5 : thePrimaryMass(mPrimary), theSecondaryMass(mSecondary) {}
11 double pT2 = px * px + py * py;
12 double p2 = pT2 + pz * pz;
19 rotMat[0][0] = px * pz / pT /
p;
20 rotMat[0][1] = -py /
pT;
21 rotMat[0][2] = px /
p;
23 rotMat[1][0] = py * pz / pT /
p;
24 rotMat[1][1] = px /
pT;
25 rotMat[1][2] = py /
p;
27 rotMat[2][0] = -pT /
p;
29 rotMat[2][2] = pz /
p;
38 double q = ((rho < 0) ? -1. : 1.);
39 double conv = q * zMagField;
41 double stheta =
sin(theta);
42 double ctheta =
cos(theta);
43 double sphi =
sin(phi);
44 double cphi =
cos(phi);
48 curv2cart[0][0] = -rho * cphi;
49 curv2cart[0][1] = -rho * sphi;
52 curv2cart[1][0] = cphi * stheta * ctheta;
53 curv2cart[1][1] = sphi * stheta * ctheta;
54 curv2cart[1][2] = -stheta * stheta;
56 curv2cart[2][0] = -sphi;
57 curv2cart[2][1] = cphi;
60 curv2cart *= rho /
conv;
70 double rt = fabs(zMagField / curv[0]);
73 cart[0] = rt *
cos(curv[2]);
74 cart[1] = rt *
sin(curv[2]);
75 cart[2] = rt /
tan(curv[1]);
89 double pT2 = px * px + py * py;
90 double p2 = pT2 + pz * pz;
93 double sphi =
sin(phi);
94 double cphi =
cos(phi);
95 double stheta =
sin(theta);
96 double ctheta =
cos(theta);
100 double c2 =
sqrt(c1 * c1 - 1.);
101 double c3 = 0.5 * c2 * ctheta /
c1;
108 pplus[2][0] = 0.5 * p + c3 * c4;
112 pminus[0][0] = -pplus[0][0];
113 pminus[1][0] = -pplus[1][0];
114 pminus[2][0] = 0.5 * p - c3 * c4;
118 return std::make_pair(rotMat * pplus, rotMat * pminus);
static HepMC::IO_HEPEVT conv
AlgebraicVector convertCurvilinearToCartesian(const AlgebraicVector &curv, double zMagField)
const AlgebraicVector & parameters(void) const
Get decay parameters.
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
AlgebraicMatrix rotationMatrix(double px, double py, double pz)
CLHEP::HepMatrix AlgebraicMatrix
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
TwoBodyDecayModel(double mPrimary=91.1876, double mSecondary=0.105658)
AlgebraicMatrix curvilinearToCartesianJacobian(double rho, double theta, double phi, double zMagField)
CLHEP::HepVector AlgebraicVector
const AlgebraicVector & parameters(void) const
const std::pair< AlgebraicVector, AlgebraicVector > cartesianSecondaryMomenta(const AlgebraicVector ¶m)