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