StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
trackCutMonitor_P_vs_Dedx.cxx
1 #include "StHbtMaker/Infrastructure/StHbtTrack.hh"
2 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
3 #include "StHbtMaker/Cut/trackCutMonitor_P_vs_Dedx.h"
4 #include <cstdio>
5 #include "StLorentzVector.hh"
6 
7 #ifdef __ROOT__
9 #endif
10 
12 trackCutMonitor_P_vs_Dedx::trackCutMonitor_P_vs_Dedx(){ // default constructor
14 }
16 trackCutMonitor_P_vs_Dedx::trackCutMonitor_P_vs_Dedx(int charge){
17  trackCutMonitor_P_vs_Dedx(charge,"P_vs_Dedx","Momentum (GeV/c) vs Energy loss (a.u.)",50,0.,1,50,0.,5e-6);
18 }
20 trackCutMonitor_P_vs_Dedx::trackCutMonitor_P_vs_Dedx(int charge, const char* TitCutMoni, const char* title,
21  int nbins1, double min1, double max1,
22  int nbins2, double min2, double max2){
23  mHisto= new StHbt2DHisto(TitCutMoni, title, nbins1 , min1, max1, nbins2 , min2, max2);
24  mCharge = charge;
25 }
27 trackCutMonitor_P_vs_Dedx::trackCutMonitor_P_vs_Dedx( const trackCutMonitor_P_vs_Dedx& cutMoni) {
28  mCharge = cutMoni.mCharge;
29  mHisto = new StHbt2DHisto(*(cutMoni.mHisto));
30 }
32 trackCutMonitor_P_vs_Dedx::trackCutMonitor_P_vs_Dedx( const trackCutMonitor_P_vs_Dedx& cutMoni, int charge) {
33  mCharge = charge;
34  mHisto = new StHbt2DHisto(*(cutMoni.mHisto));
35 }
37 trackCutMonitor_P_vs_Dedx::~trackCutMonitor_P_vs_Dedx(){
38  delete mHisto;
39 }
41 void trackCutMonitor_P_vs_Dedx::Fill(const StHbtTrack* track){
42  if (track->Charge() == mCharge || mCharge == 0)
43  mHisto->Fill( abs( track->P() ), track->dEdx(), 1.);
44 }
45 
46