ATLAS Offline Software
Loading...
Searching...
No Matches
StepHistogram.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef G4DEBUGGINGTOOLS_StepHistogram_H
6#define G4DEBUGGINGTOOLS_StepHistogram_H
7
8
9
10
11
12//G4
13#include "G4UserEventAction.hh"
14#include "G4UserSteppingAction.hh"
15#include "G4UserRunAction.hh"
16#include "G4String.hh"
17
18//Athena
21//C++
22#include <map>
23
24
25class TH1;
26
27namespace G4UA{
28
30 public G4UserEventAction,
31 public G4UserRunAction,
32 public G4UserSteppingAction
33 {
34 public:
36 virtual void UserSteppingAction(const G4Step*) override;
37
38 // maps to hold info per volume/process/material per particle type
39 typedef std::map<G4String, TH1*> HistoMap_t;
40 typedef std::map<G4String, HistoMap_t> HistoMapMap_t;
41
43 struct Report
44 {
45 // distributions per volume per particle type
57
58 // distributions per material per particle type
70
71 // distributions per process per particle type
83
84 // all atlas
91
92 // 2D maps
98
99 // rather complicated function that merges two maps
100 void mergeMaps(HistoMapMap_t &selfMap, const HistoMapMap_t& refMap);
101
102 // function needed by ActionToolBaseReport base class
103 void merge(const Report & rep);
104 };
105
106 // configurable properties
107 struct Config
108 {
109 bool do2DHistograms = false;
111 };
112
114 StepHistogram(const Config&);
115
116 const Report& getReport() const { return m_report; }
117
118 private:
119 // report
121
124
125 // initialize and fill histogram in a map
126 void InitializeFillHistogram2D(HistoMapMap_t &hMapMap, const char* suffix,
127 const G4String& pdgId, const G4String& vol,
128 int nbinsx, double xmin, double xmax,
129 int nbinsy, double ymin, double ymax,
130 double valuex, double valuey, double weight);
131
132 void InitializeFillHistogram(HistoMapMap_t &hMapMap, const char* suffix,
133 const G4String& pdgId, const G4String& vol,
134 int nbins, double xmin, double xmax, double value, double weight);
135
136 void InitializeFillHistogram(HistoMapMap_t &hMapMap, const char* suffix,
137 const G4String& pdgId, const G4String& vol,
138 int nbins, double *edges, double value, double weight);
139
144 int m_trackID = 0;
145
146 }; // class StepHistogram
147
148} // namespace G4UA
149
150#endif // G4DEBUGGINGTOOLS_StepHistogram_H
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
std::map< G4String, HistoMap_t > HistoMapMap_t
void InitializeFillHistogram2D(HistoMapMap_t &hMapMap, const char *suffix, const G4String &pdgId, const G4String &vol, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, double valuex, double valuey, double weight)
StepHistogram(const Config &)
ctor
std::map< G4String, TH1 * > HistoMap_t
Config m_config
configuration data
virtual void UserSteppingAction(const G4Step *) override
the hooks for G4 UA handling
const Report & getReport() const
void InitializeFillHistogram(HistoMapMap_t &hMapMap, const char *suffix, const G4String &pdgId, const G4String &vol, int nbins, double xmin, double xmax, double value, double weight)
double xmax
Definition listroot.cxx:61
double ymin
Definition listroot.cxx:63
double xmin
Definition listroot.cxx:60
double ymax
Definition listroot.cxx:64
Definition merge.py:1
this holds all the data from individual threads that needs to be merged at EoR
HistoMapMap_t histoMapMap_mat_stepKineticEnergy
HistoMapMap_t histoMapMap_vol_postStepKineticEnergy
HistoMapMap_t histoMapMap_vol_InitialE
HistoMapMap_t histoMapMap_prc_postStepKineticEnergy
HistoMapMap_t histoMapMap2D_vol_RZ
HistoMapMap_t histoMapMap_stepKinetic
HistoMapMap_t histoMapMap_prc_InitialE
HistoMapMap_t histoMapMap_prc_trackLengthPerInitialE
HistoMapMap_t histoMapMap_prc_stepEnergyDeposit
HistoMapMap_t histoMapMap_vol_stepEnergyDeposit
HistoMapMap_t histoMapMap_prc_stepSecondaryKinetic
HistoMapMap_t histoMapMap_vol_stepSecondaryKinetic
HistoMapMap_t histoMapMap_mat_InitialE
HistoMapMap_t histoMapMap_vol_stepKineticEnergy
HistoMapMap_t histoMapMap_vol_numberOfStepsPerInitialE
HistoMapMap_t histoMapMap_vol_numberOfSteps
HistoMapMap_t histoMapMap_prc_stepSize
HistoMapMap_t histoMapMap_numberOfStepsPerInitialE
HistoMapMap_t histoMapMap_vol_stepEnergyNonIonDeposit
HistoMapMap_t histoMapMap_prc_numberOfStepsPerInitialE
HistoMapMap_t histoMapMap_prc_stepEnergyNonIonDeposit
HistoMapMap_t histoMapMap_vol_stepSize
HistoMapMap_t histoMapMap_mat_stepSecondaryKinetic
HistoMapMap_t histoMapMap_InitialE
void mergeMaps(HistoMapMap_t &selfMap, const HistoMapMap_t &refMap)
HistoMapMap_t histoMapMap2D_vol_RZ_E
HistoMapMap_t histoMapMap_mat_stepSize
HistoMapMap_t histoMapMap_vol_trackLengthPerInitialE
HistoMapMap_t histoMapMap_mat_stepEnergyNonIonDeposit
HistoMapMap_t histoMapMap2D_mat_RZ_E
HistoMapMap_t histoMapMap_mat_numberOfSteps
HistoMapMap_t histoMapMap_numberOfSteps
HistoMapMap_t histoMapMap_trackLengthPerInitialE
HistoMapMap_t histoMapMap_mat_stepPseudorapidity
HistoMapMap_t histoMapMap2D_mat_RZ
HistoMapMap_t histoMapMap_prc_stepKineticEnergy
HistoMapMap_t histoMapMap_mat_postStepKineticEnergy
HistoMapMap_t histoMapMap_vol_stepPseudorapidity
HistoMapMap_t histoMapMap_mat_stepEnergyDeposit
HistoMapMap_t histoMapMap2D_prc_RZ
HistoMapMap_t histoMapMap_mat_numberOfStepsPerInitialE
HistoMapMap_t histoMapMap_prc_numberOfSteps
HistoMapMap_t histoMapMap_postStepKinetic
HistoMapMap_t histoMapMap_mat_trackLengthPerInitialE
HistoMapMap_t histoMapMap_prc_stepPseudorapidity