StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StNegativeTracks.cxx
1 #include "StNegativeTracks.h"
2 #include "StRareTrack.h"
3 #include "StEventTypes.h"
4 #include <stdlib.h>
5 ClassImp(StNegativeTracks)
6 
7 StNegativeTracks::StNegativeTracks(float plow,float phigh){
8  pcut[0] = plow;
9  pcut[1] = phigh;
10 }
11 
12 int StNegativeTracks::Accept(StPrimaryTrack* trk){
13  int iret = 0;
14  int chargeOK = 0;
15  int pOK=0;
16  StRareTrack track(trk);
17  if (track.chargesign()<0) {chargeOK=1;}
18  if (track.p()>pcut[0]&&track.p()<pcut[1]&&track.npntfit()>20&&track.iflag()>=0) pOK = 1;
19  iret = chargeOK*pOK;
20  return iret;
21 }
22 void StNegativeTracks::Report(){
23  cout << "StNegativeTracks: momentum > " << pcut << endl;
24 }