Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
FlukaHaloGenerator Class Reference

A class to provide conversion from a FLUKA format ASCII input record into HepMC format, with or without sampling. More...

#include <FlukaHaloGenerator.h>

Inheritance diagram for FlukaHaloGenerator:
Collaboration diagram for FlukaHaloGenerator:

Public Member Functions

 FlukaHaloGenerator (int type, const HepPDT::ParticleDataTable *particleTable, const std::string &inputFile, const std::vector< std::string > &generatorSettings)
 
virtual ~FlukaHaloGenerator ()=default
 
virtual int genInitialize ()
 A function to initialise the generator. More...
 
virtual int genFinalize ()
 A function to finalise the generator. More...
 
virtual int fillEvt (HepMC::GenEvent *evt, CLHEP::HepRandomEngine *engine)
 A function to create one event in HepMC format. More...
 
void setInterfacePlane (double interfacePlane)
 Set the position of the interface plane in mm. More...
 
void setEnableFlip (bool enableFlip)
 Turn on or off the event flipping code. More...
 
void setFlipProbability (float flipProbability)
 Set probability of flipping an event about Z=0. More...
 
void setEnableSampling (bool enableSampling)
 Turn on or off sampling from the input ASCII file. More...
 
void setBufferFileName (const std::string &bufferFileName)
 Set the name of the binary buffer file, needed for sampling from a converted file. More...
 
void setDebugEnable (bool debug)
 A function to turn on or off debug print out. More...
 

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)
 A function to read one event in a simplified format. More...
 
virtual int readParticle (BeamHaloParticle *beamHaloParticle)
 A function to read one particle from the input ASCII file. More...
 
bool flipEvent (CLHEP::HepRandomEngine *engine)
 A member function to check if the event should be flipped. More...
 
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. More...
 

Protected Attributes

const HepPDT::ParticleDataTable * m_particleTable
 A pointer to the particle data table. More...
 
std::string m_inputFile
 Input file name. More...
 
double m_interfacePlane
 The position of the interface plane in mm. More...
 
bool m_enableFlip
 Flag for flipping event. More...
 
float m_flipProbability
 Flip probability. More...
 
bool m_enableSampling
 Flag to enable or disable sampling. More...
 
std::string m_bufferFileName
 The name of the binary buffer file, needed for sampling from a converted file. More...
 
BeamHaloParticleBufferm_beamHaloParticleBuffer
 Binary particle buffer for caching converted events. More...
 
AsciiInputm_asciiInput
 A pointer to an AsciiInput object, used to read data from the Ascii input file. More...
 
BeamHaloGeneratorSettingsm_beamHaloGeneratorSettings
 A pointer to a BeamHaloGeneratorSettings object used to filter particles. More...
 
long m_eventNumber
 A data member to count the event number. More...
 
long m_counters [NUM_COUNTERS]
 Particle or event counters of dimension enumCounters. More...
 
double m_wsums [NUM_COUNTERS]
 Sum of weights of particles or events of dimension enumCounters. More...
 
bool m_debug
 A flat to turn on or off debug print out. More...
 

Private Attributes

bool m_sameEvent
 
bool m_firstEvent
 
FlukaParticle m_flukaParticle
 
FlukaParticle m_lastFlukaParticle
 
std::vector< std::string > m_generatorSettings
 A vector of generator settings in string command form. More...
 

Detailed Description

A class to provide conversion from a FLUKA format ASCII input record into HepMC format, with or without sampling.

Author
W. H. Bell W.Bel.nosp@m.l@ce.nosp@m.rn.ch

Definition at line 18 of file FlukaHaloGenerator.h.

Member Enumeration Documentation

◆ enumCounters

enum BeamHaloGenerator::enumCounters
protectedinherited

An enum of particle counter indices.

Enumerator
TOT_READ 
TOT_AFTER 
TOT_GEN 
NUM_COUNTERS 

Definition at line 141 of file BeamHaloGenerator.h.

141  {
142  TOT_READ,
143  TOT_AFTER,
144  TOT_GEN,
145  NUM_COUNTERS};

