franksTrackCutMonitor.cxx 1.7 KB

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