|
ATLAS Offline Software
|
This code is used to get an Epos Monte Carlo event.
More...
#include <Epos.h>
|
| Epos (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~Epos ()=default |
|
virtual StatusCode | genInitialize () |
| For initializing the generator, if required. 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...
|
|
virtual StatusCode | fillEvt (HepMC::GenEvent *evt) |
| 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 |
|
|
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...
|
|
ServiceHandle< IAthRNGSvc > | m_rndmSvc {this, "RndmSvc", "AthRNGSvc"} |
| Data members. More...
|
|
ServiceHandle< IIncidentSvc > | m_incidentSvc {this, "IncidentSvc", "IncidentSvc"} |
| Handle on the incident service. 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 |
|
This code is used to get an Epos Monte Carlo event.
genInitialize() is used to read parameters callGenerator() makes the event genFinalize() writes log files etc fillEvt(GeneratorEvent* evt) passes the event to HepMC
The output will be stored in the transient event store so it can be passed to the simulation.
- Author
- Sami Kama Adapted from Ian Hinchliffe's code
Definition at line 28 of file Epos.h.
◆ StoreGateSvc_t
◆ Epos()
Epos::Epos |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Definition at line 60 of file Epos.cxx.
64 epos_rndm_stream =
"EPOS_INIT";
◆ ~Epos()
◆ 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()
StatusCode Epos::callGenerator |
( |
| ) |
|
|
virtual |
For calling the generator on each iteration of the event loop.
Reimplemented from GenModule.
Definition at line 124 of file Epos.cxx.
130 const EventContext& ctx = Gaudi::Hive::currentContext();
132 p_rndmEngine->setSeeds(seeds, 0);
135 const long *
s = p_rndmEngine->getSeeds();
144 double impactParameter = -1.0;
150 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);
◆ 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()
◆ 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 Epos::fillEvt |
( |
HepMC::GenEvent * |
evt | ) |
|
|
virtual |
For filling the HepMC event object.
We use the old approach for HepMC2, as the CRMC 2.0.1 has a bug that prevents us from using the same approach as for HepMC3. This should be changed once the bug is fixed.
Implements GenModule.
Definition at line 183 of file Epos.cxx.
185 CRMChepevt<HepMC::GenParticlePtr, HepMC::GenVertexPtr, HepMC::FourVector, HepMC::GenEvent> hepevtconverter;
187 hepevtconverter.convert(*
evt);
191 evt->weights().push_back(1.0);
192 m_runinfo = std::make_shared<HepMC3::GenRunInfo>();
193 std::vector<std::string>
names = {
"Default"};
194 m_runinfo->set_weight_names(
names);
195 evt->set_run_info(m_runinfo);
198 hepevtconverter.convert();
201 for (
auto&
v: hepevtconverter.vertices())
evt->add_vertex(
v);
202 if (hepevtconverter.beams().size() == 2)
evt->set_beam_particles(hepevtconverter.beams()[0],hepevtconverter.beams()[1]);
203 if (hepevtconverter.beams().size() == 1)
evt->set_beam_particles(hepevtconverter.beams()[0],
nullptr);
206 evt->weights().push_back(1.0);
210 std::vector<HepMC::GenParticlePtr> beams;
213 if (
p->status() == 4) {
218 if (beams.size() >= 2) {
219 evt->set_beam_particles(beams[0], beams[1]);
221 ATH_MSG_INFO(
"EPOS event has only " << beams.size() <<
" beam particles" );
227 HepMC::GenHeavyIonPtr ion= std::make_shared<HepMC::GenHeavyIon>();
228 ion->Ncoll_hard=cevt_.kohevt;
229 ion->Npart_proj=cevt_.npjevt;
230 ion->Npart_targ=cevt_.ntgevt;
231 ion->Ncoll=cevt_.kolevt;
232 ion->spectator_neutrons=cevt_.npnevt + cevt_.ntnevt;
233 ion->spectator_protons=cevt_.nppevt + cevt_.ntpevt;
234 ion->N_Nwounded_collisions=-1;
235 ion->Nwounded_N_collisions=-1;
236 ion->Nwounded_Nwounded_collisions=-1;
237 ion->impact_parameter= cevt_.bimevt;
238 ion->event_plane_angle=cevt_.phievt;
239 ion->eccentricity=-1;
240 ion->sigma_inel_NN=1e9*hadr5_.sigine;
242 HepMC::HeavyIon ion(cevt_.kohevt,
246 cevt_.npnevt + cevt_.ntnevt,
247 cevt_.nppevt + cevt_.ntpevt,
257 evt->set_heavy_ion(ion);
262 switch (
int(c2evt_.typevt))
264 case 1: sig_id = 101;
break;
265 case -1: sig_id = 101;
break;
266 case 2: sig_id = 105;
break;
267 case -2: sig_id = 105;
break;
268 case 3: sig_id = 102;
break;
269 case -3: sig_id = 102;
break;
270 case 4: sig_id = 103;
break;
271 case -4: sig_id = 104;
break;
272 default:
ATH_MSG_INFO(
"Signal ID not recognised for setting HEPEVT \n");
277 double xsigtot, xsigine, xsigela, xsigdd, xsigsd, xsloela, xsigtotaa, xsigineaa, xsigelaaa;
278 xsigtot = xsigine = xsigela = xsigdd = xsigsd = xsloela = xsigtotaa = xsigineaa = xsigelaaa = 0.0;
279 crmc_xsection_f_(xsigtot, xsigine, xsigela, xsigdd, xsigsd, xsloela, xsigtotaa, xsigineaa, xsigelaaa);
282 std::shared_ptr<HepMC3::GenCrossSection>
xsec = std::make_shared<HepMC3::GenCrossSection>();
283 xsec->set_cross_section(xsigine, 0.0);
285 HepMC::GenCrossSection
xsec;
286 xsec.set_cross_section(xsigine, 0.0);
290 return StatusCode::SUCCESS;
◆ finalize()
StatusCode GenModule::finalize |
( |
| ) |
|
|
inlineinherited |
◆ genFinalize()
StatusCode Epos::genFinalize |
( |
| ) |
|
|
virtual |
For finalising the generator, if required.
Reimplemented from GenModule.
Definition at line 154 of file Epos.cxx.
158 std::cout <<
"MetaData: generator = Epos " << std::endl;
161 double xsigtot, xsigine, xsigela, xsigdd, xsigsd, xsloela, xsigtotaa, xsigineaa, xsigelaaa;
162 xsigtot = xsigine = xsigela = xsigdd = xsigsd = xsloela = xsigtotaa = xsigineaa = xsigelaaa = 0.0;
164 crmc_xsection_f_(xsigtot, xsigine, xsigela, xsigdd, xsigsd, xsloela, xsigtotaa, xsigineaa, xsigelaaa);
167 std::cout <<
"MetaData: cross-section (nb) = " << xsigtot << std::endl;
169 std::cout <<
"MetaData: cross-section inelastic (cut + projectile diffraction)[nb] = " << xsigine << std::endl;
171 std::cout <<
"MetaData: cross-section elastic (includes target diffraction)[nb] = " << xsigela << std::endl;
173 std::cout <<
"MetaData: cross-section dd (nb) = " << xsigdd << std::endl;
175 std::cout <<
"MetaData: cross-section sd (nb) = " << xsigsd << std::endl;
179 return StatusCode::SUCCESS;
◆ genInitialize()
StatusCode Epos::genInitialize |
( |
| ) |
|
|
virtual |
For initializing the generator, if required.
Reimplemented from GenModule.
Definition at line 100 of file Epos.cxx.
103 ATH_MSG_INFO(
"signal_rocess_id 101-ND, 105-DD, 102-CD, 103 AB->XB, 104 AB->AX \n");
106 const long *sip = p_rndmEngine->getSeeds();
107 long int si1 = sip[0];
109 int iSeed = si1%1000000000;
116 epos_rndm_stream =
"EPOS";
120 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; }
◆ 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()
◆ 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()
◆ kMaxParticles
const size_t Epos::kMaxParticles {10000} |
|
inlinestaticprotected |
◆ m_beamMomentum
double Epos::m_beamMomentum |
|
protected |
◆ m_degymx
◆ m_detStore
◆ m_dsid
IntegerProperty Epos::m_dsid {this, "Dsid", 999999} |
|
protected |
◆ m_events
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_ievent
◆ m_ilheout
◆ 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_interface
CRMCinterface* Epos::m_interface |
|
protected |
◆ m_iout
◆ 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_itab
◆ m_lheout
std::string Epos::m_lheout |
|
protected |
◆ 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_model
◆ m_nEvents
◆ m_paramFile
std::string Epos::m_paramFile |
|
protected |
◆ m_partEnergy
std::vector<double> Epos::m_partEnergy |
|
protected |
◆ m_partID
std::vector<int> Epos::m_partID |
|
protected |
◆ m_partMass
std::vector<double> Epos::m_partMass |
|
protected |
◆ m_partPx
std::vector<double> Epos::m_partPx |
|
protected |
◆ m_partPy
std::vector<double> Epos::m_partPy |
|
protected |
◆ m_partPz
std::vector<double> Epos::m_partPz |
|
protected |
◆ m_partStat
std::vector<int> Epos::m_partStat |
|
protected |
◆ 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_primaryParticle
int Epos::m_primaryParticle |
|
protected |
◆ 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_seeds
std::vector<long int> Epos::m_seeds |
|
protected |
◆ m_targetMomentum
double Epos::m_targetMomentum |
|
protected |
◆ m_targetParticle
int Epos::m_targetParticle |
|
protected |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
std::vector< double > m_partPy
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
std::vector< int > m_partID
const_pointer_type cptr()
Dereference the pointer.
std::vector< long int > m_seeds
virtual StatusCode fillEvt(HepMC::GenEvent *evt)=0
For filling the HepMC event object.
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
void GeVToMeV(HepMC::GenEvent *evt)
Scale event energies/momenta by x 1000.
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< double > m_partMass
CRMCinterface * m_interface
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)
void crmc_set_f_(int &nEvents, double &beamMomentum, double &targetMomentum, int &primaryParticle, int &targetParticle)
const std::string & key() const
Return the StoreGate ID for the referenced object.
void fillBarcodesAttribute(GenEvent *)
void crmc_f_(int &iout, int &ievent, int &nParticles, double &impactParam, int &partPdg, double &partPx, double &partPy, double &partPz, double &partEnergy, double &partMass, int &outstat)
static const size_t kMaxParticles
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, const EventContext &ctx) const
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
std::vector< double > m_partPx
virtual StatusCode genuserInitialize()
For initialization of user code, if required. Called after genInitialize.
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.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::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.
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)
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
void crmc_xsection_f_(double &xsigtot, double &xsigine, double &xsigela, double &xsigdd, double &xsigsd, double &xsloela, double &xsigtotaa, double &xsigineaa, double &xsigelaaa)
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
A wrapper class for event-slot-local random engines.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
IntegerProperty m_randomSeed
Seed for random number engine.
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.
void crmc_init_f_(double &m_degymx, int &iSeed, int &model, int &itab, int &itypout, const char *paramFile, const char *output, int &lout)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
void calculateSeedsMC21(long *seeds, const std::string &algName, uint64_t ev, uint64_t run, uint64_t offset=0)
Set the random seed using a string (e.g.
std::vector< double > m_partEnergy
std::vector< double > m_partPz
std::vector< int > m_partStat
void set_signal_process_id(GenEvent *e, const int i)
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
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
CLHEP::HepRandomEngine * getRandomEngineDuringInitialize(const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const
void set_random_states(GenEvent *e, std::vector< T > a)