◆ enumGeneratorProcessIds

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.

86  {
87  MARS_READ,
90  FLUKA_READ,
92  FLUKA_SHOWER };

Constructor & Destructor Documentation

◆ FlukaHaloGenerator()

FlukaHaloGenerator::FlukaHaloGenerator ( int  type,
const HepPDT::ParticleDataTable *  particleTable,
const std::string &  inputFile,
const std::vector< std::string > &  generatorSettings 
)

Definition at line 15 of file FlukaHaloGenerator.cxx.

18  :
20  m_sameEvent(true),
21  m_firstEvent(true),
24 }

◆ ~FlukaHaloGenerator()

virtual FlukaHaloGenerator::~FlukaHaloGenerator ( )
virtualdefault

Member Function Documentation

◆ convertEvent()

int BeamHaloGenerator::convertEvent ( std::vector< BeamHaloParticle > *  beamHaloEvent,
HepMC::GenEvent *  evt,
CLHEP::HepRandomEngine *  engine 
)
protectedinherited

A member function to convert a vector of beam halo particles into a GenEvent.

Definition at line 94 of file BeamHaloGenerator.cxx.

96  {
97  double pz;
98  bool flipFlag = flipEvent(engine);
99  HepMC::GenParticlePtr genParticle;
100  HepMC::GenVertexPtr genVertex;
101  const double c = 2.99792458E+11; // speed of light in mm/s
102 
103  std::vector<BeamHaloParticle>::iterator itr = beamHaloEvent->begin();
104  std::vector<BeamHaloParticle>::iterator itr_end = beamHaloEvent->end();
105 
106  if(itr != itr_end) {
107  // Take the primary information from the first particle in the event. If the event is more than one
108  // particle, the particles come from the same primary proton.
109  evt->weights().push_back((*itr).weight()); // event weight
110  HepMC::FourVector primaryPosition = (*itr).positionAtPrimary();
111  evt->weights().push_back(primaryPosition.x()); // Starting position of primary particle: x position (cm)
112  evt->weights().push_back(primaryPosition.y()); // Starting position of primary particle: y position (cm)
113  evt->weights().push_back(primaryPosition.z()); // Starting position of primary particle: z position (cm)
114  evt->weights().push_back(primaryPosition.t()); // Starting position of primary particle: t (s)
115  }
116 
117  // Append each particle to the GenEvent
118  for(;itr!=itr_end;++itr) {
119  HepMC::FourVector position = (*itr).positionAtScoringPlane();
120  HepMC::FourVector fourVector = (*itr).fourVector();
121 
122  if(!flipFlag) {
123  genParticle = HepMC::newGenParticlePtr(fourVector,
124  (*itr).pdgId(),
125  1);
126 
127  genVertex = HepMC::newGenVertexPtr(HepMC::FourVector(position.x(),
128  position.y(),
129  (position.z() + m_interfacePlane),
130  c*position.t() -1.0*std::fabs(m_interfacePlane)),
131  1);
132  }
133  else {
134  pz = fourVector.pz();
135  fourVector.setPz(-pz);
136 
137  genParticle = HepMC::newGenParticlePtr(fourVector,
138  (*itr).pdgId(),
139  1);
140 
141  genVertex = HepMC::newGenVertexPtr(HepMC::FourVector(position.x(),
142  position.y(),
143  -1.0*(position.z() + m_interfacePlane),
144  c*position.t() -1.0*std::fabs(m_interfacePlane)),
145  1);
146  }
147 
148  genVertex->add_particle_out(genParticle);
149  evt->add_vertex(genVertex);
150  }
151 
152  return 0;
153 }

◆ fillEvt()

int FlukaHaloGenerator::fillEvt ( HepMC::GenEvent *  evt,
CLHEP::HepRandomEngine *  engine 
)
virtual

A function to create one event in HepMC format.

Implements BeamHaloGenerator.

Definition at line 48 of file FlukaHaloGenerator.cxx.

