11 #include <TDatabasePDG.h>
21 #include "KFParticle.h"
60 SetTracks(particle1, pid1, particle2, pid2);
84 const Double_t cpid1 =
85 TDatabasePDG::Instance()->GetParticle(pid1)->Charge() * 3;
86 const Double_t cpid2 =
87 TDatabasePDG::Instance()->GetParticle(pid2)->Charge() * 3;
94 if (particle1->
Charge() == cpid2) {
98 if (particle2->
Charge() == cpid1) {
144 Float_t* par1 = kf1.Parameters();
148 par1[3] = particle1->
GetPx();
149 par1[4] = particle1->
GetPy();
150 par1[5] = particle1->
GetPz();
156 Float_t* par2 = kf2.Parameters();
160 par2[3] = particle2->
GetPx();
161 par2[4] = particle2->
GetPy();
162 par2[5] = particle2->
GetPz();
168 fPair.AddDaughter(kf1);
169 fPair.AddDaughter(kf2);
176 Double_t& phiCS)
const {
180 Double_t px1 =
fD1.GetPx();
181 Double_t py1 =
fD1.GetPy();
182 Double_t pz1 =
fD1.GetPz();
183 Double_t px2 =
fD2.GetPx();
184 Double_t py2 =
fD2.GetPy();
185 Double_t pz2 =
fD2.GetPz();
186 const Double_t d1Mass = TDatabasePDG::Instance()->GetParticle(
fPid1)->Mass();
187 const Double_t d2Mass = TDatabasePDG::Instance()->GetParticle(
fPid2)->Mass();
190 TLorentzVector p1Mom(
194 TMath::Sqrt(px1 * px1 + py1 * py1 + pz1 * pz1 + d1Mass * d1Mass));
195 TLorentzVector p2Mom(
199 TMath::Sqrt(px2 * px2 + py2 * py2 + pz2 * pz2 + d2Mass * d2Mass));
201 TLorentzVector motherMom = p1Mom + p2Mom;
204 motherMom, p1Mom, p2Mom, thetaHE, phiHE, thetaCS, phiCS);
274 Int_t qD1 =
fD1.GetQ();
276 TVector3 momNeg((qD1 < 0 ?
fD1.GetPx() :
fD2.GetPx()),
277 (qD1 < 0 ?
fD1.GetPy() :
fD2.GetPy()),
278 (qD1 < 0 ?
fD1.GetPz() :
fD2.GetPz()));
279 TVector3 momPos((qD1 < 0 ?
fD2.GetPx() :
fD1.GetPx()),
280 (qD1 < 0 ?
fD2.GetPy() :
fD1.GetPy()),
281 (qD1 < 0 ?
fD2.GetPz() :
fD1.GetPz()));
282 TVector3 momTot(
Px(),
Py(),
Pz());
284 Double_t lQlNeg = momNeg.Dot(momTot) / momTot.Mag();
285 Double_t lQlPos = momPos.Dot(momTot) / momTot.Mag();
287 return ((lQlPos - lQlNeg) / (lQlPos + lQlNeg));
295 Int_t qD1 =
fD1.GetQ();
297 TVector3 momNeg((qD1 < 0 ?
fD1.GetPx() :
fD2.GetPx()),
298 (qD1 < 0 ?
fD1.GetPy() :
fD2.GetPy()),
299 (qD1 < 0 ?
fD1.GetPz() :
fD2.GetPz()));
300 TVector3 momTot(
Px(),
Py(),
Pz());
302 return (momNeg.Perp(momTot));
311 Double_t px1 = -9999., py1 = -9999., pz1 = -9999.;
312 Double_t px2 = -9999., py2 = -9999., pz2 = -9999.;
315 if (
fD1.GetQ() > 0) {
333 if (
fD1.GetQ() > 0) {
352 Double_t px = px1 + px2;
353 Double_t py = py1 + py2;
354 Double_t pz = pz1 + pz2;
355 Double_t dppair = TMath::Sqrt(px * px + py * py + pz * pz);
358 Double_t pl = dppair;
359 Double_t ux = px / pl;
360 Double_t uy = py / pl;
361 Double_t uz = pz / pl;
362 Double_t ax = uy / TMath::Sqrt(ux * ux + uy * uy);
363 Double_t ay = -ux / TMath::Sqrt(ux * ux + uy * uy);
378 Double_t vpx = pyep * pzem - pzep * pyem;
379 Double_t vpy = pzep * pxem - pxep * pzem;
380 Double_t vpz = pxep * pyem - pyep * pxem;
381 Double_t vp =
sqrt(vpx * vpx + vpy * vpy + vpz * vpz);
385 Double_t vx = vpx / vp;
386 Double_t vy = vpy / vp;
387 Double_t vz = vpz / vp;
390 Double_t wx = uy * vz - uz * vy;
391 Double_t wy = uz * vx - ux * vz;
398 Double_t cosPhiV = wx * ax + wy * ay;
399 Double_t phiv = TMath::ACos(cosPhiV);