16 #include "StHbtMaker/Cut/mikesTrackCut.h"
23 mikesTrackCut::mikesTrackCut(){
24 mNTracksPassed = mNTracksFailed = 0;
41 bool goodPID = ((track->NSigmaPion() > mNSigmaPion[0]) &&
42 (track->NSigmaPion() < mNSigmaPion[1]) &&
43 (track->NSigmaKaon() > mNSigmaKaon[0]) &&
44 (track->NSigmaKaon() < mNSigmaKaon[1]) &&
45 (track->NSigmaProton() > mNSigmaProton[0]) &&
46 (track->NSigmaProton() < mNSigmaProton[1]));
48 goodPID = (goodPID&&(track->Charge() == mCharge));
52 float TEnergy = ::sqrt(track->P().mag2()+mMass*mMass);
53 float TRapidity = 0.5*::log((TEnergy+track->P().z())/
54 (TEnergy-track->P().z()));
56 float Pt = ::sqrt((track->P().x())*(track->P().x())+
57 (track->P().y())*(track->P().y()));
73 ((track->DCAxy() > mDCA[0]) &&
74 (track->DCAxy() < mDCA[1]) &&
75 (track->NHits() > mNHits[0]) &&
76 (track->NHits() < mNHits[1]) &&
79 (TRapidity > mRapidity[0]) &&
80 (TRapidity < mRapidity[1]));
82 goodTrack ? mNTracksPassed++ : mNTracksFailed++;
91 StHbtString mikesTrackCut::Report(){
94 sprintf(Ctemp,
"Particle mass:\t%E\n",this->Mass());
96 sprintf(Ctemp,
"Particle charge:\t%d\n",mCharge);
98 sprintf(Ctemp,
"Particle Nsigma from pion:\t%E - %E\n",mNSigmaPion[0],mNSigmaPion[1]);
100 sprintf(Ctemp,
"Particle Nsigma from kaon:\t%E - %E\n",mNSigmaKaon[0],mNSigmaKaon[1]);
102 sprintf(Ctemp,
"Particle Nsigma from proton:\t%E - %E\n",mNSigmaProton[0],mNSigmaProton[1]);
104 sprintf(Ctemp,
"Particle #hits:\t%d - %d\n",mNHits[0],mNHits[1]);
106 sprintf(Ctemp,
"Particle pT:\t%E - %E\n",mPt[0],mPt[1]);
108 sprintf(Ctemp,
"Particle rapidity:\t%E - %E\n",mRapidity[0],mRapidity[1]);
110 sprintf(Ctemp,
"Particle DCA:\t%E - %E\n",mDCA[0],mDCA[1]);
112 sprintf(Ctemp,
"Number of tracks which passed:\t%ld Number which failed:\t%ld\n",mNTracksPassed,mNTracksFailed);
114 StHbtString returnThis = Stemp;