49  {
50  std::vector<BeamHaloParticle> beamHaloEvent;
51  int ret_val;
52 
53  // Read one FLUKA event which passes the generator settings.
54  if((ret_val = readEvent(&beamHaloEvent, engine)) != 0) return ret_val;
55 
56  // Convert the particles to GenParticles and attach them to the
57  // event. Flip the event if needed.
58  if((ret_val = BeamHaloGenerator::convertEvent(&beamHaloEvent, evt, engine)) != 0) return ret_val;
59 
60  // Set the event number
61  evt->set_event_number(m_eventNumber);
62 
63  // Set the signal process
65 
66  // Increment the event number
67  m_eventNumber++;
68 
69  return 0;
70 }

◆ flipEvent()

bool BeamHaloGenerator::flipEvent ( CLHEP::HepRandomEngine *  engine)
protectedinherited

A member function to check if the event should be flipped.

Definition at line 80 of file BeamHaloGenerator.cxx.

80  {
81  if(!m_enableFlip) return false;
82 
83  // Check to see if the event should be flipped or not
84  if(CLHEP::RandFlat::shoot(engine) <= m_flipProbability) {
85  if(m_debug) std::cout << "Debug: Flipping event" << std::endl;
86  return true;
87  }
88 
89  return false;
90 }

◆ genFinalize()

int FlukaHaloGenerator::genFinalize ( )
virtual

A function to finalise the generator.

Reimplemented from BeamHaloGenerator.

Definition at line 74 of file FlukaHaloGenerator.cxx.

74  {
75  int ret_val;
76 
78 
79  // Finalise base class
80  if((ret_val = BeamHaloGenerator::genFinalize()) != 0) return ret_val;
81 
82  return 0;
83 }

◆ genInitialize()

int FlukaHaloGenerator::genInitialize ( )
virtual

A function to initialise the generator.

Reimplemented from BeamHaloGenerator.

Definition at line 29 of file FlukaHaloGenerator.cxx.

29  {
30  int ret_val;
31 
32  // Initialise base class
33  if((ret_val = BeamHaloGenerator::genInitialize()) != 0) return ret_val;
34 
35  if(m_asciiInput->open() != 0) {
36  std::cout << "Error: Could not open ascii input file " << m_inputFile << std::endl;
37  return 1;
38  }
39 
40  std::cout << "Info: Reading ascii input file " << m_inputFile << std::endl;
41 
42  return 0;
43 }

◆ readEvent()

int FlukaHaloGenerator::readEvent ( std::vector< BeamHaloParticle > *  beamHaloEvent,
CLHEP::HepRandomEngine *  engine 
)
protectedvirtual

A function to read one event in a simplified format.

Implements BeamHaloGenerator.

Definition at line 95 of file FlukaHaloGenerator.cxx.

