Utility class to calculate the Klong kinematics.
More...
#include <KlongCalculatorUtils.h>
|
static bool | calculateBtoKlongX (ROOT::Math::PxPyPzEVector &BMomentum, ROOT::Math::PxPyPzEVector &KMomentum, const std::vector< Particle * > daughters, const double m_b, int &idx) |
| Calculate kinematics of two body B decays containing a K_L0. More...
|
|
Utility class to calculate the Klong kinematics.
Definition at line 31 of file KlongCalculatorUtils.h.
◆ calculateBtoKlongX()
static bool calculateBtoKlongX |
( |
ROOT::Math::PxPyPzEVector & |
BMomentum, |
|
|
ROOT::Math::PxPyPzEVector & |
KMomentum, |
|
|
const std::vector< Particle * > |
daughters, |
|
|
const double |
m_b, |
|
|
int & |
idx |
|
) |
| |
|
inlinestatic |
Calculate kinematics of two body B decays containing a K_L0.
- Parameters
-
BMomentum | 4-vector of B-meson that will be updated by this function |
KMomentum | 4-vector of Klong that will be updated by this function |
daughters | Original daughters of the B-meson |
m_b | PDG-mass of the B-meson |
idx | Array index of the other daughter. This will be assigned to the extraInfo, permID, of Klong. |
- Returns
- true if the kinematics is physical
Definition at line 41 of file KlongCalculatorUtils.h.
49 ROOT::Math::PxPyPzEVector klDaughters;
50 ROOT::Math::PxPyPzEVector pDaughters;
52 for (
auto daughter : daughters) {
55 B2FATAL(
"More than one K_L is detected! This tool accepts only one K_L in the final state.");
59 klDaughters = klm_cluster->getMomentum();
66 B2ERROR(
"K_L candidate must have related KLM or ECL cluster!");
71 pDaughters += daughter->get4Vector();
74 m_j = daughter->getPDGMass();
75 idx = daughter->getArrayIndex() + idx * 100;
80 B2FATAL(
"This tool is meant to reconstruct decays with a K_L0 in the final state. There is no K_L0 in this decay!");
83 if (daughters.size() == 3) {
89 const double s_p = (klDaughters.Vect().Unit()).Dot(pDaughters.Vect());
90 const double m_sum = (m_b * m_b) - (m_j * m_j) - m_k2;
92 const double s_p2 = s_p * s_p;
93 const double m_sum2 = m_sum * m_sum;
94 const double s_pm = s_p * m_sum;
95 const double e_j2 = pDaughters.E() * pDaughters.E();
97 const double k_mag1 = (s_pm +
std::sqrt(s_p2 * m_sum2 - 4 * (e_j2 - s_p2) * (e_j2 * m_k2 - m_sum2 / 4))) / (2 *
99 const double k_mag2 = (s_pm -
std::sqrt(s_p2 * m_sum2 - 4 * (e_j2 - s_p2) * (e_j2 * m_k2 - m_sum2 / 4))) / (2 *
103 ROOT::Math::PxPyPzEVector missDaughters;
106 missDaughters = k_mag1 * klDaughters / klDaughters.P();
108 missDaughters = k_mag2 * klDaughters / klDaughters.P();
110 missDaughters.SetE(
std::sqrt(m_k2 + missDaughters.P2()));
112 if (isnan(missDaughters.P()))
115 ROOT::Math::PxPyPzEVector mom = pDaughters + missDaughters;
116 mom.SetE(
std::sqrt(m_b * m_b + mom.P2()));
120 KMomentum = missDaughters;
int getPDGCode() const
PDG code.
double getMass() const
Particle mass.
static const ParticleType Klong
K^0_L particle.
@ c_neutralHadron
CR is reconstructed as a neutral hadron (N2)
double sqrt(double a)
sqrt for double
The documentation for this struct was generated from the following file: