Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
FemtoWeightGeneratorLednicky.cxx
1/*
2 * FemtoWeightGeneratorLednicky.cxx
3 *
4 * Created on: 21-08-2013
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9
10#include "FemtoWeightGeneratorLednicky.h"
11
12
13#include <Rtypes.h>
14#include <RtypesCore.h>
15#include <TString.h>
16#include <cmath>
17#include <cstdlib>
18#include <cstring>
19#include <utility>
20
21#include "Cout.h"
22#include "FemtoConst.h"
23#include "FemtoPair.h"
24#include "Package.h"
25#include "Parameter.h"
26#include <iostream>
27
28#ifdef SOLARIS
29#ifndef false
30typedef int bool;
31#define false 0
32#define true 1
33#endif
34#endif
35
36#ifdef WIN32
37#ifdef CERNLIB_MSSTDCALL
38#define F77_UCASE
39#define type_of_call _stdcall
40#ifndef CERNLIB_QXCAPT
41#define CERNLIB_QXCAPT
42#endif
43#else
44#define F77_LCASE
45#ifndef CERNLIB_QXNO_SC
46#define CERNLIB_QXNO_SC
47#endif
48#endif
49#define type_of_call _stdcall
50#define DEFCHARD const char*, const int
51#define DEFCHARL
52#define PASSCHARD(string) string, strlen(string)
53#define PASSCHARL(string)
54#else
55#define DEFCHARD const char*
56#define DEFCHARL , const int
57#define PASSCHARD(string) string
58#define PASSCHARL(string) , strlen(string)
59#endif
60#ifdef CERNLIB_QXCAPT
61#define F77_NAME(name, NAME) NAME
62#else
63#if defined(CERNLIB_QXNO_SC)
64#define F77_NAME(name, NAME) name
65#else
66#define F77_NAME(name, NAME) name##_
67#endif
68#endif
69#ifndef type_of_call
70#define type_of_call
71#endif
72
73//#define LEDNICKY_CHEATING
74#define OLD_LEDNICKY // keep compatibility with old lednicky code
75
76// --- Prototype of the function used in the weight calculator
77// (in FsiWeightLedinicky.F)
78
79#ifdef OLD_LEDNICKY
80#define fsiin F77_NAME(fsiin, FSIIN)
81extern "C" {
82void type_of_call F77_NAME(fsiin, FSIIN)(const int& itest, const int& ich, const int& iqs, const int& isi, const int& i3c);
83}
84
85#else
86#define fsiini F77_NAME(fsiini, FSIINI)
87extern "C" {
88void type_of_call F77_NAME(
89 fsiini,
90 FSIINI)(const int& itest, const int& ill, const int& ins, const int& ich, const int& iqs, const int& isi, const int& i3c);
91}
92#endif
93#define llini F77_NAME(llini, LLINI)
94extern "C" {
95void type_of_call F77_NAME(llini, LLINI)(const int& lll, const int& ns, const int& itest);
96}
97
98#define fsinucl F77_NAME(fsinucl, FSINUCL)
99extern "C" {
100void type_of_call F77_NAME(fsinucl, FSINUCL)(const double& mn, const double& cn);
101}
102#define fsimomentum F77_NAME(fsimomentum, FSIMOMENTUM)
103extern "C" {
104void type_of_call F77_NAME(fsimomentum, FSIMOMENTUM)(double& p1, double& p2);
105}
106#define fsiposition F77_NAME(fsiposition, FSIPOSITION)
107extern "C" {
108void type_of_call F77_NAME(fsiposition, FSIPOSITION)(double& x1, double& x2);
109}
110#define fsiw F77_NAME(fsiw, FSIW)
111extern "C" {
112void type_of_call F77_NAME(fsiw, FSIW)(const int& i, double& weif, double& wei, double& wein);
113}
114#define ltran12 F77_NAME(ltran12, LTRAN12)
115extern "C" {
116void type_of_call ltran12_();
117}
118
119// K+K- model type
120/*
121#define setkpkmmodel F77_NAME(setkpkmmodel, SETKPKMMODEL)
122extern "C" {
123void type_of_call F77_NAME(setkpkmmodel, SETKPKMMODEL)(const int& i_model, const int& i_PhiOffOn);
124}
125*/
126// Test function for Lambda potential
127//#define printlam F77_NAME(printlam,PRINTLAM)
128// extern "C" {void type_of_call printlam_();}
129// there is not PRINTLAM in *.F file
130
131// --- Additional prototyping of some CERN functions (in FsiTool.F)
132typedef float REAL;
133typedef struct {
134 REAL re;
135 REAL im;
136} COMPLEX;
137#define cgamma F77_NAME(cgamma, CGAMMA)
138extern "C" {
139COMPLEX type_of_call cgamma_(COMPLEX*);
140}
141#ifdef __ROOT__
142ClassImp(FemtoWeightGeneratorLednicky)
143#endif
144 namespace Hal {
147 fWei(0),
148 fWein(0),
149 fWeif(0),
150 fWeightDen(0),
151 fItest(0),
152 fIch(1),
153 fIqs(1),
154 fIsi(1),
155 fI3c(0),
156 fNuclMass(1.),
157 fNuclCharge(0.),
158 fSphereApp(false),
159 fT0App(false),
160 fLL(0),
161 fNuclChargeSign(1),
162 fSwap(0),
163 fLLMax(30),
164 fNS(4),
165 fNumProcessPair(0),
166 fNumbNonId(0),
167 fKpKmModel(14),
168 fPhi_OffOn(1),
169 fNS_4(0) {
170 fNumProcessPair = new int[fLLMax + 1];
171 int i;
172 for (i = 1; i <= fLLMax; i++) {
173 fNumProcessPair[i] = 0;
174 }
175 FsiInit();
176 FsiNucl();
177 }
178
180 int tNS;
181 if (fSphereApp || (fLL > 5)) {
182 if (fT0App) {
183 tNS = 4;
184 } else {
185 tNS = 2;
186 }
187 } else {
188 tNS = 1;
189 }
190 if (fNS_4 == 4) tNS = 4; // K+K- analisys
191 /* std::cout << "fLL dans FsiSetLL() = " << fLL << std::endl;
192 std::cout << "tNS dans FsiSetLL() = " << tNS << std::endl;
193 std::cout << "fItest dans FsiSetLL() = " << fItest << std::endl;*/
194 llini(fLL, tNS, fItest);
195 }
196
198 // initialize weight generation taking into account the residual charge
199 // cout << "*******************AliFemtoModelWeightGeneratorLednicky check
200 // FsiNucl ************" << endl; cout <<"fNuclMass dans FsiNucl() = " <<
201 // fNuclMass << endl; cout <<"fNuclCharge dans FsiNucl() = " << fNuclCharge
202 // << endl; cout <<"fNuclChargeSign dans FsiNucl() = " << fNuclChargeSign <<
203 // endl;
205 }
206
207 bool FemtoWeightGeneratorLednicky::SetPid(const int aPid1, const int aPid2) {
208 // set calculated system for basing on particles' pids
209 /* static const int ksPi0Pid = 111;
210 static const int ksPionPid = 211;
211 static const int ksK0Pid = 130;
212 static const int ksKPid = 321;
213 static const int ksNeutPid = 2112;
214 static const int ksProtPid = 2212;
215 static const int ksLamPid = 3122;*/
216 // static const int sLamLamPid=3122;
217
218 // cout << "Setting PID to " << aPid1 << " " << aPid2 << endl;
219
220 // int tPidl, tPidh;
221 int tChargeFactor = 1;
222
223 if (abs(aPid1) < abs(aPid2)) {
224 if (aPid1 < 0) tChargeFactor = -1;
225 // tPidl = aPid1 * tChargeFactor;
226 // tPidh = aPid2 * tChargeFactor;
227 fSwap = false;
228 } else {
229 if (aPid2 < 0) tChargeFactor = -1;
230 // tPidl = aPid2 * tChargeFactor;
231 // tPidh = aPid1 * tChargeFactor;
232 fSwap = true;
233 }
234
235
236 fPairType = Femto::PidToPairType(aPid1, aPid2);
237
238 PairIDToLL(fPairType, fLL, tChargeFactor);
239
240 if (tChargeFactor != fNuclChargeSign) {
241 fNuclChargeSign = tChargeFactor;
242 FsiNucl();
243 }
244 (fNumProcessPair[0])++;
245 if (fLL) {
246 (fNumProcessPair[fLL])++;
247 return true;
248 } else {
249 fNumbNonId++;
250 return false;
251 }
252 // cout << "*******************AliFemtoModelWeightGeneratorLednicky check
253 // SetPid ************" << endl; cout << "fLL=="<< fLL << endl; cout <<
254 // "fNuclCharge=="<< fNuclCharge << endl;
255 }
256
258 FemtoWeightGenerator(aWeight),
259 fWei(aWeight.fWei),
260 fWein(aWeight.fWein),
261 fWeif(aWeight.fWeif),
262 fWeightDen(aWeight.fWeightDen),
263 fItest(aWeight.fItest),
264 fIch(aWeight.fIch),
265 fIqs(aWeight.fIqs),
266 fIsi(aWeight.fIsi),
267 fI3c(aWeight.fI3c),
268 fNuclMass(aWeight.fNuclMass),
269 fNuclCharge(aWeight.fNuclCharge),
270 fSphereApp(aWeight.fSphereApp),
271 fT0App(aWeight.fT0App),
272 fLL(aWeight.fLL),
273 fNuclChargeSign(aWeight.fNuclChargeSign),
274 fSwap(aWeight.fSwap),
275 fLLMax(aWeight.fLLMax),
276 fNS(aWeight.fNS),
277 fNumProcessPair(nullptr),
278 fNumbNonId(aWeight.fNumbNonId),
279 fKpKmModel(aWeight.fKpKmModel),
280 fPhi_OffOn(aWeight.fPhi_OffOn),
281 fNS_4(aWeight.fNS_4) {
282 // copy constructor
283
284 fNumProcessPair = new int[fLLMax + 1];
285 int i;
286 for (i = 1; i <= fLLMax; i++) {
287 fNumProcessPair[i] = 0;
288 }
289
290 FsiInit();
291 FsiNucl();
292 }
293
295 if (this == &aWeight) return *this;
297 fWei = aWeight.fWei;
298 fWein = aWeight.fWein;
299 fWeif = aWeight.fWeif;
300 fWeightDen = aWeight.fWeightDen;
301
302 fItest = aWeight.fItest;
303 fIch = aWeight.fIch;
304 fIqs = aWeight.fIqs;
305 fIsi = aWeight.fIsi;
306 fI3c = aWeight.fI3c;
307 fNuclMass = aWeight.fNuclMass;
308 fNuclCharge = aWeight.fNuclCharge;
309 fSphereApp = aWeight.fSphereApp;
310 fT0App = aWeight.fT0App;
311 fLL = aWeight.fLL;
313 fSwap = aWeight.fSwap;
314 // fLLName = aWeight.fLLName;
316 fNumbNonId = aWeight.fNumbNonId;
317 fNS = aWeight.fNS;
318 fKpKmModel = aWeight.fKpKmModel;
319 fPhi_OffOn = aWeight.fPhi_OffOn;
320 fNS_4 = aWeight.fNS_4;
322 fNumProcessPair = new int[fLLMax + 1];
323 int i;
324 for (i = 1; i <= fLLMax; i++) {
325 fNumProcessPair[i] = 0;
326 }
327 FsiInit();
328 FsiNucl();
329
330 return *this;
331 }
332
336
338 // AliFemtoModelHiddenInfo *track1 = (AliFemtoModelHiddenInfo *)
339 // aPair->Track1()->HiddenInfo();
340 // AliFemtoModelHiddenInfo *track2 = (AliFemtoModelHiddenInfo *)
341 // aPair->Track2()->HiddenInfo();
342
343 // Calculate pair variables
344 Double_t tPx = pair->TruePx1() + pair->TruePx2();
345 Double_t tPy = pair->TruePy1() + pair->TruePy2();
346 Double_t tPz = pair->TruePz1() + pair->TruePz2();
347 Double_t tE1 = pair->TrueE1();
348 Double_t tE2 = pair->TrueE2();
349 Double_t tE = tE1 + tE2;
350 Double_t tPt = tPx * tPx + tPy * tPy;
351 Double_t tMt = tE * tE - tPz * tPz; // mCVK;
352 Double_t tM = sqrt(tMt - tPt);
353 tMt = sqrt(tMt);
354 tPt = sqrt(tPt);
355 // Double_t tBetat = tPt/tMt;
356
357 // Boost to LCMS
358 Double_t tBeta = tPz / tE;
359 Double_t tGamma = tE / tMt;
360 fKStarLong = tGamma * (pair->TruePz1() - tBeta * tE1);
361 Double_t tE1L = tGamma * (tE1 - tBeta * pair->TruePz1());
362
363 // Rotate in transverse plane
364 fKStarOut = (pair->TruePx1() * tPx + pair->TruePy1() * tPy) / tPt;
365 fKStarSide = (-pair->TruePx1() * tPy + pair->TruePy1() * tPx) / tPt;
366#ifdef _kinetic_debug
367 pair->PrintInfo();
368 std::cout << "LEDNICKY" << std::endl;
369 std::cout << 2.0 * fKStarSide << " " << 2.0 * fKStarOut << " " << fKStarLong * 2.0 << std::endl;
370#endif
371
372 // Boost to pair cms
373 // Double_t out = this->fKStarOut;
374 fKStarOut = tMt / tM * (this->fKStarOut - tPt / tMt * tE1L);
375
376 // tBetat = tPt/tMt;
377
378 Double_t tDX = pair->GetX1() - pair->GetX2();
379 Double_t tDY = pair->GetY1() - pair->GetY2();
380 Double_t tRLong = pair->GetZ1() - pair->GetZ2();
381 Double_t tDTime = pair->GetT1() - pair->GetT2();
382
383 Double_t tROut = (tDX * tPx + tDY * tPy) / tPt;
384 Double_t tRSide = (-tDX * tPy + tDY * tPx) / tPt;
385
386 // cout << "Got points 1 " << track1->GetEmissionPoint()->x() << " " <<
387 // track1->GetEmissionPoint()->y() << " " <<
388 // track1->GetEmissionPoint()->z() << " " <<
389 // track1->GetEmissionPoint()->t() << endl;
390
391 // cout << "Got points 2 " << track2->GetEmissionPoint()->x() << " " <<
392 // track2->GetEmissionPoint()->y() << " " << track2->GetEmissionPoint()->z()
393 // << " " << track2->GetEmissionPoint()->t() << endl;
394 this->fRStarSide = tRSide;
395
396 this->fRStarLong = tGamma * (tRLong - tBeta * tDTime);
397 Double_t tDTimePairLCMS = tGamma * (tDTime - tBeta * tRLong);
398
399 tBeta = tPt / tMt;
400 tGamma = tMt / tM;
401
402 this->fRStarOut = tGamma * (tROut - tBeta * tDTimePairLCMS);
403 this->fRStar =
404 ::sqrt(this->fRStarOut * this->fRStarOut + this->fRStarSide * this->fRStarSide + this->fRStarLong * this->fRStarLong);
405 this->fKStar =
406 ::sqrt(this->fKStarOut * this->fKStarOut + this->fKStarSide * this->fKStarSide + this->fKStarLong * this->fKStarLong);
407
408 // cout << "Got out side " << this->fRStarOut << " " << this->fRStarSide <<
409 // endl;
410 SetPid(pair->GetPdg1(), pair->GetPdg2());
411 // std::cout << Femto::PairTypeToString(fPairType) << " " << fLL << std::endl;
412 if (fPairType == Femto::EPairType::kUnknown) { return 1; }
413
414 // AliFemtoThreeVector* p;
415 // p=(track1->GetTrueMomentum());
416 double p1[] = {pair->TruePx1(), pair->TruePy1(), pair->TruePz1()};
417 // p=(track2->GetTrueMomentum());
418 double p2[] = {pair->TruePx2(), pair->TruePy2(), pair->TruePz2()};
419 if ((p1[0] == p2[0]) && (p1[1] == p2[1]) && (p1[2] == p2[2])) {
420 fWeightDen = 0.;
421 return 0;
422 }
423
424 double x1[] = {pair->GetX1(), pair->GetY1(), pair->GetZ1(), pair->GetT1()};
425 // tPoint=(track2->GetEmissionPoint());
426 double x2[] = {pair->GetX2(), pair->GetY2(), pair->GetZ2(), pair->GetT2()};
427 if ((x1[0] == x2[0]) && (x1[1] == x2[1]) && (x1[2] == x2[2]) && (x1[3] == x2[3])) {
428 fWeightDen = 0.;
429 return 0;
430 }
431 if (fSwap) {
432 fsimomentum(*p2, *p1);
433 fsiposition(*x2, *x1);
434 } else {
435 fsiposition(*x1, *x2);
436 fsimomentum(*p1, *p2);
437 }
438 FsiSetLL();
439#ifndef OLD_LEDNICKY
440 FsiInit();
441#endif
442 ltran12();
443 fsiw(1, fWeif, fWei, fWein);
444
445 if (fI3c == 0) return fWein;
447
448 return fWei;
449 }
450
451 void FemtoWeightGeneratorLednicky::SetPairType(Femto::EPairType aPairType) {
452 this->fPairType = aPairType;
453 std::pair<Int_t, Int_t> pair = Femto::PairTypeToPid(fPairType);
454 SetPid(pair.first, pair.second);
455 }
456
458 const Int_t ktPid1 = pair->GetPdg1();
459 const Int_t ktPid2 = pair->GetPdg2();
460 fIch = 0;
461 fIqs = 0;
462 fIsi = 0;
463
464 fPairType = Femto::PidToPairType(ktPid1, ktPid2);
465 switch (fPairType) {
466 // clang-format off
467 //quantum strong coulomb
468 case Femto::EPairType::kPionPlusPionPlus: {SetFlags(1, 0, 1);} break;
469 case Femto::EPairType::kPionPlusPionMinus: {SetFlags(0, 0, 1);} break;
470 case Femto::EPairType::kKaonPlusKaonPlus: {SetFlags(1, 0, 1);} break;
471 case Femto::EPairType::kKaonPlusKaonMinus: {SetFlags(0, 0, 1);} break;
472
473 case Femto::EPairType::kProtonProton: {SetFlags(1, 1, 1);} break;
474 case Femto::EPairType::kProtonAntiproton: {SetFlags(0, 1, 1);} break;
475 case Femto::EPairType::kPionPlusKaonPlus: {SetFlags(0, 1, 1);} break;
476 case Femto::EPairType::kPionPlusKaonMinus: {SetFlags(0, 1, 1);} break;
477
478 case Femto::EPairType::kPionPlusProton: {SetFlags(0, 1, 1);} break;
479 case Femto::EPairType::kPionPlusAntiproton: {SetFlags(0, 1, 1);} break;
480 case Femto::EPairType::kKaonPlusProton: {SetFlags(0, 1, 1);} break;
481 case Femto::EPairType::kKaonPlusAntiproton: {SetFlags(0, 1, 1);} break;
482
483 case Femto::EPairType::kProtonLambda: {SetFlags(0, 1, 0);} break;
484 case Femto::EPairType::kLambdaLambda: {SetFlags(1, 1, 0);} break;
485 case Femto::EPairType::kKaonZeroKaonZero: {SetFlags(1, 1, 0);} break;
486 case Femto::EPairType::kKaonZeroKaonZeroBar: {SetFlags(0, 1, 0);} break;
487
488 case Femto::EPairType::kNeutronNeutron: {SetFlags(1, 1, 0);} break;
489 case Femto::EPairType::kNeutronProton: {SetFlags(0, 1, 0);} break;
490 case Femto::EPairType::kPionZeroPionZero: {SetFlags(1, 0, 0);} break;
491 case Femto::EPairType::kNeutronLambda: {SetFlags(0, 1, 0);} break;
492 // clang-format on
493 default: break;
494 }
495 FsiInit();
496 SetPid(ktPid1, ktPid2);
497 }
498
499
501 const Int_t ktPid1 = pair->GetPdg1();
502 const Int_t ktPid2 = pair->GetPdg2();
503 SetPid(ktPid1, ktPid2);
504 }
505
506 Femto::EPairType FemtoWeightGeneratorLednicky::GetPairType() const { return this->fPairType; }
507
509
511
513
515
517
519
521
523
526 return tmp;
527 }
528
530 fItest = 1;
531 fIqs = 1;
532 fIsi = 1;
533 fI3c = 0;
534 fIch = 1;
535 FsiInit();
536 fSphereApp = false;
537 fT0App = false;
538 }
539
541 fItest = 1;
542 fIch = 1;
543 FsiInit();
544 }
545
547 fItest = 1;
548 fIch = 0;
549 FsiInit();
550 }
551
553 fItest = 1;
554 fIqs = 1;
555 FsiInit();
556 }
557
559 fItest = 1;
560 fIqs = 0;
561 FsiInit();
562 }
563
565 fItest = 1;
566 fIsi = 1;
567 FsiInit();
568 }
569
571 fItest = 1;
572 fIsi = 0;
573 FsiInit();
574 }
575
577 fItest = 1;
578 fI3c = 1;
579 FsiInit();
580 FsiNucl();
581 }
582
584 fItest = 1;
585 fI3c = 0;
586 FsiInit();
587 fWeightDen = 1.;
588 FsiNucl();
589 }
590
592
594
596
598
599 void FemtoWeightGeneratorLednicky::SetNuclCharge(const double aNuclCharge) {
600 fNuclCharge = aNuclCharge;
601 FsiNucl();
602 }
603
604 void FemtoWeightGeneratorLednicky::SetNuclMass(const double aNuclMass) {
605 fNuclMass = aNuclMass;
606 FsiNucl();
607 }
608
610 // Initialize weight generation module
611 // cout << "*******************AliFemtoModelWeightGeneratorLednicky check
612 // FsiInit ************" << endl; cout <<"mItest dans FsiInit() = " <<
613 // fItest << endl; cout <<"mIch dans FsiInit() = " << fIch << endl; cout
614 // <<"mIqs dans FsiInit() = " << fIqs << endl; cout <<"mIsi dans FsiInit() =
615 // " << fIsi << endl; cout <<"mI3c dans FsiInit() = " << fI3c << endl;
616#ifdef OLD_LEDNICKY
617 fsiin(fItest, fIch, fIqs, fIsi, fI3c);
618#else
619 fsiini(fItest, fLL, fNS, fIch, fIqs, fIsi, fI3c);
620#endif
621 }
622
623 Bool_t FemtoWeightGeneratorLednicky::Init(Int_t task_id, FemtoPair * /*pair*/) {
624 FsiInit();
625 fTaskID = task_id;
626 return kTRUE;
627 }
628
629 Package* FemtoWeightGeneratorLednicky::Report() const {
630 Package* report = FemtoWeightGenerator::Report();
631 report->AddObject(new ParameterString("PairType", Femto::PairTypeToString(fPairType)));
632 report->AddObject(new ParameterBool("Coulomb", fIch));
633 report->AddObject(new ParameterBool("Qstat.", fIqs));
634 report->AddObject(new ParameterBool("Strong", fIsi));
635 report->AddObject(new ParameterBool("3-body", fI3c));
636 report->AddObject(new ParameterDouble("Nucl.Charge", fNuclCharge));
637 report->AddObject(new ParameterDouble("Nucl.Mass", fNuclMass));
638 report->AddObject(new ParameterInt("Nucl.ChargeSign", fNuclChargeSign));
639 report->AddObject(new ParameterBool("SphereApprox.", fSphereApp));
640 report->AddObject(new ParameterBool("T0Approx.", fT0App));
641 return report;
642 }
643
644 void FemtoWeightGeneratorLednicky::PairIDToLL(Femto::EPairType pair_pid, Int_t & LL, Int_t & tChargeFactor) const {
645
646 switch (pair_pid) {
647 case Femto::EPairType::kPionPlusPionPlus: {
648 LL = 7;
649 tChargeFactor *= 1;
650 } break;
651 case Femto::EPairType::kPionPlusPionMinus: {
652 LL = 5;
653 tChargeFactor *= 1;
654 } break;
655 case Femto::EPairType::kKaonPlusKaonPlus: {
656 LL = 15;
657 tChargeFactor *= 1;
658 } break;
659 case Femto::EPairType::kKaonPlusKaonMinus: {
660 LL = 14;
661 tChargeFactor *= 1;
662 } break;
663
664 case Femto::EPairType::kProtonProton: {
665 LL = 2;
666 tChargeFactor *= 1;
667 } break;
668 case Femto::EPairType::kProtonAntiproton: {
669 LL = 30;
670 tChargeFactor *= 1;
671 } break;
672 case Femto::EPairType::kPionPlusKaonPlus: {
673 LL = 11;
674 tChargeFactor *= 1;
675 } break;
676 case Femto::EPairType::kPionPlusKaonMinus: {
677 LL = 10;
678 tChargeFactor *= 1;
679 } break;
680
681 case Femto::EPairType::kPionPlusProton: {
682 LL = 12;
683 tChargeFactor *= 1;
684 } break;
685 case Femto::EPairType::kPionPlusAntiproton: {
686 LL = 13;
687 tChargeFactor *= -1;
688 } break;
689 case Femto::EPairType::kKaonPlusProton: {
690 LL = 16;
691 tChargeFactor *= 1;
692 } break;
693 case Femto::EPairType::kKaonPlusAntiproton: {
694 LL = 17;
695 tChargeFactor *= -1;
696 } break;
697
698 case Femto::EPairType::kProtonLambda: {
699 LL = 27;
700 tChargeFactor *= 1;
701 } break;
702 case Femto::EPairType::kLambdaLambda: {
703 LL = 29;
704 tChargeFactor *= 1;
705 } break;
706 case Femto::EPairType::kKaonZeroKaonZero: {
707 LL = 22;
708 tChargeFactor *= 1;
709 } break;
710 case Femto::EPairType::kKaonZeroKaonZeroBar: {
711 LL = 23;
712 tChargeFactor *= 1;
713 } break;
714
715 case Femto::EPairType::kNeutronNeutron: {
716 LL = 1;
717 tChargeFactor *= 1;
718 } break;
719 case Femto::EPairType::kNeutronProton: {
720 LL = 3;
721 tChargeFactor *= 1;
722 } break;
723 case Femto::EPairType::kPionZeroPionZero: {
724 LL = 6;
725 tChargeFactor *= 1;
726 } break;
727 case Femto::EPairType::kNeutronLambda: {
728 LL = 28;
729 tChargeFactor *= 1;
730 } break;
731
732
733 default: LL = 0; break;
734 }
735 }
736
737 Femto::EPairType FemtoWeightGeneratorLednicky::LLToPairID(Int_t ll) const {
738 switch (ll) {
739 case 7: {
740 return Femto::EPairType::kPionPlusPionPlus;
741 } break;
742 case 5: {
743 return Femto::EPairType::kPionPlusPionMinus;
744 } break;
745 case 15: {
746 return Femto::EPairType::kKaonPlusKaonPlus;
747 } break;
748 case 14: {
749 return Femto::EPairType::kKaonPlusKaonMinus;
750 } break;
751
752 case 2: {
753 return Femto::EPairType::kProtonProton;
754 } break;
755 case 30: {
756 return Femto::EPairType::kProtonAntiproton;
757 } break;
758 case 11: {
759 return Femto::EPairType::kPionPlusKaonPlus;
760 } break;
761 case 10: {
762 return Femto::EPairType::kPionPlusKaonMinus;
763 } break;
764
765 case 12: {
766 return Femto::EPairType::kPionPlusProton;
767 } break;
768 case 13: {
769 return Femto::EPairType::kPionPlusAntiproton;
770 } break;
771 case 16: {
772 return Femto::EPairType::kKaonPlusProton;
773 } break;
774 case 17: {
775 return Femto::EPairType::kKaonPlusAntiproton;
776 } break;
777
778 case 27: {
779 return Femto::EPairType::kProtonLambda;
780 } break;
781 case 29: {
782 return Femto::EPairType::kLambdaLambda;
783 } break;
784 case 22: {
785 return Femto::EPairType::kKaonZeroKaonZero;
786 } break;
787 case 23: {
788 return Femto::EPairType::kKaonZeroKaonZeroBar;
789 } break;
790
791 case 1: {
792 return Femto::EPairType::kNeutronNeutron;
793 } break;
794 case 3: {
795 return Femto::EPairType::kNeutronProton;
796 } break;
797 case 6: {
798 return Femto::EPairType::kPionZeroPionZero;
799 } break;
800 case 28: {
801 return Femto::EPairType::kNeutronLambda; //
802 } break;
803
804 default: break;
805 }
806 return Femto::EPairType::kUnknown;
807 }
808
809 void FemtoWeightGeneratorLednicky::Print(Option_t * /*option*/) const {
810 Cout::Text(ClassName(), "L");
811 Cout::Text(Femto::PairTypeToString(fPairType), "L");
812 if (fIqs == 1) {
813 Cout::FailSucced("Quantum Stat.", "ENABLED ", kGreen);
814 } else {
815 Cout::FailSucced("Quantum Stat.", "DISABLED", kRed);
816 }
817 if (fIch == 1) {
818 Cout::FailSucced("Coulomb FSI", "ENABLED ", kGreen);
819 } else {
820 Cout::FailSucced("Coulomb FSI", "DISABLED", kRed);
821 }
822 if (fIsi == 1) {
823 Cout::FailSucced("Strong FSI", "ENABLED ", kGreen);
824 } else {
825 Cout::FailSucced("Strong FSI", "DISABLED", kRed);
826 }
827 if (fI3c == 1) {
828 Cout::FailSucced("3-body", "ENABLED ", kGreen);
829 } else {
830 Cout::FailSucced("3-body", "DISABLED", kRed);
831 }
832 Cout::Text("--", "L");
833 }
834
835 void FemtoWeightGeneratorLednicky::FsiSetKpKmModelType(const int aModelType, const int aPhi_OffOn) {
836 fKpKmModel = aModelType;
837 fPhi_OffOn = aPhi_OffOn;
838 fNS_4 = 4;
840 }
841
843 // setkpkmmodel(fKpKmModel, fPhi_OffOn);
844 }
845
846 Bool_t FemtoWeightGeneratorLednicky::IsPairSupported(Femto::EPairType type) const {
847 if (static_cast<int>(type) <= 200) return kTRUE;
848 return kFALSE;
849 }
850
852 double p1[] = {pair->TruePx1(), pair->TruePy1(), pair->TruePz1()};
853 // p=(track2->GetTrueMomentum());
854 double p2[] = {pair->TruePx2(), pair->TruePy2(), pair->TruePz2()};
855 if ((p1[0] == p2[0]) && (p1[1] == p2[1]) && (p1[2] == p2[2])) {
856 fWeightDen = 0.;
857 return;
858 }
859
860 double x1[] = {pair->GetX1(), pair->GetY1(), pair->GetZ1(), pair->GetT1()};
861 // tPoint=(track2->GetEmissionPoint());
862 double x2[] = {pair->GetX2(), pair->GetY2(), pair->GetZ2(), pair->GetT2()};
863 if ((x1[0] == x2[0]) && (x1[1] == x2[1]) && (x1[2] == x2[2]) && (x1[3] == x2[3])) {
864 fWeightDen = 0.;
865 return;
866 }
867 if (fSwap) {
868 fsimomentum(*p2, *p1);
869 fsiposition(*x2, *x1);
870 } else {
871 fsiposition(*x1, *x2);
872 fsimomentum(*p1, *p2);
873 }
874 FsiSetLL();
875#ifndef OLD_LEDNICKY
876 FsiInit();
877#endif
878 ltran12();
879 fsiw(1, fWeif, fWei, fWein);
880 }
881
882} // namespace Hal
static void Text(TString text, TString option="L", Color_t color=-1)
Definition Cout.cxx:92
static void FailSucced(TString value, TString flag, Color_t color)
Definition Cout.cxx:382
Int_t GetPdg2() const
Definition FemtoPair.h:302
void PrintInfo() const
Double_t GetY1() const
Definition FemtoPair.h:197
Double_t GetY2() const
Definition FemtoPair.h:217
Double_t TruePx1() const
Definition FemtoPair.h:142
Double_t TruePy2() const
Definition FemtoPair.h:172
Double_t GetZ1() const
Definition FemtoPair.h:202
Double_t TruePy1() const
Definition FemtoPair.h:147
Double_t GetX2() const
Definition FemtoPair.h:212
Double_t TruePz2() const
Definition FemtoPair.h:177
Double_t TruePx2() const
Definition FemtoPair.h:167
Double_t GetZ2() const
Definition FemtoPair.h:222
Double_t TrueE1() const
Definition FemtoPair.h:157
Double_t GetT1() const
Definition FemtoPair.h:207
Double_t TrueE2() const
Definition FemtoPair.h:182
Double_t TruePz1() const
Definition FemtoPair.h:152
Int_t GetPdg1() const
Definition FemtoPair.h:297
Double_t GetT2() const
Definition FemtoPair.h:227
Double_t GetX1() const
Definition FemtoPair.h:192
void PairIDToLL(Femto::EPairType pair_pid, Int_t &LL, Int_t &tCharge) const
Bool_t Init(Int_t taks_id, FemtoPair *pair)
virtual Femto::EPairType GetPairType() const
bool SetPid(const int aPid1, const int aPid2)
virtual void SetPairType(Femto::EPairType aPairType)
virtual Double_t GenerateWeight(FemtoPair *pair)
virtual void SetPairTypeFromPairAndConfigureFSI(FemtoPair *pair)
void SetFlags(Int_t qs, Int_t s, Int_t c)
virtual FemtoWeightGenerator * Clone(const char *newname="") const
virtual void SetPairTypeFromPair(FemtoPair *pair)
Femto::EPairType LLToPairID(Int_t ll) const
virtual Bool_t IsPairSupported(Femto::EPairType type) const
FemtoWeightGeneratorLednicky & operator=(const FemtoWeightGeneratorLednicky &aWeight)
virtual FemtoWeightGenerator & operator=(const FemtoWeightGenerator &aModel)
virtual Double_t GetKStar() const
virtual Double_t GetRStar() const
virtual Double_t GetRStarLong() const
virtual Double_t GetRStarOut() const
virtual Double_t GetKStarSide() const
virtual Double_t GetKStarLong() const
virtual Double_t GetRStarSide() const
virtual Double_t GetKStarOut() const
void AddObject(TObject *object)
Definition Package.cxx:209