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
17 void SetParticles(AliHBTParticle*,AliHBTParticle*); //sets particles in the pair
18 AliHBTPair* GetSwapedPair() {return fSwapedPair;} //returns pair with swapped particles
20 AliHBTParticle* Particle1() const {return fPart1;} //returns pointer to first particle
21 AliHBTParticle* Particle2() const {return fPart2;} //returns pointer to decond particle
23 //Center Mass System - Longitudinally Comoving
25 Double_t GetInvMass(); //returns invariant mass of the pair
28 Double_t GetQInv(); //returns Q invariant
29 Double_t GetQSideCMSLC(); //returns Q Side CMS longitudionally co-moving
30 Double_t GetQOutCMSLC(); //returns Q out CMS longitudionally co-moving
31 Double_t GetQLongCMSLC(); //returns Q Long CMS longitudionally co-moving
34 Double_t GetKt(); //returns K transverse
37 Double_t GetDeltaP(); //return difference of momenta
38 Double_t GetDeltaPx();
39 Double_t GetDeltaPy();
40 Double_t GetDeltaPz();
43 AliHBTParticle* fPart1; //pointer to first particle
44 AliHBTParticle* fPart2; //pointer to second particle
46 AliHBTPair* fSwapedPair; //pointer to swapped pair
48 /************************************************************/
49 /************CMS (LC) Q's *********************************/
50 /************************************************************/
51 //Center Mass System - Longitudinally Comoving
53 Double_t fQSideCMSLC; //value of Q side CMS longitudially co-moving
54 Bool_t fQSideCMSLCNotCalc; //flag indicating if fQSideCMSLC is already calculated for this pair
56 Double_t fQOutCMSLC; //value of Q out CMS longitudially co-moving
57 Bool_t fQOutCMSLCNotCalc;//flag indicating if fQOutCMSLC is already calculated for this pair
59 Double_t fQLongCMSLC; //value of Q long CMS longitudially co-moving
60 Bool_t fQLongCMSLCNotCalc;//flag indicating if fQLongCMSLC is already calculated for this pair
61 /************************************************************/
62 /************************************************************/
63 Double_t fQInv; //half of differnece of 4-momenta
64 Bool_t fQInvNotCalc;//flag indicating if fQInv is already calculated for this pair
66 Double_t fInvMass; //invariant mass
67 Bool_t fInvMassNotCalc;//flag indicating if fInvMass is already calculated for this pair
69 Double_t fKt; //K == sum vector of particle's momenta. Kt transverse component
70 Bool_t fKtNotCalc;//flag indicating if fKt is already calculated for this pair
75 Double_t fPInv; //invariant momentum
76 Double_t fQSide; //Q Side
78 Double_t fQLong;//Q Long
81 Double_t fInvMassSqr;//squre of invariant mass
82 Bool_t fMassSqrNotCalc; //
83 void CalculateInvMassSqr();
87 void CalculateQInvL();
100 Bool_t fDiffsNotCalc;
101 void CalculateDiffs();
104 /***************************************************/
105 void CalculateBase();
111 ClassDef(AliHBTPair,1)
113 /****************************************************************/
115 void AliHBTPair::SetParticles(AliHBTParticle* p1,AliHBTParticle* p2)
117 //sets the particle to the pair
121 if (fSwapedPair) //if we have Swaped (so we are not)
122 fSwapedPair->SetParticles(p2,p1); //set particles for him too
124 // Resel all calculations (flags)
127 fSumsNotCalc = kTRUE;
128 fDiffsNotCalc = kTRUE;
129 fMassSqrNotCalc = kTRUE;
130 fInvMassNotCalc = kTRUE;
131 fQInvNotCalc = kTRUE;
132 fQSideCMSLCNotCalc = kTRUE;
133 fQOutCMSLCNotCalc = kTRUE;
134 fQLongCMSLCNotCalc = kTRUE;
136 fKStarNotCalc = kTRUE;
137 fQInvLNotCalc = kTRUE;
139 //and do nothing until will be asked for
141 /****************************************************************/
142 /****************************************************************/
144 void AliHBTPair::CalculateInvMassSqr()
150 Double_t fPart12s= (fPxSum*fPxSum) + (fPySum*fPySum) + (fPzSum*fPzSum);
152 fInvMassSqr=fESum*fESum-fPart12s;
154 fMassSqrNotCalc = kFALSE;
157 /****************************************************************/
159 void AliHBTPair::CalculateQInvL()
161 //Calculates square root of Qinv
165 fQInvL = fEDiff*fEDiff - ( fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff );
166 fQInvLNotCalc = kFALSE;
169 /****************************************************************/
171 void AliHBTPair::CalculateSums()
175 fPxSum = fPart1->Px()+fPart2->Px();
176 fPySum = fPart1->Py()+fPart2->Py();
177 fPzSum = fPart1->Pz()+fPart2->Pz();
178 fESum = fPart1->Energy() + fPart2->Energy();
179 fSumsNotCalc = kFALSE;
182 /****************************************************************/
184 void AliHBTPair::CalculateDiffs()
188 fPxDiff = fPart1->Px()-fPart2->Px();
189 fPyDiff = fPart1->Py()-fPart2->Py();
190 fPzDiff = fPart1->Pz()-fPart2->Pz();
191 fEDiff = fPart1->Energy() - fPart2->Energy();
192 fDiffsNotCalc = kFALSE;
196 /****************************************************************/
198 Double_t AliHBTPair::GetDeltaP() //return difference of momenta
201 return TMath::Sqrt(fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff);
203 /****************************************************************/
205 Double_t AliHBTPair::GetDeltaPx()
210 /****************************************************************/
212 Double_t AliHBTPair::GetDeltaPy()
218 /****************************************************************/
220 Double_t AliHBTPair::GetDeltaPz()