StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
v0CutMonitor_Minv.cxx
1 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
2 #include "StHbtMaker/Infrastructure/StHbtV0.hh"
3 #include "StHbtMaker/Cut/v0CutMonitor_Minv.h"
4 #include <cstdio>
5 
6 #ifdef __ROOT__
7 ClassImp(v0CutMonitor_Minv)
8 #endif
9 
10 v0CutMonitor_Minv::v0CutMonitor_Minv(){
11  mHistoK0Short = new StHbt1DHisto("K0ShortMinv","invariant mass (GeV/c)",200,0.,1.);
12  mHistoK0Short->SetDirectory(0);
13  mHistoLambda = new StHbt1DHisto("LambdaMinv","invariant mass (GeV/c)",200,0.5,1.5);
14  mHistoLambda->SetDirectory(0);
15  mHistoAntiLambda = new StHbt1DHisto("AntiLambdaMinv","invariant mass (GeV/c)",200,0.5,1.5);
16  mHistoAntiLambda->SetDirectory(0);
17 }
18 //------------------------------
19 v0CutMonitor_Minv::v0CutMonitor_Minv(const char* Titlek0,const char* Titlela,const char* Titlelab){
20  mHistoK0Short = new StHbt1DHisto(Titlek0,"invariant mass (GeV/c)",200,0.,1.);
21  mHistoK0Short->SetDirectory(0);
22  mHistoLambda = new StHbt1DHisto(Titlela,"invariant mass (GeV/c)",200,0.5,1.5);
23  mHistoLambda->SetDirectory(0);
24  mHistoAntiLambda = new StHbt1DHisto(Titlelab,"invariant mass (GeV/c)",200,0.5,1.5);
25  mHistoAntiLambda->SetDirectory(0);
26 }
27 //------------------------------
28 v0CutMonitor_Minv::v0CutMonitor_Minv(const char* TitCutMoni, const char* title,
29  int nbins, double min, double max){
30  mHistoK0Short = new StHbt1DHisto(TitCutMoni, title, nbins , min, max);
31  mHistoK0Short->SetDirectory(0);
32  mHistoLambda = new StHbt1DHisto(TitCutMoni, title, nbins , min, max);
33  mHistoLambda->SetDirectory(0);
34  mHistoAntiLambda = new StHbt1DHisto(TitCutMoni, title, nbins , min, max);
35  mHistoAntiLambda->SetDirectory(0);
36 }
37 //------------------------------
38 v0CutMonitor_Minv::~v0CutMonitor_Minv(){
39  delete mHistoK0Short;
40  delete mHistoLambda;
41  delete mHistoAntiLambda;
42 }
43 
44 //------------------------------
45 void v0CutMonitor_Minv::Fill(const StHbtV0* v0){
46  mHistoK0Short->Fill( v0->massK0Short() , 1.);
47  mHistoLambda->Fill( v0->massLambda() , 1.);
48  mHistoAntiLambda->Fill( v0->massAntiLambda() , 1.);
49 }
50 
51 //------------------------------
52 void v0CutMonitor_Minv::Finish(){
53  cout << " entries in K0Short histogram : " << mHistoK0Short->Integral() << endl;
54  cout << " entries in Lambda histogram : " << mHistoLambda->Integral() << endl;
55  cout << " entries in AntiLambda histogram : " << mHistoAntiLambda->Integral() << endl;
56 }
57 
58 //------------------------------
59 StHbtString v0CutMonitor_Minv::Report(){
60  string Stemp;
61  char Ctemp[100];
62  sprintf(Ctemp," v0CutMonitor ");
63  Stemp=Ctemp;
64  StHbtString returnThis = Stemp;
65  return returnThis;
66 }
67