![]() |
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. | |
| 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. | |
| virtual void | EndOfEventAction (const G4Event *) override |
| Called at end of G4 event to finalize measurements and fill hists. | |
| virtual void | UserSteppingAction (const G4Step *) override |
| Called at every particle step to accumulate thickness. | |
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. | |
| 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 | |
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. | |
| bool | m_doHistos |
| double | m_etaPrimary |
| Cached eta of the current primary. | |
| double | m_phiPrimary |
| Cached phi of the current primary. | |
| std::map< std::string, std::pair< double, double > > | m_detThickMap |
| Map of detector thickness measurements for current event. | |
| TProfile2D * | m_rzProfRL |
| Rad-length profile hist in R-Z. | |
| std::map< std::string, TProfile * > | m_etaMapRL |
| Rad-length profile hist in eta. | |
| std::map< std::string, TProfile * > | m_phiMapRL |
| Rad-length profile hist in phi. | |
| TProfile2D * | m_rzProfIL |
| Int-length profile hist in R-Z. | |
| std::map< std::string, TProfile * > | m_etaMapIL |
| Int-length profile hist in eta. | |
| std::map< std::string, TProfile * > | m_phiMapIL |
| Int-length profile hist in phi. | |
| 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 39 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 101 of file LengthIntegrator.cxx.
|
delete |
|
private |
Definition at line 511 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 174 of file LengthIntegrator.cxx.
|
overridevirtual |
Called at end of G4 event to finalize measurements and fill hists.
Definition at line 198 of file LengthIntegrator.cxx.
|
private |
Definition at line 386 of file LengthIntegrator.cxx.
|
private |
Definition at line 230 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 484 of file LengthIntegrator.cxx.
|
private |
Definition at line 368 of file LengthIntegrator.cxx.
|
delete |
|
private |
Setup one set of measurement hists for a detector name.
Definition at line 525 of file LengthIntegrator.cxx.
|
overridevirtual |
Called at every particle step to accumulate thickness.
Definition at line 418 of file LengthIntegrator.cxx.
|
private |
Definition at line 93 of file LengthIntegrator.h.
|
private |
Definition at line 97 of file LengthIntegrator.h.
|
private |
Definition at line 83 of file LengthIntegrator.h.
|
private |
Definition at line 84 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 81 of file LengthIntegrator.h.
|
private |
Definition at line 94 of file LengthIntegrator.h.
|
private |
Definition at line 88 of file LengthIntegrator.h.
|
private |
Definition at line 89 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 95 of file LengthIntegrator.h.
|
private |
Definition at line 98 of file LengthIntegrator.h.
|
private |
Definition at line 80 of file LengthIntegrator.h.
|
private |
Map of detector thickness measurements for current event.
Definition at line 129 of file LengthIntegrator.h.
|
private |
Definition at line 121 of file LengthIntegrator.h.
|
private |
Int-length profile hist in eta.
Definition at line 143 of file LengthIntegrator.h.
|
private |
Rad-length profile hist in eta.
Definition at line 134 of file LengthIntegrator.h.
|
private |
Cached eta of the current primary.
Definition at line 124 of file LengthIntegrator.h.
|
private |
Definition at line 64 of file LengthIntegrator.h.
|
private |
Definition at line 71 of file LengthIntegrator.h.
|
private |
Definition at line 70 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 73 of file LengthIntegrator.h.
|
private |
Handle to the histogram service.
Definition at line 118 of file LengthIntegrator.h.
|
private |
Int-length profile hist in phi.
Definition at line 145 of file LengthIntegrator.h.
|
private |
Rad-length profile hist in phi.
Definition at line 136 of file LengthIntegrator.h.
|
private |
Cached phi of the current primary.
Definition at line 126 of file LengthIntegrator.h.
|
private |
Definition at line 151 of file LengthIntegrator.h.
|
private |
Definition at line 148 of file LengthIntegrator.h.
|
private |
Int-length profile hist in R-Z.
Definition at line 141 of file LengthIntegrator.h.
|
private |
Rad-length profile hist in R-Z.
Definition at line 132 of file LengthIntegrator.h.
|
private |
Definition at line 100 of file LengthIntegrator.h.
|
private |
Definition at line 101 of file LengthIntegrator.h.
|
private |
Definition at line 78 of file LengthIntegrator.h.
|
private |
Definition at line 77 of file LengthIntegrator.h.
|
private |
Definition at line 67 of file LengthIntegrator.h.
|
private |
Definition at line 152 of file LengthIntegrator.h.
|
private |
Definition at line 149 of file LengthIntegrator.h.