15 #include <TDatabasePDG.h>
57 SetTracks(particle1, pid1, particle2, pid2);
81 const Double_t mpid1 = TDatabasePDG::Instance()->GetParticle(pid1)->Mass();
82 const Double_t mpid2 = TDatabasePDG::Instance()->GetParticle(pid2)->Mass();
83 const Double_t cpid1 =
84 TDatabasePDG::Instance()->GetParticle(pid1)->Charge() * 3;
85 const Double_t cpid2 =
86 TDatabasePDG::Instance()->GetParticle(pid2)->Charge() * 3;
93 if (particle1->
Charge() == cpid2) {
97 if (particle2->
Charge() == cpid1) {
103 Double_t e1 = TMath::Sqrt(m1 * m1 + particle1->
Px() * particle1->
Px()
104 + particle1->
Py() * particle1->
Py()
105 + particle1->
Pz() * particle1->
Pz());
107 Double_t e2 = TMath::Sqrt(m2 * m2 + particle2->
Px() * particle2->
Px()
108 + particle2->
Py() * particle2->
Py()
109 + particle2->
Pz() * particle2->
Pz());
113 fD1.SetPxPyPzE(particle1->
Px(), particle1->
Py(), particle1->
Pz(), e1);
114 fD2.SetPxPyPzE(particle2->
Px(), particle2->
Py(), particle2->
Pz(), e2);
135 TLorentzVector fD1Pos(particle1->
GetStartX(),
139 TLorentzVector fD2Pos(particle2->
GetStartX(),
157 Double_t& phiCS)
const {
162 TLorentzVector motherMom(
fPair);
163 TLorentzVector p1Mom(
fD1);
164 TLorentzVector p2Mom(
fD2);
166 motherMom, p1Mom, p2Mom, thetaHE, phiHE, thetaCS, phiCS);
181 Double_t m1[3] = {0, 0, 0};
182 Double_t m2[3] = {0, 0, 0};
192 Double_t deltat = 1.;
195 TMath::ATan(m2[2] / (TMath::Sqrt(m2[0] * m2[0] + m2[1] * m2[1]) + 1.e-13))
197 / (TMath::Sqrt(m1[0] * m1[0] + m1[1] * m1[1]) + 1.e-13));
201 Double_t mom1Prop[3] = {0., 0., 0.};
202 Double_t mom2Prop[3] = {0., 0., 0.};
205 Double_t fPsiPair = 4.;
221 TMath::Sqrt(mom2Prop[0] * mom2Prop[0] + mom2Prop[1] * mom2Prop[1]
222 + mom2Prop[2] * mom2Prop[2]);
224 TMath::Sqrt(mom1Prop[0] * mom1Prop[0] + mom1Prop[1] * mom1Prop[1]
225 + mom1Prop[2] * mom1Prop[2]);
227 Double_t scalarproduct = mom1Prop[0] * mom2Prop[0] + mom1Prop[1] * mom2Prop[1]
228 + mom1Prop[2] * mom2Prop[2];
230 Double_t chipair = TMath::ACos(scalarproduct / (pEle * pPos));
232 fPsiPair = TMath::Abs(TMath::ASin(deltat / chipair));
244 TVector3 momNeg = (qD1 < 0 ?
fD1.Vect() :
fD2.Vect());
245 TVector3 momPos = (qD1 < 0 ?
fD2.Vect() :
fD1.Vect());
246 TVector3 momTot(
Px(),
Py(),
Pz());
248 Double_t lQlNeg = momNeg.Dot(momTot) / momTot.Mag();
249 Double_t lQlPos = momPos.Dot(momTot) / momTot.Mag();
251 return ((lQlPos - lQlNeg) / (lQlPos + lQlNeg));
261 TVector3 momNeg = (qD1 < 0 ?
fD1.Vect() :
fD2.Vect());
262 TVector3 momTot(
Px(),
Py(),
Pz());
263 return (momNeg.Perp(momTot));
289 p1 = (qD1 > 0 ?
fD1.Vect() :
fD2.Vect());
290 p2 = (qD1 > 0 ?
fD2.Vect() :
fD1.Vect());
292 p2 = (qD1 > 0 ?
fD1.Vect() :
fD2.Vect());
293 p1 = (qD1 > 0 ?
fD2.Vect() :
fD1.Vect());
297 TVector3 u =
fPair.Vect();
301 TVector3 vpm = p1.Cross(p2);
306 TVector3 w = u.Cross(vpm);
310 u.Pz() / TMath::Sqrt(u.Px() + u.Px() + u.Pz() + u.Pz());
314 / TMath::Sqrt(u.Px() + u.Px() + u.Pz() + u.Pz());
315 TVector3 a(ax, ay, az);
321 Double_t phiv = w.Angle(a);
332 Double_t rotAngle = rot->
GetAngle();
344 && rotCharge == 0)) {
345 if (
first->Charge() > 0)
346 fD1.RotateZ(rotAngle);
348 fD2.RotateZ(rotAngle);
353 && rotCharge == 1)) {
354 if (
first->Charge() > 0)
355 fD1.RotateZ(rotAngle);
357 fD2.RotateZ(rotAngle);