StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
trackCutMonitor_Pt.cxx
1 #include "StHbtMaker/Infrastructure/StHbtTrack.hh"
2 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
3 #include "StHbtMaker/Cut/trackCutMonitor_Pt.h"
4 
5 #ifdef __ROOT__
6 ClassImp(trackCutMonitor_Pt)
7 #endif
8 
9 trackCutMonitor_Pt::trackCutMonitor_Pt(){
10  mHisto = new StHbt1DHisto("Pt","Pt (GeV/c)",20,0.,2.);
11  cout << " this " << this << endl;
12  mHisto->SetDirectory(0);
13 }
14 //------------------------------
15 trackCutMonitor_Pt::trackCutMonitor_Pt(const char* TitCutMoni, const char* title,
16  int nbins, double min, double max){
17  mHisto = new StHbt1DHisto(TitCutMoni, title, nbins , min, max);
18  mHisto->SetDirectory(0);
19 }
20 //------------------------------
21 trackCutMonitor_Pt::~trackCutMonitor_Pt(){
22  delete mHisto;
23 }
24 
25 //------------------------------
26 void trackCutMonitor_Pt::Fill(const StHbtTrack* track){
27  mHisto->Fill( track->P().perp(), 1.);
28 }
29 
30