StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mercedesEventCutMonitor.cxx
1 /***************************************************************************
2  *
3  * $Id: mercedesEventCutMonitor.cxx,v 1.3 2003/01/22 16:05:11 mercedes Exp $
4  *
5  * Author: Mercedes Lopez Noriega , Ohio State, mercedes@pacific.mps.ohio-state.edu
6  *
7  ***************************************************************************
8  *
9  * Event Cut Monitor that plots just the tracks that passed
10  * mercedesStarStandardEventCut in the multiplicity plot
11  * Plots: EventMultiplicity (just # of tracks that passed the event cut),
12  * ZVertexPosition, and 2D plot: EventMultiplicity vs Tracks (# of tracks that
13  * passed the cuts vs # of tracks in the event)
14  *
15  ***************************************************************************
16  *
17  * $Log: mercedesEventCutMonitor.cxx,v $
18  * Revision 1.3 2003/01/22 16:05:11 mercedes
19  * Minor changes
20  *
21  * Revision 1.2 2003/01/17 16:47:31 mercedes
22  * Updated to get reference multiplicity
23  *
24  * Revision 1.1 2002/04/09 15:14:46 mercedes
25  * Event Cut Monitor for mercedesStarStandardEventCut
26  *
27  *
28  **************************************************************************/
29 
30 #include "StHbtMaker/Infrastructure/StHbtEvent.hh"
31 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
32 #include "StHbtMaker/Cut/mercedesEventCutMonitor.h"
33 #include <cstdio>
34 
35 #ifdef __ROOT__
37 #endif
38 
39 mercedesEventCutMonitor::mercedesEventCutMonitor(){
40  mEventMultHisto = new StHbt1DHisto("EventMultHisto","Event Multiplicity",1000,0.,1000.);
41  mEventMultHisto->SetDirectory(0);
42  mZVertexPosHisto = new StHbt1DHisto("ZVertexPos","zVertex Position",1000,-50.0,50.0);
43  mZVertexPosHisto->SetDirectory(0);
44  mEventMultvsTracks = new StHbt2DHisto("EventMultvsTracks ","Event Multiplicity vs Total Tracks",1000, 0., 1000., 1000,0.,10000.0);
45  mEventMultvsTracks->SetDirectory(0);
46 }
47 //------------------------------
48 mercedesEventCutMonitor::~mercedesEventCutMonitor(){
49  delete mEventMultHisto;
50  delete mZVertexPosHisto;
51  delete mEventMultvsTracks;
52 }
53 
54 //------------------------------
55 void mercedesEventCutMonitor::Fill(const StHbtEvent* event){
56 
57  double VertexZPos = event->PrimVertPos().z();
58  int mult = event->UncorrectedNumberOfPrimaries();
59 
60  mEventMultHisto->Fill(mult,1.);
61  mZVertexPosHisto->Fill (VertexZPos,1.);
62  mEventMultvsTracks->Fill(mult,event->NumberOfTracks(),1.);
63 }
64 
65 //------------------------------
66 void mercedesEventCutMonitor::Finish(){
67  cout << " entries in Multiplicity histogram : " << mEventMultHisto->Integral() << endl;
68  cout << " entries in Vertex Pos. histogram : " << mZVertexPosHisto->Integral() << endl;
69 }
70 
71 //------------------------------
72 StHbtString mercedesEventCutMonitor::Report(){
73  string Stemp;
74  char Ctemp[100];
75  sprintf(Ctemp," mercedesEventCutMonitor");
76  Stemp=Ctemp;
77  StHbtString returnThis = Stemp;
78  return returnThis;
79 }
80