|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef BEAMHALOGENERATOR_H
6 #define BEAMHALOGENERATOR_H
14 class ParticleDataTable;
17 class HepRandomEngine;
48 CLHEP::HepRandomEngine* engine) = 0;
53 virtual int readEvent(std::vector<BeamHaloParticle> *beamHaloEvent,
54 CLHEP::HepRandomEngine* engine) = 0;
96 bool flipEvent(CLHEP::HepRandomEngine* engine);
100 int convertEvent(std::vector<BeamHaloParticle>* beamHaloEvent,
101 HepMC::GenEvent*
evt,
102 CLHEP::HepRandomEngine* engine);
bool m_enableFlip
Flag for flipping event.
A class to read a vector of strings defining particle filtering settings and provide a method for fil...
A class to describe a generic beam halo particle.
void setEnableSampling(bool enableSampling)
Turn on or off sampling from the input ASCII file.
double m_wsums[NUM_COUNTERS]
Sum of weights of particles or events of dimension enumCounters.
double m_interfacePlane
The position of the interface plane in mm.
bool m_enableSampling
Flag to enable or disable sampling.
virtual int fillEvt(HepMC::GenEvent *evt, CLHEP::HepRandomEngine *engine)=0
A function to create one event in HepMC format.
std::string m_bufferFileName
The name of the binary buffer file, needed for sampling from a converted file.
long m_counters[NUM_COUNTERS]
Particle or event counters of dimension enumCounters.
enumCounters
An enum of particle counter indices.
BeamHaloGenerator(const HepPDT::ParticleDataTable *particleTable, const std::string &inputFile, const std::vector< std::string > &generatorSettings)
virtual int readEvent(std::vector< BeamHaloParticle > *beamHaloEvent, CLHEP::HepRandomEngine *engine)=0
A function to read one event in a simplified format.
void setDebugEnable(bool debug)
A function to turn on or off debug print out.
AsciiInput * m_asciiInput
A pointer to an AsciiInput object, used to read data from the Ascii input file.
virtual ~BeamHaloGenerator()
const HepPDT::ParticleDataTable * m_particleTable
A pointer to the particle data table.
An abstract base class to provide generic beam halo generator functionality.
virtual int genFinalize()
A function to finalise the generator.
virtual int readParticle(BeamHaloParticle *beamHaloParticle)=0
A function to read one particle from the input ASCII file.
bool m_debug
A flat to turn on or off debug print out.
std::vector< std::string > m_generatorSettings
A vector of generator settings in string command form.
BeamHaloGeneratorSettings * m_beamHaloGeneratorSettings
A pointer to a BeamHaloGeneratorSettings object used to filter particles.
float m_flipProbability
Flip probability.
long m_eventNumber
A data member to count the event number.
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.
void setEnableFlip(bool enableFlip)
Turn on or off the event flipping code.
virtual int genInitialize()
A function to initialise the generator.
std::string m_inputFile
Input file name.
void setInterfacePlane(double interfacePlane)
Set the position of the interface plane in mm.
enumGeneratorProcessIds
An enum of generator process identifiers.
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.
BeamHaloParticleBuffer * m_beamHaloParticleBuffer
Binary particle buffer for caching converted events.
bool flipEvent(CLHEP::HepRandomEngine *engine)
A member function to check if the event should be flipped.
A GenModule algorithm to produce beam halo HepMC records from input ASCII files produced with MARS or...