A class to describe a generic beam halo particle.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
unsigned int m_particlesPerInterval
The number of particles per interval.
long m_numberOfParticles
The number of particles present within the output or input file.
int writeParticle(BeamHaloParticle *particle)
A member function to append a particle to the binary file.
int m_recordSize
The size of 1 binary data record.
BeamHaloParticleBuffer(const std::string &fileName)
~BeamHaloParticleBuffer()=default
BeamHaloParticle * readParticle(void)
A member function to read a particle from the current position in the binary file.
BeamHaloParticle * readRandomParticle(CLHEP::HepRandomEngine *engine)
A member function to read a random particle from the binary file.
std::vector< BinnedInterval > m_binnedIntervals
A map of the upper bin limits and an vector of bin limits within the given interval.
std::ofstream m_ofstream
A data member to store the output file stream.
double m_intervalUpperBinEdge
The upper bin edge of a bin within a given interval.
std::ifstream m_ifstream
A data member to store the input file stream.
double m_upperBinEdge
The upper edge of the bin.
std::vector< double > m_intervalUpperBinEdges
A vector of bin limits for a given interval.
bool m_writeFlag
A flag to select read or write.