]>
Commit | Line | Data |
---|---|---|
37e4484e | 1 | /////////////////////////////////////////////////////////////////////////// |
2 | // // | |
3 | // AliFemtoModelWeightGeneratorLednicky : the most advanced weight // | |
4 | // generator available. Supports a large number of different pair types // | |
5 | // and interaction types. Can calculate pair weights coming from // | |
6 | // quantum statistics, coulomb interation and strong interaction ot any // | |
7 | // combination of the three, as applicable. // | |
8 | // This class is a wrapper for the fortran code provided by Richard // | |
9 | // Lednicky. // | |
10 | // // | |
11 | /////////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | //#include "StHbtMaker/ThCorrFctn/AliFemtoModelWeightGeneratorLednicky.h" | |
14 | #include "AliFemtoModelWeightGeneratorLednicky.h" | |
15 | #include "AliFemtoModelHiddenInfo.h" | |
ea77036b | 16 | #include "AliFemtoPair.h" |
37e4484e | 17 | //#include "StarCallf77.h" |
18 | //#include <strstream.h> | |
19 | //#include <iomanip.h> | |
20 | //#include <stream> | |
21 | //#include <iomanip> | |
22 | #include <sstream> | |
23 | ||
24 | #ifdef SOLARIS | |
25 | # ifndef false | |
26 | typedef int bool; | |
27 | #define false 0 | |
28 | #define true 1 | |
29 | # endif | |
30 | #endif | |
31 | ||
32 | #ifdef WIN32 | |
33 | # ifdef CERNLIB_MSSTDCALL | |
34 | # define F77_UCASE | |
35 | # define type_of_call _stdcall | |
36 | # ifndef CERNLIB_QXCAPT | |
37 | # define CERNLIB_QXCAPT | |
38 | # endif | |
39 | # else | |
40 | # define F77_LCASE | |
41 | # ifndef CERNLIB_QXNO_SC | |
42 | # define CERNLIB_QXNO_SC | |
43 | # endif | |
44 | # endif | |
45 | # define type_of_call _stdcall | |
46 | # define DEFCHARD const char* , const int | |
47 | # define DEFCHARL | |
48 | # define PASSCHARD(string) string, strlen(string) | |
49 | # define PASSCHARL(string) | |
50 | #else | |
51 | # define DEFCHARD const char* | |
52 | # define DEFCHARL , const int | |
53 | # define PASSCHARD(string) string | |
54 | # define PASSCHARL(string) , strlen(string) | |
55 | #endif | |
56 | #ifdef CERNLIB_QXCAPT | |
57 | # define F77_NAME(name,NAME) NAME | |
58 | #else | |
59 | # if defined(CERNLIB_QXNO_SC) | |
60 | # define F77_NAME(name,NAME) name | |
61 | # else | |
62 | # define F77_NAME(name,NAME) name##_ | |
63 | # endif | |
64 | #endif | |
65 | #ifndef type_of_call | |
66 | # define type_of_call | |
67 | #endif | |
68 | ||
69 | // --- Prototype of the function used in the weight calculator | |
70 | // (in FsiWeightLedinicky.F) | |
71 | #define fsiin F77_NAME(fsiin,FSIIN) | |
72 | extern "C" {void type_of_call F77_NAME(fsiin,FSIIN)(const int &itest,const int &ich, const int &iqs, const int &isi,const int &i3c);} | |
73 | #define llini F77_NAME(llini,LLINI) | |
74 | extern "C" {void type_of_call F77_NAME(llini,LLINI)(const int &lll,const int &ns, const int &itest);} | |
75 | ||
76 | #define fsinucl F77_NAME(fsinucl,FSINUCL) | |
77 | extern "C" {void type_of_call F77_NAME(fsinucl,FSINUCL)(const double &mn,const double &cn);} | |
78 | #define fsimomentum F77_NAME(fsimomentum,FSIMOMENTUM) | |
79 | extern "C" {void type_of_call F77_NAME(fsimomentum,FSIMOMENTUM)(double &p1,double &p2);} | |
80 | #define fsiposition F77_NAME(fsiposition,FSIPOSITION) | |
81 | extern "C" {void type_of_call F77_NAME(fsiposition,FSIPOSITION)(double &x1,double &x2);} | |
82 | #define fsiw F77_NAME(fsiw,FSIW) | |
83 | extern "C" {void type_of_call F77_NAME(fsiw,FSIW)(const int &i,double &weif, | |
84 | double &wei,double &wein);} | |
85 | #define ltran12 F77_NAME(ltran12,LTRAN12) | |
86 | extern "C" {void type_of_call ltran12_();} | |
87 | ||
88 | // Test function for Lambda potential | |
89 | //#define printlam F77_NAME(printlam,PRINTLAM) | |
90 | //extern "C" {void type_of_call printlam_();} | |
91 | //there is not PRINTLAM in *.F file | |
92 | ||
93 | // --- Additional prototyping of some CERN functions (in FsiTool.F) | |
94 | typedef float REAL; | |
95 | typedef struct { REAL re; REAL im; } COMPLEX; | |
96 | #define cgamma F77_NAME(cgamma,CGAMMA) | |
97 | extern "C" {COMPLEX type_of_call cgamma_(COMPLEX*);} | |
98 | ||
99 | #ifdef __ROOT__ | |
100 | ClassImp(AliFemtoModelWeightGeneratorLednicky) | |
101 | #endif | |
102 | ||
103 | AliFemtoModelWeightGeneratorLednicky::AliFemtoModelWeightGeneratorLednicky() : | |
104 | AliFemtoModelWeightGenerator(), | |
105 | fWei(0), fWein(0), fWeif(0), fWeightDen(0), | |
106 | fItest(0),fIch(1),fIqs(1),fIsi(1),fI3c(0), | |
107 | fNuclMass(1.),fNuclCharge(0.), | |
108 | fSphereApp(false),fT0App(false) , | |
109 | fLL(0), fNuclChargeSign(1), fSwap(0), fLLMax(30), fLLName(0), | |
110 | fNumProcessPair(0), fNumbNonId(0) | |
111 | { | |
112 | // default constructor | |
113 | fLLName=new char*[fLLMax+1]; | |
114 | fNumProcessPair=new int[fLLMax+1]; | |
115 | int i; | |
116 | for (i=1;i<=fLLMax;i++) {fLLName[i]=new char[40];fNumProcessPair[i]=0;} | |
117 | strcpy( fLLName[1],"neutron neutron"); | |
118 | strcpy( fLLName[2],"proton proton"); | |
119 | strcpy( fLLName[3],"neutron proton"); | |
120 | strcpy( fLLName[4],"alpha alpha"); | |
121 | strcpy( fLLName[5],"pi+ pi-"); | |
122 | strcpy( fLLName[6],"pi0 pi0"); | |
123 | strcpy( fLLName[7],"pi+ pi+"); | |
124 | strcpy( fLLName[8],"neutron deuteron"); | |
125 | strcpy( fLLName[9],"proton deuteron"); | |
126 | strcpy( fLLName[10],"pi+ K-"); | |
127 | strcpy( fLLName[11],"pi+ K+"); | |
128 | strcpy( fLLName[12],"pi+ proton"); | |
129 | strcpy( fLLName[13],"pi- proton"); | |
130 | strcpy( fLLName[14],"K+ K-"); | |
131 | strcpy( fLLName[15],"K+ K+"); | |
132 | strcpy( fLLName[16],"K+ proton"); | |
133 | strcpy( fLLName[17],"K- proton"); | |
134 | strcpy( fLLName[18],"deuteron deuteron"); | |
135 | strcpy( fLLName[19],"deuton alpha"); | |
136 | strcpy( fLLName[20],"triton triton"); | |
137 | strcpy( fLLName[21],"triton alpha"); | |
138 | strcpy( fLLName[22],"K0 K0"); | |
139 | strcpy( fLLName[23],"K0 K0b"); | |
140 | strcpy( fLLName[24],"deuteron triton"); | |
141 | strcpy( fLLName[25],"proton triton"); | |
142 | strcpy( fLLName[26],"proton alpha"); | |
143 | strcpy( fLLName[27],"proton lambda"); | |
144 | strcpy( fLLName[28],"neutron lambda"); | |
145 | strcpy( fLLName[29],"Lambda lambda");// gael 21May02 | |
146 | strcpy( fLLName[30],"Proton Anti-proton");// gael 21May02 | |
147 | FsiInit(); | |
148 | FsiNucl(); | |
ea77036b | 149 | } |
37e4484e | 150 | //______________________ |
151 | AliFemtoModelWeightGeneratorLednicky::AliFemtoModelWeightGeneratorLednicky(const AliFemtoModelWeightGeneratorLednicky &aWeight): | |
152 | AliFemtoModelWeightGenerator(), | |
153 | fWei(0), fWein(0), fWeif(0), fWeightDen(0), | |
154 | fItest(0),fIch(1),fIqs(1),fIsi(1),fI3c(0), | |
155 | fNuclMass(1.),fNuclCharge(0.), | |
156 | fSphereApp(false),fT0App(false) , | |
157 | fLL(0), fNuclChargeSign(1), fSwap(0), fLLMax(30), fLLName(0), | |
158 | fNumProcessPair(0), fNumbNonId(0) | |
159 | { | |
160 | // copy constructor | |
161 | fWei = aWeight.fWei; | |
162 | fWein = aWeight. fWein; | |
163 | fWeif = aWeight. fWeif; | |
164 | fWeightDen = aWeight.fWeightDen; | |
165 | ||
166 | fItest = aWeight.fItest; | |
167 | fIch = aWeight.fIch; | |
168 | fIqs = aWeight.fIqs; | |
169 | fIsi = aWeight.fIsi; | |
170 | fI3c = aWeight.fI3c; | |
171 | fNuclMass = aWeight.fNuclMass; | |
172 | fNuclCharge = aWeight.fNuclCharge; | |
173 | fSphereApp = aWeight.fSphereApp; | |
174 | fT0App = aWeight.fT0App; | |
175 | fLL = aWeight.fLL; | |
176 | fNuclChargeSign = aWeight.fNuclChargeSign; | |
177 | fSwap = aWeight.fSwap; | |
178 | fLLName = aWeight.fLLName; | |
179 | fNumProcessPair = aWeight.fNumProcessPair; | |
180 | fNumbNonId = aWeight.fNumbNonId; | |
181 | fLLName=new char*[fLLMax+1]; | |
182 | fNumProcessPair=new int[fLLMax+1]; | |
183 | int i; | |
184 | for (i=1;i<=fLLMax;i++) {fLLName[i]=new char[40];fNumProcessPair[i]=0;} | |
185 | strcpy( fLLName[1],"neutron neutron"); | |
186 | strcpy( fLLName[2],"proton proton"); | |
187 | strcpy( fLLName[3],"neutron proton"); | |
188 | strcpy( fLLName[4],"alpha alpha"); | |
189 | strcpy( fLLName[5],"pi+ pi-"); | |
190 | strcpy( fLLName[6],"pi0 pi0"); | |
191 | strcpy( fLLName[7],"pi+ pi+"); | |
192 | strcpy( fLLName[8],"neutron deuteron"); | |
193 | strcpy( fLLName[9],"proton deuteron"); | |
194 | strcpy( fLLName[10],"pi+ K-"); | |
195 | strcpy( fLLName[11],"pi+ K+"); | |
196 | strcpy( fLLName[12],"pi+ proton"); | |
197 | strcpy( fLLName[13],"pi- proton"); | |
198 | strcpy( fLLName[14],"K+ K-"); | |
199 | strcpy( fLLName[15],"K+ K+"); | |
200 | strcpy( fLLName[16],"K+ proton"); | |
201 | strcpy( fLLName[17],"K- proton"); | |
202 | strcpy( fLLName[18],"deuteron deuteron"); | |
203 | strcpy( fLLName[19],"deuton alpha"); | |
204 | strcpy( fLLName[20],"triton triton"); | |
205 | strcpy( fLLName[21],"triton alpha"); | |
206 | strcpy( fLLName[22],"K0 K0"); | |
207 | strcpy( fLLName[23],"K0 K0b"); | |
208 | strcpy( fLLName[24],"deuteron triton"); | |
209 | strcpy( fLLName[25],"proton triton"); | |
210 | strcpy( fLLName[26],"proton alpha"); | |
211 | strcpy( fLLName[27],"proton lambda"); | |
212 | strcpy( fLLName[28],"neutron lambda"); | |
213 | strcpy( fLLName[29],"Lambda lambda");// gael 21May02 | |
214 | strcpy( fLLName[30],"Proton Anti-proton");// gael 21May02 | |
215 | FsiInit(); | |
216 | FsiNucl(); | |
217 | } | |
218 | ||
219 | AliFemtoModelWeightGeneratorLednicky& AliFemtoModelWeightGeneratorLednicky::operator=(const AliFemtoModelWeightGeneratorLednicky& aWeight) | |
220 | { | |
221 | // assignment operator | |
222 | if (this == &aWeight) | |
223 | return *this; | |
224 | ||
225 | fWei = aWeight.fWei; | |
226 | fWein = aWeight. fWein; | |
227 | fWeif = aWeight. fWeif; | |
228 | fWeightDen = aWeight.fWeightDen; | |
229 | ||
230 | fItest = aWeight.fItest; | |
231 | fIch = aWeight.fIch; | |
232 | fIqs = aWeight.fIqs; | |
233 | fIsi = aWeight.fIsi; | |
234 | fI3c = aWeight.fI3c; | |
235 | fNuclMass = aWeight.fNuclMass; | |
236 | fNuclCharge = aWeight.fNuclCharge; | |
237 | fSphereApp = aWeight.fSphereApp; | |
238 | fT0App = aWeight.fT0App; | |
239 | fLL = aWeight.fLL; | |
240 | fNuclChargeSign = aWeight.fNuclChargeSign; | |
241 | fSwap = aWeight.fSwap; | |
242 | fLLName = aWeight.fLLName; | |
243 | fNumProcessPair = aWeight.fNumProcessPair; | |
244 | fNumbNonId = aWeight.fNumbNonId; | |
245 | fLLName=new char*[fLLMax+1]; | |
246 | fNumProcessPair=new int[fLLMax+1]; | |
247 | int i; | |
248 | for (i=1;i<=fLLMax;i++) {fLLName[i]=new char[40];fNumProcessPair[i]=0;} | |
249 | strcpy( fLLName[1],"neutron neutron"); | |
250 | strcpy( fLLName[2],"proton proton"); | |
251 | strcpy( fLLName[3],"neutron proton"); | |
252 | strcpy( fLLName[4],"alpha alpha"); | |
253 | strcpy( fLLName[5],"pi+ pi-"); | |
254 | strcpy( fLLName[6],"pi0 pi0"); | |
255 | strcpy( fLLName[7],"pi+ pi+"); | |
256 | strcpy( fLLName[8],"neutron deuteron"); | |
257 | strcpy( fLLName[9],"proton deuteron"); | |
258 | strcpy( fLLName[10],"pi+ K-"); | |
259 | strcpy( fLLName[11],"pi+ K+"); | |
260 | strcpy( fLLName[12],"pi+ proton"); | |
261 | strcpy( fLLName[13],"pi- proton"); | |
262 | strcpy( fLLName[14],"K+ K-"); | |
263 | strcpy( fLLName[15],"K+ K+"); | |
264 | strcpy( fLLName[16],"K+ proton"); | |
265 | strcpy( fLLName[17],"K- proton"); | |
266 | strcpy( fLLName[18],"deuteron deuteron"); | |
267 | strcpy( fLLName[19],"deuton alpha"); | |
268 | strcpy( fLLName[20],"triton triton"); | |
269 | strcpy( fLLName[21],"triton alpha"); | |
270 | strcpy( fLLName[22],"K0 K0"); | |
271 | strcpy( fLLName[23],"K0 K0b"); | |
272 | strcpy( fLLName[24],"deuteron triton"); | |
273 | strcpy( fLLName[25],"proton triton"); | |
274 | strcpy( fLLName[26],"proton alpha"); | |
275 | strcpy( fLLName[27],"proton lambda"); | |
276 | strcpy( fLLName[28],"neutron lambda"); | |
277 | strcpy( fLLName[29],"Lambda lambda");// gael 21May02 | |
278 | strcpy( fLLName[30],"Proton Anti-proton");// gael 21May02 | |
279 | FsiInit(); | |
280 | FsiNucl(); | |
281 | ||
282 | return *this; | |
283 | } | |
284 | ||
285 | ||
286 | double AliFemtoModelWeightGeneratorLednicky::GenerateWeight(AliFemtoPair* aPair) | |
287 | { | |
288 | // Get hidden information pointers | |
289 | AliFemtoModelHiddenInfo *inf1 = (AliFemtoModelHiddenInfo *) aPair->Track1()->HiddenInfo(); | |
290 | AliFemtoModelHiddenInfo *inf2 = (AliFemtoModelHiddenInfo *) aPair->Track2()->HiddenInfo(); | |
291 | ||
292 | // Calculate pair variables | |
293 | Double_t tPx = inf1->GetTrueMomentum()->x()+inf2->GetTrueMomentum()->x(); | |
294 | Double_t tPy = inf1->GetTrueMomentum()->y()+inf2->GetTrueMomentum()->y(); | |
295 | Double_t tPz = inf1->GetTrueMomentum()->z()+inf2->GetTrueMomentum()->z(); | |
296 | Double_t tM1 = inf1->GetMass(); | |
297 | Double_t tM2 = inf2->GetMass(); | |
69c1c8ff | 298 | Double_t tE1 = sqrt(tM1*tM1 + inf1->GetTrueMomentum()->Mag2()); |
299 | Double_t tE2 = sqrt(tM2*tM2 + inf2->GetTrueMomentum()->Mag2()); | |
37e4484e | 300 | Double_t tE = tE1 + tE2; |
301 | Double_t tPt = tPx*tPx + tPy*tPy; | |
302 | Double_t tMt = tE*tE - tPz*tPz;//mCVK; | |
303 | Double_t tM = sqrt(tMt - tPt); | |
304 | tMt = sqrt(tMt); | |
305 | tPt = sqrt(tPt); | |
306 | Double_t tBetat = tPt/tMt; | |
307 | ||
308 | // Boost to LCMS | |
309 | Double_t tBeta = tPz/tE; | |
310 | Double_t tGamma = tE/tMt; | |
311 | fKStarLong = tGamma * (inf1->GetTrueMomentum()->z() - tBeta * tE1); | |
312 | Double_t tE1L = tGamma * (tE1 - tBeta * inf1->GetTrueMomentum()->z()); | |
313 | ||
314 | // Rotate in transverse plane | |
315 | fKStarOut = ( inf1->GetTrueMomentum()->x()*tPx + inf1->GetTrueMomentum()->y()*tPy)/tPt; | |
316 | fKStarSide = (-inf1->GetTrueMomentum()->x()*tPy + inf1->GetTrueMomentum()->y()*tPx)/tPt; | |
317 | ||
318 | // Boost to pair cms | |
319 | fKStarOut = tMt/tM * (fKStarOut - tPt/tMt * tE1L); | |
320 | ||
321 | tBetat = tPt/tMt; | |
322 | ||
323 | Double_t tDX = inf1->GetEmissionPoint()->x()-inf2->GetEmissionPoint()->x(); | |
324 | Double_t tDY = inf1->GetEmissionPoint()->y()-inf2->GetEmissionPoint()->y(); | |
325 | Double_t tRLong = inf1->GetEmissionPoint()->z()-inf2->GetEmissionPoint()->z(); | |
326 | Double_t tDTime = inf1->GetEmissionPoint()->t()-inf2->GetEmissionPoint()->t(); | |
327 | ||
328 | Double_t tROut = (tDX*tPx + tDY*tPy)/tPt; | |
329 | Double_t tRSide = (-tDX*tPy + tDY*tPx)/tPt; | |
330 | ||
b9f7b567 | 331 | // cout << "Got points 1 " << inf1->GetEmissionPoint()->x() << " " << inf1->GetEmissionPoint()->y() << " " << inf1->GetEmissionPoint()->z() << " " << inf1->GetEmissionPoint()->t() << endl; |
332 | ||
333 | // cout << "Got points 2 " << inf2->GetEmissionPoint()->x() << " " << inf2->GetEmissionPoint()->y() << " " << inf2->GetEmissionPoint()->z() << " " << inf2->GetEmissionPoint()->t() << endl; | |
334 | ||
37e4484e | 335 | fRStarSide = tRSide; |
336 | ||
337 | fRStarLong = tGamma*(tRLong - tBeta* tDTime); | |
338 | Double_t tDTimePairLCMS = tGamma*(tDTime - tBeta* tRLong); | |
339 | ||
340 | tBeta = tPt/tMt; | |
341 | tGamma = tMt/tM; | |
342 | ||
343 | fRStarOut = tGamma*(tROut - tBeta* tDTimePairLCMS); | |
344 | fRStar = ::sqrt(fRStarOut*fRStarOut + fRStarSide*fRStarSide + | |
345 | fRStarLong*fRStarLong); | |
346 | fKStar = ::sqrt(fKStarOut*fKStarOut + fKStarSide*fKStarSide + fKStarLong*fKStarLong); | |
347 | ||
b9f7b567 | 348 | // cout << "Got out side " << fRStarOut << " " << fRStarSide << endl; |
349 | ||
37e4484e | 350 | if (!SetPid(inf1->GetPDGPid(),inf2->GetPDGPid())) { |
351 | fWeightDen=1.; | |
352 | return 1; | |
353 | } | |
354 | else { // Good Pid | |
355 | AliFemtoThreeVector* p; | |
356 | p=(inf1->GetTrueMomentum()); | |
357 | double p1[]={p->x(),p->y(),p->z()}; | |
358 | p=(inf2->GetTrueMomentum()); | |
359 | double p2[]={p->x(),p->y(),p->z()}; | |
360 | if ((p1[0]==p2[0])&&(p1[1]==p2[1])&&(p1[2]==p2[2])) { | |
361 | fWeightDen=0.; | |
362 | return 0; | |
363 | } | |
364 | if (fSwap) { | |
365 | fsimomentum(*p2,*p1); | |
366 | } else { | |
367 | fsimomentum(*p1,*p2); | |
368 | } | |
369 | AliFemtoLorentzVector* tPoint; | |
370 | tPoint=(inf1->GetEmissionPoint()); | |
371 | // cout << "Pid1:dans GetWeight = " << aThPair->GetPid1() << endl; | |
372 | // cout << "Pid2:dans GetWeight = " << aThPair->GetPid2() << endl; | |
373 | // cout << "LL:in GetWeight = " << mLL << endl; | |
374 | ||
375 | double x1[]={tPoint->x(),tPoint->y(),tPoint->z(),tPoint->t()}; | |
376 | tPoint=(inf2->GetEmissionPoint()); | |
377 | double x2[]={tPoint->x(),tPoint->y(),tPoint->z(),tPoint->t()}; | |
378 | if ((x1[0]==x2[0])&&(x1[1]==x2[1])&&(x1[2]==x2[2])&&(x1[3]==x2[3])) { | |
379 | fWeightDen=0.; | |
380 | return 0; | |
381 | } | |
382 | if (fSwap) { | |
383 | fsiposition(*x2,*x1); | |
384 | } else { | |
385 | fsiposition(*x1,*x2); | |
386 | } | |
387 | FsiSetLL(); | |
388 | ltran12(); | |
389 | fsiw(1,fWeif,fWei,fWein); | |
b9f7b567 | 390 | |
37e4484e | 391 | if (fI3c==0) return fWein; |
392 | fWeightDen=fWeif; | |
393 | return fWei; | |
ea77036b | 394 | } |
395 | } | |
37e4484e | 396 | |
397 | AliFemtoString AliFemtoModelWeightGeneratorLednicky::Report() { | |
398 | // create report | |
399 | ostringstream tStr; | |
400 | tStr << "Lednicky afterburner calculation for Correlation - Report" << endl; | |
401 | tStr << " Setting : Quantum : " << ((fIqs) ? "On" : "Off"); | |
402 | tStr << " - Coulbomb : " << ((fIch) ? "On" : "Off") ; | |
403 | tStr << " - Strong : " << ((fIsi) ? "On" : "Off"); | |
404 | tStr << endl; | |
405 | tStr << " 3-Body : " << ((fI3c) ? "On" : "Off") ; | |
406 | if (fI3c) tStr << " Mass=" << fNuclMass << " - Charge= " << fNuclCharge ; | |
407 | tStr << endl; | |
408 | tStr << " " << fNumProcessPair[0] << " Pairs have been Processed :" << endl; | |
409 | int i; | |
410 | for(i=1;i<=fLLMax;i++) { | |
411 | if (fNumProcessPair[i]) | |
412 | tStr << " " << fNumProcessPair[i] << " " << fLLName[i] << endl; | |
413 | } | |
414 | if (fNumbNonId) | |
415 | tStr << " "<< fNumbNonId << " Non Identified" << endl; | |
416 | AliFemtoString returnThis = tStr.str(); | |
417 | return returnThis; | |
418 | } | |
419 | ||
420 | void AliFemtoModelWeightGeneratorLednicky::FsiInit(){ | |
421 | // Initialize weight generation module | |
b9f7b567 | 422 | // cout << "*******************AliFemtoModelWeightGeneratorLednicky check FsiInit ************" << endl; |
423 | // cout <<"mItest dans FsiInit() = " << fItest << endl; | |
424 | // cout <<"mIch dans FsiInit() = " << fIch << endl; | |
425 | // cout <<"mIqs dans FsiInit() = " << fIqs << endl; | |
426 | // cout <<"mIsi dans FsiInit() = " << fIsi << endl; | |
427 | // cout <<"mI3c dans FsiInit() = " << fI3c << endl; | |
37e4484e | 428 | fsiin(fItest,fIch,fIqs,fIsi,fI3c); |
ea77036b | 429 | } |
37e4484e | 430 | |
431 | void AliFemtoModelWeightGeneratorLednicky::FsiNucl(){ | |
432 | // initialize weight generation taking into account the residual charge | |
b9f7b567 | 433 | // cout << "*******************AliFemtoModelWeightGeneratorLednicky check FsiNucl ************" << endl; |
434 | // cout <<"fNuclMass dans FsiNucl() = " << fNuclMass << endl; | |
435 | // cout <<"fNuclCharge dans FsiNucl() = " << fNuclCharge << endl; | |
436 | // cout <<"fNuclChargeSign dans FsiNucl() = " << fNuclChargeSign << endl; | |
37e4484e | 437 | fsinucl(fNuclMass,fNuclCharge*fNuclChargeSign); |
ea77036b | 438 | } |
37e4484e | 439 | |
440 | void AliFemtoModelWeightGeneratorLednicky::FsiSetLL(){ | |
441 | // set internal pair type for the module | |
442 | int tNS; | |
443 | if (fSphereApp||(fLL>5)) { | |
444 | if (fT0App) { tNS=4;} | |
ea77036b | 445 | else {tNS=2;} |
446 | } else { tNS=1;} | |
37e4484e | 447 | //cout <<"fLL dans FsiSetLL() = "<< fLL << endl; |
448 | //cout <<"tNS dans FsiSetLL() = "<< tNS << endl; | |
449 | //cout <<"fItest dans FsiSetLL() = "<< fItest << endl; | |
450 | llini(fLL,tNS,fItest); | |
451 | //cout<<" end of FsiSetLL"<<endl; | |
452 | } | |
453 | ||
454 | bool AliFemtoModelWeightGeneratorLednicky::SetPid(const int aPid1,const int aPid2) { | |
455 | // set calculated system for basing on particles' pids | |
456 | static const int ksPi0Pid=111; | |
457 | static const int ksPionPid=211; | |
458 | static const int ksK0Pid=311; | |
459 | static const int ksKPid=321; | |
460 | static const int ksNeutPid=2112; | |
461 | static const int ksProtPid=2212; | |
462 | static const int ksLamPid=3122; | |
463 | // static const int sLamLamPid=3122; | |
464 | ||
465 | // cout << "Setting PID to " << aPid1 << " " << aPid2 << endl; | |
466 | ||
467 | int tPidl,tPidh; | |
468 | int tChargeFactor=1; | |
469 | ||
470 | if (abs(aPid1)<abs(aPid2)) { | |
471 | if (aPid1<0) tChargeFactor=-1; | |
472 | tPidl=aPid1*tChargeFactor; | |
473 | tPidh=aPid2*tChargeFactor; | |
474 | fSwap=false; | |
475 | } else { | |
476 | if (aPid2<0) tChargeFactor=-1; | |
477 | tPidl=aPid2*tChargeFactor; | |
478 | tPidh=aPid1*tChargeFactor; | |
479 | fSwap=true; | |
480 | } | |
481 | switch (tPidl) { | |
482 | case ksPionPid: | |
483 | switch (tPidh) { | |
484 | case -ksPionPid: fLL=5; tChargeFactor*=1 ;break; | |
485 | case ksPionPid: fLL=7; tChargeFactor*=1 ;break; | |
486 | case -ksKPid: fLL=10;tChargeFactor*=1 ;break; | |
487 | case ksKPid: fLL=11;tChargeFactor*=1 ;break; | |
488 | case ksProtPid: fLL=12;tChargeFactor*=1 ;break; | |
489 | case -ksProtPid: fLL=13;tChargeFactor*=-1;break; | |
490 | default: fLL=0; | |
491 | } | |
492 | break; | |
493 | case ksProtPid: | |
494 | switch (tPidh) { | |
495 | case ksProtPid: fLL=2; tChargeFactor*=1 ;break; | |
496 | case ksLamPid: fLL=27;tChargeFactor*=1 ;break; | |
497 | case -ksProtPid: fLL=30;tChargeFactor*=1 ;break; | |
498 | default: fLL=0; | |
ea77036b | 499 | } |
37e4484e | 500 | break; |
501 | case ksKPid: | |
502 | switch (tPidh) { | |
503 | case -ksKPid: fLL=14;tChargeFactor*=1 ;break; | |
504 | case ksKPid: fLL=15;tChargeFactor*=1 ;break; | |
505 | case ksProtPid: fLL=16;tChargeFactor*=1 ;break; | |
506 | case -ksProtPid: fLL=17;tChargeFactor*=-1 ;break; | |
507 | default: fLL=0; | |
ea77036b | 508 | } |
37e4484e | 509 | break; |
510 | case ksK0Pid: | |
511 | switch (tPidh) { | |
512 | case ksK0Pid: fLL=22;tChargeFactor*=1 ;break; | |
513 | case -ksK0Pid: fLL=23;tChargeFactor*=1 ;break; | |
514 | default: fLL=0; | |
ea77036b | 515 | } |
37e4484e | 516 | break; |
517 | case ksPi0Pid: | |
518 | switch (tPidh) { | |
519 | case ksPi0Pid: fLL=6; tChargeFactor*=1 ;break; | |
520 | default: fLL=0; | |
ea77036b | 521 | } |
37e4484e | 522 | break; |
523 | case ksNeutPid: | |
524 | switch (tPidh) { | |
525 | case ksNeutPid: fLL=1; tChargeFactor*=1 ;break; | |
526 | case ksProtPid: fLL=3; tChargeFactor*=1 ;break; | |
527 | case ksLamPid: fLL=28;tChargeFactor*=1 ;break; | |
528 | default: fLL=0; | |
ea77036b | 529 | } |
37e4484e | 530 | break; //Gael 21May02 |
531 | case ksLamPid: //Gael 21May02 | |
532 | switch (tPidh) { //Gael 21May02 | |
533 | case ksLamPid: fLL=29;tChargeFactor*=1 ;break;//Gael 21May02 | |
534 | default: fLL=0; //Gael 21May02 | |
ea77036b | 535 | } //Gael 21May02 |
37e4484e | 536 | break; //Gael 21May02 |
537 | default: fLL=0; | |
538 | } | |
539 | if (tChargeFactor!=fNuclChargeSign) { | |
540 | fNuclChargeSign=tChargeFactor; | |
541 | FsiNucl(); | |
542 | } | |
543 | (fNumProcessPair[0])++; | |
544 | if (fLL) { | |
545 | (fNumProcessPair[fLL])++; | |
546 | return true; | |
547 | } else { | |
548 | fNumbNonId++; | |
549 | return false; | |
550 | } | |
b9f7b567 | 551 | // cout << "*******************AliFemtoModelWeightGeneratorLednicky check SetPid ************" << endl; |
552 | // cout << "fLL=="<< fLL << endl; | |
553 | // cout << "fNuclCharge=="<< fNuclCharge << endl; | |
37e4484e | 554 | |
555 | } | |
556 | AliFemtoModelWeightGeneratorLednicky::~AliFemtoModelWeightGeneratorLednicky() | |
ea77036b | 557 | { /* no-op */ } |
37e4484e | 558 | |
559 | //_____________________________________________ | |
560 | void AliFemtoModelWeightGeneratorLednicky::SetPairType(Int_t aPairType) | |
561 | { | |
562 | // set calculated system basing on the pair type | |
563 | fPairType = aPairType; | |
564 | if (fPairType == fgkPionPlusPionPlus) SetPid(211,211); | |
565 | if (fPairType == fgkPionPlusPionMinus ) SetPid(211, -211); | |
566 | if (fPairType == fgkKaonPlusKaonPlus ) SetPid(321, 321); | |
567 | if (fPairType == fgkKaonPlusKaonMinus ) SetPid(321, -321); | |
568 | if (fPairType == fgkProtonProton ) SetPid(2212, 2212); | |
569 | if (fPairType == fgkProtonAntiproton ) SetPid(2212, -2212); | |
570 | if (fPairType == fgkPionPlusKaonPlus ) SetPid(211, 321); | |
571 | if (fPairType == fgkPionPlusKaonMinus ) SetPid(211, -321); | |
572 | if (fPairType == fgkPionPlusProton ) SetPid(211, 2212); | |
573 | if (fPairType == fgkPionPlusAntiproton ) SetPid(211, -2212); | |
574 | if (fPairType == fgkKaonPlusProton ) SetPid(321, 2212); | |
575 | if (fPairType == fgkKaonPlusAntiproton ) SetPid(321, -2212); | |
576 | } | |
577 | ||
578 | //_____________________________________________ | |
579 | Int_t AliFemtoModelWeightGeneratorLednicky::GetPairType() const | |
580 | { | |
581 | // return pair type | |
582 | return fPairType; | |
583 | } | |
584 | ||
585 | //_____________________________________________ | |
586 | void AliFemtoModelWeightGeneratorLednicky::SetPairTypeFromPair(AliFemtoPair *aPair) | |
587 | { | |
588 | // set calculated system based on the hidden info in the pair | |
589 | AliFemtoModelHiddenInfo *inf1 = ( AliFemtoModelHiddenInfo *) aPair->Track1()->HiddenInfo(); | |
590 | AliFemtoModelHiddenInfo *inf2 = ( AliFemtoModelHiddenInfo *) aPair->Track2()->HiddenInfo(); | |
591 | ||
592 | const Int_t ktPid1 = inf1->GetPDGPid(); | |
593 | const Int_t ktPid2 = inf2->GetPDGPid(); | |
594 | ||
595 | if (((ktPid1 == 211) && (ktPid2 == 211)) || | |
596 | ((ktPid1 == -211) && (ktPid2 == -211))) | |
597 | fPairType = fgkPionPlusPionPlus; | |
598 | else if (((ktPid1 == -211) && (ktPid2 == 211)) || | |
599 | ((ktPid1 == 211) && (ktPid2 == -211))) | |
600 | fPairType = fgkPionPlusPionMinus; | |
601 | else if (((ktPid1 == 321) && (ktPid2 == 321)) || | |
602 | ((ktPid1 == -321) && (ktPid2 == -321))) | |
603 | fPairType = fgkKaonPlusKaonPlus; | |
604 | else if (((ktPid1 == -321) && (ktPid2 == 321)) || | |
605 | ((ktPid1 == 321) && (ktPid2 == -321))) | |
606 | fPairType = fgkKaonPlusKaonMinus; | |
607 | else if (((ktPid1 == 2212) && (ktPid2 == 2212)) || | |
608 | ((ktPid1 == -2212) && (ktPid2 == -2212))) | |
609 | fPairType = fgkProtonProton; | |
610 | else if (((ktPid1 == -2212) && (ktPid2 == 2212)) || | |
611 | ((ktPid1 == 2212) && (ktPid2 == -2212))) | |
612 | fPairType = fgkProtonAntiproton; | |
613 | else if (((ktPid1 == 211) && (ktPid2 == 321)) || | |
614 | ((ktPid1 == -211) && (ktPid2 == -321))) | |
615 | fPairType = fgkPionPlusKaonPlus; | |
616 | else if (((ktPid1 == -211) && (ktPid2 == 321)) || | |
617 | ((ktPid1 == 211) && (ktPid2 == -321))) | |
618 | fPairType = fgkPionPlusKaonMinus; | |
619 | else if (((ktPid1 == 211) && (ktPid2 == 2212)) || | |
620 | ((ktPid1 == -211) && (ktPid2 == -2212))) | |
621 | fPairType = fgkPionPlusProton; | |
622 | else if (((ktPid1 == -211) && (ktPid2 == 2212)) || | |
623 | ((ktPid1 == 211) && (ktPid2 == -2212))) | |
624 | fPairType = fgkPionPlusAntiproton; | |
625 | else if (((ktPid1 == 321) && (ktPid2 == 2212)) || | |
626 | ((ktPid1 == -321) && (ktPid2 == -2212))) | |
627 | fPairType = fgkKaonPlusProton; | |
628 | else if (((ktPid1 == -321) && (ktPid2 == 2212)) || | |
629 | ((ktPid1 == 321) && (ktPid2 == -2212))) | |
630 | fPairType = fgkKaonPlusAntiproton; | |
631 | SetPid(ktPid1, ktPid2); | |
632 | } | |
633 | ||
ea77036b | 634 | void AliFemtoModelWeightGeneratorLednicky::SetNuclCharge(const double aNuclCharge) {fNuclCharge=aNuclCharge;FsiNucl();} |
635 | void AliFemtoModelWeightGeneratorLednicky::SetNuclMass(const double aNuclMass){fNuclMass=aNuclMass;FsiNucl();} | |
37e4484e | 636 | |
ea77036b | 637 | void AliFemtoModelWeightGeneratorLednicky::SetSphere(){fSphereApp=true;} |
638 | void AliFemtoModelWeightGeneratorLednicky::SetSquare(){fSphereApp=false;} | |
639 | void AliFemtoModelWeightGeneratorLednicky::SetT0ApproxOn(){ fT0App=true;} | |
640 | void AliFemtoModelWeightGeneratorLednicky::SetT0ApproxOff(){ fT0App=false;} | |
37e4484e | 641 | void AliFemtoModelWeightGeneratorLednicky::SetDefaultCalcPar(){ |
642 | fItest=1;fIqs=1;fIsi=1;fI3c=0;fIch=1;FsiInit(); | |
ea77036b | 643 | fSphereApp=false;fT0App=false;} |
644 | ||
645 | void AliFemtoModelWeightGeneratorLednicky::SetCoulOn() {fItest=1;fIch=1;FsiInit();} | |
646 | void AliFemtoModelWeightGeneratorLednicky::SetCoulOff() {fItest=1;fIch=0;FsiInit();} | |
647 | void AliFemtoModelWeightGeneratorLednicky::SetQuantumOn() {fItest=1;fIqs=1;FsiInit();} | |
648 | void AliFemtoModelWeightGeneratorLednicky::SetQuantumOff(){fItest=1;fIqs=0;FsiInit();} | |
649 | void AliFemtoModelWeightGeneratorLednicky::SetStrongOn() {fItest=1;fIsi=1;FsiInit();} | |
650 | void AliFemtoModelWeightGeneratorLednicky::SetStrongOff() {fItest=1;fIsi=0;FsiInit();} | |
651 | void AliFemtoModelWeightGeneratorLednicky::Set3BodyOn() {fItest=1;fI3c=1;FsiInit();FsiNucl();} | |
652 | void AliFemtoModelWeightGeneratorLednicky::Set3BodyOff() {fItest=1;fI3c=0;FsiInit();fWeightDen=1.;FsiNucl();} | |
37e4484e | 653 | |
654 | Double_t AliFemtoModelWeightGeneratorLednicky::GetKStar() const {return AliFemtoModelWeightGenerator::GetKStar();} | |
655 | Double_t AliFemtoModelWeightGeneratorLednicky::GetKStarOut() const { return AliFemtoModelWeightGenerator::GetKStarOut(); } | |
656 | Double_t AliFemtoModelWeightGeneratorLednicky::GetKStarSide() const { return AliFemtoModelWeightGenerator::GetKStarSide(); } | |
657 | Double_t AliFemtoModelWeightGeneratorLednicky::GetKStarLong() const { return AliFemtoModelWeightGenerator::GetKStarLong(); } | |
658 | Double_t AliFemtoModelWeightGeneratorLednicky::GetRStar() const { return AliFemtoModelWeightGenerator::GetRStar(); } | |
659 | Double_t AliFemtoModelWeightGeneratorLednicky::GetRStarOut() const { return AliFemtoModelWeightGenerator::GetRStarOut(); } | |
660 | Double_t AliFemtoModelWeightGeneratorLednicky::GetRStarSide() const { return AliFemtoModelWeightGenerator::GetRStarSide(); } | |
661 | Double_t AliFemtoModelWeightGeneratorLednicky::GetRStarLong() const { return AliFemtoModelWeightGenerator::GetRStarLong(); } | |
662 | ||
663 | AliFemtoModelWeightGenerator* AliFemtoModelWeightGeneratorLednicky::Clone() const { | |
664 | AliFemtoModelWeightGenerator* tmp = new AliFemtoModelWeightGeneratorLednicky(*this); | |
665 | return tmp; | |
666 | } |