Skip to content

Commit 9a66710

Browse files
committed
Add histogram of production processes per track
1 parent c167813 commit 9a66710

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

include/MCStepLogger/SimpleStepAnalysis.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ class SimpleStepAnalysis : public MCAnalysis
6969
TH1I* histTrackEnergySpectrum;
7070
TH1I* histTrackPDGSpectrum;
7171
TH1I* histTrackPDGSpectrumSorted;
72-
72+
73+
/// the production processes per track
74+
TH1I* histTrackProdProcess;
75+
7376
// steps in the r-z plane
7477
TH2D* histRZ;
7578
// steps in the x-y plane

src/SimpleStepAnalysis.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ void SimpleStepAnalysis::initialize()
4949
histTrackEnergySpectrum = getHistogram<TH1I>("trackEnergySpectrum", 400, -10, 4.);
5050
histTrackPDGSpectrum = getHistogram<TH1I>("trackPDGSpectrum", 1, 2., 1.);
5151
histTrackPDGSpectrumSorted = getHistogram<TH1I>("trackPDGSpectrumSorted", 1, 2., 1.);
52-
52+
histTrackProdProcess = getHistogram<TH1I>("trackProdProcess", 1, 2., 1.);
53+
5354
// steps in the r-z plane
5455
histRZ = getHistogram<TH2D>("RZOccupancy", 200, -3000., 3000., 200, 0., 3000.);
5556
// steps in x-y plane
@@ -143,6 +144,7 @@ void SimpleStepAnalysis::analyze(const std::vector<StepInfo>* const steps, const
143144
if (newtrack) {
144145
histTrackEnergySpectrum->Fill(log10f(step.E));
145146
histTrackPDGSpectrum->Fill(pdgasstring.c_str(),1);
147+
histTrackProdProcess->Fill(step.getProdProcessAsString(),1);
146148
}
147149

148150
// record number of steps per module

0 commit comments

Comments
 (0)