trackCutMonitor_DCA.cxx 837 B

123456789101112131415161718192021222324252627282930
  1. #include "StHbtMaker/Infrastructure/StHbtTrack.hh"
  2. #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
  3. #include "StHbtMaker/Cut/trackCutMonitor_DCA.h"
  4. #include <cstdio>
  5. #ifdef __ROOT__
  6. ClassImp(trackCutMonitor_DCA)
  7. #endif
  8. trackCutMonitor_DCA::trackCutMonitor_DCA(){
  9. mHisto = new StHbt1DHisto("DCA","DCA (cm)",20,0.,10.);
  10. mHisto->SetDirectory(0);
  11. }
  12. //------------------------------
  13. trackCutMonitor_DCA::trackCutMonitor_DCA(const char* TitCutMoni, const char* title,
  14. int nbins, double min, double max){
  15. mHisto = new StHbt1DHisto(TitCutMoni, title, nbins, min, max);
  16. mHisto->SetDirectory(0);
  17. }
  18. //------------------------------
  19. trackCutMonitor_DCA::~trackCutMonitor_DCA(){
  20. delete mHisto;
  21. }
  22. //------------------------------
  23. void trackCutMonitor_DCA::Fill(const StHbtTrack* track){
  24. mHisto->Fill( track->DCAxy() );
  25. }