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 Double_t GetInvMass(); //returns invariant mass of the pair
30 Double_t GetQInv(); //returns Q invariant
31 Double_t GetQSideCMSLC(); //returns Q Side CMS longitudionally co-moving
32 Double_t GetQOutCMSLC(); //returns Q out CMS longitudionally co-moving
33 Double_t GetQLongCMSLC(); //returns Q Long CMS longitudionally co-moving
36 Double_t GetKt(); //returns K transverse
39 Double_t GetDeltaP(); //return difference of momenta
40 Double_t GetDeltaPx();
41 Double_t GetDeltaPy();
42 Double_t GetDeltaPz();
45 AliHBTParticle* fPart1; //pointer to first particle
46 AliHBTParticle* fPart2; //pointer to second particle
48 AliHBTPair* fSwapedPair; //pointer to swapped pair
50 /************************************************************/
51 /************CMS (LC) Q's *********************************/
52 /************************************************************/
53 //Center Mass System - Longitudinally Comoving
55 Double_t fQSideCMSLC; //value of Q side CMS longitudially co-moving
56 Bool_t fQSideCMSLCNotCalc; //flag indicating if fQSideCMSLC is already calculated for this pair
58 Double_t fQOutCMSLC; //value of Q out CMS longitudially co-moving
59 Bool_t fQOutCMSLCNotCalc;//flag indicating if fQOutCMSLC is already calculated for this pair
61 Double_t fQLongCMSLC; //value of Q long CMS longitudially co-moving
62 Bool_t fQLongCMSLCNotCalc;//flag indicating if fQLongCMSLC is already calculated for this pair
63 /************************************************************/
64 /************************************************************/
65 Double_t fQInv; //half of differnece of 4-momenta
66 Bool_t fQInvNotCalc;//flag indicating if fQInv is already calculated for this pair
68 Double_t fInvMass; //invariant mass
69 Bool_t fInvMassNotCalc;//flag indicating if fInvMass is already calculated for this pair
71 Double_t fKt; //K == sum vector of particle's momenta. Kt transverse component
72 Bool_t fKtNotCalc;//flag indicating if fKt is already calculated for this pair
77 Double_t fPInv; //invariant momentum
78 Double_t fQSide; //Q Side
80 Double_t fQLong;//Q Long
83 Double_t fInvMassSqr;//squre of invariant mass
84 Bool_t fMassSqrNotCalc; //
85 void CalculateInvMassSqr();
89 void CalculateQInvL();
102 Bool_t fDiffsNotCalc;
103 void CalculateDiffs();
106 /***************************************************/
107 void CalculateBase();
113 ClassDef(AliHBTPair,1)
115 /****************************************************************/
117 void AliHBTPair::SetParticles(AliHBTParticle* p1,AliHBTParticle* p2)
119 //sets the particle to the pair
123 if (fSwapedPair) //if we have Swaped (so we are not)
124 fSwapedPair->SetParticles(p2,p1); //set particles for him too
126 //and do nothing until will be asked for
128 /****************************************************************/
131 void AliHBTPair::Changed()
133 // Resel all calculations (flags)
135 fSumsNotCalc = kTRUE;
136 fDiffsNotCalc = kTRUE;
137 fMassSqrNotCalc = kTRUE;
138 fInvMassNotCalc = kTRUE;
139 fQInvNotCalc = kTRUE;
140 fQSideCMSLCNotCalc = kTRUE;
141 fQOutCMSLCNotCalc = kTRUE;
142 fQLongCMSLCNotCalc = kTRUE;
144 fKStarNotCalc = kTRUE;
145 fQInvLNotCalc = kTRUE;
147 /****************************************************************/
149 void AliHBTPair::CalculateInvMassSqr()
155 Double_t fPart12s= (fPxSum*fPxSum) + (fPySum*fPySum) + (fPzSum*fPzSum);
157 fInvMassSqr=fESum*fESum-fPart12s;
159 fMassSqrNotCalc = kFALSE;
162 /****************************************************************/
164 void AliHBTPair::CalculateQInvL()
166 //Calculates square root of Qinv
170 fQInvL = fEDiff*fEDiff - ( fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff );
171 fQInvLNotCalc = kFALSE;
174 /****************************************************************/
176 void AliHBTPair::CalculateSums()
180 fPxSum = fPart1->Px()+fPart2->Px();
181 fPySum = fPart1->Py()+fPart2->Py();
182 fPzSum = fPart1->Pz()+fPart2->Pz();
183 fESum = fPart1->Energy() + fPart2->Energy();
184 fSumsNotCalc = kFALSE;
187 /****************************************************************/
189 void AliHBTPair::CalculateDiffs()
193 fPxDiff = fPart1->Px()-fPart2->Px();
194 fPyDiff = fPart1->Py()-fPart2->Py();
195 fPzDiff = fPart1->Pz()-fPart2->Pz();
196 fEDiff = fPart1->Energy() - fPart2->Energy();
197 fDiffsNotCalc = kFALSE;
201 /****************************************************************/
203 Double_t AliHBTPair::GetDeltaP() //return difference of momenta
206 return TMath::Sqrt(fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff);
208 /****************************************************************/
210 Double_t AliHBTPair::GetDeltaPx()
215 /****************************************************************/
217 Double_t AliHBTPair::GetDeltaPy()
223 /****************************************************************/
225 Double_t AliHBTPair::GetDeltaPz()