1 #include "StHbtMaker/Cut/franksXiCut.h"
9 franksXiCut::franksXiCut(){
10 mNXisPassed = mNXisFailed = 0;
13 mXiMassRange[1]=10000;
15 mOmegaMassRange[0] =0;
16 mOmegaMassRange[1]=10000;
19 mdcaXidaughters[1]=1000;
21 mdcaXiToPrimVertex[0]=0;
22 mdcaXiToPrimVertex[1]=1000;
25 mdecayLengthXi[1]=10000;
30 mdcaBacToPrimVertex[0]=0;
31 mdcaBacToPrimVertex[1]=10000;
60 bool franksXiCut::Pass(
const StHbtXi* Xi){
65 cout <<
" * dcaXiDaughters " << Xi->dcaXiDaughters();
66 cout <<
" * dcaXiToPrimVertex " << Xi->dcaXiToPrimVertex();
67 cout <<
" * decayLengthXi " << Xi->decayLengthXi();
68 cout <<
" * tpcHitsBac " << Xi->tpcHitsBac();
69 cout <<
" * dcaNegToPrimVertex " << Xi->dcaBacToPrimVertex();
70 cout <<
" * ptArmXi " << Xi->ptArmXi();
71 cout <<
" * alphaXi " << Xi->alphaXi();
72 cout <<
" * dEdxBac " << Xi->dedxBac();
80 if ( (Xi->massXi() > mXiMassRange[0]) && (Xi->massXi() < mXiMassRange[1]) ) inMassRange=1;
81 if ( (Xi->massOmega() > mOmegaMassRange[0]) && (Xi->massOmega() < mOmegaMassRange[1]) ) inMassRange=1;
84 bool goodPID = ( inMassRange &&
85 (Xi->dcaXiDaughters() > mdcaXidaughters[0]) &&
86 (Xi->dcaXiDaughters() < mdcaXidaughters[1]) &&
87 (Xi->dcaXiToPrimVertex() > mdcaXiToPrimVertex[0]) &&
88 (Xi->dcaXiToPrimVertex() < mdcaXiToPrimVertex[1]) &&
89 (Xi->decayLengthXi() > mdecayLengthXi[0]) &&
90 (Xi->decayLengthXi() < mdecayLengthXi[1]) &&
91 (Xi->tpcHitsBac() > mtpcHitsBac[0]) &&
92 (Xi->tpcHitsBac() < mtpcHitsBac[1]) &&
93 (Xi->dcaBacToPrimVertex() > mdcaBacToPrimVertex[0]) &&
94 (Xi->dcaBacToPrimVertex() < mdcaBacToPrimVertex[1]) &&
95 (Xi->ptArmXi() > mptArmXi[0]) &&
96 (Xi->ptArmXi() < mptArmXi[1]) &&
97 (Xi->alphaXi() > malphaXi[0]) &&
98 (Xi->alphaXi() < malphaXi[1]));
102 goodPID = (Xi->dedxNeg() > (mdEdx[0]*Xi->ptNeg()+mdEdx[1]));
104 if( mChargedEdx > 0){
105 goodPID = (Xi->dedxPos() > (mdEdx[0]*Xi->ptPos()+mdEdx[1]));
110 float TEnergy = ::sqrt((Xi->ptotXi())*(Xi->ptotXi())+mMass*mMass);
111 float TRapidity = 0.5*::log((TEnergy+Xi->momXi().z())/
112 (TEnergy-Xi->momXi().z()));
114 float Pt = Xi->ptXi();
119 cout <<
" * Pt " << Pt;
120 cout <<
" * mPt[0] " << mPt[0];
121 cout <<
" * mPt[1] " << mPt[1];
122 cout <<
" * TRapidity " << TRapidity;
123 cout <<
" * mRapidity[0] " << mRapidity[0];
124 cout <<
" * mRapidity[1] " << mRapidity[1];
125 cout <<
" * Pt " << (Pt > mPt[0]) && (Pt < mPt[1]);
126 cout <<
" * y " << (TRapidity > mRapidity[0]) && (TRapidity < mRapidity[1]);
133 (TRapidity > mRapidity[0]) &&
134 (TRapidity < mRapidity[1]));
136 goodXi ? mNXisPassed++ : mNXisFailed++;
145 StHbtString franksXiCut::Report(){
148 sprintf(Ctemp,
"--franksXiCut--\n Particle mass:\t%E\n",this->Mass());
150 sprintf(Ctemp,
"Xi mass range:\t%E - %E\n",mXiMassRange[0],
153 sprintf(Ctemp,
"dcaXidaughters:\t%E - %E\n",mdcaXidaughters[0],
156 sprintf(Ctemp,
"dcaXiToPrimVertex:\t%E - %E\n",mdcaXiToPrimVertex[0],
157 mdcaXiToPrimVertex[1]);
159 sprintf(Ctemp,
"decayLengthXi:\t%E - %E\n",mdecayLengthXi[0],
162 sprintf(Ctemp,
"tpcHitsBac:\t%d - %d\n",mtpcHitsBac[0],mtpcHitsBac[1]);
164 sprintf(Ctemp,
"dcaBacToPrimVertex:\t%E - %E\n",mdcaBacToPrimVertex[0],
165 mdcaBacToPrimVertex[1]);
167 sprintf(Ctemp,
"dedx>:\t%E pt+%E for Charge %E\n ",mdEdx[0],mdEdx[1],mChargedEdx);
169 sprintf(Ctemp,
"ptArmXi:\t%E - %E\n",mptArmXi[0],mptArmXi[1]);
171 sprintf(Ctemp,
"alphaXi:\t%E - %E\n",malphaXi[0],malphaXi[1]);
173 sprintf(Ctemp,
"Particle pT:\t%E - %E\n",mPt[0],mPt[1]);
175 sprintf(Ctemp,
"Particle rapidity:\t%E - %E\n",mRapidity[0],mRapidity[1]);
177 sprintf(Ctemp,
"Number of Xis which passed:\t%ld Number which failed:\t%ld\n",mNXisPassed,mNXisFailed);
179 StHbtString returnThis = Stemp;