19 #include "StHbtMaker/Cut/ParityEventCut.h"
26 ParityEventCut::ParityEventCut(
const char* title,
const int& nbins,
const float& Lo,
const float& Hi){
27 mNEventsPassed = mNEventsFailed = 0;
29 RealQuantity = MixedQuantity = 0.0;
33 sprintf(Tit,
"Real Events");
36 sprintf(Tit,
"Mixed Events");
41 ParityEventCut::~ParityEventCut(){
46 bool ParityEventCut::Pass(
const StHbtEvent* event){
48 double temp = RealQuantity / nReals;
50 cout <<
"Real value was " << temp <<
" with " << nReals <<
" pairs" << endl;
55 double temp = MixedQuantity / nMixed;
57 cout <<
"Mixed value was " << temp <<
" with " << nMixed <<
" pairs" << endl;
62 int mult =
event->NumberOfTracks();
63 double VertexZPos =
event->PrimVertPos().z();
64 cout <<
"ParityEventCut::Pass -- mult, VertexZPos : " << mult <<
" " << VertexZPos << endl;
66 ((mult > mEventMult[0]) &&
67 (mult < mEventMult[1]) &&
68 (VertexZPos > mVertZPos[0]) &&
69 (VertexZPos < mVertZPos[1]));
70 goodEvent ? mNEventsPassed++ : mNEventsFailed++ ;
74 StHbtString ParityEventCut::Report(){
77 sprintf(Ctemp,
"Parity EventCut\nMultiplicity:\t %d-%d\n",mEventMult[0],mEventMult[1]);
79 sprintf(Ctemp,
"Vertex Z-position:\t %E-%E\n",mVertZPos[0],mVertZPos[1]);
81 sprintf(Ctemp,
"Number of events which passed:\t%ld Number which failed:\t%ld\n",mNEventsPassed,mNEventsFailed);
83 StHbtString returnThis = Stemp;