![]() |
ATLAS Offline Software
|
Cosmic generator. More...
#include <CosmicGenerator.h>
Public Member Functions | |
| CosmicGenerator (const std::string &name, ISvcLocator *pSvcLocator) | |
| virtual | ~CosmicGenerator ()=default |
| virtual StatusCode | genInitialize () |
| For initializing the generator, if required. | |
| virtual StatusCode | callGenerator () |
| For calling the generator on each iteration of the event loop. | |
| virtual StatusCode | genFinalize () |
| For finalising the generator, if required. | |
| virtual StatusCode | fillEvt (HepMC::GenEvent *evt) |
| For filling the HepMC event object. | |
| CLHEP::HepLorentzVector | generateVertex (void) |
| CLHEP::HepLorentzVector | generateVertexReweighted (void) |
| virtual StatusCode | sysInitialize () override |
| Override sysInitialize. | |
| virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. | |
| ServiceHandle< StoreGateSvc > & | evtStore () |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. | |
| const ServiceHandle< StoreGateSvc > & | detStore () const |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. | |
| virtual StatusCode | sysStart () override |
| Handle START transition. | |
| virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. | |
| virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. | |
| Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
| void | updateVHKA (Gaudi::Details::PropertyBase &) |
| MsgStream & | msg () const |
| bool | msgLvl (const MSG::Level lvl) const |
Event loop algorithm methods: not to be overloaded | |
| StatusCode | initialize () |
| StatusCode | execute () |
| StatusCode | finalize () |
Gen-specific event loop methods: to be overloaded | |
| virtual StatusCode | genuserInitialize () |
| For initialization of user code, if required. Called after genInitialize. | |
Event collection accessors (const and non-const) | |
| HepMC::GenEvent *event | ATLAS_NOT_CONST_THREAD_SAFE () |
| Access the current signal event (first in the McEventCollection) | |
| McEventCollection *events | ATLAS_NOT_CONST_THREAD_SAFE () |
| Access the current event's McEventCollection. | |
| const HepMC::GenEvent * | event_const () const |
| Access the current signal event (const) | |
| const McEventCollection * | events_const () const |
| Access the current event's McEventCollection (const) | |
| const McEventCollection * | events_const (const EventContext &ctx) const |
Particle data accessors | |
| const ServiceHandle< IPartPropSvc > | partPropSvc () const |
| Access the particle property service. | |
| const HepPDT::ParticleDataTable & | particleTable () const |
| Get a particle data table. | |
| const HepPDT::ParticleDataTable & | pdt () const |
| Shorter alias to get a particle data table. | |
| const HepPDT::ParticleData * | particleData (int pid) const |
| Access an element in the particle data table. | |
Static Public Attributes | |
| static CLHEP::HepRandomEngine * | COSMIC_RANDOM_ENGINE {} |
| Static pointer to random number generator for use by. | |
Protected Member Functions | |
| void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution | |
| std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > | renounce (T &h) |
| void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
| Add StoreName to extra input/output deps as needed. | |
Protected Attributes | |
Properties | |
| std::string | m_mcEventKey {} |
| StoreGate key for the MC event collection (defaults to GEN_EVENT) | |
| BooleanProperty | m_mkMcEvent {this, "MakeMcEvent", false, "Create a new MC event collection if it doesn't exist"} |
| Flag to determine if a new MC event collection should be made if it doesn't exist. | |
Private Types | |
| typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
Private Member Functions | |
| bool | exzCut (const CLHEP::Hep3Vector &pos, const CLHEP::HepLorentzVector &p) |
| double | pathLengthInRock (double xgen, double ygen, double zgen, double theta, double phi) |
| bool | pointsAtPixels (double xgen, double ygen, double zgen, double theta, double phi) |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> | |
Private Attributes | |
| int | m_events {0} |
| int | m_rejected {0} |
| int | m_accepted {0} |
| std::vector< int > | m_pdgCode |
| IntegerProperty | m_dsid {this, "Dsid", 999999, "Dataset ID number"} |
| FloatProperty | m_emin {this, "emin", 10.*m_GeV} |
| FloatProperty | m_emax {this, "emax", 100.*m_GeV} |
| FloatProperty | m_ctcut {this, "ctcut", 0.35} |
| FloatProperty | m_xlow {this, "xvert_low", 0.*m_mm} |
| FloatProperty | m_xhig {this, "xvert_hig", 10.*m_mm} |
| FloatProperty | m_zlow {this, "zvert_low", 0.*m_mm} |
| FloatProperty | m_zhig {this, "zvert_hig", 10.*m_mm} |
| FloatProperty | m_yval {this, "yvert_val", 81.*m_mm} |
| FloatProperty | m_IPx {this, "IPx", 0.f} |
| FloatProperty | m_IPy {this, "IPy", 0.f} |
| FloatProperty | m_IPz {this, "IPz", 0.f} |
| FloatProperty | m_radius {this, "Radius", 0.f} |
| FloatProperty | m_zpos {this, "Zposition", 14500.f} |
| FloatProperty | m_tmin {this, "tmin", 0.f} |
| FloatProperty | m_tmax {this, "tmax", 0.f} |
| BooleanProperty | m_cavOpt {this, "OptimizeForCavern", false} |
| IntegerProperty | m_srOneOpt {this, "OptimizeForSR1", 0} |
| BooleanProperty | m_srOnePixECOpt {this, "OptimizeForSR1PixelEndCap", false} |
| BooleanProperty | m_swapYZAxis {this, "SwapYZAxis", false} |
| BooleanProperty | m_muonECOpt {this, "OptimizeForMuonEndCap", false} |
| IntegerProperty | m_printEvent {this, "PrintEvent", 10} |
| IntegerProperty | m_printMod {this, "PrintMod", 100} |
| FloatProperty | m_thetamin {this, "ThetaMin", 0.f} |
| FloatProperty | m_thetamax {this, "ThetaMax", 1.f} |
| FloatProperty | m_phimin {this, "PhiMin", -1.*M_PI} |
| FloatProperty | m_phimax {this, "PhiMax", M_PI} |
| bool | m_readfile {false} |
| StringProperty | m_infile {this, "eventfile", "NONE"} |
| std::ifstream | m_ffile |
| std::vector< CLHEP::HepLorentzVector > | m_fourPos |
| std::vector< CLHEP::HepLorentzVector > | m_fourMom |
| CLHEP::Hep3Vector | m_center |
| std::vector< HepMC::Polarization > | m_polarization |
| BooleanProperty | m_exzCut {this, "ExzCut", false} |
| FloatProperty | m_rmax {this, "RMax", 10000000.f} |
| BooleanProperty | m_doPathlengthCut {this, "doPathLengthCut", false} |
| BooleanProperty | m_doAimedAtPixelsCut {this, "doAimedAtPixelsCut", false} |
| BooleanProperty | m_doReweighting {this, "doReweighting", false} |
| DoubleProperty | m_energyCutThreshold {this, "energyCutThreshold", 1.0} |
| DoubleProperty | m_ysurface {this, "ysurface", 81.*m_mm} |
| DoubleProperty | m_rvertmax {this, "rvert_max", 300.*m_mm} |
| DoubleProperty | m_pixelplanemaxx {this, "pixelplane_maxx", 1150.} |
| DoubleProperty | m_pixelplanemaxz {this, "pixelplane_maxz", 1650.} |
| DataObjIDColl | m_extendedExtraObjects |
| StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) | |
| StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) | |
| std::vector< SG::VarHandleKeyArray * > | m_vhka |
| bool | m_varHandleArraysDeclared |
Static Private Attributes | |
| static constexpr float | m_GeV = 1000.f |
| static constexpr float | m_mm = 10.f |
Features for derived classes to use internally | |
| ServiceHandle< IAthRNGSvc > | m_rndmSvc {this, "RndmSvc", "AthRNGSvc"} |
| Data members. | |
| ServiceHandle< IIncidentSvc > | m_incidentSvc {this, "IncidentSvc", "IncidentSvc"} |
| Handle on the incident service. | |
| IntegerProperty | m_randomSeed {this, "RandomSeed", 1234567, "Random seed for the built-in random engine"} |
| Seed for random number engine. | |
| BooleanProperty | m_isAfterburner {this, "IsAfterburner", false, "Set true if generator modifies existing events rather than creating new ones"} |
| Flag for normal vs. afterburner generators. | |
| CLHEP::HepRandomEngine * | getRandomEngine (const std::string &streamName, const EventContext &ctx) const |
| CLHEP::HepRandomEngine * | getRandomEngine (const std::string &streamName, unsigned long int randomSeedOffset, const EventContext &ctx) const |
| CLHEP::HepRandomEngine * | getRandomEngineDuringInitialize (const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const |
Utility event-mangling functions | |
| ServiceHandle< IPartPropSvc > | m_ppSvc {this, "PartPropSvc", "PartPropSvc"} |
| Handle on the particle property service. | |
| SG::ReadHandleKey< McEventCollection > | m_mcevents_const { this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" } |
| Const handle to the MC event collection. | |
| void | GeVToMeV (HepMC::GenEvent *evt) |
| Scale event energies/momenta by x 1000. | |
| void | MeVToGeV (HepMC::GenEvent *evt) |
| Scale event energies/momenta by x 1/1000. | |
| void | cmTomm (HepMC::GenEvent *evt) |
| Scale event lengths by x 10. | |
| void | mmTocm (HepMC::GenEvent *evt) |
| Scale event lengths by x 1/10. | |
Cosmic generator.
The output will be stored in the transient event store so it can be passed to the simulation.
Modification for increasing efficiency of muon hitting the detector: H. Ma. March 17, 2006 Property: ExzCut:
if true, the method exzCut(...) will be called to apply a energy dependent position cut on the surface. This rejects low energy muons at large distance. Property: RMax Used by exzCut to reject non-projective muons, which are too far out on the surface
Modifications to accomodate Pixel EndCap C Cosmic Test needs Marian Zdrazil June 7, 2006 mzdra.nosp@m.zil@.nosp@m.lbl.g.nosp@m.ov
Modifications to accomodate replacement of Pixel EndCap C by a Pixel EndCap A Marian Zdrazil November 24, 2006 mzdra.nosp@m.zil@.nosp@m.lbl.g.nosp@m.ov
It is easier and actually more useful to leave the EndCap A in the vertical position (the way it is positioned in the ATLAS detector) instead of rotating it clockwise by 90deg which corresponds to the placement during the Pixel EndCap A cosmic test in SR1 in November 2006. This is why we will generate cosmic muons coming from the positive Z-axis direction better than rotating the whole setup in PixelGeoModel.
Modifications July 3rd 2007, Rob McPherson
Optimize selection of events passed to Geant4 for full simulation:
Definition at line 75 of file CosmicGenerator.h.
|
privateinherited |
Definition at line 388 of file AthCommonDataStore.h.
| CosmicGenerator::CosmicGenerator | ( | const std::string & | name, |
| ISvcLocator * | pSvcLocator ) |
Definition at line 80 of file CosmicGenerator.cxx.
|
virtualdefault |
|
inlineinherited |
Access the current signal event (first in the McEventCollection)
Definition at line 76 of file GenBase.h.
|
inherited |
Access the current event's McEventCollection.
|
virtual |
For calling the generator on each iteration of the event loop.
Reimplemented from GenModule.
Definition at line 214 of file CosmicGenerator.cxx.
|
protectedinherited |
Scale event lengths by x 10.
Definition at line 78 of file GenBase.cxx.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 145 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 95 of file AthCommonDataStore.h.
|
inlineinherited |
Access the current signal event (const)
Definition at line 83 of file GenBase.h.
|
inlineinherited |
Access the current event's McEventCollection (const)
|
inlineinherited |
Definition at line 99 of file GenBase.h.
|
inlineinherited |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 85 of file AthCommonDataStore.h.
|
virtualinherited |
Reimplemented from GenBase.
Definition at line 70 of file GenModule.cxx.
|
protectedinherited |
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
|
private |
Definition at line 662 of file CosmicGenerator.cxx.
|
virtual |
For filling the HepMC event object.
Implements GenModule.
Definition at line 622 of file CosmicGenerator.cxx.
|
inlineinherited |
Definition at line 55 of file GenModule.h.
| CLHEP::HepLorentzVector CosmicGenerator::generateVertex | ( | void | ) |
Definition at line 132 of file CosmicGenerator.cxx.
| CLHEP::HepLorentzVector CosmicGenerator::generateVertexReweighted | ( | void | ) |
Definition at line 158 of file CosmicGenerator.cxx.
|
virtual |
For finalising the generator, if required.
Reimplemented from GenModule.
Definition at line 554 of file CosmicGenerator.cxx.
|
virtual |
For initializing the generator, if required.
Reimplemented from GenModule.
Definition at line 88 of file CosmicGenerator.cxx.
|
inlinevirtualinherited |
For initialization of user code, if required. Called after genInitialize.
Reimplemented in Pythia8B_i.
Definition at line 64 of file GenModule.h.
|
protectedinherited |
Definition at line 34 of file GenModule.cxx.
|
protectedinherited |
Definition at line 44 of file GenModule.cxx.
|
protectedinherited |
Definition at line 53 of file GenModule.cxx.
|
protectedinherited |
Scale event energies/momenta by x 1000.
Definition at line 58 of file GenBase.cxx.
|
virtualinherited |
Reimplemented from GenBase.
Definition at line 21 of file GenModule.cxx.
|
overridevirtualinherited |
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
|
protectedinherited |
Scale event energies/momenta by x 1/1000.
Definition at line 68 of file GenBase.cxx.
|
protectedinherited |
Scale event lengths by x 1/10.
Definition at line 87 of file GenBase.cxx.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
overridevirtualinherited |
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
|
inlineinherited |
Access an element in the particle data table.
Definition at line 126 of file GenBase.h.
|
inlineinherited |
Get a particle data table.
Definition at line 118 of file GenBase.h.
|
inlineinherited |
|
private |
Definition at line 694 of file CosmicGenerator.cxx.
|
inlineinherited |
Shorter alias to get a particle data table.
Definition at line 123 of file GenBase.h.
|
private |
Definition at line 775 of file CosmicGenerator.cxx.
|
inlineprotectedinherited |
Definition at line 380 of file AthCommonDataStore.h.
|
inlineprotectedinherited |
remove all handles from I/O resolution
Definition at line 364 of file AthCommonDataStore.h.
|
overridevirtualinherited |
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.
Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.
Definition at line 66 of file AthAlgorithm.cxx.
|
overridevirtualinherited |
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
|
inlineinherited |
Definition at line 308 of file AthCommonDataStore.h.
|
static |
Static pointer to random number generator for use by.
Definition at line 73 of file CosmicGenerator.h.
|
private |
Definition at line 103 of file CosmicGenerator.h.
|
private |
Definition at line 122 of file CosmicGenerator.h.
|
private |
Definition at line 142 of file CosmicGenerator.h.
|
private |
Definition at line 109 of file CosmicGenerator.h.
|
privateinherited |
Pointer to StoreGate (detector store by default)
Definition at line 393 of file AthCommonDataStore.h.
|
private |
Definition at line 160 of file CosmicGenerator.h.
|
private |
Definition at line 159 of file CosmicGenerator.h.
|
private |
Definition at line 161 of file CosmicGenerator.h.
|
private |
Definition at line 106 of file CosmicGenerator.h.
|
private |
Definition at line 108 of file CosmicGenerator.h.
|
private |
Definition at line 107 of file CosmicGenerator.h.
|
private |
Definition at line 162 of file CosmicGenerator.h.
|
private |
Definition at line 101 of file CosmicGenerator.h.
|
privateinherited |
Pointer to StoreGate (event store by default)
Definition at line 390 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 79 of file AthAlgorithm.h.
|
private |
Definition at line 149 of file CosmicGenerator.h.
|
private |
Definition at line 137 of file CosmicGenerator.h.
|
private |
Definition at line 141 of file CosmicGenerator.h.
|
private |
Definition at line 140 of file CosmicGenerator.h.
|
staticconstexprprivate |
Definition at line 97 of file CosmicGenerator.h.
|
privateinherited |
Handle on the incident service.
Definition at line 101 of file GenModule.h.
|
private |
Definition at line 136 of file CosmicGenerator.h.
|
private |
Definition at line 115 of file CosmicGenerator.h.
|
private |
Definition at line 116 of file CosmicGenerator.h.
|
private |
Definition at line 117 of file CosmicGenerator.h.
|
protectedinherited |
Flag for normal vs. afterburner generators.
Definition at line 87 of file GenModule.h.
|
protectedinherited |
|
privateinherited |
|
staticconstexprprivate |
Definition at line 98 of file CosmicGenerator.h.
|
private |
Definition at line 126 of file CosmicGenerator.h.
|
private |
Definition at line 104 of file CosmicGenerator.h.
|
private |
Definition at line 133 of file CosmicGenerator.h.
|
private |
Definition at line 132 of file CosmicGenerator.h.
|
private |
Definition at line 165 of file CosmicGenerator.h.
|
private |
Definition at line 166 of file CosmicGenerator.h.
|
private |
Definition at line 143 of file CosmicGenerator.h.
|
privateinherited |
|
private |
Definition at line 127 of file CosmicGenerator.h.
|
private |
Definition at line 128 of file CosmicGenerator.h.
|
private |
Definition at line 118 of file CosmicGenerator.h.
|
protectedinherited |
Seed for random number engine.
Definition at line 84 of file GenModule.h.
|
private |
Definition at line 135 of file CosmicGenerator.h.
|
private |
Definition at line 102 of file CosmicGenerator.h.
|
private |
Definition at line 151 of file CosmicGenerator.h.
|
privateinherited |
|
private |
Definition at line 164 of file CosmicGenerator.h.
|
private |
Definition at line 123 of file CosmicGenerator.h.
|
private |
Definition at line 124 of file CosmicGenerator.h.
|
private |
Definition at line 125 of file CosmicGenerator.h.
|
private |
Definition at line 131 of file CosmicGenerator.h.
|
private |
Definition at line 130 of file CosmicGenerator.h.
|
private |
Definition at line 121 of file CosmicGenerator.h.
|
private |
Definition at line 120 of file CosmicGenerator.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.
|
private |
Definition at line 111 of file CosmicGenerator.h.
|
private |
Definition at line 110 of file CosmicGenerator.h.
|
private |
Definition at line 163 of file CosmicGenerator.h.
|
private |
Definition at line 114 of file CosmicGenerator.h.
|
private |
Definition at line 113 of file CosmicGenerator.h.
|
private |
Definition at line 112 of file CosmicGenerator.h.
|
private |
Definition at line 119 of file CosmicGenerator.h.