 |
Belle II Software
release-05-02-19
|
13 #include <framework/core/FrameworkExceptions.h>
15 #include <mdst/dataobjects/MCParticleGraph.h>
17 #include <TGeoMatrix.h>
76 void open(
const std::string& filename);
double m_lostY
y at lost position [m].
double m_lostX
x at lost position [m].
double m_inputSAD_py
y momentum at lost position [m].
double m_inputSAD_rate
loss rate [Hz]
AcceleratorRings m_accRing
The accelerator ring from which the particles originate.
double m_lostE
energy at lost position [m].
double m_sRange
The +- range for the s value for which particles are loaded.
double m_pxRes
The resolution for the x momentum component of the SAD real particle.
double m_lostS
lost position [m] along ring.
Class to build, validate and sort a particle decay chain.
double m_pyRes
The resolution for the y momentum component of the SAD real particle.
void setMomentumRes(double pxRes, double pyRes)
Sets the resolution of the momentum for the real particles.
double m_SADToRealFactor
The factor to calculate the number of real particles from a SAD particle.
@ c_LER
Low Energy Ring (positrons)
@ c_HER
High Energy Ring (electrons)
double getSADParticle(MCParticleGraph &graph)
Reads one SAD particle from the file and creates one event per SAD particle.
BELLE2_DEFINE_EXCEPTION(SADCouldNotOpenFileError, "Could not open file %1% !")
Exception is thrown if the SAD file could not be opened.
double m_inputSAD_x
x at lost position [m].
TTree * m_tree
The input root tree.
int m_inputSAD_nturn
number of turns from scattered to lost
void open(const std::string &filename)
Opens a root file and prepares it for reading.
int m_readEntry
The current number of the SAD entry that is read.
double m_inputSAD_rr
sqrt(x*x+y*y) [m] before matching onto beam pipe inner surface
unsigned int m_realPartEntry
The current number of the created real particles.
TGeoHMatrix SADtoGeant(ReaderSAD::AcceleratorRings accRing, double s)
Transformation matrix.
bool getRealParticle(MCParticleGraph &graph)
Reads one SAD particle from the file, calculates the number of real particles which are represented b...
double m_inputSAD_watt
loss wattage [W]
Abstract base class for different kinds of events.
double m_readoutTime
The readout time.
double m_inputSAD_sraw
lost position [m
void addParticleToMCParticles(MCParticleGraph &graph, bool gaussSmearing=false)
Adds the current particle described by the member variables to the MCParticles collection.
double m_inputSAD_px
x momentum at lost position [m].
void convertParamsToSADUnits()
Convert the parameters from the SAD units to the basf2 units.
double z0
Initial position in Z
double m_inputSAD_ss
scattered position (|s|<Ltot/2) [m]
TGeoHMatrix * m_transMatrix
Transformation matrix from local SAD to global geant4 space.
double m_inputSAD_y
y at lost position [m].
void initialize(TGeoHMatrix *transMatrix, double sRange, AcceleratorRings accRing, double readoutTime)
Initializes the reader, sets the particle parameters and calculates important values.
double m_lostPy
y momentum at lost position [m].
AcceleratorRings
The both accelerator rings.
double x0
Initial position in X
double m_inputSAD_Lss
length of element in which scattered [m]
TFile * m_file
The input root file.
double dphi
Bending Angle for torus in phi.
double m_inputSAD_r
sqrt(x*x+y*y) [m]
double m_inputSAD_dp_over_p0
dp_over_p0
double m_inputSAD_s
lost position (|s|<Ltot/2) [m]
int calculateRealParticleNumber(double rate)
Calculates the number of real particles for a SAD particle.
double sphi
Bending Angle.
double m_inputSAD_xraw
x at lost position [m] before matching onto beam pipe inner surface
double m_inputSAD_ssraw
scattered position [m]
double m_inputSAD_E
energy at lost position [m].
Calculates the transformation matrix from local SAD to global geant4 space.
ReaderSAD()
Constructor of the ReaderSAD class.
void addAllSADParticles(MCParticleGraph &graph)
Reads all SAD particles from the file into the MCParticles collection which are inside the specified ...
double x0
Initial position in X.
double m_lostPx
x momentum at lost position [m].
double m_lostRate
loss rate [Hz]>
double m_inputSAD_yraw
y at lost position [m] before matching onto beam pipe inner surface
unsigned int m_realPartNum
The current number of the created real particles.
double z0
Initial position in Z.