7 #include "AliHBTParticle.h"
8 //class implements pair of particles and taking care of caluclation (almost)
9 //all of pair properties (Qinv, InvMass,...)
10 //more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html
12 class AliHBTPair: public TObject
15 AliHBTPair(Bool_t rev = kFALSE); //contructor
16 AliHBTPair(AliHBTParticle* part1, AliHBTParticle* part2, Bool_t rev = kFALSE); //contructor
17 virtual ~AliHBTPair(){}
18 void SetParticles(AliHBTParticle*,AliHBTParticle*); //sets particles in the pair
19 AliHBTPair* GetSwapedPair() {return fSwapedPair;} //returns pair with swapped particles
21 AliHBTParticle* Particle1() const {return fPart1;} //returns pointer to first particle
22 AliHBTParticle* Particle2() const {return fPart2;} //returns pointer to decond particle
25 //Center Mass System - Longitudinally Comoving
27 virtual Double_t GetInvMass(); //returns invariant mass of the pair
28 virtual Double_t GetMt();
29 virtual Double_t GetQInv(); //returns Q invariant
30 virtual Double_t GetQSideCMSLC(); //returns Q Side CMS longitudionally co-moving
31 virtual Double_t GetQOutCMSLC(); //returns Q out CMS longitudionally co-moving
32 virtual Double_t GetQLongCMSLC(); //returns Q Long CMS longitudionally co-moving
35 virtual Double_t GetKt(); //returns K transverse
36 virtual Double_t GetKStar();
38 virtual Double_t GetDeltaP(); //return difference of momenta
39 virtual Double_t GetDeltaPx();
40 virtual Double_t GetDeltaPy();
41 virtual Double_t GetDeltaPz();
43 virtual Double_t GetGammaToCMSLC();
44 Double_t GetLLWeight();
46 AliHBTParticle* fPart1; //pointer to first particle
47 AliHBTParticle* fPart2; //pointer to second particle
49 AliHBTPair* fSwapedPair; //pointer to swapped pair
51 /************************************************************/
52 /************CMS (LC) Q's *********************************/
53 /************************************************************/
54 //Center Mass System - Longitudinally Comoving
56 Double_t fQSideCMSLC; //value of Q side CMS longitudially co-moving
57 Bool_t fQSideCMSLCNotCalc; //flag indicating if fQSideCMSLC is already calculated for this pair
59 Double_t fQOutCMSLC; //value of Q out CMS longitudially co-moving
60 Bool_t fQOutCMSLCNotCalc;//flag indicating if fQOutCMSLC is already calculated for this pair
62 Double_t fQLongCMSLC; //value of Q long CMS longitudially co-moving
63 Bool_t fQLongCMSLCNotCalc;//flag indicating if fQLongCMSLC is already calculated for this pair
64 /************************************************************/
65 /************************************************************/
66 Double_t fQInv; //half of differnece of 4-momenta
67 Bool_t fQInvNotCalc;//flag indicating if fQInv is already calculated for this pair
69 Double_t fInvMass; //invariant mass
70 Bool_t fInvMassNotCalc;//flag indicating if fInvMass is already calculated for this pair
72 Double_t fKt; //K == sum vector of particle's momenta. Kt transverse component
73 Bool_t fKtNotCalc;//flag indicating if fKt is already calculated for this pair
78 Double_t fPInv; //invariant momentum
80 Double_t fQSide; //Q Side
82 Double_t fQLong;//Q Long
84 Double_t fMt;//Transverse coordinate of Inv. Mass
85 Bool_t fMtNotCalc;//flag indicating if Mt is calculated
87 Double_t fInvMassSqr;//squre of invariant mass
88 Bool_t fMassSqrNotCalc; //
89 void CalculateInvMassSqr();
93 void CalculateQInvL();
96 Bool_t ffLLWeightNotCalc;
103 void CalculateSums();
109 Bool_t fDiffsNotCalc;
110 void CalculateDiffs();
112 Double_t fGammaCMSLC;
113 Bool_t fGammaCMSLCNotCalc;
114 /***************************************************/
115 void CalculateBase();
121 ClassDef(AliHBTPair,1)
123 /****************************************************************/
125 void AliHBTPair::SetParticles(AliHBTParticle* p1,AliHBTParticle* p2)
127 //sets the particle to the pair
131 if (fSwapedPair) //if we have Swaped (so we are not)
132 fSwapedPair->SetParticles(p2,p1); //set particles for him too
134 //and do nothing until will be asked for
136 /****************************************************************/
139 void AliHBTPair::Changed()
141 // Resel all calculations (flags)
143 fSumsNotCalc = kTRUE;
144 fDiffsNotCalc = kTRUE;
145 fMassSqrNotCalc = kTRUE;
146 fInvMassNotCalc = kTRUE;
147 fQInvNotCalc = kTRUE;
149 fQSideCMSLCNotCalc = kTRUE;
150 fQOutCMSLCNotCalc = kTRUE;
151 fQLongCMSLCNotCalc = kTRUE;
153 fKStarNotCalc = kTRUE;
154 fQInvLNotCalc = kTRUE;
155 fGammaCMSLCNotCalc = kTRUE;
156 ffLLWeightNotCalc = kTRUE;
158 /****************************************************************/
160 void AliHBTPair::CalculateInvMassSqr()
166 Double_t fPart12s= (fPxSum*fPxSum) + (fPySum*fPySum) + (fPzSum*fPzSum);
168 fInvMassSqr=fESum*fESum-fPart12s;
170 fMassSqrNotCalc = kFALSE;
173 /****************************************************************/
175 void AliHBTPair::CalculateQInvL()
177 //Calculates square root of Qinv
181 fQInvL = fEDiff*fEDiff - ( fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff );
182 fQInvLNotCalc = kFALSE;
185 /****************************************************************/
187 void AliHBTPair::CalculateSums()
191 fPxSum = fPart1->Px()+fPart2->Px();
192 fPySum = fPart1->Py()+fPart2->Py();
193 fPzSum = fPart1->Pz()+fPart2->Pz();
194 fESum = fPart1->Energy() + fPart2->Energy();
195 fSumsNotCalc = kFALSE;
198 /****************************************************************/
200 void AliHBTPair::CalculateDiffs()
204 fPxDiff = fPart1->Px()-fPart2->Px();
205 fPyDiff = fPart1->Py()-fPart2->Py();
206 fPzDiff = fPart1->Pz()-fPart2->Pz();
207 fEDiff = fPart1->Energy() - fPart2->Energy();
208 fDiffsNotCalc = kFALSE;
212 /****************************************************************/
214 Double_t AliHBTPair::GetDeltaP() //return difference of momenta
217 return TMath::Sqrt(fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff);
219 /****************************************************************/
221 Double_t AliHBTPair::GetDeltaPx()
226 /****************************************************************/
228 Double_t AliHBTPair::GetDeltaPy()
234 /****************************************************************/
236 Double_t AliHBTPair::GetDeltaPz()