2 #include "StRareTrack.h"
3 #include "StEventTypes.h"
10 chargeToAccept = charge;
20 if (chargeToAccept==0) {chargeOK = 1;}
21 else if (chargeToAccept<0 &&
track.chargesign()<0) {chargeOK=1;}
22 else if (chargeToAccept>0 &&
track.chargesign()>0) {chargeOK=1;}
25 if (abs(chargeToAccept)>1) theCharge=2;
26 float dedxExp =
track.dedxExpected(minMass*0.939,theCharge);
27 dedxmin = 0.6*dedxExp;
28 float dedx =
track.dedx();
31 if (minMass>1) dedxbad = 1.1*
track.dedxExpected((minMass-1)*0.939,theCharge);
32 if (minMass==1) dedxbad = 1.1*
track.dedxExpected(0.494,1);
33 if (dedx>dedxmin&&dedx>dedxbad) dedxOK=1;
34 float random_number = (float)rand()/(float)RAND_MAX;
36 if (random_number<0.005){dedxOK=1;}
41 iret = chargeOK*dedxOK*pOK;
44 void StNuclei::Report(){
45 cout <<
"StNuclei: charge = " << chargeToAccept << endl;
46 cout <<
"StNuclei: mass >= " << minMass << endl;
47 cout <<
"StNuclei: momentum > " << pcut << endl;