v0CutMonitor_Minv.cxx 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
  2. #include "StHbtMaker/Infrastructure/StHbtV0.hh"
  3. #include "StHbtMaker/Cut/v0CutMonitor_Minv.h"
  4. #include <cstdio>
  5. #ifdef __ROOT__
  6. ClassImp(v0CutMonitor_Minv)
  7. #endif
  8. v0CutMonitor_Minv::v0CutMonitor_Minv(){
  9. mHistoK0Short = new StHbt1DHisto("K0ShortMinv","invariant mass (GeV/c)",200,0.,1.);
  10. mHistoK0Short->SetDirectory(0);
  11. mHistoLambda = new StHbt1DHisto("LambdaMinv","invariant mass (GeV/c)",200,0.5,1.5);
  12. mHistoLambda->SetDirectory(0);
  13. mHistoAntiLambda = new StHbt1DHisto("AntiLambdaMinv","invariant mass (GeV/c)",200,0.5,1.5);
  14. mHistoAntiLambda->SetDirectory(0);
  15. }
  16. //------------------------------
  17. v0CutMonitor_Minv::v0CutMonitor_Minv(const char* Titlek0,const char* Titlela,const char* Titlelab){
  18. mHistoK0Short = new StHbt1DHisto(Titlek0,"invariant mass (GeV/c)",200,0.,1.);
  19. mHistoK0Short->SetDirectory(0);
  20. mHistoLambda = new StHbt1DHisto(Titlela,"invariant mass (GeV/c)",200,0.5,1.5);
  21. mHistoLambda->SetDirectory(0);
  22. mHistoAntiLambda = new StHbt1DHisto(Titlelab,"invariant mass (GeV/c)",200,0.5,1.5);
  23. mHistoAntiLambda->SetDirectory(0);
  24. }
  25. //------------------------------
  26. v0CutMonitor_Minv::v0CutMonitor_Minv(const char* TitCutMoni, const char* title,
  27. int nbins, double min, double max){
  28. mHistoK0Short = new StHbt1DHisto(TitCutMoni, title, nbins , min, max);
  29. mHistoK0Short->SetDirectory(0);
  30. mHistoLambda = new StHbt1DHisto(TitCutMoni, title, nbins , min, max);
  31. mHistoLambda->SetDirectory(0);
  32. mHistoAntiLambda = new StHbt1DHisto(TitCutMoni, title, nbins , min, max);
  33. mHistoAntiLambda->SetDirectory(0);
  34. }
  35. //------------------------------
  36. v0CutMonitor_Minv::~v0CutMonitor_Minv(){
  37. delete mHistoK0Short;
  38. delete mHistoLambda;
  39. delete mHistoAntiLambda;
  40. }
  41. //------------------------------
  42. void v0CutMonitor_Minv::Fill(const StHbtV0* v0){
  43. mHistoK0Short->Fill( v0->massK0Short() , 1.);
  44. mHistoLambda->Fill( v0->massLambda() , 1.);
  45. mHistoAntiLambda->Fill( v0->massAntiLambda() , 1.);
  46. }
  47. //------------------------------
  48. void v0CutMonitor_Minv::Finish(){
  49. cout << " entries in K0Short histogram : " << mHistoK0Short->Integral() << endl;
  50. cout << " entries in Lambda histogram : " << mHistoLambda->Integral() << endl;
  51. cout << " entries in AntiLambda histogram : " << mHistoAntiLambda->Integral() << endl;
  52. }
  53. //------------------------------
  54. StHbtString v0CutMonitor_Minv::Report(){
  55. string Stemp;
  56. char Ctemp[100];
  57. sprintf(Ctemp," v0CutMonitor ");
  58. Stemp=Ctemp;
  59. StHbtString returnThis = Stemp;
  60. return returnThis;
  61. }