6 thePrimaryMass( mPrimary ), theSecondaryMass( mSecondary ) {}
15 double pT2 = px*px + py*py;
16 double p2 = pT2 + pz*pz;
17 double pT =
sqrt( pT2 );
18 double p =
sqrt( p2 );
23 rotMat[0][0] = px*pz/pT/
p;
24 rotMat[0][1] = -py/pT;
27 rotMat[1][0] = py*pz/pT/
p;
41 double q = ( ( rho < 0 ) ? -1. : 1. );
42 double conv = q*zMagField;
44 double stheta =
sin( theta );
45 double ctheta =
cos( theta );
46 double sphi =
sin( phi );
47 double cphi =
cos( phi );
51 curv2cart[0][0] = -rho*cphi;
52 curv2cart[0][1] = -rho*sphi;
55 curv2cart[1][0] = cphi*stheta*ctheta;
56 curv2cart[1][1] = sphi*stheta*ctheta;
57 curv2cart[1][2] = -stheta*stheta;
59 curv2cart[2][0] = -sphi;
60 curv2cart[2][1] = cphi;
63 curv2cart *= rho/
conv;
77 double rt = fabs( zMagField/curv[0] );
80 cart[0] = rt*
cos( curv[2] );
81 cart[1] = rt*
sin( curv[2] );
82 cart[2] = rt/
tan( curv[1] );
97 double pT2 = px*px + py*py;
98 double p2 = pT2 + pz*pz;
99 double p =
sqrt( p2 );
101 double sphi =
sin( phi );
102 double cphi =
cos( phi );
103 double stheta =
sin( theta );
104 double ctheta =
cos( theta );
108 double c2 =
sqrt( c1*c1 - 1. );
109 double c3 = 0.5*c2*ctheta/
c1;
116 pplus[2][0] = 0.5*p + c3*c4;
120 pminus[0][0] = -pplus[0][0];
121 pminus[1][0] = -pplus[1][0];
122 pminus[2][0] = 0.5*p - c3*c4;
126 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)