Belle II Software development
|
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 | setGenerationFlags (int flags) override |
Set the generation flags to be used for event generation (ORed combination of EGenerationFlags). | |
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. | |
void | setCovVertex (const TMatrixDSym &cov) |
Set the covariance matrix of the vertex position. | |
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. | |
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. | |
void | setVertex (const ROOT::Math::XYZVector &vertex, const std::vector< double > &cov) |
Set the vertex position and error matrix. | |
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 ROOT::Math::PxPyPzEVector &ler) |
Set the Low Energy Beam 4-momentum. | |
void | setHER (const ROOT::Math::PxPyPzEVector &her) |
Set the High Energy Beam 4-momentum. | |
void | setVertex (const ROOT::Math::XYZVector &vertex) |
Set the vertex position. | |
bool | operator== (const MCInitialParticles &b) const |
Equality operator. | |
void | set (const ROOT::Math::PxPyPzEVector &her, const ROOT::Math::PxPyPzEVector &ler, const ROOT::Math::XYZVector &vertex) |
Set the initial event values, i.e. | |
void | setByLorentzTransformation (double Ecms, double bX, double bY, double bZ, double angleXZ, double angleYZ, const ROOT::Math::XYZVector &vertex) |
Initialize the event values from CMS energy and parameters of the Lorentz transformation between LAB and CMS. | |
void | setTime (double time) |
Set collision time. | |
const ROOT::Math::PxPyPzEVector & | getHER () const |
Get 4vector of the high energy beam. | |
const ROOT::Math::PxPyPzEVector & | getLER () const |
Get 4vector of the low energy beam. | |
const ROOT::Math::XYZVector & | getVertex () const |
Get the position of the collision. | |
double | getTime () const |
Get collision time. | |
double | getEnergy () const |
Get the actual collision energy (in lab system) | |
double | getMass () const |
Get the invariant mass of the collision (= energy in CMS) | |
ROOT::Math::XYZVector | getBoostVector () const |
Get the boost vector (velocity of system produced in the collision) | |
ROOT::Math::PxPyPzEVector | getBoostedHER () const |
Get the 4-vector of electron beam in CM system obtained by pure boost. | |
const ROOT::Math::LorentzRotation & | getLabToCMS () const |
Return the LorentzRotation to convert from lab to CMS frame. | |
const ROOT::Math::LorentzRotation & | 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. | |
Static Public Member Functions | |
static ROOT::Math::PxPyPzEVector | getFourVector (double energy, double angleX, double angleY, bool isHER) |
Calculate FourVector of a beam from energy and angles in xz and yz planes. | |
static ROOT::Math::LorentzRotation | cmsToLab (double bX, double bY, double bZ, double angleXZ, double angleYZ) |
Return the LorentzRotation from CMS to LAB based on the following parameters. | |
Protected Attributes | |
int | m_generationFlags {0} |
Flags to be used when generating events. | |
Private Member Functions | |
ClassDefOverride (BeamParameters, 3) | |
ClassDef. | |
void | calculateBoost () const |
Calculate the Lorentz transformations LAB->CMS & CMS->LAB if necessary. | |
void | resetBoost () |
Reset cached transformations after changing parameters. | |
ClassDef (MCInitialParticles, 5) | |
ROOT Dictionary. | |
Static Private Member Functions | |
static void | setCovMatrix (Double32_t *member, const std::vector< double > &cov, bool common) |
Set covariance matrix from vector of entries. | |
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. | |
ROOT::Math::PxPyPzEVector | m_her |
HER 4vector. | |
ROOT::Math::PxPyPzEVector | m_ler |
LER 4vector. | |
ROOT::Math::XYZVector | m_vertex |
collision position | |
double | m_time = 0 |
collision time | |
ROOT::Math::LorentzRotation * | m_labToCMS {nullptr} |
Boost from Lab into CMS. | |
ROOT::Math::LorentzRotation * | m_CMSToLab {nullptr} |
transient | |
double | m_invariantMass {0.0} |
transient | |
ROOT::Math::PxPyPzEVector | m_boostedHER |
transient | |
bool | m_validFlag = false |
transient | |
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 25 of file BeamParameters.h.
|
inherited |
Possible Flags for initial event generation.
Definition at line 35 of file MCInitialParticles.h.
|
inline |
Default constructor.
Definition at line 34 of file BeamParameters.h.
|
inline |
Copy constructor.
Definition at line 41 of file BeamParameters.h.
|
staticinherited |
Return the LorentzRotation from CMS to LAB based on the following parameters.
bX | x-component of the boost vector, i.e. of (pHER + pLER) / (eHER + eLER), where pHER & pLER are momentum 3-vectors |
bY | y-component of the boost vector, i.e. of (pHER + pLER) / (eHER + eLER), where pHER & pLER are momentum 3-vectors |
bZ | z-component of the boost vector, i.e. of (pHER + pLER) / (eHER + eLER), where pHER & pLER are momentum 3-vectors |
angleXZ | angle in the XZ plane of the collision axis in the CM system obtained by pure boost |
angleYZ | angle in the YZ plane of the collision axis in the CM system obtained by pure boost |
Definition at line 31 of file MCInitialParticles.cc.
|
inlineinherited |
Get the 4-vector of electron beam in CM system obtained by pure boost.
Definition at line 184 of file MCInitialParticles.h.
|
inlineinherited |
Get the boost vector (velocity of system produced in the collision)
Definition at line 181 of file MCInitialParticles.h.
|
inlineinherited |
Return the LorentzRotation to convert from CMS to lab frame.
Definition at line 193 of file MCInitialParticles.h.
|
inline |
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.
Definition at line 157 of file BeamParameters.h.
|
inline |
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.
Definition at line 162 of file BeamParameters.h.
|
inline |
|
inlineinherited |
Get the actual collision energy (in lab system)
Definition at line 175 of file MCInitialParticles.h.
|
static |
Calculate FourVector of a beam from energy and angles in xz and yz planes.
if isHER=true, the angles are measured wrt +p if isHER=false, the angles are measured wrt -p, as is the standard convention for LER
energy | beam energy |
angleX | horizontal angle wrt z-axis, i.e. angle measured in xz plane |
angleY | vertical angle wrt z-axis, i.e. angle measured in yz plane |
isHER | isHER=true for HER, isHER=false for LER |
|
inlineinherited |
Get the generation flags to be used for event generation (ORed combination of EGenerationFlags)
Definition at line 202 of file MCInitialParticles.h.
|
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 |
|
inlineinherited |
Return the LorentzRotation to convert from lab to CMS frame.
Definition at line 187 of file MCInitialParticles.h.
|
inlineinherited |
|
inlineinherited |
Get the invariant mass of the collision (= energy in CMS)
Definition at line 178 of file MCInitialParticles.h.
|
inlineinherited |
|
inlineinherited |
Get the flag to check if a valid MCInitialParticles object was already generated and filled in an event.
Definition at line 199 of file MCInitialParticles.h.
|
inlineinherited |
Get the position of the collision.
Definition at line 169 of file MCInitialParticles.h.
|
inlineinherited |
Check if a certain set of EGenerationFlags is set.
Definition at line 205 of file MCInitialParticles.h.
|
inline |
Assignment operator.
Definition at line 49 of file BeamParameters.h.
|
inline |
Equality operator.
Definition at line 59 of file BeamParameters.h.
|
inlineinherited |
Equality operator.
Definition at line 67 of file MCInitialParticles.h.
|
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 96 of file MCInitialParticles.h.
|
inlineinherited |
Initialize the event values from CMS energy and parameters of the Lorentz transformation between LAB and CMS.
In addition the vertex is also initialized.
Ecms | centre-of-mass energy of the collision |
bX | x-component of the boost vector, i.e. of (pHER + pLER) / (eHER + eLER), where pHER & pLER are momentum 3-vectors |
bY | y-component of the boost vector, i.e. of (pHER + pLER) / (eHER + eLER), where pHER & pLER are momentum 3-vectors |
bZ | z-component of the boost vector, i.e. of (pHER + pLER) / (eHER + eLER), where pHER & pLER are momentum 3-vectors |
angleXZ | angle in the XZ plane of the collision axis in the CM system obtained by pure boost |
angleYZ | angle in the YZ plane of the collision axis in the CM system obtained by pure boost |
vertex | position of the actual collision vertex |
Definition at line 115 of file MCInitialParticles.h.
|
inline |
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.
Definition at line 91 of file BeamParameters.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 97 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 100 of file BeamParameters.h.
|
inlineoverridevirtual |
Set the generation flags to be used for event generation (ORed combination of EGenerationFlags).
The only difference w.r.t. MCInitialParticles::setGenerationFlags() is that a WARNING is thrown if a flag different from 14 (= all the smearings turned on) is set.
Reimplemented from MCInitialParticles.
Definition at line 74 of file BeamParameters.h.
|
inline |
Set the High Energy Beam 4-momentum.
Definition at line 137 of file MCInitialParticles.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. |
|
inline |
Set the Low Energy Beam 4-momentum.
Definition at line 144 of file MCInitialParticles.h.
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. |
|
inlineinherited |
|
inline |
Set the vertex position.
Definition at line 151 of file MCInitialParticles.h.
void setVertex | ( | const ROOT::Math::XYZVector & | 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
HER 4-momentum in CM frame obtained by pure boost (calculated on first use, not saved to file)
Definition at line 242 of file MCInitialParticles.h.
|
mutableprivateinherited |
transient
Boost from CMS into lab. (calculated on first use, not saved to file)
Definition at line 238 of file MCInitialParticles.h.
|
private |
Covariance matrix of the high energy beam at the IP.
Definition at line 207 of file BeamParameters.h.
|
private |
Covariance matrix of the low energy beam at the IP.
Definition at line 210 of file BeamParameters.h.
|
private |
Covariance matrix of the vertex position.
Definition at line 213 of file BeamParameters.h.
|
protectedinherited |
Flags to be used when generating events.
Definition at line 249 of file MCInitialParticles.h.
|
privateinherited |
HER 4vector.
Definition at line 228 of file MCInitialParticles.h.
|
mutableprivateinherited |
transient
invariant mass of HER+LER (calculated on first use, not saved to file)
Definition at line 240 of file MCInitialParticles.h.
|
mutableprivateinherited |
Boost from Lab into CMS.
(calculated on first use, not saved to file)
Definition at line 236 of file MCInitialParticles.h.
|
privateinherited |
LER 4vector.
Definition at line 230 of file MCInitialParticles.h.
|
privateinherited |
collision time
Definition at line 234 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 244 of file MCInitialParticles.h.
|
privateinherited |
collision position
Definition at line 232 of file MCInitialParticles.h.