96  {
97  BeamHaloParticle beamHaloParticle;
98 
99  // Clear the event
100  beamHaloEvent->clear();
101 
102  // If there was a last event.
103  if(!m_firstEvent) {
104 
105  // If the last event caused the same event flag to be set to false
106  // copy the last particle into the vector of those in this event.
107  if(!m_sameEvent) {
108  // Fill the BeamHaloParticle with the data in the FlukaParticle
109  if(beamHaloParticle.fill(m_particleTable, &m_lastFlukaParticle)) {
110  std::cout << "Error: Conversion from FlukaParticle to BeamHaloParticle failed." << std::endl;
111  return 1;
112  }
113  // Append the BeamHalo particle to the event.
114  beamHaloEvent->push_back(beamHaloParticle);
115 
116  // Set the same event flag to enter the while loop to read the
117  // rest of this event.
118  m_sameEvent = true;
119  }
120  }
121 
122  // Loop over the ascii input and read each particle until a new
123  // event is found or there are no more particles.
124  std::vector<std::string> row;
125  bool endOfFile = false;
126  while(m_sameEvent && !endOfFile) {
127  row = m_asciiInput->readRow(); // Read one line of the ascii file.11
128 
129  if(row.size() == 0) {
130  endOfFile = true;
131  continue;
132  }
133 
134  if(m_flukaParticle.read(&row)) { // Fill the particle from the string vector
135  continue;
136  }
137 
138  // Check if there was a last particle.
139  if(!m_firstEvent) {
140 
141  m_sameEvent = false;
142 
143  // Check if the event id of the last particle is the same as this particle.
147 
150  }
151  else {
152  // For the first event.
153  m_firstEvent = false;
154  m_sameEvent = true;
155  }
156 
157  // If this is the same event copy the particle into the vector for
158  // this event.
159  if(m_sameEvent) {
160 
161  // Fill the BeamHaloParticle with the data in the FlukaParticle
162  if(beamHaloParticle.fill(m_particleTable, &m_flukaParticle)) {
163  std::cout << "Error: Conversion from FlukaParticle to BeamHaloParticle failed." << std::endl;
164  return 1;
165  }
166 
167  // Append the BeamHalo particle to the event.
168  beamHaloEvent->push_back(beamHaloParticle);
169  }
170 
171  // Copy this particle into the last particle.
173 
174  }
175 
176  if(beamHaloEvent->size() == 0) {
177  std::cout << "Error: No particles read from " << m_inputFile << std::endl;
178  return 1;
179  }
180 
181  m_counters[TOT_READ]++;
182  m_wsums[TOT_READ]+= 1.0;
183 
184  // Check if one of the particles in the event passes the generator settings.
185  std::vector<BeamHaloParticle>::iterator itr = beamHaloEvent->begin();
186  std::vector<BeamHaloParticle>::iterator itr_end = beamHaloEvent->end();
187  bool passed = false;
188  for(;itr!=itr_end;++itr) {
189  beamHaloParticle = *itr;
190  // Check the generator settings for this particle.
191  if(m_beamHaloGeneratorSettings->checkParticle(&beamHaloParticle)) {
192  passed = true;
193  }
194  else {
195  if(m_debug) std::cout << "Debug: Particle fails generator settings cuts." << std::endl;
196  }
197  }
198 
200  m_wsums[TOT_AFTER]+= 1.0;
201  m_counters[TOT_GEN]++;
202  m_wsums[TOT_GEN]+= 1.0;
203 
204  // If all of the particles from this event fail read another event.
205  // If there are no more events this function will exit with a
206  // WARNING.
207  if(!passed) {
208  int ret_val;
209  if((ret_val = readEvent(beamHaloEvent, engine)) != 0) return ret_val;
210  }
211 
212  return 0;
213 }

◆ readParticle()

int FlukaHaloGenerator::readParticle ( BeamHaloParticle beamHaloParticle)
protectedvirtual

A function to read one particle from the input ASCII file.

Implements BeamHaloGenerator.

Definition at line 87 of file FlukaHaloGenerator.cxx.

87  {
88 
89  std::cout << "Warning: FlukaHaloGenerator::readParticle is not yet available: "<< beamHaloParticle << std::endl;
90  return 0;
91 }

◆ setBufferFileName()

void BeamHaloGenerator::setBufferFileName ( const std::string &  bufferFileName)
inlineinherited

Set the name of the binary buffer file, needed for sampling from a converted file.

Definition at line 76 of file BeamHaloGenerator.h.

76 { m_bufferFileName = bufferFileName; }

◆ setDebugEnable()

void BeamHaloGenerator::setDebugEnable ( bool  debug)
inlineinherited

A function to turn on or off debug print out.

Definition at line 79 of file BeamHaloGenerator.h.

79 { m_debug = debug; }

◆ setEnableFlip()

void BeamHaloGenerator::setEnableFlip ( bool  enableFlip)
inlineinherited

Turn on or off the event flipping code.

Definition at line 66 of file BeamHaloGenerator.h.

66 { m_enableFlip = enableFlip; }

◆ setEnableSampling()

void BeamHaloGenerator::setEnableSampling ( bool  enableSampling)
inlineinherited

Turn on or off sampling from the input ASCII file.

Definition at line 72 of file BeamHaloGenerator.h.

72 { m_enableSampling = enableSampling; }

◆ setFlipProbability()

void BeamHaloGenerator::setFlipProbability ( float  flipProbability)
inlineinherited

