![]() |
Belle II Software
release-06-02-00
|
This class contains the nominal beam parameters and the parameters used for smearing of the primary vertex and the beam energy and momentum. More...
#include <BeamParameters.h>
Public Types | |
enum | EGenerationFlags { c_generateCMS = 1 << 0 , c_smearBeamEnergy = 1 << 1 , c_smearBeamDirection = 1 << 2 , c_smearBeam = c_smearBeamEnergy | c_smearBeamDirection , c_smearVertex = 1 << 3 , c_smearALL = c_smearVertex | c_smearBeam } |
Possible Flags for initial event generation. More... | |
Public Member Functions | |
BeamParameters () | |
default constructor | |
BeamParameters (const BeamParameters &b) | |
copy constructor | |
BeamParameters & | operator= (const BeamParameters &b) |
assignment operator | |
bool | operator== (const BeamParameters &b) const |
equality operator | |
void | setCovHER (const TMatrixDSym &cov) |
Set the covariance matrix for HER (E, theta_x, theta_y) where E is the energy, theta_x is the horizontal angle between nominal direction and actual direction in spread and theta_y is the vertical angle The upper triangle will be saved. | |
void | setCovLER (const TMatrixDSym &cov) |
Set the covariance matrix for LER (E, theta_x, theta_y) where E is the energy, theta_x is the horizontal angle between nominal direction and actual direction in spread and theta_y is the vertical angle. More... | |
void | setCovVertex (const TMatrixDSym &cov) |
Set the covariance matrix of the vertex position. More... | |
void | setHER (double energy, double angleX, double angleY, const std::vector< double > &cov) |
Set the HER FourVector and error matrix from beam energy, angle and covariance entries. More... | |
void | setLER (double energy, double angleX, double angleY, const std::vector< double > &cov) |
Set the LER FourVector and error matrix from beam energy, angle and covariance entries. More... | |
void | setVertex (const TVector3 &vertex, const std::vector< double > &cov) |
Set the vertex position and error matrix. More... | |
TMatrixDSym | getCovHER () const |
Get the covariance matrix of HER (E, theta_x, theta_y) where E is the energy, theta_x is the horizontal angle between nominal direction and actual direction in spread and theta_y is the vertical angle. | |
TMatrixDSym | getCovLER () const |
Get the covariance matrix of LER (E, theta_x, theta_y) where E is the energy, theta_x is the horizontal angle between nominal direction and actual direction in spread and theta_y is the vertical angle. | |
TMatrixDSym | getCovVertex () const |
Get the covariance matrix of the vertex position. | |
void | setLER (const TLorentzVector &ler) |
Set the Low Energy Beam 4-momentum. | |
void | setHER (const TLorentzVector &her) |
Set the High Energy Beam 4-momentum. | |
void | setVertex (const TVector3 &vertex) |
Set the vertex position. | |
bool | operator== (const MCInitialParticles &b) const |
Equality operator. | |
void | set (const TLorentzVector &her, const TLorentzVector &ler, const TVector3 &vertex) |
Set the initial event values, i.e. More... | |
void | setHER (const TLorentzVector &her) |
Set the High Energy Beam 4-momentum. | |
void | setLER (const TLorentzVector &ler) |
Set the Low Energy Beam 4-momentum. | |
void | setVertex (const TVector3 &vertex) |
Set the vertex position. | |
void | setTime (double time) |
Set collison time. | |
void | setGenerationFlags (int flags) |
Set the generation flags to be used for event generation (ORed combination of EGenerationFlags) | |
const TLorentzVector & | getHER () const |
Get 4vector of the high energy beam. | |
const TLorentzVector & | getLER () const |
Get 4vector of the low energy beam. | |
const TVector3 & | getVertex () const |
Get the position of the collision. | |
double | getTime () const |
Get collison time. | |
double | getEnergy () const |
Get the the actual collision energy (in lab system) | |
double | getMass () const |
Get the invariant mass of the collision (= energy in CMS) | |
const TLorentzRotation & | getLabToCMS () const |
Return the LorentzRotation to convert from lab to CMS frame. | |
const TLorentzRotation & | getCMSToLab () const |
Return the LorentzRotation to convert from CMS to lab frame. | |
bool | getValidFlag () const |
Get the flag to check if a valid MCInitialParticles object was already generated and filled in an event. | |
int | getGenerationFlags () const |
Get the generation flags to be used for event generation (ORed combination of EGenerationFlags) | |
bool | hasGenerationFlags (int flags) const |
Check if a certain set of EGenerationFlags is set. | |
std::string | getGenerationFlagString (const std::string &separator=" ") const |
Return string representation of all active flags for printing. More... | |
Private Member Functions | |
ClassDef (BeamParameters, 2) | |
nominal beam and primary vertex parameters (including smearing). | |
void | calculateBoost () const |
Calculate the boost if necessary. | |
void | resetBoost () |
Reset cached transformations after changing parameters. | |
Static Private Member Functions | |
static TLorentzVector | getFourVector (double energy, double angleX, double angleY) |
Return energy smearing of LER. More... | |
static void | setCovMatrix (Double32_t *member, const std::vector< double > &cov, bool common) |
Set covariance matrix from vector of entries. More... | |
static void | setCovMatrix (Double32_t *member, const TMatrixDSym &cov) |
Set covariance matrix from ROOT Matrix object. | |
static TMatrixDSym | getCovMatrix (const Double32_t *member) |
Obtain covariance matrix from a given float array. | |
Private Attributes | |
Double32_t | m_covHER [6] |
Covariance matrix of the high energy beam at the IP. | |
Double32_t | m_covLER [6] |
Covariance matrix of the low energy beam at the IP. | |
Double32_t | m_covVertex [6] |
Covariance matrix of the vertex position. | |
TLorentzVector | m_her |
HER 4vector. | |
TLorentzVector | m_ler |
LER 4vector. | |
TVector3 | m_vertex |
collision position | |
double | m_time = 0 |
collision time | |
TLorentzRotation * | m_labToCMS {nullptr} |
Boost from Lab into CMS. More... | |
TLorentzRotation * | m_CMSToLab {nullptr} |
transient More... | |
double | m_invariantMass {0.0} |
transient More... | |
bool | m_validFlag = false |
transient More... | |
int | m_generationFlags {0} |
Flags to be used when generating events. | |
This class contains the nominal beam parameters and the parameters used for smearing of the primary vertex and the beam energy and momentum.
It is event independent (but might be run or even sub run dependent)
Definition at line 23 of file BeamParameters.h.
|
inherited |
Possible Flags for initial event generation.
Definition at line 30 of file MCInitialParticles.h.
|
staticprivate |
Return energy smearing of LER.
Return energy smearing of LER Return energy smearing of the CMS Calculate FourVector of a beam from energy and angle wrt the z-axis. Negative angles will be treated as angle = M_PI - fabs(angle)
energy | beam energy |
angleX | horizontal angle wrt z-axis |
angleY | vertical angle wrt z-axis |
|
inherited |
Return string representation of all active flags for printing.
separator | separation string to be put between flags |
Definition at line 13 of file MCInitialParticles.cc.
|
inlineinherited |
Set the initial event values, i.e.
the four momenta of both beams and the vertex
her | 4vector of the high energy beam |
ler | 4vector of the low energy beam |
vertex | position of the actual collision vertex |
Definition at line 91 of file MCInitialParticles.h.
|
inline |
Set the covariance matrix for LER (E, theta_x, theta_y) where E is the energy, theta_x is the horizontal angle between nominal direction and actual direction in spread and theta_y is the vertical angle.
The upper triangle will be saved.
Definition at line 68 of file BeamParameters.h.
|
staticprivate |
Set covariance matrix from vector of entries.
The vector for the covariance matrix can have either 0, 1, 3, 6 or 9 entries:
member | to the member which contains the matrix |
cov | entries for the covariance matrix |
common | if true a 1-element cov will be treated as the common variance for all diagonal elements |
|
inline |
Set the covariance matrix of the vertex position.
The upper triangle will be saved.
Definition at line 70 of file BeamParameters.h.
void setHER | ( | double | energy, |
double | angleX, | ||
double | angleY, | ||
const std::vector< double > & | cov | ||
) |
Set the HER FourVector and error matrix from beam energy, angle and covariance entries.
The vector for the covariance matrix can have either 0, 1, 3, 6 or 9 entries:
energy | beam energy |
angleX | angle between beam direction and z axis (in the x-z plane). Negative values are treated as M_PI - abs(angle) |
angleY | angle between beam direction and z axis (in the y-z plane). Negative values are treated as M_PI - abs(angle) |
cov | entries of the covariance matrix. |
void setLER | ( | double | energy, |
double | angleX, | ||
double | angleY, | ||
const std::vector< double > & | cov | ||
) |
Set the LER FourVector and error matrix from beam energy, angle and covariance entries.
The vector for the covariance matrix can have either 0, 1, 3, 6 or 9 entries:
energy | beam energy |
angleX | angle between beam direction and z axis (in the x-z plane). Negative values are treated as M_PI - abs(angle) |
angleY | angle between beam direction and z axis (in the y-z plane). Negative values are treated as M_PI - abs(angle) |
cov | entries of the covariance matrix. |
void setVertex | ( | const TVector3 & | vertex, |
const std::vector< double > & | cov | ||
) |
Set the vertex position and error matrix.
The vector for the covariance matrix can have either 0, 1, 3, 6 or 9 entries:
vertex | vertex position |
cov | entries of the covariance matrix. |
|
mutableprivateinherited |
transient
Boost from CMS into lab. (calculated on first use, not saved to file)
Definition at line 186 of file MCInitialParticles.h.
|
mutableprivateinherited |
transient
invariant mass of HER+LER (calculated on first use, not saved to file)
Definition at line 188 of file MCInitialParticles.h.
|
mutableprivateinherited |
Boost from Lab into CMS.
(calculated on first use, not saved to file)
Definition at line 184 of file MCInitialParticles.h.
|
privateinherited |
transient
Flag to check if a valid MCInitialParticles object was already generated and filled in an event.
Definition at line 190 of file MCInitialParticles.h.