ATLAS Offline Software
|
A user action used to evaluate thickness of all detectors traversed by outgoing particles. More...
#include <LengthIntegrator.h>
Public Member Functions | |
LengthIntegrator (const std::string &histSvcName, bool doHistos) | |
Constructor takes the name of the histogram service as argument. More... | |
LengthIntegrator (const LengthIntegrator &)=delete | |
LengthIntegrator & | operator= (const LengthIntegrator &)=delete |
virtual void | BeginOfEventAction (const G4Event *) override |
Called at beginning of G4 event to cache some details about the current primary vertex and particle. More... | |
virtual void | EndOfEventAction (const G4Event *) override |
Called at end of G4 event to finalize measurements and fill hists. More... | |
virtual void | UserSteppingAction (const G4Step *) override |
Called at every particle step to accumulate thickness. More... | |
Private Member Functions | |
void | fillNtuple () |
std::string | getMaterialClassification (const std::string &name) |
std::string | getVolumeType (const std::string &s) |
void | addToDetThickMap (const std::string &, double, double) |
void | regAndFillHist (const std::string &, const std::pair< double, double > &) |
Setup one set of measurement hists for a detector name. More... | |
TProfile2D * | getOrCreateProfile (const std::string ®Name, const TString &histoname, const TString &xtitle, int nbinsx, float xmin, float xmax, const TString &ytitle, int nbinsy, float ymin, float ymax, const TString &ztitle) |
this method checks if a histo is on THsvc already and caches a local pointer to it if the histo is not present, it creates and registers it More... | |
Private Attributes | |
G4Pow * | m_g4pow |
TTree * | m_tree |
int | m_genNPart = 0 |
float | m_genEta = 0.0F |
float | m_genPhi = 0.0F |
float | m_genZ = 0.0F |
float | m_genR = 0.0F |
float | m_total_X0 = 0.0F |
float | m_total_L0 = 0.0F |
std::vector< double > | m_collected_X0 |
std::vector< double > | m_collected_L0 |
std::vector< float > | m_collected_hitr |
std::vector< float > | m_collected_hitx |
std::vector< float > | m_collected_hity |
std::vector< float > | m_collected_hitz |
std::vector< float > | m_collected_outhitr |
std::vector< float > | m_collected_outhitx |
std::vector< float > | m_collected_outhity |
std::vector< float > | m_collected_outhitz |
std::vector< float > | m_collected_density |
std::vector< std::string > | m_collected_material |
std::vector< std::string > | m_collected_volume |
std::vector< std::string > | m_collected_groupedmaterial |
std::vector< std::string > | m_collected_volumetype |
bool | m_splitModerator |
bool | m_splitPP1 |
ServiceHandle< ITHistSvc > | m_hSvc |
Handle to the histogram service. More... | |
bool | m_doHistos |
double | m_etaPrimary |
Cached eta of the current primary. More... | |
double | m_phiPrimary |
Cached phi of the current primary. More... | |
std::map< std::string, std::pair< double, double > > | m_detThickMap |
Map of detector thickness measurements for current event. More... | |
TProfile2D * | m_rzProfRL |
Rad-length profile hist in R-Z. More... | |
std::map< std::string, TProfile * > | m_etaMapRL |
Rad-length profile hist in eta. More... | |
std::map< std::string, TProfile * > | m_phiMapRL |
Rad-length profile hist in phi. More... | |
TProfile2D * | m_rzProfIL |
Int-length profile hist in R-Z. More... | |
std::map< std::string, TProfile * > | m_etaMapIL |
Int-length profile hist in eta. More... | |
std::map< std::string, TProfile * > | m_phiMapIL |
Int-length profile hist in phi. More... | |
std::map< std::string, TProfile2D *, std::less< std::string > > | m_rzMapRL |
std::map< std::string, TProfile2D *, std::less< std::string > > | m_xyMapRL |
std::map< std::string, TProfile2D *, std::less< std::string > > | m_rzMapIL |
std::map< std::string, TProfile2D *, std::less< std::string > > | m_xyMapIL |
A user action used to evaluate thickness of all detectors traversed by outgoing particles.
This user action is currently used only in special runs with geantinos. Thickness is recorded in terms of both rad length and int length.
NOTE: the current design is safe for multi-threading, but not performant due to sharing of the histograms and excessive locking. If this action needs to be used in multi-threaded jobs, we can rewrite it so that each instance has its own copy of the histograms which get merged in finalization of the LengthIntegratorTool.
Definition at line 41 of file LengthIntegrator.h.
G4UA::LengthIntegrator::LengthIntegrator | ( | const std::string & | histSvcName, |
bool | doHistos = false |
||
) |
Constructor takes the name of the histogram service as argument.
Definition at line 100 of file LengthIntegrator.cxx.
|
delete |
|
private |
Definition at line 516 of file LengthIntegrator.cxx.
|
overridevirtual |
Called at beginning of G4 event to cache some details about the current primary vertex and particle.
Also resets some measurements.
Definition at line 173 of file LengthIntegrator.cxx.
|
overridevirtual |
Called at end of G4 event to finalize measurements and fill hists.
Definition at line 197 of file LengthIntegrator.cxx.
|
private |
Definition at line 391 of file LengthIntegrator.cxx.
|
private |
Definition at line 229 of file LengthIntegrator.cxx.
|
private |
this method checks if a histo is on THsvc already and caches a local pointer to it if the histo is not present, it creates and registers it
note that this should be called from a section protected by a mutex, since it talks to the THitSvc
Definition at line 489 of file LengthIntegrator.cxx.
|
private |
Definition at line 373 of file LengthIntegrator.cxx.
|
delete |
|
private |
Setup one set of measurement hists for a detector name.
Definition at line 530 of file LengthIntegrator.cxx.
|
overridevirtual |
Called at every particle step to accumulate thickness.
Definition at line 423 of file LengthIntegrator.cxx.
|
private |
Definition at line 95 of file LengthIntegrator.h.
|
private |
Definition at line 99 of file LengthIntegrator.h.
|
private |
Definition at line 85 of file LengthIntegrator.h.
|
private |
Definition at line 86 of file LengthIntegrator.h.
|
private |
Definition at line 87 of file LengthIntegrator.h.
|
private |
Definition at line 88 of file LengthIntegrator.h.
|
private |
Definition at line 83 of file LengthIntegrator.h.
|
private |
Definition at line 96 of file LengthIntegrator.h.
|
private |
Definition at line 90 of file LengthIntegrator.h.
|
private |
Definition at line 91 of file LengthIntegrator.h.
|
private |
Definition at line 92 of file LengthIntegrator.h.
|
private |
Definition at line 93 of file LengthIntegrator.h.
|
private |
Definition at line 97 of file LengthIntegrator.h.
|
private |
Definition at line 100 of file LengthIntegrator.h.
|
private |
Definition at line 82 of file LengthIntegrator.h.
|
private |
Map of detector thickness measurements for current event.
Definition at line 131 of file LengthIntegrator.h.
|
private |
Definition at line 123 of file LengthIntegrator.h.
|
private |
Int-length profile hist in eta.
Definition at line 145 of file LengthIntegrator.h.
|
private |
Rad-length profile hist in eta.
Definition at line 136 of file LengthIntegrator.h.
|
private |
Cached eta of the current primary.
Definition at line 126 of file LengthIntegrator.h.
|
private |
Definition at line 66 of file LengthIntegrator.h.
|
private |
Definition at line 73 of file LengthIntegrator.h.
|
private |
Definition at line 72 of file LengthIntegrator.h.
|
private |
Definition at line 74 of file LengthIntegrator.h.
|
private |
Definition at line 76 of file LengthIntegrator.h.
|
private |
Definition at line 75 of file LengthIntegrator.h.
|
private |
Handle to the histogram service.
Definition at line 120 of file LengthIntegrator.h.
|
private |
Int-length profile hist in phi.
Definition at line 147 of file LengthIntegrator.h.
|
private |
Rad-length profile hist in phi.
Definition at line 138 of file LengthIntegrator.h.
|
private |
Cached phi of the current primary.
Definition at line 128 of file LengthIntegrator.h.
|
private |
Definition at line 153 of file LengthIntegrator.h.
|
private |
Definition at line 150 of file LengthIntegrator.h.
|
private |
Int-length profile hist in R-Z.
Definition at line 143 of file LengthIntegrator.h.
|
private |
Rad-length profile hist in R-Z.
Definition at line 134 of file LengthIntegrator.h.
|
private |
Definition at line 102 of file LengthIntegrator.h.
|
private |
Definition at line 103 of file LengthIntegrator.h.
|
private |
Definition at line 80 of file LengthIntegrator.h.
|
private |
Definition at line 79 of file LengthIntegrator.h.
|
private |
Definition at line 69 of file LengthIntegrator.h.
|
private |
Definition at line 154 of file LengthIntegrator.h.
|
private |
Definition at line 151 of file LengthIntegrator.h.