Set probability of flipping an event about Z=0.

Definition at line 69 of file BeamHaloGenerator.h.

◆ setInterfacePlane()

void BeamHaloGenerator::setInterfacePlane ( double  interfacePlane)
inlineinherited

Set the position of the interface plane in mm.

Definition at line 63 of file BeamHaloGenerator.h.

Member Data Documentation

◆ m_asciiInput

AsciiInput* BeamHaloGenerator::m_asciiInput
protectedinherited

A pointer to an AsciiInput object, used to read data from the Ascii input file.

Definition at line 131 of file BeamHaloGenerator.h.

◆ m_beamHaloGeneratorSettings

BeamHaloGeneratorSettings* BeamHaloGenerator::m_beamHaloGeneratorSettings
protectedinherited

A pointer to a BeamHaloGeneratorSettings object used to filter particles.

Definition at line 135 of file BeamHaloGenerator.h.

◆ m_beamHaloParticleBuffer

BeamHaloParticleBuffer* BeamHaloGenerator::m_beamHaloParticleBuffer
protectedinherited

Binary particle buffer for caching converted events.

Definition at line 127 of file BeamHaloGenerator.h.

◆ m_bufferFileName

std::string BeamHaloGenerator::m_bufferFileName
protectedinherited

The name of the binary buffer file, needed for sampling from a converted file.

Definition at line 124 of file BeamHaloGenerator.h.

◆ m_counters

long BeamHaloGenerator::m_counters[NUM_COUNTERS]
protectedinherited

Particle or event counters of dimension enumCounters.

Definition at line 148 of file BeamHaloGenerator.h.

◆ m_debug

bool BeamHaloGenerator::m_debug
protectedinherited

A flat to turn on or off debug print out.

Definition at line 154 of file BeamHaloGenerator.h.

◆ m_enableFlip

bool BeamHaloGenerator::m_enableFlip
protectedinherited

Flag for flipping event.

Definition at line 114 of file BeamHaloGenerator.h.

◆ m_enableSampling

bool BeamHaloGenerator::m_enableSampling
protectedinherited

Flag to enable or disable sampling.

Definition at line 120 of file BeamHaloGenerator.h.

◆ m_eventNumber

long BeamHaloGenerator::m_eventNumber
protectedinherited

A data member to count the event number.

Definition at line 138 of file BeamHaloGenerator.h.

◆ m_firstEvent

bool FlukaHaloGenerator::m_firstEvent
private

Definition at line 50 of file FlukaHaloGenerator.h.

◆ m_flipProbability

float BeamHaloGenerator::m_flipProbability
protectedinherited

Flip probability.

Definition at line 117 of file BeamHaloGenerator.h.

◆ m_flukaParticle

FlukaParticle FlukaHaloGenerator::m_flukaParticle
private

Definition at line 51 of file FlukaHaloGenerator.h.

◆ m_generatorSettings

std::vector<std::string> BeamHaloGenerator::m_generatorSettings
privateinherited

A vector of generator settings in string command form.

Definition at line 159 of file BeamHaloGenerator.h.

◆ m_inputFile

std::string BeamHaloGenerator::m_inputFile
protectedinherited

Input file name.

Definition at line 108 of file BeamHaloGenerator.h.

◆ m_interfacePlane

double BeamHaloGenerator::m_interfacePlane
protectedinherited

The position of the interface plane in mm.

Definition at line 111 of file BeamHaloGenerator.h.

◆ m_lastFlukaParticle

FlukaParticle FlukaHaloGenerator::m_lastFlukaParticle
private

Definition at line 52 of file FlukaHaloGenerator.h.

◆ m_particleTable

const HepPDT::ParticleDataTable* BeamHaloGenerator::m_particleTable
protectedinherited

A pointer to the particle data table.

Definition at line 105 of file BeamHaloGenerator.h.

◆ m_sameEvent

bool FlukaHaloGenerator::m_sameEvent
private

Definition at line 49 of file FlukaHaloGenerator.h.

◆ m_wsums

double BeamHaloGenerator::m_wsums[NUM_COUNTERS]
protectedinherited

