17#include <TDatabasePDG.h>
47 SetTracks(pair.GetFirstDaughter(), pair.GetFirstDaughterPid(), pair.GetSecondDaughter(), pair.GetSecondDaughterPid());
62 SetTracks(particle1, pid1, particle2, pid2);
86 const Double_t mpid1 = TDatabasePDG::Instance()->GetParticle(pid1)->Mass();
87 const Double_t mpid2 = TDatabasePDG::Instance()->GetParticle(pid2)->Mass();
88 const Double_t cpid1 = TDatabasePDG::Instance()->GetParticle(pid1)->Charge() * 3;
89 const Double_t cpid2 = TDatabasePDG::Instance()->GetParticle(pid2)->Charge() * 3;
96 if (particle1->
Charge() == cpid2) {
100 if (particle2->
Charge() == cpid1) {
106 Double_t e1 = TMath::Sqrt(m1 * m1 + particle1->
Px() * particle1->
Px() + particle1->
Py() * particle1->
Py()
107 + particle1->
Pz() * particle1->
Pz());
109 Double_t e2 = TMath::Sqrt(m2 * m2 + particle2->
Px() * particle2->
Px() + particle2->
Py() * particle2->
Py()
110 + particle2->
Pz() * particle2->
Pz());
114 fD1.SetPxPyPzE(particle1->
Px(), particle1->
Py(), particle1->
Pz(), e1);
115 fD2.SetPxPyPzE(particle2->
Px(), particle2->
Py(), particle2->
Pz(), e2);
133 if (mother1 && mother2 && (mother1Id == mother2Id))
fWeight = particle1->
GetWeight();
169 TLorentzVector motherMom(
fPair);
170 TLorentzVector p1Mom(
fD1);
171 TLorentzVector p2Mom(
fD2);
188 Double_t m1[3] = {0, 0, 0};
189 Double_t m2[3] = {0, 0, 0};
199 Double_t deltat = 1.;
201 deltat = TMath::ATan(m2[2] / (TMath::Sqrt(m2[0] * m2[0] + m2[1] * m2[1]) + 1.e-13))
202 - TMath::ATan(m1[2] / (TMath::Sqrt(m1[0] * m1[0] + m1[1] * m1[1]) + 1.e-13));
206 Double_t mom1Prop[3] = {0., 0., 0.};
207 Double_t mom2Prop[3] = {0., 0., 0.};
210 Double_t fPsiPair = 4.;
225 Double_t pEle = TMath::Sqrt(mom2Prop[0] * mom2Prop[0] + mom2Prop[1] * mom2Prop[1] + mom2Prop[2] * mom2Prop[2]);
226 Double_t pPos = TMath::Sqrt(mom1Prop[0] * mom1Prop[0] + mom1Prop[1] * mom1Prop[1] + mom1Prop[2] * mom1Prop[2]);
228 Double_t scalarproduct = mom1Prop[0] * mom2Prop[0] + mom1Prop[1] * mom2Prop[1] + 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());
293 p2 = (qD1 > 0 ?
fD1.Vect() :
fD2.Vect());
294 p1 = (qD1 > 0 ?
fD2.Vect() :
fD1.Vect());
298 TVector3 u =
fPair.Vect();
302 TVector3 vpm = p1.Cross(p2);
307 TVector3 w = u.Cross(vpm);
310 Double_t ax = u.Pz() / TMath::Sqrt(u.Px() + u.Px() + u.Pz() + u.Pz());
312 Double_t az = u.Pz() / TMath::Sqrt(u.Px() + u.Px() + u.Pz() + u.Pz());
313 TVector3 a(ax, ay, az);
319 Double_t phiv = w.Angle(a);
331 Double_t rotAngle = rot->
GetAngle();
343 if (
first->Charge() > 0)
fD1.RotateZ(rotAngle);
345 fD2.RotateZ(rotAngle);
350 if (
first->Charge() > 0)
fD1.RotateZ(rotAngle);
352 fD2.RotateZ(rotAngle);
ClassImp(PairAnalysisPairLV) PairAnalysisPairLV
int32_t GetMotherId() const
void Get4Momentum(TLorentzVector &momentum) const
static PairAnalysisMC * Instance()
CbmMCTrack * GetMCTrackFromMCEvent(Int_t label) const
void SetTracks(PairAnalysisTrack *const particle1, Int_t pid1, PairAnalysisTrack *const particle2, Int_t pid2)
virtual Double_t Py() const
virtual Double_t Pz() const
virtual Double_t Px() const
void GetThetaPhiCM(Double_t &thetaHE, Double_t &phiHE, Double_t &thetaCS, Double_t &phiCS) const
virtual ~PairAnalysisPairLV()
virtual void RotateTrack(PairAnalysisTrackRotator *rot)
Double_t GetArmAlpha() const
Double_t GetArmPt() const
Double_t PhivPair(Double_t MagField) const
void SetMCTracks(const CbmMCTrack *const particle1, const CbmMCTrack *const particle2)
Double_t PsiPair(Double_t MagField) const
virtual void GetThetaPhiCM(Double_t &thetaHE, Double_t &phiHE, Double_t &thetaCS, Double_t &phiCS) const =0
PairAnalysisTrack * GetFirstDaughter() const
ERotationType GetRotationType() const
Double_t GetAngle() const
Double_t GetCharge() const
CbmMCTrack * GetMCTrack() const
TLorentzVector * GetPosition()
Double_t GetWeight() const