24 #include "StHbtMaker/Cut/rotateToReactionPlaneEventCut.h"
25 #include "Randomize.h"
26 #include "PhysicalConstants.h"
27 #include "SystemOfUnits.h"
35 rotateToReactionPlaneEventCut::rotateToReactionPlaneEventCut() : mRotation(true), mSmear(0) {
36 mNEventsPassed = mNEventsFailed = 0;
45 bool rotateToReactionPlaneEventCut::Pass(
const StHbtEvent* event){
49 bool goodEvent =
true;
51 if ( event->TrackCollection()->size() +
event->V0Collection()->size() > 0 ) {
52 mult =
event->NumberOfTracks();
53 VertexZPos =
event->PrimVertPos().z();
55 ((mult > mEventMult[0]) &&
56 (mult < mEventMult[1]) &&
57 (VertexZPos > mVertZPos[0]) &&
58 (VertexZPos < mVertZPos[1]));
60 if (goodEvent && mRotation ) {
61 angle = gauss->shoot()*mSmear*2.*pi;
62 ((
StHbtEvent*)event)->RotateZ(-1.* event->ReactionPlane() + angle);
64 goodEvent ? mNEventsPassed++ : mNEventsFailed++ ;
70 StHbtString rotateToReactionPlaneEventCut::Report(){
73 sprintf(Ctemp,
"rotateToReactionPlaneEventCut: ");
75 sprintf(Ctemp,
"\n Rotation :\t %d",(
int) mRotation);
77 sprintf(Ctemp,
"\n Multiplicity:\t %d-%d",mEventMult[0],mEventMult[1]);
79 sprintf(Ctemp,
"\n Vertex Z-position:\t %E-%E",mVertZPos[0],mVertZPos[1]);
81 sprintf(Ctemp,
"\n Number of events which passed:\t%ld Number which failed:\t%ld",mNEventsPassed,mNEventsFailed);
83 StHbtString returnThis = Stemp;