![]() |
ATLAS Offline Software
|
An abstract base class to provide generic beam halo generator functionality. More...
#include <BeamHaloGenerator.h>
Public Member Functions | |
| BeamHaloGenerator (const HepPDT::ParticleDataTable *particleTable, const std::string &inputFile, const std::vector< std::string > &generatorSettings) | |
| virtual | ~BeamHaloGenerator () |
| virtual int | genInitialize () |
| A function to initialise the generator. | |
| virtual int | genFinalize () |
| A function to finalise the generator. | |
| virtual int | fillEvt (HepMC::GenEvent *evt, CLHEP::HepRandomEngine *engine)=0 |
| A function to create one event in HepMC format. | |
| void | setInterfacePlane (double interfacePlane) |
| Set the position of the interface plane in mm. | |
| void | setEnableFlip (bool enableFlip) |
| Turn on or off the event flipping code. | |
| void | setFlipProbability (float flipProbability) |
| Set probability of flipping an event about Z=0. | |
| void | setEnableSampling (bool enableSampling) |
| Turn on or off sampling from the input ASCII file. | |
| void | setBufferFileName (const std::string &bufferFileName) |
| Set the name of the binary buffer file, needed for sampling from a converted file. | |
| void | setDebugEnable (bool debug) |
| A function to turn on or off debug print out. | |
Protected Types | |
| enum | enumGeneratorProcessIds { MARS_READ , MARS_SINGLE , MARS_SHOWER , FLUKA_READ , FLUKA_SINGLE , FLUKA_SHOWER } |
| An enum of generator process identifiers. More... | |
| enum | enumCounters { TOT_READ , TOT_AFTER , TOT_GEN , NUM_COUNTERS } |
| An enum of particle counter indices. More... | |
Protected Member Functions | |
| virtual int | readEvent (std::vector< BeamHaloParticle > *beamHaloEvent, CLHEP::HepRandomEngine *engine)=0 |
| A function to read one event in a simplified format. | |
| virtual int | readParticle (BeamHaloParticle *beamHaloParticle)=0 |
| A function to read one particle from the input ASCII file. | |
| bool | flipEvent (CLHEP::HepRandomEngine *engine) |
| A member function to check if the event should be flipped. | |
| int | convertEvent (std::vector< BeamHaloParticle > *beamHaloEvent, HepMC::GenEvent *evt, CLHEP::HepRandomEngine *engine) |
| A member function to convert a vector of beam halo particles into a GenEvent. | |
Protected Attributes | |
| const HepPDT::ParticleDataTable * | m_particleTable |
| A pointer to the particle data table. | |
| std::string | m_inputFile |
| Input file name. | |
| double | m_interfacePlane |
| The position of the interface plane in mm. | |
| bool | m_enableFlip |
| Flag for flipping event. | |
| float | m_flipProbability |
| Flip probability. | |
| bool | m_enableSampling |
| Flag to enable or disable sampling. | |
| std::string | m_bufferFileName |
| The name of the binary buffer file, needed for sampling from a converted file. | |
| BeamHaloParticleBuffer * | m_beamHaloParticleBuffer |
| Binary particle buffer for caching converted events. | |
| AsciiInput * | m_asciiInput |
| A pointer to an AsciiInput object, used to read data from the Ascii input file. | |
| BeamHaloGeneratorSettings * | m_beamHaloGeneratorSettings |
| A pointer to a BeamHaloGeneratorSettings object used to filter particles. | |
| long | m_eventNumber |
| A data member to count the event number. | |
| long | m_counters [NUM_COUNTERS] |
| Particle or event counters of dimension enumCounters. | |
| double | m_wsums [NUM_COUNTERS] |
| Sum of weights of particles or events of dimension enumCounters. | |
| bool | m_debug |
| A flat to turn on or off debug print out. | |
Private Attributes | |
| std::vector< std::string > | m_generatorSettings |
| A vector of generator settings in string command form. | |
An abstract base class to provide generic beam halo generator functionality.
Definition at line 31 of file BeamHaloGenerator.h.
|
protected |
An enum of particle counter indices.
| Enumerator | |
|---|---|
| TOT_READ | |
| TOT_AFTER | |
| TOT_GEN | |
| NUM_COUNTERS | |
Definition at line 141 of file BeamHaloGenerator.h.
|
protected |
An enum of generator process identifiers.
_READ corresponds to no sampling and therefore simple conversion from input file to HepMC record.
| Enumerator | |
|---|---|
| MARS_READ | |
| MARS_SINGLE | |
| MARS_SHOWER | |
| FLUKA_READ | |
| FLUKA_SINGLE | |
| FLUKA_SHOWER | |
Definition at line 86 of file BeamHaloGenerator.h.
| BeamHaloGenerator::BeamHaloGenerator | ( | const HepPDT::ParticleDataTable * | particleTable, |
| const std::string & | inputFile, | ||
| const std::vector< std::string > & | generatorSettings ) |
Definition at line 16 of file BeamHaloGenerator.cxx.
|
virtual |
Definition at line 40 of file BeamHaloGenerator.cxx.
|
protected |
A member function to convert a vector of beam halo particles into a GenEvent.
Definition at line 94 of file BeamHaloGenerator.cxx.
|
pure virtual |
A function to create one event in HepMC format.
Implemented in FlukaHaloGenerator, and MarsHaloGenerator.
|
protected |
A member function to check if the event should be flipped.
Definition at line 80 of file BeamHaloGenerator.cxx.
|
virtual |
A function to finalise the generator.
Reimplemented in FlukaHaloGenerator, and MarsHaloGenerator.
Definition at line 57 of file BeamHaloGenerator.cxx.
|
virtual |
A function to initialise the generator.
Reimplemented in FlukaHaloGenerator, and MarsHaloGenerator.
Definition at line 48 of file BeamHaloGenerator.cxx.
|
protectedpure virtual |
A function to read one event in a simplified format.
Implemented in FlukaHaloGenerator, and MarsHaloGenerator.
|
protectedpure virtual |
A function to read one particle from the input ASCII file.
Implemented in FlukaHaloGenerator, and MarsHaloGenerator.
|
inline |
Set the name of the binary buffer file, needed for sampling from a converted file.
Definition at line 76 of file BeamHaloGenerator.h.
|
inline |
|
inline |
Turn on or off the event flipping code.
Definition at line 66 of file BeamHaloGenerator.h.
|
inline |
Turn on or off sampling from the input ASCII file.
Definition at line 72 of file BeamHaloGenerator.h.
|
inline |
Set probability of flipping an event about Z=0.
Definition at line 69 of file BeamHaloGenerator.h.
|
inline |
Set the position of the interface plane in mm.
Definition at line 63 of file BeamHaloGenerator.h.
|
protected |
A pointer to an AsciiInput object, used to read data from the Ascii input file.
Definition at line 131 of file BeamHaloGenerator.h.
|
protected |
A pointer to a BeamHaloGeneratorSettings object used to filter particles.
Definition at line 135 of file BeamHaloGenerator.h.
|
protected |
Binary particle buffer for caching converted events.
Definition at line 127 of file BeamHaloGenerator.h.
|
protected |
The name of the binary buffer file, needed for sampling from a converted file.
Definition at line 124 of file BeamHaloGenerator.h.
|
protected |
Particle or event counters of dimension enumCounters.
Definition at line 148 of file BeamHaloGenerator.h.
|
protected |
A flat to turn on or off debug print out.
Definition at line 154 of file BeamHaloGenerator.h.
|
protected |
Flag for flipping event.
Definition at line 114 of file BeamHaloGenerator.h.
|
protected |
Flag to enable or disable sampling.
Definition at line 120 of file BeamHaloGenerator.h.
|
protected |
A data member to count the event number.
Definition at line 138 of file BeamHaloGenerator.h.
|
protected |
Flip probability.
Definition at line 117 of file BeamHaloGenerator.h.
|
private |
A vector of generator settings in string command form.
Definition at line 159 of file BeamHaloGenerator.h.
|
protected |
Input file name.
Definition at line 108 of file BeamHaloGenerator.h.
|
protected |
The position of the interface plane in mm.
Definition at line 111 of file BeamHaloGenerator.h.
|
protected |
A pointer to the particle data table.
Definition at line 105 of file BeamHaloGenerator.h.
|
protected |
Sum of weights of particles or events of dimension enumCounters.
Definition at line 151 of file BeamHaloGenerator.h.