24 #include "StHbtMaker/Cut/randomRotateEventCut.h"
25 #include "Randomize.h"
26 #include "PhysicalConstants.h"
27 #include "SystemOfUnits.h"
35 randomRotateEventCut::randomRotateEventCut() : mRotation(true) {
36 mNEventsPassed = mNEventsFailed = 0;
44 bool randomRotateEventCut::Pass(
const StHbtEvent* event){
48 bool goodEvent =
true;
50 if ( event->TrackCollection()->size() +
event->V0Collection()->size() > 0 ) {
51 mult =
event->NumberOfTracks();
52 VertexZPos =
event->PrimVertPos().z();
54 ((mult > mEventMult[0]) &&
55 (mult < mEventMult[1]) &&
56 (VertexZPos > mVertZPos[0]) &&
57 (VertexZPos < mVertZPos[1]));
59 if (goodEvent && mRotation ) {
60 angle = engine->flat()*2.*pi;
63 goodEvent ? mNEventsPassed++ : mNEventsFailed++ ;
68 StHbtString randomRotateEventCut::Report(){
71 sprintf(Ctemp,
"\n randomRotateEventCut:");
73 sprintf(Ctemp,
"\n Rotation :\t %d",(
int) mRotation);
75 sprintf(Ctemp,
"\n Multiplicity:\t %d-%d",mEventMult[0],mEventMult[1]);
77 sprintf(Ctemp,
"\n Vertex Z-position:\t %E-%E",mVertZPos[0],mVertZPos[1]);
79 sprintf(Ctemp,
"\n Number of events which passed:\t%ld Number which failed:\t%ld",mNEventsPassed,mNEventsFailed);
81 StHbtString returnThis = Stemp;