10#include "FemtoWeightGeneratorLednicky.h"
14#include <RtypesCore.h>
22#include "FemtoConst.h"
37#ifdef CERNLIB_MSSTDCALL
39#define type_of_call _stdcall
45#ifndef CERNLIB_QXNO_SC
46#define CERNLIB_QXNO_SC
49#define type_of_call _stdcall
50#define DEFCHARD const char*, const int
52#define PASSCHARD(string) string, strlen(string)
53#define PASSCHARL(string)
55#define DEFCHARD const char*
56#define DEFCHARL , const int
57#define PASSCHARD(string) string
58#define PASSCHARL(string) , strlen(string)
61#define F77_NAME(name, NAME) NAME
63#if defined(CERNLIB_QXNO_SC)
64#define F77_NAME(name, NAME) name
66#define F77_NAME(name, NAME) name##_
80#define fsiin F77_NAME(fsiin, FSIIN)
82void type_of_call F77_NAME(fsiin, FSIIN)(
const int& itest,
const int& ich,
const int& iqs,
const int& isi,
const int& i3c);
86#define fsiini F77_NAME(fsiini, FSIINI)
88void type_of_call F77_NAME(
90 FSIINI)(
const int& itest,
const int& ill,
const int& ins,
const int& ich,
const int& iqs,
const int& isi,
const int& i3c);
93#define llini F77_NAME(llini, LLINI)
95void type_of_call F77_NAME(llini, LLINI)(
const int& lll,
const int& ns,
const int& itest);
98#define fsinucl F77_NAME(fsinucl, FSINUCL)
100void type_of_call F77_NAME(fsinucl, FSINUCL)(
const double& mn,
const double& cn);
102#define fsimomentum F77_NAME(fsimomentum, FSIMOMENTUM)
104void type_of_call F77_NAME(fsimomentum, FSIMOMENTUM)(
double& p1,
double& p2);
106#define fsiposition F77_NAME(fsiposition, FSIPOSITION)
108void type_of_call F77_NAME(fsiposition, FSIPOSITION)(
double& x1,
double& x2);
110#define fsiw F77_NAME(fsiw, FSIW)
112void type_of_call F77_NAME(fsiw, FSIW)(
const int& i,
double& weif,
double& wei,
double& wein);
114#define ltran12 F77_NAME(ltran12, LTRAN12)
116void type_of_call ltran12_();
137#define cgamma F77_NAME(cgamma, CGAMMA)
142ClassImp(FemtoWeightGeneratorLednicky)
172 for (i = 1; i <=
fLLMax; i++) {
190 if (fNS_4 == 4) tNS = 4;
221 int tChargeFactor = 1;
223 if (abs(aPid1) < abs(aPid2)) {
224 if (aPid1 < 0) tChargeFactor = -1;
229 if (aPid2 < 0) tChargeFactor = -1;
236 fPairType = Femto::PidToPairType(aPid1, aPid2);
260 fWein(aWeight.fWein),
261 fWeif(aWeight.fWeif),
262 fWeightDen(aWeight.fWeightDen),
263 fItest(aWeight.fItest),
268 fNuclMass(aWeight.fNuclMass),
269 fNuclCharge(aWeight.fNuclCharge),
270 fSphereApp(aWeight.fSphereApp),
271 fT0App(aWeight.fT0App),
273 fNuclChargeSign(aWeight.fNuclChargeSign),
274 fSwap(aWeight.fSwap),
275 fLLMax(aWeight.fLLMax),
277 fNumProcessPair(nullptr),
278 fNumbNonId(aWeight.fNumbNonId),
279 fKpKmModel(aWeight.fKpKmModel),
280 fPhi_OffOn(aWeight.fPhi_OffOn),
281 fNS_4(aWeight.fNS_4) {
286 for (i = 1; i <=
fLLMax; i++) {
295 if (
this == &aWeight)
return *
this;
318 fKpKmModel = aWeight.fKpKmModel;
319 fPhi_OffOn = aWeight.fPhi_OffOn;
320 fNS_4 = aWeight.fNS_4;
324 for (i = 1; i <=
fLLMax; i++) {
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;
352 Double_t tM = sqrt(tMt - tPt);
358 Double_t tBeta = tPz / tE;
359 Double_t tGamma = tE / tMt;
361 Double_t tE1L = tGamma * (tE1 - tBeta * pair->
TruePz1());
368 std::cout <<
"LEDNICKY" << std::endl;
380 Double_t tRLong = pair->
GetZ1() - pair->
GetZ2();
381 Double_t tDTime = pair->
GetT1() - pair->
GetT2();
383 Double_t tROut = (tDX * tPx + tDY * tPy) / tPt;
384 Double_t tRSide = (-tDX * tPy + tDY * tPx) / tPt;
396 this->
fRStarLong = tGamma * (tRLong - tBeta * tDTime);
397 Double_t tDTimePairLCMS = tGamma * (tDTime - tBeta * tRLong);
402 this->
fRStarOut = tGamma * (tROut - tBeta * tDTimePairLCMS);
412 if (
fPairType == Femto::EPairType::kUnknown) {
return 1; }
419 if ((p1[0] == p2[0]) && (p1[1] == p2[1]) && (p1[2] == p2[2])) {
427 if ((x1[0] == x2[0]) && (x1[1] == x2[1]) && (x1[2] == x2[2]) && (x1[3] == x2[3])) {
432 fsimomentum(*p2, *p1);
433 fsiposition(*x2, *x1);
435 fsiposition(*x1, *x2);
436 fsimomentum(*p1, *p2);
453 std::pair<Int_t, Int_t> pair = Femto::PairTypeToPid(
fPairType);
454 SetPid(pair.first, pair.second);
458 const Int_t ktPid1 = pair->
GetPdg1();
459 const Int_t ktPid2 = pair->
GetPdg2();
464 fPairType = Femto::PidToPairType(ktPid1, ktPid2);
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;
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;
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;
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;
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;
501 const Int_t ktPid1 = pair->
GetPdg1();
502 const Int_t ktPid2 = pair->
GetPdg2();
629 Package* FemtoWeightGeneratorLednicky::Report()
const {
630 Package* report = FemtoWeightGenerator::Report();
647 case Femto::EPairType::kPionPlusPionPlus: {
651 case Femto::EPairType::kPionPlusPionMinus: {
655 case Femto::EPairType::kKaonPlusKaonPlus: {
659 case Femto::EPairType::kKaonPlusKaonMinus: {
664 case Femto::EPairType::kProtonProton: {
668 case Femto::EPairType::kProtonAntiproton: {
672 case Femto::EPairType::kPionPlusKaonPlus: {
676 case Femto::EPairType::kPionPlusKaonMinus: {
681 case Femto::EPairType::kPionPlusProton: {
685 case Femto::EPairType::kPionPlusAntiproton: {
689 case Femto::EPairType::kKaonPlusProton: {
693 case Femto::EPairType::kKaonPlusAntiproton: {
698 case Femto::EPairType::kProtonLambda: {
702 case Femto::EPairType::kLambdaLambda: {
706 case Femto::EPairType::kKaonZeroKaonZero: {
710 case Femto::EPairType::kKaonZeroKaonZeroBar: {
715 case Femto::EPairType::kNeutronNeutron: {
719 case Femto::EPairType::kNeutronProton: {
723 case Femto::EPairType::kPionZeroPionZero: {
727 case Femto::EPairType::kNeutronLambda: {
733 default: LL = 0;
break;
740 return Femto::EPairType::kPionPlusPionPlus;
743 return Femto::EPairType::kPionPlusPionMinus;
746 return Femto::EPairType::kKaonPlusKaonPlus;
749 return Femto::EPairType::kKaonPlusKaonMinus;
753 return Femto::EPairType::kProtonProton;
756 return Femto::EPairType::kProtonAntiproton;
759 return Femto::EPairType::kPionPlusKaonPlus;
762 return Femto::EPairType::kPionPlusKaonMinus;
766 return Femto::EPairType::kPionPlusProton;
769 return Femto::EPairType::kPionPlusAntiproton;
772 return Femto::EPairType::kKaonPlusProton;
775 return Femto::EPairType::kKaonPlusAntiproton;
779 return Femto::EPairType::kProtonLambda;
782 return Femto::EPairType::kLambdaLambda;
785 return Femto::EPairType::kKaonZeroKaonZero;
788 return Femto::EPairType::kKaonZeroKaonZeroBar;
792 return Femto::EPairType::kNeutronNeutron;
795 return Femto::EPairType::kNeutronProton;
798 return Femto::EPairType::kPionZeroPionZero;
801 return Femto::EPairType::kNeutronLambda;
806 return Femto::EPairType::kUnknown;
809 void FemtoWeightGeneratorLednicky::Print(Option_t * )
const {
836 fKpKmModel = aModelType;
837 fPhi_OffOn = aPhi_OffOn;
847 if (
static_cast<int>(type) <= 200)
return kTRUE;
855 if ((p1[0] == p2[0]) && (p1[1] == p2[1]) && (p1[2] == p2[2])) {
863 if ((x1[0] == x2[0]) && (x1[1] == x2[1]) && (x1[2] == x2[2]) && (x1[3] == x2[3])) {
868 fsimomentum(*p2, *p1);
869 fsiposition(*x2, *x1);
871 fsiposition(*x1, *x2);
872 fsimomentum(*p1, *p2);
static void Text(TString text, TString option="L", Color_t color=-1)
static void FailSucced(TString value, TString flag, Color_t color)
virtual Double_t GetKStar() const
virtual Double_t GetRStarLong() const
void PairIDToLL(Femto::EPairType pair_pid, Int_t &LL, Int_t &tCharge) const
virtual Double_t GetKStarLong() const
virtual ~FemtoWeightGeneratorLednicky()
Bool_t Init(Int_t taks_id, FemtoPair *pair)
virtual Double_t GetRStar() const
virtual Femto::EPairType GetPairType() const
virtual Double_t GetRStarSide() const
virtual Double_t GetRStarOut() const
bool SetPid(const int aPid1, const int aPid2)
virtual void SetPairType(Femto::EPairType aPairType)
virtual Double_t GenerateWeight(FemtoPair *pair)
virtual Double_t GetKStarOut() const
virtual void SetPairTypeFromPairAndConfigureFSI(FemtoPair *pair)
void FsiSetKpKmModelType()
void SetFlags(Int_t qs, Int_t s, Int_t c)
virtual Double_t GetKStarSide() const
virtual FemtoWeightGenerator * Clone(const char *newname="") const
virtual void SetPairTypeFromPair(FemtoPair *pair)
Femto::EPairType LLToPairID(Int_t ll) const
void SetNuclMass(const double aNuclMass)
FemtoWeightGeneratorLednicky()
void SetNuclCharge(const double aNuclCharge)
virtual Bool_t IsPairSupported(Femto::EPairType type) const
void RawCalc(FemtoPair *pair)
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
Femto::EPairType fPairType
virtual Double_t GetKStarSide() const
virtual Double_t GetKStarLong() const
virtual Double_t GetRStarSide() const
virtual Double_t GetKStarOut() const
void AddObject(TObject *object)