StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
franksTrackCutMonitor.cxx
1 #include "StHbtMaker/Infrastructure/StHbtTrack.hh"
2 #include "StHbtMaker/Cut/franksTrackCutMonitor.h"
3 #include <cstdio>
4 #include <string>
5 #include "StLorentzVector.hh"
6 
7 #ifdef __ROOT__
8 ClassImp(franksTrackCutMonitor)
9 #endif
10 
12 franksTrackCutMonitor::franksTrackCutMonitor(const char* name){ // default constructor
13  string s("franksTrackCutMonitor");
14  string n(name);
15  mDCAxy= new StHbt1DHisto( (s+n+"mDCAxy").c_str(),"Momentum (GeV/c) vs Energy loss (a.u.)",1000,0,5.);
16  mDCAxyGlobal= new StHbt1DHisto( (s+n+"mDCAxyGlobal").c_str(),"Momentum (GeV/c) vs Energy loss (a.u.)",1000,0.,5.);
17  mPvsDedx= new StHbt2DHisto( (s+n+"mPvsDedx").c_str(),"Momentum (GeV/c) vs Energy loss (a.u.)",100,-3.,3.,50,0.,5e-6);
18 }
19 
21 franksTrackCutMonitor::franksTrackCutMonitor( const franksTrackCutMonitor& cutMoni) {
22  mDCAxy =new StHbt1DHisto(*(cutMoni.mDCAxy));
23  mDCAxyGlobal =new StHbt1DHisto(*(cutMoni.mDCAxyGlobal));
24  mPvsDedx =new StHbt2DHisto(*(cutMoni.mPvsDedx));
25 }
27 franksTrackCutMonitor::~franksTrackCutMonitor(){
28  delete mDCAxy;
29  delete mDCAxyGlobal;
30  delete mPvsDedx ;
31 }
33 void franksTrackCutMonitor::Fill(const StHbtTrack* track){
34  mDCAxy->Fill( track->DCAxy(), 1.);
35  mDCAxyGlobal->Fill( track->DCAxyGlobal(), 1.);
36  mPvsDedx->Fill( abs(track->P())*track->Charge(), track->dEdx(), 1.);
37 }
38 
39