11#include <mdst/dataobjects/MCParticleGraph.h>
Class to build, validate and sort a particle decay chain.
Class to generate tracks in the particle gun and store them in a MCParticle graph.
EDistribution
enum containing all known distributions available for generation of values
@ c_polylineDistribution
Distribution given as list of (x,y) points.
@ c_uniformLogPtDistribution
Uniform distribution of the logarithm of the Pt, parameters are min and max value.
@ c_normalDistribution
Normal distribution, parameters are mean and sigma.
@ c_normalCosDistribution
Normal distribution of the cosinge, parameters are mean and sigma.
@ c_uniformPtDistribution
Uniform distribution of Pt, parameters are min and max value.
@ c_polylinePtDistribution
Same as polylineDistribution but for the transverse momentum.
@ c_discretePtSpectrum
Discrete pt spectrum, parameters are first the values and then the weights (non-negative) for each va...
@ c_uniformDistribution
Uniform distribution, parameters are min and max value.
@ c_discreteSpectrum
Discrete spectrum, parameters are first the values and then the weights (non-negative) for each value...
@ c_fixedValue
Fixed value, no random generation at all, 1 parameter.
@ c_normalPtDistribution
Normal distribution of Pt, parameters are mean and sigma.
@ c_uniformCosDistribution
Uniform distribution of the cosine of the values, parameters are min and max value.
@ c_inversePtDistribution
Distribution uniform in the inverse pt distribution, that is uniform in track curvature.
@ c_polylineCosDistribution
Same as polylineDistribution but for the cosine of the angle.
@ c_uniformLogDistribution
Uniform distribution of the logarithm of the values, parameters are min and max value.
Parameters m_params
All relevant parameters.
~ParticleGun()
Default destructor.
bool generateEvent(MCParticleGraph &graph)
Generate the next event and store the result in the given MCParticle graph.
ParticleGun()
Default constructor.
bool setParameters(const Parameters ¶meters)
Set the parameters for generating the Particles.
double generateValue(EDistribution dist, const std::vector< double > ¶ms)
Generate a value according to the given distribution with the given parameters.
Abstract base class for different kinds of events.
Struct to keep all necessary parameters for the particle gun.
std::vector< int > pdgCodes
List of PDG particle codes to pick from when generating particles.
EDistribution xVertexDist
Distribution to use for x vertex generation.
std::vector< double > thetaParams
Parameters for the polar angle generation, meaning depends on chosen distribution.
std::vector< double > momentumParams
Parameters for the momentum generation, meaning depends on chosen distribution.
EDistribution yVertexDist
Distribution to use for y vertex generation.
std::vector< double > xVertexParams
Parameters for the x vertex generation, meaning depends on chosen distribution.
EDistribution thetaDist
Distribution to use for polar angle generation.
EDistribution zVertexDist
Distribution to use for z vertex generation.
EDistribution timeDist
Distribution to use for time generation.
EDistribution momentumDist
Distribution to use for momentum generation.
EDistribution phiDist
Distribution to use for azimuth angle generation.
double nTracks
Number of tracks to generate per event.
bool independentVertices
If false, all particles of one event will have the same vertex, if true the vertex of each particle w...
std::vector< double > zVertexParams
Parameters for the z vertex generation, meaning depends on chosen distribution.
std::vector< double > phiParams
Parameters for the azimuth angle generation, meaning depends on chosen distribution.
bool varyNumberOfTracks
If true, the number of tracks per event will fluctuate according to Poisson distribution.
std::vector< double > timeParams
Parameters for the time generation, meaning depends on chosen distribution.
bool fixedMomentumPerEvent
generates particle momentum according to the specified distribution and assigns this momentum to all ...
std::vector< double > yVertexParams
Parameters for the y vertex generation, meaning depends on chosen distribution.