|
ATLAS Offline Software
|
#include <ParticleDecayer.h>
|
| ParticleDecayer (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~ParticleDecayer ()=default |
|
StatusCode | genInitialize () |
| For initializing the generator, if required. More...
|
|
StatusCode | fillEvt (HepMC::GenEvent *) |
| For filling the HepMC event object. More...
|
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
double | getParticleMass (int pdgID) |
|
void | addParticle (HepMC::GenVertexPtr, int pdg, HepMC::FourVector, int statusCode) |
|
double | rnd_ExpLifetime (CLHEP::HepRandomEngine *engine, double ct) |
|
double | rnd_DoubleRange (CLHEP::HepRandomEngine *engine, double a, double b) |
|
double | cosgen (CLHEP::HepRandomEngine *engine, int itype) |
|
StatusCode | DFTwoBodyDecay (CLHEP::HepRandomEngine *engine, HepMC::GenParticlePtr, int) |
|
StatusCode | setDecayPosition (CLHEP::HepRandomEngine *engine, HepMC::GenParticlePtr, HepMC::GenEvent *, bool doScalarDecay=false) |
|
StatusCode | changeMass (HepMC::GenParticlePtr, double) |
|
StatusCode | getDecayProducts (CLHEP::HepRandomEngine *engine, CLHEP::HepLorentzVector, double, std::vector< CLHEP::HepLorentzVector > &, int decayType=0) |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
virtual StatusCode | genuserInitialize () |
| For initialization of user code, if required. Called after genInitialize. More...
|
|
virtual StatusCode | callGenerator () |
| For calling the generator on each iteration of the event loop. More...
|
|
virtual StatusCode | genFinalize () |
| For finalising the generator, if required. More...
|
|
|
ServiceHandle< IAthRNGSvc > | m_rndmSvc {this, "RndmSvc", "AthRNGSvc"} |
| Data members. More...
|
|
ServiceHandle< IIncidentSvc > | m_incidentSvc {this, "IncidentSvc", "IncidentSvc"} |
| Handle on the incident service. More...
|
|
IntegerProperty | m_randomSeed {this, "RandomSeed", 1234567, "Random seed for the built-in random engine"} |
| Seed for random number engine. More...
|
|
BooleanProperty | m_isAfterburner {this, "IsAfterburner", false, "Set true if generator modifies existing events rather than creating new ones"} |
| Flag for normal vs. afterburner generators. More...
|
|
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 |
|
Definition at line 26 of file ParticleDecayer.h.
◆ StoreGateSvc_t
◆ ParticleDecayer()
ParticleDecayer::ParticleDecayer |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~ParticleDecayer()
ParticleDecayer::~ParticleDecayer |
( |
| ) |
|
|
default |
◆ addParticle()
void ParticleDecayer::addParticle |
( |
HepMC::GenVertexPtr |
prod_vtx, |
|
|
int |
pdg, |
|
|
HepMC::FourVector |
momentum, |
|
|
int |
statusCode |
|
) |
| |
|
private |
◆ ATLAS_NOT_CONST_THREAD_SAFE() [1/2]
HepMC::GenEvent* event GenBase::ATLAS_NOT_CONST_THREAD_SAFE |
( |
| ) |
|
|
inlineinherited |
Access the current signal event (first in the McEventCollection)
- Note
- This function will make a new McEventCollection if there is not already a valid one and MakeMcEvent=True.
Definition at line 76 of file GenBase.h.
78 ATH_MSG_ERROR(
"McEventCollection is empty during first event access");
79 return *(
events()->begin());
◆ ATLAS_NOT_CONST_THREAD_SAFE() [2/2]
◆ callGenerator()
virtual StatusCode GenModule::callGenerator |
( |
| ) |
|
|
inlinevirtualinherited |
For calling the generator on each iteration of the event loop.
Reimplemented in Hijing, Herwig7, CosmicGenerator, Pythia8_i, Hydjet, BeamHaloGeneratorAlg, Starlight_i, Epos, MultiParticleGunPileup, MultiPy8Pileup, TrackRecordGenerator, Pythia8B_i, and Sherpa_i.
Definition at line 66 of file GenModule.h.
66 {
return StatusCode::SUCCESS; }
◆ changeMass()
Definition at line 94 of file ParticleDecayer.cxx.
100 double p2 =
e*
e - newMass*newMass;
102 ATH_MSG_FATAL(
"ParticleDecayer::fillEvt: -- you have generated a tachyon!");
103 return StatusCode::FAILURE;
106 double p = std::sqrt(
p2);
111 const CLHEP::HepLorentzVector updatedLV(
px,
py,
pz,
e);
112 genpart->set_momentum(HepMC::FourVector(updatedLV.x(),updatedLV.y(),updatedLV.z(),updatedLV.e()));
113 genpart->set_generated_mass(newMass);
114 return StatusCode::SUCCESS;
◆ cmTomm()
void GenBase::cmTomm |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event lengths by x 10.
Definition at line 78 of file GenBase.cxx.
79 for (HepMC::GenEvent::vertex_iterator vtx =
evt->vertices_begin(); vtx !=
evt->vertices_end(); ++vtx) {
80 const HepMC::FourVector fv((*vtx)->position().x() * 10,
81 (*vtx)->position().y() * 10,
82 (*vtx)->position().z() * 10,
83 (*vtx)->position().t() * 10);
84 (*vtx)->set_position(fv);
◆ cosgen()
double ParticleDecayer::cosgen |
( |
CLHEP::HepRandomEngine * |
engine, |
|
|
int |
itype |
|
) |
| |
|
private |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ DFTwoBodyDecay()
StatusCode ParticleDecayer::DFTwoBodyDecay |
( |
CLHEP::HepRandomEngine * |
engine, |
|
|
HepMC::GenParticlePtr |
genpart, |
|
|
int |
Polarization |
|
) |
| |
|
private |
Definition at line 470 of file ParticleDecayer.cxx.
473 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- allow the two-body decay of the dark photon...");
476 CLHEP::HepLorentzVector boostDF(
genpart->momentum().px(),
genpart->momentum().py(),
genpart->momentum().pz(),
genpart->momentum().e() );
488 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- decayMode = " << ModeOfDecay);
496 if(Polarization==0) {
498 }
else if(Polarization==-1 && (ModeOfDecay==11 || ModeOfDecay==13)) {
500 }
else if(Polarization==1 && (ModeOfDecay==11 || ModeOfDecay==13)) {
502 }
else if(Polarization==-1 && ModeOfDecay==211) {
504 }
else if(Polarization==1 && ModeOfDecay==211) {
507 ATH_MSG_FATAL(
"ParticleDecayer::fillEvt: -- wrong polarization value... please check!");
508 return StatusCode::FAILURE;
512 std::vector<CLHEP::HepLorentzVector> daughterLVs;
516 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- Add the daughters to the pool file");
517 auto end_vtx =
genpart->end_vertex();
518 auto v0=daughterLVs.at(0).vect();
519 addParticle(end_vtx, ModeOfDecay, HepMC::FourVector(
v0.x(),
v0.y(),
v0.z(),0.0), 1);
520 auto v1=daughterLVs.at(1).vect();
521 addParticle(end_vtx, -ModeOfDecay, HepMC::FourVector(v1.x(),v1.y(),v1.z(),0.0), 1);
523 return StatusCode::SUCCESS;
◆ event_const()
const HepMC::GenEvent* GenBase::event_const |
( |
| ) |
const |
|
inlineinherited |
Access the current signal event (const)
Definition at line 83 of file GenBase.h.
85 ATH_MSG_ERROR(
"Const McEventCollection is empty during first event access");
◆ events_const() [1/2]
◆ events_const() [2/2]
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode GenModule::execute |
( |
| ) |
|
|
virtualinherited |
- Todo:
- Remove hard-coded alg name checking (already incomplete)
Reimplemented from GenBase.
Definition at line 70 of file GenModule.cxx.
105 if (
name() ==
"ParticleDecayer") {
112 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
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.
57 return Algorithm::extraOutputDeps();
◆ fillEvt()
StatusCode ParticleDecayer::fillEvt |
( |
HepMC::GenEvent * |
evt | ) |
|
|
virtual |
For filling the HepMC event object.
*** Now allow the two-body decay of the particle
*** Now allow the two-body decay of the scalar
Implements GenModule.
Definition at line 290 of file ParticleDecayer.cxx.
294 const EventContext& ctx = Gaudi::Hive::currentContext();
295 CLHEP::HepRandomEngine* engine = this->
getRandomEngine(
"ParticleDecayer", ctx);
302 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- Found an McEventCollection for ParticleDecayer");
305 status = StatusCode::FAILURE;
309 event = mcEvtColl->
back();
312 ATH_MSG_FATAL(
"ParticleDecayer::fillEvt: -- McEvent was not successfully created");
313 status = StatusCode::FAILURE;
324 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- only one dark photon per LeptonJet");
325 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- found MC particle with PDG ID = " <<
genpart->pdg_id());
340 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- set the new status = 2");
344 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- set the new momentum");
356 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- two dark photons per LeptonJet");
357 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- found MC particle with PDG ID = " <<
genpart->pdg_id());
370 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- set the new status = 2");
378 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- allow the two-body decay of the dark scalar to dark photons...");
381 std::vector<CLHEP::HepLorentzVector> darkPhotonLVs;
387 auto v0=darkPhotonLVs.at(0).vect();
390 auto v1=darkPhotonLVs.at(1).vect();
394 int polarizationSwitch = 1;
396 auto pItBegin =
genpart->end_vertex()->particles_out().end();
397 auto pItEnd =
genpart->end_vertex()->particles_out().end();
399 HepMC::GenVertex::particles_out_const_iterator pItBegin =
genpart->end_vertex()->particles_out_const_begin();
400 HepMC::GenVertex::particles_out_const_iterator pItEnd =
genpart->end_vertex()->particles_out_const_end();
402 for (
auto pIt=pItBegin ; pIt != pItEnd; ++pIt )
407 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- Now allow the two-body decay of the dark photons");
411 polarizationSwitch = -polarizationSwitch;
420 return StatusCode::FAILURE;
428 if (
event->weights().empty()) {
429 event->weights().push_back(1.);
◆ finalize()
StatusCode GenModule::finalize |
( |
| ) |
|
|
inlineinherited |
◆ genFinalize()
virtual StatusCode GenModule::genFinalize |
( |
| ) |
|
|
inlinevirtualinherited |
For finalising the generator, if required.
Reimplemented in Hijing, Herwig7, CosmicGenerator, Pythia8_i, Hydjet, Starlight_i, Epos, BeamHaloGeneratorAlg, MultiParticleGunPileup, MultiPy8Pileup, Pythia8B_i, and Sherpa_i.
Definition at line 70 of file GenModule.h.
70 {
return StatusCode::SUCCESS; }
◆ genInitialize()
StatusCode ParticleDecayer::genInitialize |
( |
| ) |
|
|
virtual |
For initializing the generator, if required.
Reimplemented from GenModule.
Definition at line 257 of file ParticleDecayer.cxx.
262 ATH_MSG_FATAL(
"Cannot configure exponential and uniform decay at the same time.");
263 return StatusCode::FAILURE;
267 if (TOTBR>1.0000001) {
268 ATH_MSG_FATAL(
"ParticleDecayer::genInitialize: -- Branching Ratio sum is larger than 1!! Please check the values in your jobOption.");
272 ATH_MSG_FATAL(
"ParticleDecayer::genInitialize: -- Total Branching Ratio " << TOTBR);
273 return StatusCode::FAILURE;
282 return StatusCode::FAILURE;
286 return StatusCode::SUCCESS;
◆ genuserInitialize()
virtual StatusCode GenModule::genuserInitialize |
( |
| ) |
|
|
inlinevirtualinherited |
For initialization of user code, if required. Called after genInitialize.
Reimplemented in Pythia8B_i.
Definition at line 64 of file GenModule.h.
64 {
return StatusCode::SUCCESS; }
◆ getDecayProducts()
StatusCode ParticleDecayer::getDecayProducts |
( |
CLHEP::HepRandomEngine * |
engine, |
|
|
CLHEP::HepLorentzVector |
parentLV, |
|
|
double |
decayPartMass, |
|
|
std::vector< CLHEP::HepLorentzVector > & |
daughterLVs, |
|
|
int |
decayType = 0 |
|
) |
| |
|
private |
Definition at line 527 of file ParticleDecayer.cxx.
532 double parentMass = parentLV.m();
533 CLHEP::Hep3Vector boostVec = parentLV.boostVector();
535 if( decayPartMass > parentMass/2.)
537 ATH_MSG_FATAL(
"Decay particle has more than half the mass of parent.");
538 return StatusCode::FAILURE;
542 double ct_rf =
cosgen(engine, decayType);
543 double theta_rf = std::acos(ct_rf);
546 double p1_rf = std::sqrt(parentMass*parentMass/4. - decayPartMass*decayPartMass);
549 double pz_rf = p1_rf*ct_rf;
550 CLHEP::HepLorentzVector hlv1( px_rf, py_rf, pz_rf, parentMass/2.);
551 CLHEP::HepLorentzVector hlv2( -px_rf, -py_rf, -pz_rf, parentMass/2.);
554 hlv1.rotateUz((parentLV.vect()).unit());
555 hlv2.rotateUz((parentLV.vect()).unit());
558 hlv1.boost(boostVec);
559 hlv2.boost(boostVec);
561 daughterLVs.push_back(hlv1);
562 daughterLVs.push_back(hlv2);
564 return StatusCode::SUCCESS;
◆ getParticleMass()
double ParticleDecayer::getParticleMass |
( |
int |
pdgID | ) |
|
|
private |
Definition at line 459 of file ParticleDecayer.cxx.
460 SmartIF<IPartPropSvc>
partPropSvc(Gaudi::svcLocator()->service(
"PartPropSvc"));
461 if (!
partPropSvc)
throw GaudiException(
"PartPropSvc error",
"I_ParticleDecayer", StatusCode::FAILURE);
◆ getRandomEngine() [1/2]
CLHEP::HepRandomEngine * GenModule::getRandomEngine |
( |
const std::string & |
streamName, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
protectedinherited |
◆ getRandomEngine() [2/2]
CLHEP::HepRandomEngine * GenModule::getRandomEngine |
( |
const std::string & |
streamName, |
|
|
unsigned long int |
randomSeedOffset, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
protectedinherited |
◆ getRandomEngineDuringInitialize()
CLHEP::HepRandomEngine * GenModule::getRandomEngineDuringInitialize |
( |
const std::string & |
streamName, |
|
|
unsigned long int |
randomSeedOffset, |
|
|
unsigned int |
conditionsRun = 1 , |
|
|
unsigned int |
lbn = 1 |
|
) |
| const |
|
protectedinherited |
Definition at line 53 of file GenModule.cxx.
58 ctx.setEventID (EventIDBase (conditionsRun,
59 EventIDBase::UNDEFEVT,
60 EventIDBase::UNDEFNUM,
61 EventIDBase::UNDEFNUM,
◆ GeVToMeV()
void GenBase::GeVToMeV |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event energies/momenta by x 1000.
- Todo:
- Add HepMC units awareness and do it differently when HepMC provides this functionality directly (and reference-based FourVector accessors)
Definition at line 58 of file GenBase.cxx.
59 for (HepMC::GenEvent::particle_iterator
p =
evt->particles_begin();
p !=
evt->particles_end(); ++
p) {
60 const HepMC::FourVector fv((*p)->momentum().px() * 1000,
61 (*p)->momentum().py() * 1000,
62 (*p)->momentum().pz() * 1000,
63 (*p)->momentum().e() * 1000);
64 (*p)->set_momentum(fv);
65 (*p)->set_generated_mass(1000 * (*p)->generated_mass());
◆ initialize()
StatusCode GenModule::initialize |
( |
| ) |
|
|
virtualinherited |
◆ inputHandles()
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.
◆ MeVToGeV()
void GenBase::MeVToGeV |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event energies/momenta by x 1/1000.
Definition at line 68 of file GenBase.cxx.
69 for (HepMC::GenEvent::particle_iterator
p =
evt->particles_begin();
p !=
evt->particles_end(); ++
p) {
70 const HepMC::FourVector fv((*p)->momentum().px() / 1000,
71 (*p)->momentum().py() / 1000,
72 (*p)->momentum().pz() / 1000,
73 (*p)->momentum().e() / 1000);
74 (*p)->set_momentum(fv);
75 (*p)->set_generated_mass((*p)->generated_mass() / 1000);
◆ mmTocm()
void GenBase::mmTocm |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event lengths by x 1/10.
Definition at line 87 of file GenBase.cxx.
88 for (HepMC::GenEvent::vertex_iterator vtx =
evt->vertices_begin(); vtx !=
evt->vertices_end(); ++vtx) {
89 const HepMC::FourVector fv((*vtx)->position().x() / 10,
90 (*vtx)->position().y() / 10,
91 (*vtx)->position().z() / 10,
92 (*vtx)->position().t() / 10);
93 (*vtx)->set_position(fv);
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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.
◆ particleData()
const HepPDT::ParticleData* GenBase::particleData |
( |
int |
pid | ) |
const |
|
inlineinherited |
Access an element in the particle data table.
Definition at line 126 of file GenBase.h.
◆ particleTable()
const HepPDT::ParticleDataTable& GenBase::particleTable |
( |
| ) |
const |
|
inlineinherited |
Get a particle data table.
Definition at line 118 of file GenBase.h.
◆ partPropSvc()
Access the particle property service.
Definition at line 113 of file GenBase.h.
◆ pdt()
const HepPDT::ParticleDataTable& GenBase::pdt |
( |
| ) |
const |
|
inlineinherited |
Shorter alias to get a particle data table.
Definition at line 123 of file GenBase.h.
◆ renounce()
◆ renounceArray()
◆ rnd_DoubleRange()
double ParticleDecayer::rnd_DoubleRange |
( |
CLHEP::HepRandomEngine * |
engine, |
|
|
double |
a, |
|
|
double |
b |
|
) |
| |
|
private |
◆ rnd_ExpLifetime()
double ParticleDecayer::rnd_ExpLifetime |
( |
CLHEP::HepRandomEngine * |
engine, |
|
|
double |
ct |
|
) |
| |
|
private |
◆ setDecayPosition()
StatusCode ParticleDecayer::setDecayPosition |
( |
CLHEP::HepRandomEngine * |
engine, |
|
|
HepMC::GenParticlePtr |
genpart, |
|
|
HepMC::GenEvent * |
event, |
|
|
bool |
doScalarDecay = false |
|
) |
| |
|
private |
Definition at line 118 of file ParticleDecayer.cxx.
122 ATH_MSG_FATAL(
"ParticleDecayer::fillEvt: -- no production vertex position found!");
123 return StatusCode::FAILURE;
128 end_vtx->set_position(vtxp->position());
129 end_vtx->add_particle_in(
genpart);
130 event->add_vertex(end_vtx);
131 return StatusCode::SUCCESS;
153 double distanceToEdge = -999.;
165 return StatusCode::FAILURE;
185 double decayRadius = -999.;
200 ATH_MSG_FATAL(
"have to pick uniform or exponential decay distance");
201 return StatusCode::FAILURE;
210 const CLHEP::HepLorentzVector posLV(((ctg*
px/
p)+(vtxp->position().x())), ((ctg*
py/
p)+(vtxp->position().y())), ((ctg*
pz/
p)+(vtxp->position().z())), ((ctg)+(vtxp->position().t())));
214 ATH_MSG_DEBUG(
"ParticleDecayer::fillEvt: -- set the decay vertex");
216 end_vtx->set_position(HepMC::FourVector(posLV.x(),posLV.y(),posLV.z(),posLV.t()));
217 end_vtx->add_particle_in(
genpart);
218 event->add_vertex(end_vtx);
219 return StatusCode::SUCCESS;
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_barrelRadius
double ParticleDecayer::m_barrelRadius |
|
private |
◆ m_boostLV
CLHEP::HepLorentzVector ParticleDecayer::m_boostLV |
|
private |
◆ m_BRElectron
double ParticleDecayer::m_BRElectron {} |
|
private |
◆ m_BRMuon
double ParticleDecayer::m_BRMuon {} |
|
private |
◆ m_BRPion
double ParticleDecayer::m_BRPion {} |
|
private |
◆ m_detStore
◆ m_doExponentialDecay
bool ParticleDecayer::m_doExponentialDecay {} |
|
private |
◆ m_doUniformDecay
bool ParticleDecayer::m_doUniformDecay {} |
|
private |
◆ m_endCapDistance
double ParticleDecayer::m_endCapDistance |
|
private |
◆ m_eventCounter
int ParticleDecayer::m_eventCounter |
|
private |
◆ m_evtStore
◆ m_expDecayDoTruncateLongDecays
bool ParticleDecayer::m_expDecayDoTruncateLongDecays {} |
|
private |
◆ m_expDecayDoVariableLifetime
bool ParticleDecayer::m_expDecayDoVariableLifetime {} |
|
private |
◆ m_expDecayFractionToKeep
double ParticleDecayer::m_expDecayFractionToKeep {} |
|
private |
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_incidentSvc
ServiceHandle<IIncidentSvc> GenModule::m_incidentSvc {this, "IncidentSvc", "IncidentSvc"} |
|
privateinherited |
Handle on the incident service.
Definition at line 101 of file GenModule.h.
◆ m_isAfterburner
BooleanProperty GenModule::m_isAfterburner {this, "IsAfterburner", false, "Set true if generator modifies existing events rather than creating new ones"} |
|
protectedinherited |
Flag for normal vs. afterburner generators.
Definition at line 87 of file GenModule.h.
◆ m_LJType
int ParticleDecayer::m_LJType {} |
|
private |
◆ m_mcEventKey
std::string GenBase::m_mcEventKey {} |
|
protectedinherited |
StoreGate key for the MC event collection (defaults to GEN_EVENT)
Definition at line 137 of file GenBase.h.
◆ m_mcevents_const
Const handle to the MC event collection.
Definition at line 163 of file GenBase.h.
◆ m_mkMcEvent
BooleanProperty GenBase::m_mkMcEvent {this, "MakeMcEvent", false, "Create a new MC event collection if it doesn't exist"} |
|
protectedinherited |
Flag to determine if a new MC event collection should be made if it doesn't exist.
Definition at line 139 of file GenBase.h.
◆ m_oppositePolarization
bool ParticleDecayer::m_oppositePolarization {} |
|
private |
◆ m_particleID
int ParticleDecayer::m_particleID {} |
|
private |
◆ m_particleLifeTime
double ParticleDecayer::m_particleLifeTime {} |
|
private |
◆ m_particleMass
double ParticleDecayer::m_particleMass {} |
|
private |
◆ m_particlePDGID
int ParticleDecayer::m_particlePDGID {} |
|
private |
◆ m_particlePolarization
int ParticleDecayer::m_particlePolarization {} |
|
private |
◆ m_particleTable
HepPDT::ParticleDataTable* ParticleDecayer::m_particleTable {} |
|
private |
◆ m_posLV
CLHEP::HepLorentzVector ParticleDecayer::m_posLV |
|
private |
◆ m_posLV1
CLHEP::HepLorentzVector ParticleDecayer::m_posLV1 |
|
private |
◆ m_posLV2
CLHEP::HepLorentzVector ParticleDecayer::m_posLV2 |
|
private |
◆ m_ppSvc
ServiceHandle<IPartPropSvc> GenBase::m_ppSvc {this, "PartPropSvc", "PartPropSvc"} |
|
privateinherited |
Handle on the particle property service.
Definition at line 160 of file GenBase.h.
◆ m_randomSeed
IntegerProperty GenModule::m_randomSeed {this, "RandomSeed", 1234567, "Random seed for the built-in random engine"} |
|
protectedinherited |
Seed for random number engine.
Definition at line 84 of file GenModule.h.
◆ m_rndmSvc
◆ m_scalarMass
double ParticleDecayer::m_scalarMass {} |
|
private |
◆ m_scalarPDGID
int ParticleDecayer::m_scalarPDGID {} |
|
private |
◆ m_thetaEndCapBarrel
double ParticleDecayer::m_thetaEndCapBarrel |
|
private |
◆ m_truthParticleContainerName
std::string ParticleDecayer::m_truthParticleContainerName |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
HepMC::GenVertex * GenVertexPtr
def retrieve(aClass, aKey=None)
int m_particlePolarization
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
StatusCode DFTwoBodyDecay(CLHEP::HepRandomEngine *engine, HepMC::GenParticlePtr, int)
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
HepPDT::ParticleDataTable * m_particleTable
Scalar phi() const
phi method
const_pointer_type cptr()
Dereference the pointer.
virtual StatusCode fillEvt(HepMC::GenEvent *evt)=0
For filling the HepMC event object.
std::string m_truthParticleContainerName
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StatusCode getDecayProducts(CLHEP::HepRandomEngine *engine, CLHEP::HepLorentzVector, double, std::vector< CLHEP::HepLorentzVector > &, int decayType=0)
Scalar theta() const
theta method
GenParticle * GenParticlePtr
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle on the incident service.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
GenEvent * newGenEvent(const int a, const int b)
const std::string & key() const
Return the StoreGate ID for the referenced object.
void addParticle(HepMC::GenVertexPtr, int pdg, HepMC::FourVector, int statusCode)
void fillBarcodesAttribute(GenEvent *)
bool m_expDecayDoTruncateLongDecays
bool m_oppositePolarization
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, const EventContext &ctx) const
virtual void setOwner(IDataHandleHolder *o)=0
double m_thetaEndCapBarrel
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
StatusCode setDecayPosition(CLHEP::HepRandomEngine *engine, HepMC::GenParticlePtr, HepMC::GenEvent *, bool doScalarDecay=false)
virtual StatusCode genuserInitialize()
For initialization of user code, if required. Called after genInitialize.
bool m_expDecayDoVariableLifetime
double m_particleLifeTime
ServiceHandle< IAthRNGSvc > m_rndmSvc
Data members.
ServiceHandle< IPartPropSvc > m_ppSvc
Handle on the particle property service.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode genInitialize()
For initializing the generator, if required.
virtual StatusCode sysInitialize() override
Override sysInitialize.
POOL::TEvent event(POOL::TEvent::kClassAccess)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
double rnd_ExpLifetime(CLHEP::HepRandomEngine *engine, double ct)
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
BooleanProperty m_isAfterburner
Flag for normal vs. afterburner generators.
double m_expDecayFractionToKeep
virtual StatusCode genFinalize()
For finalising the generator, if required.
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
const T * back() const
Access the last element in the collection as an rvalue.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual void renounce()=0
const HepPDT::ParticleDataTable & particleTable() const
Get a particle data table.
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
double cosgen(CLHEP::HepRandomEngine *engine, int itype)
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
A wrapper class for event-slot-local random engines.
const ServiceHandle< IPartPropSvc > partPropSvc() const
Access the particle property service.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
bool m_doExponentialDecay
tuple genpart
Check that the actual generators, tune, and main PDF are consistent with the JO name.
DataObjIDColl m_extendedExtraObjects
GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), int pid=0, int status=0)
#define ATH_MSG_WARNING(x)
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
double getParticleMass(int pdgID)
constexpr int pow(int base, int exp) noexcept
StatusCode changeMass(HepMC::GenParticlePtr, double)
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.
virtual StatusCode initialize() override
double rnd_DoubleRange(CLHEP::HepRandomEngine *engine, double a, double b)
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.