|
ATLAS Offline Software
|
A GenModule algorithm to produce beam halo HepMC records from input ASCII files produced with MARS or FLUKA beam background simulations.
More...
#include <BeamHaloGeneratorAlg.h>
|
| BeamHaloGeneratorAlg (const std::string &name, ISvcLocator *svcLocator) |
|
virtual | ~BeamHaloGeneratorAlg ()=default |
|
virtual StatusCode | genInitialize () |
| For initializing the generator, if required. More...
|
|
virtual StatusCode | genFinalize () |
| For finalising the generator, if required. More...
|
|
virtual StatusCode | callGenerator () |
| Read one event from the selected input and convert it into GenEvent format. More...
|
|
virtual StatusCode | fillEvt (HepMC::GenEvent *evt) |
| Fill the GenEvent pointer with the contents of the GenEvent cache. 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 |
|
|
enum | validationPlotsEnum {
PRI_R,
PRI_Z,
PRI_Z_TCT,
SP_R_ALL,
SP_E_ALL,
SP_PZ_ALL,
SP_PT_ALL,
SP_R_PROTONS,
SP_E_PROTONS,
SP_PZ_PROTONS,
SP_PT_PROTONS,
SP_R_MUONS,
SP_E_MUONS,
SP_PZ_MUONS,
SP_PT_MUONS,
NPLOTS
} |
|
typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
|
|
StringProperty | m_inputTypeStr {this, "inputType", "MARS-NM"} |
| Input file type and therefore associated beam halo generator that should be used. More...
|
|
StringProperty | m_inputFile {this, "inputFile", "bgi-b2l1.1"} |
| Input file name. More...
|
|
DoubleProperty | m_interfacePlane {this, "interfacePlane", 20850.0} |
| The position of the interface plane in mm. More...
|
|
BooleanProperty | m_enableFlip {this, "enableFlip", false} |
| Flag for flipping event. More...
|
|
FloatProperty | m_flipProbability {this, "flipProbability", 0.0} |
| Flip probability. More...
|
|
BooleanProperty | m_enableSampling {this, "enableSampling", false} |
| Flag to enable or disable sampling. More...
|
|
StringProperty | m_bufferFileName {this, "bufferFileName", "BinaryBuffer.bin"} |
| The name of the binary buffer file, needed for sampling from a converted file. More...
|
|
StringArrayProperty | m_generatorSettings {this, "generatorSettings", {}, "A set of cuts to be applied to generated particles."} |
| A vector of strings defining generator settings. More...
|
|
BooleanProperty | m_doMonitoringPlots {this, "doMonitoringPlots", false} |
| A flag to allow monitoring plots to be turned on or off. More...
|
|
ServiceHandle< ITHistSvc > | m_tHistSvc {this, "THistSvc", "THistSvc"} |
| A pointer to the THist service for validation plots. More...
|
|
StringProperty | m_randomStream {this, "randomStream", "BeamHalo"} |
| Name of the random number stream. More...
|
|
BeamHaloGenerator * | m_beamHaloGenerator {} |
| A pointer to the beam halo generator. More...
|
|
HepMC::GenEvent | m_evt {} |
| An empty GenEvent to cache the generate output between callGenerator and fillEvt. More...
|
|
TH1F * | m_validationPlots [NPLOTS] |
| An array of TH1F pointers for validation plots. More...
|
|
DataObjIDColl | m_extendedExtraObjects |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
|
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 |
|
A GenModule algorithm to produce beam halo HepMC records from input ASCII files produced with MARS or FLUKA beam background simulations.
- Author
- W. H. Bell W.Bel.nosp@m.l@ce.nosp@m.rn.ch
Definition at line 26 of file BeamHaloGeneratorAlg.h.
◆ StoreGateSvc_t
◆ validationPlotsEnum
Enumerator |
---|
PRI_R | |
PRI_Z | |
PRI_Z_TCT | |
SP_R_ALL | |
SP_E_ALL | |
SP_PZ_ALL | |
SP_PT_ALL | |
SP_R_PROTONS | |
SP_E_PROTONS | |
SP_PZ_PROTONS | |
SP_PT_PROTONS | |
SP_R_MUONS | |
SP_E_MUONS | |
SP_PZ_MUONS | |
SP_PT_MUONS | |
NPLOTS | |
Definition at line 87 of file BeamHaloGeneratorAlg.h.
◆ BeamHaloGeneratorAlg()
BeamHaloGeneratorAlg::BeamHaloGeneratorAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svcLocator |
|
) |
| |
◆ ~BeamHaloGeneratorAlg()
virtual BeamHaloGeneratorAlg::~BeamHaloGeneratorAlg |
( |
| ) |
|
|
virtualdefault |
◆ 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 BeamHaloGeneratorAlg::callGenerator |
( |
| ) |
|
|
virtual |
Read one event from the selected input and convert it into GenEvent format.
If the end of file is reached the status code returned will not be success.
Reimplemented from GenModule.
Definition at line 148 of file BeamHaloGeneratorAlg.cxx.
150 const EventContext& ctx = Gaudi::Hive::currentContext();
164 auto weightContainer =
m_evt.weights();
165 if(weightContainer.size() != 5) {
166 ATH_MSG_WARNING(
"The number of weights for this event is not equal to 5.");
167 return StatusCode::SUCCESS;
169 double weight = weightContainer[0];
170 HepMC::FourVector primaryPosition(weightContainer[1],weightContainer[2],weightContainer[3],weightContainer[4]);
177 for (
auto hepmc_part:
m_evt) {
178 auto prodVertex = hepmc_part->production_vertex();
179 if(!prodVertex)
continue;
182 values[0] = prodVertex->position().perp()/1000.;
183 values[1] = hepmc_part->momentum().e()/1000.;
184 values[2] = hepmc_part->momentum().pz()/1000.;
185 values[3] = hepmc_part->momentum().perp()/1000.;
187 pdgId = hepmc_part->pdg_id();
if(pdgId<0) pdgId = -pdgId;
198 else if(pdgId == 13) {
207 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 BeamHaloGeneratorAlg::fillEvt |
( |
HepMC::GenEvent * |
evt | ) |
|
|
virtual |
◆ finalize()
StatusCode GenModule::finalize |
( |
| ) |
|
|
inlineinherited |
◆ genFinalize()
StatusCode BeamHaloGeneratorAlg::genFinalize |
( |
| ) |
|
|
virtual |
◆ genInitialize()
StatusCode BeamHaloGeneratorAlg::genInitialize |
( |
| ) |
|
|
virtual |
For initializing the generator, if required.
- Todo:
- Use ServiceHandle system instead
Reimplemented from GenModule.
Definition at line 27 of file BeamHaloGeneratorAlg.cxx.
30 ATH_MSG_INFO(
"================ Generator Settings =================");
43 ATH_MSG_INFO(
"=====================================================");
64 const Int_t nbins_E = 60;
67 double logxmin = std::log10(
xmin);
68 double logxmax = std::log10(
xmax);
69 double binwidth = (logxmax-logxmin)/nbins_E;
70 Double_t
xbins[nbins_E+1];
72 for (Int_t
i=1;
i<=nbins_E;
i++) {
129 return StatusCode::FAILURE;
143 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()
◆ m_beamHaloGenerator
◆ m_bufferFileName
StringProperty BeamHaloGeneratorAlg::m_bufferFileName {this, "bufferFileName", "BinaryBuffer.bin"} |
|
private |
The name of the binary buffer file, needed for sampling from a converted file.
Definition at line 66 of file BeamHaloGeneratorAlg.h.
◆ m_detStore
◆ m_doMonitoringPlots
BooleanProperty BeamHaloGeneratorAlg::m_doMonitoringPlots {this, "doMonitoringPlots", false} |
|
private |
◆ m_enableFlip
BooleanProperty BeamHaloGeneratorAlg::m_enableFlip {this, "enableFlip", false} |
|
private |
◆ m_enableSampling
BooleanProperty BeamHaloGeneratorAlg::m_enableSampling {this, "enableSampling", false} |
|
private |
◆ m_evt
HepMC::GenEvent BeamHaloGeneratorAlg::m_evt {} |
|
private |
An empty GenEvent to cache the generate output between callGenerator and fillEvt.
Definition at line 85 of file BeamHaloGeneratorAlg.h.
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_flipProbability
FloatProperty BeamHaloGeneratorAlg::m_flipProbability {this, "flipProbability", 0.0} |
|
private |
◆ m_generatorSettings
StringArrayProperty BeamHaloGeneratorAlg::m_generatorSettings {this, "generatorSettings", {}, "A set of cuts to be applied to generated particles."} |
|
private |
◆ 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_inputFile
StringProperty BeamHaloGeneratorAlg::m_inputFile {this, "inputFile", "bgi-b2l1.1"} |
|
private |
◆ m_inputTypeStr
StringProperty BeamHaloGeneratorAlg::m_inputTypeStr {this, "inputType", "MARS-NM"} |
|
private |
Input file type and therefore associated beam halo generator that should be used.
Definition at line 47 of file BeamHaloGeneratorAlg.h.
◆ m_interfacePlane
DoubleProperty BeamHaloGeneratorAlg::m_interfacePlane {this, "interfacePlane", 20850.0} |
|
private |
◆ 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_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_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_randomStream
StringProperty BeamHaloGeneratorAlg::m_randomStream {this, "randomStream", "BeamHalo"} |
|
private |
◆ m_rndmSvc
◆ m_tHistSvc
ServiceHandle<ITHistSvc> BeamHaloGeneratorAlg::m_tHistSvc {this, "THistSvc", "THistSvc"} |
|
private |
◆ m_validationPlots
TH1F* BeamHaloGeneratorAlg::m_validationPlots[NPLOTS] |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
StringProperty m_inputFile
Input file name.
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
void setEnableSampling(bool enableSampling)
Turn on or off sampling from the input ASCII file.
FloatProperty m_flipProbability
Flip probability.
BooleanProperty m_enableFlip
Flag for flipping event.
BooleanProperty m_enableSampling
Flag to enable or disable sampling.
const_pointer_type cptr()
Dereference the pointer.
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.
virtual int fillEvt(HepMC::GenEvent *evt, CLHEP::HepRandomEngine *engine)=0
A function to create one event in HepMC format.
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle on the incident service.
StringProperty m_bufferFileName
The name of the binary buffer file, needed for sampling from a converted file.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
GenEvent * newGenEvent(const int a, const int b)
StringArrayProperty m_generatorSettings
A vector of strings defining generator settings.
A class to provide conversion from a MARS format ASCII input record into HepMC format,...
const std::string & key() const
Return the StoreGate ID for the referenced object.
void fillBarcodesAttribute(GenEvent *)
DoubleProperty m_interfacePlane
The position of the interface plane in mm.
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, const EventContext &ctx) const
void setDebugEnable(bool debug)
A function to turn on or off debug print out.
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
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.
BeamHaloGenerator * m_beamHaloGenerator
A pointer to the beam halo generator.
virtual StatusCode genInitialize()
For initializing the generator, if required.
A class to provide conversion from a FLUKA format ASCII input record into HepMC format,...
virtual int genFinalize()
A function to finalise the generator.
virtual StatusCode sysInitialize() override
Override sysInitialize.
StringProperty m_inputTypeStr
Input file type and therefore associated beam halo generator that should be used.
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.
TH1F * m_validationPlots[NPLOTS]
An array of TH1F pointers for validation plots.
virtual StatusCode genFinalize()
For finalising the generator, if required.
StringProperty m_randomStream
Name of the random number stream.
#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
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
A wrapper class for event-slot-local random engines.
void setFlipProbability(float flipProbability)
Set probability of flipping an event about Z=0.
void setBufferFileName(const std::string &bufferFileName)
Set the name of the binary buffer file, needed for sampling from a converted file.
ServiceHandle< ITHistSvc > m_tHistSvc
A pointer to the THist service for validation plots.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
DataObjIDColl m_extendedExtraObjects
void setEnableFlip(bool enableFlip)
Turn on or off the event flipping code.
#define ATH_MSG_WARNING(x)
virtual int genInitialize()
A function to initialise the generator.
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.
HepMC::GenEvent m_evt
An empty GenEvent to cache the generate output between callGenerator and fillEvt.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
void setInterfacePlane(double interfacePlane)
Set the position of the interface plane in mm.
BooleanProperty m_doMonitoringPlots
A flag to allow monitoring plots to be turned on or off.
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
constexpr int pow(int base, int exp) noexcept
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.