1 #include "AliHBTPair.h"
2 #include "AliHBTParticle.h"
6 /************************************************************************/
7 AliHBTPair::AliHBTPair(Bool_t rev):
11 //value of rev defines if it is Swaped
12 //if you pass kTRUE swpaped pair will NOT be created
13 //though you wont be able to get the swaped pair from this pair
15 if(!rev) fSwapedPair = new AliHBTPair(kTRUE); //if false create swaped pair
16 else fSwapedPair = 0x0; //if true set the pointer to NULL
19 /************************************************************************/
21 AliHBTPair::AliHBTPair(AliHBTParticle* part1, AliHBTParticle* part2, Bool_t rev):
25 //value of rev defines if it is Swaped
26 //if you pass kTRUE swpaped pair will NOT be created
27 //though you wont be able to get the swaped pair from this pair
29 if(!rev) fSwapedPair = new AliHBTPair(part2,part1,kTRUE); //if false create swaped pair
30 else fSwapedPair = 0x0; //if true set the pointer to NULL
33 /************************************************************************/
35 Double_t AliHBTPair::GetInvMass()
37 //Returns qinv value for a pair
40 CalculateInvMassSqr(); //method is inline so we not waste th time for jumping into method
42 if(fInvMassSqr<0) fInvMass = TMath::Sqrt(-fInvMassSqr);
43 else fInvMass = TMath::Sqrt(fInvMassSqr);
45 fInvMassNotCalc = kFALSE;
49 /************************************************************************/
50 Double_t AliHBTPair::GetQSideCMSLC()
52 //return Q Side in Central Of Mass System in Longitudialy Comoving Frame
54 if (fQSideCMSLCNotCalc)
56 fQSideCMSLC = (fPart1->Px()*fPart2->Py()-fPart2->Px()*fPart1->Py())/GetKt();
57 fQSideCMSLCNotCalc = kFALSE;
61 /************************************************************************/
62 Double_t AliHBTPair::GetQOutCMSLC()
68 Double_t k2 = fPxSum*fPxDiff+fPySum*fPyDiff;
69 fQOutCMSLC = 0.5*k2/GetKt();
70 fQOutCMSLCNotCalc = kFALSE;
74 /************************************************************************/
75 Double_t AliHBTPair::GetQLongCMSLC()
77 if (fQLongCMSLCNotCalc)
81 Double_t beta = fPzSum/fESum;
82 Double_t gamma = 1.0/TMath::Sqrt(1.0 - beta*beta);
83 fQLongCMSLC = gamma*( fPzDiff - beta*fEDiff );
84 fQLongCMSLCNotCalc = kFALSE;
88 /************************************************************************/
89 Double_t AliHBTPair::GetKt()
94 fKt = 0.5*TMath::Hypot(fPxSum,fPySum);
99 /************************************************************************/
101 Double_t AliHBTPair::GetKStar()
108 Double_t Ptrans = fPxSum*fPxSum + fPySum*fPySum;
109 Double_t Mtrans = fESum*fESum - fPzSum*fPzSum;
110 Double_t Pinv = TMath::Sqrt(Mtrans - Ptrans);
112 Double_t Q = ( fPart1->GetMass()*fPart1->GetMass() - fPart2->GetMass()*fPart2->GetMass())/Pinv;
116 Q = TMath::Sqrt( Q*Q - fQInvL);
118 fKStarNotCalc = kFALSE;
122 /************************************************************************/
124 Double_t AliHBTPair::GetQInv()
129 fQInv = TMath::Sqrt(TMath::Abs(fQInvL));
130 fQInvNotCalc = kFALSE;
135 /************************************************************************/
136 /************************************************************************/
138 /************************************************************************/