Belle II Software development
|
Class to generate tracks in the particle gun and store them in a MCParticle graph. More...
#include <ParticleGun.h>
Classes | |
struct | Parameters |
Struct to keep all necessary parameters for the particle gun. More... | |
Public Types | |
enum | EDistribution { c_fixedValue , c_uniformDistribution , c_uniformPtDistribution , c_uniformCosDistribution , c_uniformLogDistribution , c_uniformLogPtDistribution , c_normalDistribution , c_normalPtDistribution , c_normalCosDistribution , c_discreteSpectrum , c_discretePtSpectrum , c_inversePtDistribution , c_polylineDistribution , c_polylinePtDistribution , c_polylineCosDistribution } |
enum containing all known distributions available for generation of values More... | |
Public Member Functions | |
ParticleGun () | |
Default constructor. | |
~ParticleGun () | |
Default destructor. | |
bool | generateEvent (MCParticleGraph &graph) |
Generate the next event and store the result in the given MCParticle graph. | |
bool | setParameters (const Parameters ¶meters) |
Set the parameters for generating the Particles. | |
Protected Member Functions | |
double | generateValue (EDistribution dist, const std::vector< double > ¶ms) |
Generate a value according to the given distribution with the given parameters. | |
Protected Attributes | |
Parameters | m_params |
All relevant parameters. | |
Class to generate tracks in the particle gun and store them in a MCParticle graph.
The class supports multiple tracks per event, different PDGcodes and the range for track momenta, track angle and track origin is configurable.
Definition at line 26 of file ParticleGun.h.
enum EDistribution |
enum containing all known distributions available for generation of values
Enumerator | |
---|---|
c_fixedValue | Fixed value, no random generation at all, 1 parameter. |
c_uniformDistribution | Uniform distribution, parameters are min and max value. |
c_uniformPtDistribution | Uniform distribution of Pt, parameters are min and max value. |
c_uniformCosDistribution | Uniform distribution of the cosine of the values, parameters are min and max value. |
c_uniformLogDistribution | Uniform distribution of the logarithm of the values, parameters are min and max value. |
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_normalPtDistribution | Normal distribution of Pt, parameters are mean and sigma. |
c_normalCosDistribution | Normal distribution of the cosinge, parameters are mean and sigma. |
c_discreteSpectrum | Discrete spectrum, parameters are first the values and then the weights (non-negative) for each value. |
c_discretePtSpectrum | Discrete pt spectrum, parameters are first the values and then the weights (non-negative) for each value. |
c_inversePtDistribution | Distribution uniform in the inverse pt distribution, that is uniform in track curvature. |
c_polylineDistribution | Distribution given as list of (x,y) points. The Distribution will follow the line connection all points. Parameters are first the x coordinates (sorted) and then the y coordinates (non-negative) |
c_polylinePtDistribution | Same as polylineDistribution but for the transverse momentum. |
c_polylineCosDistribution | Same as polylineDistribution but for the cosine of the angle. |
Definition at line 29 of file ParticleGun.h.
|
inline |
Default constructor.
Definition at line 114 of file ParticleGun.h.
|
inline |
bool generateEvent | ( | MCParticleGraph & | graph | ) |
Generate the next event and store the result in the given MCParticle graph.
|
protected |
All relevant parameters.
Definition at line 133 of file ParticleGun.h.