3 TLorentzVector Particle1,
4 TLorentzVector Particle2,
9 double E_Particle1 = Particle1.E();
10 double p_Particle1_x = Particle1.Px();
11 double p_Particle1_y = Particle1.Py();
12 double p_Particle1_z = Particle1.Pz();
13 double p_Particle1 = sqrt(TMath::Power(p_Particle1_x,2.0) +
14 TMath::Power(p_Particle1_y,2.0) +
15 TMath::Power(p_Particle1_z,2.0));
16 double phi = Particle2.Phi();
17 double theta = Particle2.Theta();
18 double b = 2.0 * ( p_Particle1_x * cos(phi) * sin(theta) +
19 p_Particle1_y * sin(phi) * sin(theta) +
20 p_Particle1_z * cos(theta) -
25 double e = TMath::Power(Particle3Mass,2.0) - TMath::Power(Particle2Mass,2.0) -
d *
d +
c;
26 double Delta = 16.0 * TMath::Power(
d,2.0) * (TMath::Power(e,2.0) +
27 TMath::Power(b * Particle2Mass,2.0) -
28 TMath::Power(
d * Particle2Mass * 2.0,2.0));
30 TLorentzVector NewParticle(0.0,0.0,0.0,0.0);
33 double sol2 = (2.0 * e * b + sqrt(Delta)) / (2.0 * (4.0 * TMath::Power(
d,2.0) - TMath::Power(b,2.0)));
34 double newpxcal = sol2 * cos(phi) * sin(theta);
35 double newpycal = sol2 * sin(phi) * sin(theta);
36 double newpzcal = sol2 * cos(theta);
37 double energy = sqrt(TMath::Power(sol2,2.0) + TMath::Power(Particle2Mass,2.0));
39 TLorentzVector NewParticle2(newpxcal,newpycal,newpzcal,energy);
40 NewParticle = NewParticle2;
TLorentzVector doCalEnergy(double BeamEnergy, TLorentzVector Particle1, TLorentzVector Particle2, double nucleusMass, double Particle2Mass, double Particle3Mass)