19#include "analysis/OrcaKInFit/FourVector.h"
33 namespace OrcaKinFit {
39 double pP = -(
p * P.p);
43 E = (e * P.getE() - pP) / M;
44 p =
p - ((pP / (P.getE() + M) - e) / M) * P.p;
59 double m1 = d1.getM();
60 double m2 = d2.getM();
63 gRandom->RndmArray(2, randoms);
67 double pstar = 0.5 *
sqrt(abs((M2 - pow(m1 + m2, 2)) * (M2 - pow(m1 - m2, 2)))) / M;
68 double phistar = 2 * M_PI * randoms[0];
69 double costhetastar = 2 * randoms[1] - 1;
70 double sinthetastar =
sqrt(abs(1 - costhetastar * costhetastar));
71 double E1 =
sqrt(m1 * m1 + pstar * pstar);
72 double E2 =
sqrt(m2 * m2 + pstar * pstar);
75 d1 =
FourVector(E1, pstar * sinthetastar * cos(phistar),
76 pstar * sinthetastar * sin(phistar),
77 pstar * costhetastar);
78 d2 =
FourVector(E2, -pstar * sinthetastar * cos(phistar),
79 -pstar * sinthetastar * sin(phistar),
80 -pstar * costhetastar);
Yet another four vector class, with metric +—.
FourVector()
Default constructor.
double E
The energy / 0 component.
double getM2() const
Returns the mass squared / magnitude squared.
double getM() const
Returns the mass / magnitude.
ThreeVector p
The momentum three vector.
double getE() const
Returns the energy / 0 component.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.