00001 #include "StHbtMaker/Infrastructure/StHbtEvent.hh"
00002 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
00003 #include "StHbtMaker/Cut/eventCutMonitor_ReactionPlane.h"
00004 #include <cstdio>
00005 #include <cmath>
00006
00007 #ifdef __ROOT__
00008 ClassImp(eventCutMonitor_ReactionPlane)
00009 #endif
00010 eventCutMonitor_ReactionPlane::eventCutMonitor_ReactionPlane(){
00011 mScaler = new StHbt1DHisto("Scaler", "Scaler", 100, -0.5, 99.5);
00012 mVertexX = new StHbt1DHisto("VertexX", "VertexX", 100, -2.,2.);
00013 mVertexY = new StHbt1DHisto("VertexY", "VertexY", 100, -2.,2.);
00014 mVertexZ = new StHbt1DHisto("VertexZ", "VertexZ", 100, -300.,300.);
00015 mReactionPlane = new StHbt1DHisto("ReactionPlane", "ReactionPlane", 36, -2.*asin(1.), 2.*asin(1.) );
00016 mReactionPlaneError = new StHbt1DHisto("ReactionPlaneError", "ReactionPlaneError", 36, 0., 2.*asin(1.) );
00017 mMultReactionPlaneError = new StHbt2DHisto("Mult_vs_ReactionPlaneError", "Mult_vs_ReactionPlaneError", 36, 0., 2.*asin(1.),100,0,5.e2);
00018 }
00019
00020 eventCutMonitor_ReactionPlane::eventCutMonitor_ReactionPlane(const char* title1, const char* title2,
00021 int nbins, double min, double max){
00022 char tit1[100];
00023 sprintf(tit1,"%s%s_Scaler",title1,title2);
00024 mScaler = new StHbt1DHisto(tit1, "Scaler", 100, -0.5,99.5);
00025 sprintf(tit1,"%s%s_VertexX",title1,title2);
00026 mVertexX = new StHbt1DHisto(tit1, "VertexX", 100, -1.,1.);
00027 sprintf(tit1,"%s%s_VertexY",title1,title2);
00028 mVertexY = new StHbt1DHisto(tit1, "VertexY", 100, -1.,1.);
00029 sprintf(tit1,"%s%s_VertexZ",title1,title2);
00030 mVertexZ = new StHbt1DHisto(tit1, "VertexZ", 100, -200.,200.);
00031 sprintf(tit1,"%s%s_ReactionPlane",title1,title2);
00032 mReactionPlane = new StHbt1DHisto(tit1,"ReactionPlane", nbins, min, max);
00033 sprintf(tit1,"%s%s_ReactionPlaneError",title1,title2);
00034 mReactionPlaneError = new StHbt1DHisto(tit1,"ReactionPlaneError", nbins , min, max);
00035 sprintf(tit1,"%s%s_MultReactionPlaneError",title1,title2);
00036 mMultReactionPlaneError = new StHbt2DHisto(tit1,"MultReactionPlaneError", nbins, min, max ,100,0,1.e3);
00037 }
00038
00039 eventCutMonitor_ReactionPlane::~eventCutMonitor_ReactionPlane(){
00040 delete mScaler;
00041 delete mVertexX;
00042 delete mVertexY;
00043 delete mVertexZ;
00044 delete mReactionPlane;
00045 delete mReactionPlaneError;
00046 delete mMultReactionPlaneError;
00047 }
00048
00049
00050 void eventCutMonitor_ReactionPlane::Fill(const StHbtEvent* event){
00051 mScaler->Fill(0.);
00052 mVertexX->Fill( event->PrimVertPos().x(), 1.);
00053 mVertexY->Fill( event->PrimVertPos().y(), 1.);
00054 mVertexZ->Fill( event->PrimVertPos().z(), 1.);
00055 mReactionPlane->Fill( event->ReactionPlane(), 1.);
00056 mReactionPlaneError->Fill( event->ReactionPlaneError(), 1.);
00057 mMultReactionPlaneError->Fill( event->ReactionPlaneError(), event->UncorrectedNumberOfNegativePrimaries());
00058 }
00059
00060
00061 void eventCutMonitor_ReactionPlane::Finish(){
00062 cout << " entries in histogram mReactionPlane : " << mReactionPlane->Integral() << endl;
00063 cout << " entries in histogram mReactionPlaneError : " << mReactionPlaneError->Integral() << endl;
00064 cout << " entries in histogram mMultReactionPlaneError : " << mMultReactionPlaneError->Integral() << endl;
00065 }
00066
00067
00068 StHbtString eventCutMonitor_ReactionPlane::Report(){
00069 string Stemp;
00070 char Ctemp[100];
00071 sprintf(Ctemp," eventCutMonitor_ReactionPlane");
00072 Stemp=Ctemp;
00073 StHbtString returnThis = Stemp;
00074 return returnThis;
00075 }
00076