7 const std::vector<RefCountedLinearizedTrackState> &
tracks,
13 if (!linTrack1 || !linTrack2)
20 secondaryMomentum1[0] = firstMomentum.
x();
21 secondaryMomentum1[1] = firstMomentum.
y();
22 secondaryMomentum1[2] = firstMomentum.
z();
25 secondaryMomentum2[0] = secondMomentum.
x();
26 secondaryMomentum2[1] = secondMomentum.
y();
27 secondaryMomentum2[2] = secondMomentum.
z();
29 AlgebraicVector primaryMomentum = secondaryMomentum1 + secondaryMomentum2;
35 double p = primaryMomentum.norm();
36 double pSquared =
p *
p;
40 lorentzTransformation[0][0] =
gamma;
41 lorentzTransformation[3][3] =
gamma;
42 lorentzTransformation[0][3] = -betaGamma;
44 double p1 = secondaryMomentum1.norm();
47 boostedLorentzMomentum1.sub(2, invRotMat * secondaryMomentum1);
49 AlgebraicVector restFrameLorentzMomentum1 = lorentzTransformation * boostedLorentzMomentum1;
50 AlgebraicVector restFrameMomentum1 = restFrameLorentzMomentum1.sub(2, 4);
51 double perp1 =
sqrt(restFrameMomentum1[0] * restFrameMomentum1[0] + restFrameMomentum1[1] * restFrameMomentum1[1]);
52 double theta1 = atan2(perp1, restFrameMomentum1[2]);
53 double phi1 = atan2(restFrameMomentum1[1], restFrameMomentum1[0]);
55 double p2 = secondaryMomentum2.norm();
58 boostedLorentzMomentum2.sub(2, invRotMat * secondaryMomentum2);
60 AlgebraicVector restFrameLorentzMomentum2 = lorentzTransformation * boostedLorentzMomentum2;
61 AlgebraicVector restFrameMomentum2 = restFrameLorentzMomentum2.sub(2, 4);
62 double perp2 =
sqrt(restFrameMomentum2[0] * restFrameMomentum2[0] + restFrameMomentum2[1] * restFrameMomentum2[1]);
63 double theta2 = atan2(
perp2, restFrameMomentum2[2]);
64 double phi2 = atan2(restFrameMomentum2[1], restFrameMomentum2[0]);
66 double pi = 3.141592654;
76 double momentumSquared1 = secondaryMomentum1.normsq();
78 double momentumSquared2 = secondaryMomentum2.normsq();
80 double sumMomentaSquared = (secondaryMomentum1 + secondaryMomentum2).normsq();
81 double sumEnergiesSquared = (energy1 + energy2) * (energy1 + energy2);
82 double estimatedPrimaryMass =
sqrt(sumEnergiesSquared - sumMomentaSquared);
const TrajectoryStateClosestToPoint & predictedState() const
T perp2() const
Squared magnitude of transverse component.
AlgebraicMatrix rotationMatrix(double px, double py, double pz)
CLHEP::HepMatrix AlgebraicMatrix
primaryMass
Define the TBD.
virtual const TwoBodyDecayParameters getLinearizationPoint(const std::vector< RefCountedLinearizedTrackState > &tracks, const double primaryMass, const double secondaryMass) const
CLHEP::HepVector AlgebraicVector
auto const & tracks
cannot be loose
CLHEP::HepSymMatrix AlgebraicSymMatrix
GlobalVector momentum() const