Go to the documentation of this file. 1 #ifndef FASTSIM_PARTICLEMANAGER_H
2 #define FASTSIM_PARTICLEMANAGER_H
5 #include "HepMC/GenEvent.h"
26 class SimplifiedGeometry;
78 std::vector<std::unique_ptr<Particle> >& secondaries,
122 HepMC::GenEvent::particle_const_iterator
138 std::vector<std::unique_ptr<Particle> >
std::vector< std::unique_ptr< Particle > > particleBuffer_
The vector of all secondaries that are not yet propagated in the event.
const double beamPipeRadius2_
(Radius of the beampipe)^2
Implementation of a generic detector layer (base class for forward/barrel layers).
~ParticleManager()
Default destructor.
unsigned addSimVertex(const math::XYZTLorentzVector &position, int motherIndex)
Add a simVertex (simVertex contains information about the track it was produced).
const HepMC::GenEvent *const genEvent_
The GenEvent.
HepMC::GenEvent::particle_const_iterator genParticleIterator_
Iterator to keep track on which GenParticles where already considered.
Manages GenParticles and Secondaries from interactions.
double timeUnitConversionFactor_
Convert pythia unis to ns (FastSim standard)
const HepPDT::ParticleDataTable *const particleDataTable_
Necessary to get information like lifetime and charge of a particle if unknown.
double lengthUnitConversionFactor2_
Convert pythia unis to cm^2 (FastSim standard)
double momentumUnitConversionFactor_
Convert pythia units to GeV (FastSim standard)
const SimVertex getSimVertex(unsigned i)
Returns the position of a given SimVertex. Needed for interfacing the code with the old calorimetry.
static int position[264][3]
const ParticleFilter *const particleFilter_
(Kinematic) cuts on the particles that have to be propagated.
const HepMC::GenEvent::particle_const_iterator genParticleEnd_
The last particle of the GenEvent.
unsigned addSimTrack(const Particle *particle)
Add a simTrack (simTrack contains some basic info about the particle, e.g. pdgId).
void addSecondaries(const math::XYZTLorentzVector &vertexPosition, int motherSimTrackId, std::vector< std::unique_ptr< Particle > > &secondaries, const SimplifiedGeometry *layer=nullptr)
Adds secondaries that are produced by any of the interactions (or particle decay) to the buffer.
const SimTrack getSimTrack(unsigned i)
Returns a given SimTrack. Needed for interfacing the code with the old calorimetry.
int genParticleIndex_
Index of particle in the GenEvent (if it is a GenParticle)
ParticleManager(const HepMC::GenEvent &genEvent, const HepPDT::ParticleDataTable &particleDataTable, double beamPipeRadius, double deltaRchargedMother, const ParticleFilter &particleFilter, std::vector< SimTrack > &simTracks, std::vector< SimVertex > &simVertices)
Constructor.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
double lengthUnitConversionFactor_
Convert pythia unis to cm (FastSim standard)
std::unique_ptr< Particle > nextGenParticle()
Returns next particle from the GenEvent that has to be propagated.
const double deltaRchargedMother_
For FastSim (cheat) tracking: cut on the angle between a charged mother and charged daughter.
unsigned addEndVertex(const Particle *particle)
Necessary to add an end vertex to a particle.
HepPDT::ParticleDataTable ParticleDataTable
(Kinematic) cuts on the particles that are propagated.
std::unique_ptr< Particle > nextParticle(const RandomEngineAndDistribution &random)
Returns the next particle that has to be propagated (secondary or genParticle).
std::vector< SimTrack > * simTracks_
The generated SimTrack of this event.
std::vector< SimVertex > * simVertices_
The generated SimVertices of this event.