]>
Commit | Line | Data |
---|---|---|
1b446896 | 1 | #ifndef ALIHBTPAIR_H |
2 | #define ALIHBTPAIR_H | |
58ee8590 | 3 | //_________________________________________________________________________ |
4 | /////////////////////////////////////////////////////////////////////////// | |
5 | // | |
6 | // class AliHBTPair | |
7 | // | |
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 | |
11 | // | |
12 | //////////////////////////////////////////////////////////////////////////// | |
1b446896 | 13 | |
14 | #include <TObject.h> | |
15 | ||
16 | ||
17 | #include "AliHBTParticle.h" | |
58ee8590 | 18 | |
1b446896 | 19 | |
20 | class AliHBTPair: public TObject | |
21 | { | |
22 | public: | |
23 | AliHBTPair(Bool_t rev = kFALSE); //contructor | |
ec6e4013 | 24 | AliHBTPair(AliHBTParticle* part1, AliHBTParticle* part2, Bool_t rev = kFALSE); //contructor |
4ca0f301 | 25 | virtual ~AliHBTPair(){} |
1b446896 | 26 | void SetParticles(AliHBTParticle*,AliHBTParticle*); //sets particles in the pair |
27 | AliHBTPair* GetSwapedPair() {return fSwapedPair;} //returns pair with swapped particles | |
28 | ||
29 | AliHBTParticle* Particle1() const {return fPart1;} //returns pointer to first particle | |
30 | AliHBTParticle* Particle2() const {return fPart2;} //returns pointer to decond particle | |
31 | ||
ec6e4013 | 32 | void Changed(); |
1b446896 | 33 | //Center Mass System - Longitudinally Comoving |
34 | ||
951aadb9 | 35 | virtual Double_t GetInvMass(); //returns invariant mass of the pair |
36 | virtual Double_t GetMt(); | |
37 | virtual Double_t GetQInv(); //returns Q invariant | |
38 | virtual Double_t GetQSideCMSLC(); //returns Q Side CMS longitudionally co-moving | |
39 | virtual Double_t GetQOutCMSLC(); //returns Q out CMS longitudionally co-moving | |
40 | virtual Double_t GetQLongCMSLC(); //returns Q Long CMS longitudionally co-moving | |
1b446896 | 41 | |
42 | ||
951aadb9 | 43 | virtual Double_t GetKt(); //returns K transverse |
44 | virtual Double_t GetKStar(); | |
1b446896 | 45 | |
951aadb9 | 46 | virtual Double_t GetDeltaP(); //return difference of momenta |
47 | virtual Double_t GetDeltaPx(); | |
48 | virtual Double_t GetDeltaPy(); | |
49 | virtual Double_t GetDeltaPz(); | |
1b446896 | 50 | |
951aadb9 | 51 | virtual Double_t GetGammaToCMSLC(); |
dd82cadc | 52 | Double_t GetWeight(); |
1b446896 | 53 | protected: |
54 | AliHBTParticle* fPart1; //pointer to first particle | |
55 | AliHBTParticle* fPart2; //pointer to second particle | |
56 | ||
57 | AliHBTPair* fSwapedPair; //pointer to swapped pair | |
58 | ||
59 | /************************************************************/ | |
60 | /************CMS (LC) Q's *********************************/ | |
61 | /************************************************************/ | |
62 | //Center Mass System - Longitudinally Comoving | |
63 | ||
64 | Double_t fQSideCMSLC; //value of Q side CMS longitudially co-moving | |
65 | Bool_t fQSideCMSLCNotCalc; //flag indicating if fQSideCMSLC is already calculated for this pair | |
66 | ||
67 | Double_t fQOutCMSLC; //value of Q out CMS longitudially co-moving | |
68 | Bool_t fQOutCMSLCNotCalc;//flag indicating if fQOutCMSLC is already calculated for this pair | |
69 | ||
70 | Double_t fQLongCMSLC; //value of Q long CMS longitudially co-moving | |
71 | Bool_t fQLongCMSLCNotCalc;//flag indicating if fQLongCMSLC is already calculated for this pair | |
72 | /************************************************************/ | |
73 | /************************************************************/ | |
74 | Double_t fQInv; //half of differnece of 4-momenta | |
75 | Bool_t fQInvNotCalc;//flag indicating if fQInv is already calculated for this pair | |
76 | ||
77 | Double_t fInvMass; //invariant mass | |
78 | Bool_t fInvMassNotCalc;//flag indicating if fInvMass is already calculated for this pair | |
79 | ||
80 | Double_t fKt; //K == sum vector of particle's momenta. Kt transverse component | |
81 | Bool_t fKtNotCalc;//flag indicating if fKt is already calculated for this pair | |
82 | ||
30025bb4 | 83 | Double_t fKStar; // |
1b446896 | 84 | Bool_t fKStarNotCalc; |
85 | ||
86 | Double_t fPInv; //invariant momentum | |
951aadb9 | 87 | |
1b446896 | 88 | Double_t fQSide; //Q Side |
89 | Double_t fOut;//Q Out | |
90 | Double_t fQLong;//Q Long | |
91 | ||
951aadb9 | 92 | Double_t fMt;//Transverse coordinate of Inv. Mass |
58ee8590 | 93 | Bool_t fMtNotCalc;//flag indicating if Mt is calculated for current pair |
951aadb9 | 94 | |
1b446896 | 95 | Double_t fInvMassSqr;//squre of invariant mass |
96 | Bool_t fMassSqrNotCalc; // | |
97 | void CalculateInvMassSqr(); | |
98 | ||
58ee8590 | 99 | Double_t fQInvL; //Qinv in longitudional direction |
100 | Bool_t fQInvLNotCalc;//flag indicating if fQInvL is calculated for current pair | |
1b446896 | 101 | void CalculateQInvL(); |
47d9a058 | 102 | |
58ee8590 | 103 | Double_t fWeight;//Value of the weight |
104 | Bool_t fWeightNotCalc;//flag indicating if fWeight is calculated for current pair | |
105 | ||
106 | Double_t fPxSum;// Sum of Px momenta | |
107 | Double_t fPySum;// Sum of Py momenta | |
108 | Double_t fPzSum;// Sum of Pz momenta | |
109 | Double_t fESum;// Sum of energies | |
110 | Bool_t fSumsNotCalc;//flag indicating if fPxSum,fPxSum,fPxSum and fESum is calculated for current pair | |
1b446896 | 111 | void CalculateSums(); |
112 | ||
58ee8590 | 113 | Double_t fPxDiff;// Difference of Px momenta |
114 | Double_t fPyDiff;// Difference of Px momenta | |
115 | Double_t fPzDiff;// Difference of Px momenta | |
116 | Double_t fEDiff;// Difference of Px momenta | |
117 | Bool_t fDiffsNotCalc;//flag indicating if fPxDiff,fPxDiff,fPxDiff and fEDiff is calculated for current pair | |
1b446896 | 118 | void CalculateDiffs(); |
119 | ||
58ee8590 | 120 | Double_t fGammaCMSLC;//gamma of boost in CMSLC |
121 | Bool_t fGammaCMSLCNotCalc;//flag indicating if fGammaCMSLC is calculated for current pair | |
1b446896 | 122 | /***************************************************/ |
123 | void CalculateBase(); | |
58ee8590 | 124 | Bool_t fChanged;//flag indicating if object has been changed |
1b446896 | 125 | |
126 | ||
127 | private: | |
1b446896 | 128 | ClassDef(AliHBTPair,1) |
129 | }; | |
130 | /****************************************************************/ | |
131 | inline | |
132 | void AliHBTPair::SetParticles(AliHBTParticle* p1,AliHBTParticle* p2) | |
133 | { | |
134 | //sets the particle to the pair | |
135 | ||
136 | fPart1 = p1; | |
137 | fPart2 = p2; | |
138 | if (fSwapedPair) //if we have Swaped (so we are not) | |
139 | fSwapedPair->SetParticles(p2,p1); //set particles for him too | |
ec6e4013 | 140 | Changed(); |
141 | //and do nothing until will be asked for | |
142 | } | |
143 | /****************************************************************/ | |
1b446896 | 144 | |
ec6e4013 | 145 | inline |
146 | void AliHBTPair::Changed() | |
147 | { | |
148 | // Resel all calculations (flags) | |
1b446896 | 149 | fChanged = kTRUE; |
150 | fSumsNotCalc = kTRUE; | |
151 | fDiffsNotCalc = kTRUE; | |
152 | fMassSqrNotCalc = kTRUE; | |
153 | fInvMassNotCalc = kTRUE; | |
154 | fQInvNotCalc = kTRUE; | |
951aadb9 | 155 | fMtNotCalc = kTRUE; |
1b446896 | 156 | fQSideCMSLCNotCalc = kTRUE; |
157 | fQOutCMSLCNotCalc = kTRUE; | |
158 | fQLongCMSLCNotCalc = kTRUE; | |
159 | fKtNotCalc = kTRUE; | |
160 | fKStarNotCalc = kTRUE; | |
161 | fQInvLNotCalc = kTRUE; | |
951aadb9 | 162 | fGammaCMSLCNotCalc = kTRUE; |
dd82cadc | 163 | fWeightNotCalc = kTRUE; |
1b446896 | 164 | } |
165 | /****************************************************************/ | |
1b446896 | 166 | inline |
167 | void AliHBTPair::CalculateInvMassSqr() | |
168 | { | |
58ee8590 | 169 | //calculates square of qinv |
1b446896 | 170 | if (fMassSqrNotCalc) |
171 | { | |
172 | CalculateSums(); | |
173 | ||
174 | Double_t fPart12s= (fPxSum*fPxSum) + (fPySum*fPySum) + (fPzSum*fPzSum); | |
175 | ||
176 | fInvMassSqr=fESum*fESum-fPart12s; | |
177 | ||
178 | fMassSqrNotCalc = kFALSE; | |
179 | } | |
180 | } | |
181 | /****************************************************************/ | |
182 | inline | |
183 | void AliHBTPair::CalculateQInvL() | |
184 | { | |
7836ee94 | 185 | //Calculates square root of Qinv |
1b446896 | 186 | if (fQInvLNotCalc) |
187 | { | |
188 | CalculateDiffs(); | |
189 | fQInvL = fEDiff*fEDiff - ( fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff ); | |
190 | fQInvLNotCalc = kFALSE; | |
191 | } | |
192 | } | |
193 | /****************************************************************/ | |
194 | inline | |
195 | void AliHBTPair::CalculateSums() | |
196 | { | |
58ee8590 | 197 | //calculates momenta and energy sums |
1b446896 | 198 | if(fSumsNotCalc) |
199 | { | |
200 | fPxSum = fPart1->Px()+fPart2->Px(); | |
201 | fPySum = fPart1->Py()+fPart2->Py(); | |
202 | fPzSum = fPart1->Pz()+fPart2->Pz(); | |
203 | fESum = fPart1->Energy() + fPart2->Energy(); | |
204 | fSumsNotCalc = kFALSE; | |
205 | } | |
206 | } | |
207 | /****************************************************************/ | |
208 | inline | |
209 | void AliHBTPair::CalculateDiffs() | |
210 | { | |
58ee8590 | 211 | //calculates momenta and energy differences |
1b446896 | 212 | if(fDiffsNotCalc) |
213 | { | |
214 | fPxDiff = fPart1->Px()-fPart2->Px(); | |
215 | fPyDiff = fPart1->Py()-fPart2->Py(); | |
216 | fPzDiff = fPart1->Pz()-fPart2->Pz(); | |
217 | fEDiff = fPart1->Energy() - fPart2->Energy(); | |
218 | fDiffsNotCalc = kFALSE; | |
219 | } | |
220 | } | |
221 | ||
7836ee94 | 222 | /****************************************************************/ |
223 | inline | |
224 | Double_t AliHBTPair::GetDeltaP() //return difference of momenta | |
225 | { | |
58ee8590 | 226 | //returns difference of momenta |
7836ee94 | 227 | CalculateDiffs(); |
228 | return TMath::Sqrt(fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff); | |
229 | } | |
230 | /****************************************************************/ | |
231 | inline | |
232 | Double_t AliHBTPair::GetDeltaPx() | |
233 | { | |
58ee8590 | 234 | //returns difference of Pz |
7836ee94 | 235 | CalculateDiffs(); |
236 | return fPxDiff; | |
237 | } | |
238 | /****************************************************************/ | |
239 | inline | |
240 | Double_t AliHBTPair::GetDeltaPy() | |
241 | { | |
58ee8590 | 242 | //returns difference of Py |
7836ee94 | 243 | CalculateDiffs(); |
244 | return fPyDiff; | |
245 | } | |
246 | ||
247 | /****************************************************************/ | |
248 | inline | |
249 | Double_t AliHBTPair::GetDeltaPz() | |
250 | { | |
58ee8590 | 251 | //returns difference of Pz |
7836ee94 | 252 | CalculateDiffs(); |
253 | return fPzDiff; | |
254 | } | |
255 | ||
256 | ||
1b446896 | 257 | #endif |