17 #include "StHbtMaker/ThCorrFctn/StHbtFsiLednickyPurity.h"
18 #include "StarCallf77.h"
32 #define fsiin F77_NAME(fsiin,FSIIN)
33 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);}
34 #define llini F77_NAME(llini,LLINI)
35 extern "C" {
void type_of_call F77_NAME(llini,LLINI)(
const int &lll,
const int &ns,
const int &itest);}
37 #define fsinucl F77_NAME(fsinucl,FSINUCL)
38 extern "C" {
void type_of_call F77_NAME(fsinucl,FSINUCL)(
const double &mn,
const double &cn);}
39 #define fsimomentum F77_NAME(fsimomentum,FSIMOMENTUM)
40 extern "C" {
void type_of_call F77_NAME(fsimomentum,FSIMOMENTUM)(
double &p1,
double &p2);}
41 #define fsiposition F77_NAME(fsiposition,FSIPOSITION)
42 extern "C" {
void type_of_call F77_NAME(fsiposition,FSIPOSITION)(
double &x1,
double &x2);}
43 #define fsiw F77_NAME(fsiw,FSIW)
44 extern "C" {
void type_of_call F77_NAME(fsiw,FSIW)(
const int &i,
double &weif,
45 double &wei,
double &wein);}
46 #define ltran12 F77_NAME(ltran12,LTRAN12)
47 extern "C" {
void type_of_call ltran12_();}
51 typedef struct { REAL re; REAL im; }
COMPLEX;
52 #define cgamma F77_NAME(cgamma,CGAMMA)
60 mPurity1(1.0), mPurity2(1.0)
66 double StHbtFsiLednickyPurity::GetWeight(
const StHbtThPair* aThPair){
68 if (!SetPid(aThPair->GetPid1(),aThPair->GetPid2())) {
73 if (aThPair->GetPid1() == aThPair->GetPid2()) {
74 if (mRandom.Rndm() > mPurity1) {
79 else if ((mRandom.Rndm() > mPurity1) || (mRandom.Rndm() > mPurity1)) {
84 p=(aThPair->GetRealMomentum1());
85 double p1[]={p->px(),p->py(),p->pz()};
86 p=(aThPair->GetRealMomentum2());
87 double p2[]={p->px(),p->py(),p->pz()};
88 if ((p1[0]==p2[0])&&(p1[1]==p2[1])&&(p1[2]==p2[2])) {
97 p=(aThPair->GetEmPoint1());
98 double x1[]={p->x(),p->y(),p->z(),p->t()};
99 p=(aThPair->GetEmPoint2());
100 double x2[]={p->x(),p->y(),p->z(),p->t()};
101 if ((x1[0]==x2[0])&&(x1[1]==x2[1])&&(x1[2]==x2[2])&&(x1[3]==x2[3])) {
106 fsiposition(*x1,*x2);
108 fsiposition(*x2,*x1);
112 fsiw(1,mWeif,mWei,mWein);
113 if (mI3c==0)
return mWein;
119 StHbtString StHbtFsiLednickyPurity::Report() {
120 std::ostringstream tStr;
121 tStr <<
"Lednicky afterburner calculation for Correlation - Report" << endl;
122 tStr <<
" Setting : Quantum : " << ((mIqs) ?
"On" :
"Off");
123 tStr <<
" - Coulbomb : " << ((mIch) ?
"On" :
"Off") ;
124 tStr <<
" - Strong : " << ((mIsi) ?
"On" :
"Off");
126 tStr <<
" 3-Body : " << ((mI3c) ?
"On" :
"Off") ;
127 if (mI3c) tStr <<
" Mass=" << mNuclMass <<
" - Charge= " << mNuclCharge ;
129 tStr <<
"First particle purity : " << mPurity1 <<
" second : " << mPurity2 << endl;
130 tStr <<
" " << mNumProcessPair[0] <<
" Pairs have been Processed :" << endl;
132 for(i=1;i<=mLLMax;i++) {
133 if (mNumProcessPair[i])
134 tStr <<
" "<< setw(8) << mNumProcessPair[i] <<
" " << mLLName[i] << endl;
137 tStr <<
" "<< setw(8) << mNumbNonId <<
" Non Identified" << endl;
138 StHbtString returnThis = tStr.str();
142 StHbtFsiLednickyPurity::~StHbtFsiLednickyPurity()
146 inline void StHbtFsiLednickyPurity::SetPurity(
const double aPurity) { mPurity1=aPurity; mPurity2 = aPurity; }
147 inline void StHbtFsiLednickyPurity::SetPurity(
const double aPurity1,
const double aPurity2) { mPurity1 = aPurity1; mPurity2 = aPurity2; }