StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
eventCutMonitor_Mult.cxx
1 #include "StHbtMaker/Infrastructure/StHbtEvent.hh"
2 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
3 #include "StHbtMaker/Cut/eventCutMonitor_Mult.h"
4 #include <cstdio>
5 
6 #ifdef __ROOT__
7 ClassImp(eventCutMonitor_Mult)
8 #endif
9 eventCutMonitor_Mult::eventCutMonitor_Mult(){
10  mHisto = new StHbt1DHisto("Mult","multiplicity",1000,0,10000.);
11  mHisto->SetDirectory(0);
12 }
13 //------------------------------
14 eventCutMonitor_Mult::eventCutMonitor_Mult(const char* TitCutMoni, const char* title,
15  int nbins, double min, double max){
16  mHisto = new StHbt1DHisto(TitCutMoni, title, nbins , min, max);
17  mHisto->SetDirectory(0);
18 }
19 //------------------------------
20 eventCutMonitor_Mult::~eventCutMonitor_Mult(){
21  delete mHisto;
22 }
23 
24 //------------------------------
25 void eventCutMonitor_Mult::Fill(const StHbtEvent* event){
26  mHisto->Fill( event->NumberOfTracks(), 1.);
27 }
28 
29 //------------------------------
30 void eventCutMonitor_Mult::Finish(){
31  cout << " entries in histogram : " << mHisto->Integral() << endl;
32 }
33 
34 //------------------------------
35 StHbtString eventCutMonitor_Mult::Report(){
36  string Stemp;
37  char Ctemp[100];
38  sprintf(Ctemp," eventCutMonitor_Mult");
39  Stemp=Ctemp;
40  StHbtString returnThis = Stemp;
41  return returnThis;
42 }
43