StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
trackCutMonitor_Y_vs_Pt.cxx
1 #include "StHbtMaker/Infrastructure/StHbtTrack.hh"
2 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
3 #include "StHbtMaker/Cut/trackCutMonitor_Y_vs_Pt.h"
4 #include <cstdio>
5 
6 #ifdef __ROOT__
8 #endif
9 
10 trackCutMonitor_Y_vs_Pt::trackCutMonitor_Y_vs_Pt(){
11  mHisto = new StHbt2DHisto("Y_vs_Pt","y vs Pt (GeV/c)",50,-2.,2,50,0.,2.);
12  cout << " this " << this << endl;
13  mHisto->SetDirectory(0);
14 }
15 //------------------------------
16 trackCutMonitor_Y_vs_Pt::trackCutMonitor_Y_vs_Pt(double aMass, const char* TitCutMoni, const char* title,
17  int nbins1, double min1, double max1,
18  int nbins2, double min2, double max2):mMass(aMass){
19  mHisto = new StHbt2DHisto(TitCutMoni, title, nbins1 , min1, max1, nbins2 , min2, max2);
20  mHisto->SetDirectory(0);
21 }
22 //------------------------------
23 trackCutMonitor_Y_vs_Pt::trackCutMonitor_Y_vs_Pt(const char* TitCutMoni, const char* title,
24  int nbins1, double min1, double max1,
25  int nbins2, double min2, double max2):mMass(0.139){
26  mHisto = new StHbt2DHisto(TitCutMoni, title, nbins1 , min1, max1, nbins2 , min2, max2);
27  mHisto->SetDirectory(0);
28 }
29 //------------------------------
30 trackCutMonitor_Y_vs_Pt::~trackCutMonitor_Y_vs_Pt(){
31  delete mHisto;
32 }
33 
34 //------------------------------
35 void trackCutMonitor_Y_vs_Pt::Fill(const StHbtTrack* track){
37  L.setVect(track->P());
38  L.setE(track->P().massHypothesis(mMass));
39  mHisto->Fill( L.rapidity(), L.vect().perp(), 1.);
40 }
41 
42