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
27 Double_t GetQSideCMSLC(); //returns Q Side CMS longitudionally co-moving
28 Double_t GetQOutCMSLC(); //returns Q out CMS longitudionally co-moving
29 Double_t GetQLongCMSLC(); //returns Q Long CMS longitudionally co-moving
32 Double_t GetKt(); //returns K transverse
35 Double_t GetQInv(); //returns Q invariant
36 Double_t GetQSide(); //returns Q side
37 Double_t GetQLong(); //returns Q long
38 Double_t GetQOut(); //returns Q out
42 AliHBTParticle* fPart1; //pointer to first particle
43 AliHBTParticle* fPart2; //pointer to second particle
45 AliHBTPair* fSwapedPair; //pointer to swapped pair
47 /************************************************************/
48 /************CMS (LC) Q's *********************************/
49 /************************************************************/
50 //Center Mass System - Longitudinally Comoving
52 Double_t fQSideCMSLC; //value of Q side CMS longitudially co-moving
53 Bool_t fQSideCMSLCNotCalc; //flag indicating if fQSideCMSLC is already calculated for this pair
55 Double_t fQOutCMSLC; //value of Q out CMS longitudially co-moving
56 Bool_t fQOutCMSLCNotCalc;//flag indicating if fQOutCMSLC is already calculated for this pair
58 Double_t fQLongCMSLC; //value of Q long CMS longitudially co-moving
59 Bool_t fQLongCMSLCNotCalc;//flag indicating if fQLongCMSLC is already calculated for this pair
60 /************************************************************/
61 /************************************************************/
62 Double_t fQInv; //half of differnece of 4-momenta
63 Bool_t fQInvNotCalc;//flag indicating if fQInv is already calculated for this pair
65 Double_t fInvMass; //invariant mass
66 Bool_t fInvMassNotCalc;//flag indicating if fInvMass is already calculated for this pair
68 Double_t fKt; //K == sum vector of particle's momenta. Kt transverse component
69 Bool_t fKtNotCalc;//flag indicating if fKt is already calculated for this pair
74 Double_t fPInv; //invariant momentum
75 Double_t fQSide; //Q Side
77 Double_t fQLong;//Q Long
80 Double_t fInvMassSqr;//squre of invariant mass
81 Bool_t fMassSqrNotCalc; //
82 void CalculateInvMassSqr();
86 void CalculateQInvL();
100 void CalculateDiffs();
103 /***************************************************/
104 void CalculateBase();
110 ClassDef(AliHBTPair,1)
112 /****************************************************************/
114 void AliHBTPair::SetParticles(AliHBTParticle* p1,AliHBTParticle* p2)
116 //sets the particle to the pair
120 if (fSwapedPair) //if we have Swaped (so we are not)
121 fSwapedPair->SetParticles(p2,p1); //set particles for him too
123 // Resel all calculations (flags)
126 fSumsNotCalc = kTRUE;
127 fDiffsNotCalc = kTRUE;
128 fMassSqrNotCalc = kTRUE;
129 fInvMassNotCalc = kTRUE;
130 fQInvNotCalc = kTRUE;
131 fQSideCMSLCNotCalc = kTRUE;
132 fQOutCMSLCNotCalc = kTRUE;
133 fQLongCMSLCNotCalc = kTRUE;
135 fKStarNotCalc = kTRUE;
136 fQInvLNotCalc = kTRUE;
138 //and do nothing until will be asked for
140 /****************************************************************/
142 Double_t AliHBTPair::GetQSide()
146 /****************************************************************/
148 void AliHBTPair::CalculateInvMassSqr()
154 Double_t fPart12s= (fPxSum*fPxSum) + (fPySum*fPySum) + (fPzSum*fPzSum);
156 fInvMassSqr=fESum*fESum-fPart12s;
158 fMassSqrNotCalc = kFALSE;
161 /****************************************************************/
163 void AliHBTPair::CalculateQInvL()
168 fQInvL = fEDiff*fEDiff - ( fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff );
169 fQInvLNotCalc = kFALSE;
172 /****************************************************************/
174 void AliHBTPair::CalculateSums()
178 fPxSum = fPart1->Px()+fPart2->Px();
179 fPySum = fPart1->Py()+fPart2->Py();
180 fPzSum = fPart1->Pz()+fPart2->Pz();
181 fESum = fPart1->Energy() + fPart2->Energy();
182 fSumsNotCalc = kFALSE;
185 /****************************************************************/
187 void AliHBTPair::CalculateDiffs()
191 fPxDiff = fPart1->Px()-fPart2->Px();
192 fPyDiff = fPart1->Py()-fPart2->Py();
193 fPzDiff = fPart1->Pz()-fPart2->Pz();
194 fEDiff = fPart1->Energy() - fPart2->Energy();
195 fDiffsNotCalc = kFALSE;