1 #include "StHbtMaker/Infrastructure/StHbtEvent.hh"
2 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
3 #include "StHbtMaker/Cut/eventCutMonitor_ReactionPlane.h"
10 eventCutMonitor_ReactionPlane::eventCutMonitor_ReactionPlane(){
11 mScaler =
new StHbt1DHisto(
"Scaler",
"Scaler", 100, -0.5, 99.5);
12 mVertexX =
new StHbt1DHisto(
"VertexX",
"VertexX", 100, -2.,2.);
13 mVertexY =
new StHbt1DHisto(
"VertexY",
"VertexY", 100, -2.,2.);
14 mVertexZ =
new StHbt1DHisto(
"VertexZ",
"VertexZ", 100, -300.,300.);
15 mReactionPlane =
new StHbt1DHisto(
"ReactionPlane",
"ReactionPlane", 36, -2.*asin(1.), 2.*asin(1.) );
16 mReactionPlaneError =
new StHbt1DHisto(
"ReactionPlaneError",
"ReactionPlaneError", 36, 0., 2.*asin(1.) );
17 mMultReactionPlaneError =
new StHbt2DHisto(
"Mult_vs_ReactionPlaneError",
"Mult_vs_ReactionPlaneError", 36, 0., 2.*asin(1.),100,0,5.e2);
20 eventCutMonitor_ReactionPlane::eventCutMonitor_ReactionPlane(
const char* title1,
const char* title2,
21 int nbins,
double min,
double max){
23 sprintf(tit1,
"%s%s_Scaler",title1,title2);
24 mScaler =
new StHbt1DHisto(tit1,
"Scaler", 100, -0.5,99.5);
25 sprintf(tit1,
"%s%s_VertexX",title1,title2);
26 mVertexX =
new StHbt1DHisto(tit1,
"VertexX", 100, -1.,1.);
27 sprintf(tit1,
"%s%s_VertexY",title1,title2);
28 mVertexY =
new StHbt1DHisto(tit1,
"VertexY", 100, -1.,1.);
29 sprintf(tit1,
"%s%s_VertexZ",title1,title2);
30 mVertexZ =
new StHbt1DHisto(tit1,
"VertexZ", 100, -200.,200.);
31 sprintf(tit1,
"%s%s_ReactionPlane",title1,title2);
32 mReactionPlane =
new StHbt1DHisto(tit1,
"ReactionPlane", nbins, min, max);
33 sprintf(tit1,
"%s%s_ReactionPlaneError",title1,title2);
34 mReactionPlaneError =
new StHbt1DHisto(tit1,
"ReactionPlaneError", nbins , min, max);
35 sprintf(tit1,
"%s%s_MultReactionPlaneError",title1,title2);
36 mMultReactionPlaneError =
new StHbt2DHisto(tit1,
"MultReactionPlaneError", nbins, min, max ,100,0,1.e3);
39 eventCutMonitor_ReactionPlane::~eventCutMonitor_ReactionPlane(){
44 delete mReactionPlane;
45 delete mReactionPlaneError;
46 delete mMultReactionPlaneError;
50 void eventCutMonitor_ReactionPlane::Fill(
const StHbtEvent* event){
52 mVertexX->Fill( event->PrimVertPos().x(), 1.);
53 mVertexY->Fill( event->PrimVertPos().y(), 1.);
54 mVertexZ->Fill( event->PrimVertPos().z(), 1.);
55 mReactionPlane->Fill( event->ReactionPlane(), 1.);
56 mReactionPlaneError->Fill( event->ReactionPlaneError(), 1.);
57 mMultReactionPlaneError->Fill( event->ReactionPlaneError(),
event->UncorrectedNumberOfNegativePrimaries());
61 void eventCutMonitor_ReactionPlane::Finish(){
62 cout <<
" entries in histogram mReactionPlane : " << mReactionPlane->Integral() << endl;
63 cout <<
" entries in histogram mReactionPlaneError : " << mReactionPlaneError->Integral() << endl;
64 cout <<
" entries in histogram mMultReactionPlaneError : " << mMultReactionPlaneError->Integral() << endl;
68 StHbtString eventCutMonitor_ReactionPlane::Report(){
71 sprintf(Ctemp,
" eventCutMonitor_ReactionPlane");
73 StHbtString returnThis = Stemp;