Sum of weights of particles or events of dimension enumCounters.

Definition at line 151 of file BeamHaloGenerator.h.


The documentation for this class was generated from the following files:
HepMC::GenVertexPtr
HepMC::GenVertex * GenVertexPtr
Definition: GenVertex.h:59
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
BeamHaloGenerator::m_enableFlip
bool m_enableFlip
Flag for flipping event.
Definition: BeamHaloGenerator.h:114
query_example.row
row
Definition: query_example.py:24
FlukaParticle::read
int read(std::vector< std::string > *eventAsStringVector)
A function to read the values from a single row definition and fill the data members.
Definition: FlukaParticle.cxx:47
BeamHaloParticle
A class to describe a generic beam halo particle.
Definition: BeamHaloParticle.h:22
BeamHaloGenerator::m_wsums
double m_wsums[NUM_COUNTERS]
Sum of weights of particles or events of dimension enumCounters.
Definition: BeamHaloGenerator.h:151
BeamHaloGenerator::m_interfacePlane
double m_interfacePlane
The position of the interface plane in mm.
Definition: BeamHaloGenerator.h:111
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
BeamHaloGenerator::m_enableSampling
bool m_enableSampling
Flag to enable or disable sampling.
Definition: BeamHaloGenerator.h:120
BeamHaloGenerator::MARS_SHOWER
@ MARS_SHOWER
Definition: BeamHaloGenerator.h:89
BeamHaloGenerator::m_bufferFileName
std::string m_bufferFileName
The name of the binary buffer file, needed for sampling from a converted file.
Definition: BeamHaloGenerator.h:124
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
BeamHaloGenerator::m_counters
long m_counters[NUM_COUNTERS]
Particle or event counters of dimension enumCounters.
Definition: BeamHaloGenerator.h:148
FlukaHaloGenerator::m_sameEvent
bool m_sameEvent
Definition: FlukaHaloGenerator.h:49
BeamHaloGenerator::TOT_AFTER
@ TOT_AFTER
Definition: BeamHaloGenerator.h:143
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
BeamHaloGenerator::BeamHaloGenerator
BeamHaloGenerator(const HepPDT::ParticleDataTable *particleTable, const std::string &inputFile, const std::vector< std::string > &generatorSettings)
Definition: BeamHaloGenerator.cxx:16
BeamHaloGenerator::FLUKA_READ
@ FLUKA_READ
Definition: BeamHaloGenerator.h:90
BeamHaloGenerator::TOT_GEN
@ TOT_GEN
Definition: BeamHaloGenerator.h:144
BeamHaloGenerator::FLUKA_SHOWER
@ FLUKA_SHOWER
Definition: BeamHaloGenerator.h:92
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
FlukaParticle::eventId
long eventId(void) const
A function to return the FLUKA event Id of this particle.
Definition: FlukaParticle.h:39
BeamHaloGenerator::MARS_READ
@ MARS_READ
Definition: BeamHaloGenerator.h:87
AsciiInput::readRow
std::vector< std::string > readRow()
Read one line of the input text file into a vector of strings.
Definition: AsciiInput.cxx:42
BeamHaloGenerator::m_asciiInput
AsciiInput * m_asciiInput
A pointer to an AsciiInput object, used to read data from the Ascii input file.
Definition: BeamHaloGenerator.h:131
jobOptions_CavernBackground.generatorSettings
generatorSettings
Definition: jobOptions_CavernBackground.py:35
BeamHaloGenerator::m_particleTable
const HepPDT::ParticleDataTable * m_particleTable
A pointer to the particle data table.
Definition: BeamHaloGenerator.h:105
AsciiInput::close
int close()
Close the input file.
Definition: AsciiInput.cxx:32
BeamHaloGenerator::genFinalize
virtual int genFinalize()
A function to finalise the generator.
Definition: BeamHaloGenerator.cxx:57
BeamHaloParticle::fill
int fill(const HepPDT::ParticleDataTable *particleDataTable, MarsParticle *marsParticle)
A function to fill the data members from an input MarsParticle object.
Definition: BeamHaloParticle.cxx:52
CaloCondBlobAlgs_fillNoiseFromASCII.inputFile
string inputFile
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:17
HepMC::newGenVertexPtr
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
Definition: GenVertex.h:64
BeamHaloGenerator::MARS_SINGLE
@ MARS_SINGLE
Definition: BeamHaloGenerator.h:88
FlukaHaloGenerator::readEvent
virtual int readEvent(std::vector< BeamHaloParticle > *beamHaloEvent, CLHEP::HepRandomEngine *engine)
A function to read one event in a simplified format.
Definition: FlukaHaloGenerator.cxx:95
BeamHaloGenerator::m_debug
bool m_debug
A flat to turn on or off debug print out.
Definition: BeamHaloGenerator.h:154
BeamHaloGenerator::m_beamHaloGeneratorSettings
BeamHaloGeneratorSettings * m_beamHaloGeneratorSettings
A pointer to a BeamHaloGeneratorSettings object used to filter particles.
Definition: BeamHaloGenerator.h:135
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
BeamHaloGenerator::m_flipProbability
float m_flipProbability
Flip probability.
Definition: BeamHaloGenerator.h:117
FlukaHaloGenerator::m_firstEvent
bool m_firstEvent
Definition: FlukaHaloGenerator.h:50
BeamHaloGenerator::m_eventNumber
long m_eventNumber
A data member to count the event number.
Definition: BeamHaloGenerator.h:138
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
FlukaHaloGenerator::m_lastFlukaParticle
FlukaParticle m_lastFlukaParticle
Definition: FlukaHaloGenerator.h:52
jobOptions_CavernBackground.interfacePlane
interfacePlane
Definition: jobOptions_CavernBackground.py:23
BeamHaloGenerator::NUM_COUNTERS
@ NUM_COUNTERS
Definition: BeamHaloGenerator.h:145
BeamHaloGeneratorSettings::checkParticle
bool checkParticle(BeamHaloParticle *beamHaloParticle)
Check if the supplied beam halo particle passes the generator settings.
Definition: BeamHaloGeneratorSettings.cxx:139
AsciiInput::open
int open()
Open the input file.
Definition: AsciiInput.cxx:22
HepMC::newGenParticlePtr
GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), int pid=0, int status=0)
Definition: GenParticle.h:39
FlukaParticle::type
int type(void) const
A function to return the type of this FlukaParticle.
Definition: FlukaParticle.h:36
BeamHaloGenerator::FLUKA_SINGLE
@ FLUKA_SINGLE
Definition: BeamHaloGenerator.h:91
FlukaHaloGenerator::m_flukaParticle
FlukaParticle m_flukaParticle
Definition: FlukaHaloGenerator.h:51
FlukaParticle::BRUCE
@ BRUCE
Definition: FlukaParticle.h:73
BeamHaloGenerator::genInitialize
virtual int genInitialize()
A function to initialise the generator.
Definition: BeamHaloGenerator.cxx:48
jobOptions_CavernBackground.flipProbability
flipProbability
Definition: jobOptions_CavernBackground.py:24
BeamHaloGenerator::m_inputFile
std::string m_inputFile
Input file name.
Definition: BeamHaloGenerator.h:108
FlukaParticle::TALANOV
@ TALANOV
Definition: FlukaParticle.h:74
BeamHaloGenerator::convertEvent
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.
Definition: BeamHaloGenerator.cxx:94
FlukaParticle::partGenNum
int partGenNum(void) const
A function to return the particle generation number of this particle.
Definition: FlukaParticle.h:46
HepMC::set_signal_process_id
void set_signal_process_id(GenEvent *e, const int i)
Definition: GenEvent.h:641
python.compressB64.c
def c
Definition: compressB64.py:93
BeamHaloGenerator::flipEvent
bool flipEvent(CLHEP::HepRandomEngine *engine)
A member function to check if the event should be flipped.
Definition: BeamHaloGenerator.cxx:80
BeamHaloGenerator::TOT_READ
@ TOT_READ
Definition: BeamHaloGenerator.h:142