65 #include "StHbtMaker/Cut/helensEventCut.h"
72 helensEventCut::helensEventCut(){
73 mNEventsPassed = mNEventsFailed = 0;
76 mTrkV0MatchCollection =
new StHbtTrkV0MatchCollection;
83 bool helensEventCut::Pass(
const StHbtEvent* event){
86 int mult =
event->NumberOfTracks();
87 if( event->V0Collection()){
88 v0Mult=
event->V0Collection()->size();
90 double VertexZPos =
event->PrimVertPos().z();
91 cout <<
"helensEventCut:: mult: " << mEventMult[0] <<
" < " << mult <<
" < " << mEventMult[1] << endl;
92 cout <<
"helensEventCut:: VertexZPos: " << mVertZPos[0] <<
" < " << VertexZPos <<
" < " << mVertZPos[1] << endl;
93 cout <<
"helensEventCut:: V0Mult: " << mV0Mult[0] <<
" < " << v0Mult <<
" < " << mV0Mult[1] << endl;
95 ((mult > mEventMult[0]) &&
96 (mult < mEventMult[1]) &&
97 (VertexZPos > mVertZPos[0]) &&
98 (VertexZPos < mVertZPos[1]) &&
99 (v0Mult > mV0Mult[0]) &&
100 (v0Mult < mV0Mult[1]));
101 goodEvent ? mNEventsPassed++ : mNEventsFailed++ ;
107 StHbtTrkV0Iterator pIter;
108 if( TrkV0MatchCollection()->size() > 0){
109 for( pIter=TrkV0MatchCollection()->begin(); pIter!=TrkV0MatchCollection()->end();
114 TrkV0MatchCollection()->clear();
119 StHbtTrackIterator TrkIter;
122 for( TrkIter=event->TrackCollection()->begin(); TrkIter!=
event->TrackCollection()->end(); TrkIter++){
124 pParticle = *TrkIter;
126 TrackV0Match->SetTrkId( pParticle->TrackId());
127 TrackV0Match->SetdEdx( pParticle->dEdx());
128 TrackV0Match->SetUsed(0);
129 TrkV0MatchCollection()->push_back(TrackV0Match);
133 cout <<
"TrkV0MatchCollection Size= " << TrkV0MatchCollection()->size() << endl;
134 cout <<
"helensEventCut:: return : " << goodEvent << endl;
138 StHbtString helensEventCut::Report(){
141 sprintf(Ctemp,
"\nMultiplicity:\t %d-%d",mEventMult[0],mEventMult[1]);
143 sprintf(Ctemp,
"\nVertex Z-position:\t %E-%E",mVertZPos[0],mVertZPos[1]);
145 sprintf(Ctemp,
"\nV0Multiplicity:\t %d-%d",mV0Mult[0],mV0Mult[1]);
147 sprintf(Ctemp,
"\nNumber of events which passed:\t%ld Number which failed:\t%ld",mNEventsPassed,mNEventsFailed);
149 StHbtString returnThis = Stemp;