pairCutMonitor_kT.cxx 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #include "StHbtMaker/Infrastructure/StHbtPair.hh"
  2. #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
  3. #include "StHbtMaker/Cut/pairCutMonitor_kT.h"
  4. #include <cstdio>
  5. #ifdef __ROOT__
  6. ClassImp(pairCutMonitor_kT)
  7. #endif
  8. //added by gnigmat -- modified for phi meson
  9. //_______________________________________
  10. pairCutMonitor_kT::pairCutMonitor_kT(){
  11. mHisto = new StHbt1DHisto("kT","momentum (GeV/c)",20,0.,2.);
  12. mHisto->SetDirectory(0);
  13. }
  14. //_______________________________________
  15. pairCutMonitor_kT::pairCutMonitor_kT(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. pairCutMonitor_kT::~pairCutMonitor_kT(){
  22. delete mHisto;
  23. }
  24. //_______________________________________
  25. void pairCutMonitor_kT::Fill(const StHbtPair* pair){
  26. mHisto->Fill( pair->kT(), 1.);
  27. }
  28. //_______________________________________
  29. void pairCutMonitor_kT::Finish(){
  30. cout << " entries in histogram : " << mHisto->Integral() << endl;
  31. }
  32. //_______________________________________
  33. #include <sstream>
  34. string pairCutMonitor_kT::Report(){
  35. ostringstream rep_stream;
  36. rep_stream << "\npairCutMonitor_kT\n";
  37. return (rep_stream.str());
  38. }