#include "StHbtMaker/Infrastructure/StHbtPair.hh"
#include "StHbtMaker/Infrastructure/StHbtTypes.hh"
#include "StHbtMaker/Cut/pairCutMonitor_kT.h"
#include <cstdio>

#ifdef __ROOT__ 
ClassImp(pairCutMonitor_kT)
#endif

//added by gnigmat    --  modified for phi meson

//_______________________________________
pairCutMonitor_kT::pairCutMonitor_kT(){
  mHisto = new StHbt1DHisto("kT","momentum (GeV/c)",20,0.,2.);
  mHisto->SetDirectory(0);
}

//_______________________________________
pairCutMonitor_kT::pairCutMonitor_kT(const char* TitCutMoni, const char* title,
						 int nbins, double min, double max){
  mHisto = new StHbt1DHisto(TitCutMoni, title, nbins , min, max);
  mHisto->SetDirectory(0);
}

//_______________________________________
pairCutMonitor_kT::~pairCutMonitor_kT(){
  delete mHisto;
}

//_______________________________________
void pairCutMonitor_kT::Fill(const StHbtPair* pair){

  mHisto->Fill( pair->kT(), 1.);
}

//_______________________________________
void pairCutMonitor_kT::Finish(){
  cout << " entries in histogram : " << mHisto->Integral() << endl;
}

//_______________________________________
#include <sstream>
string pairCutMonitor_kT::Report(){
  
  ostringstream rep_stream;
  rep_stream << "\npairCutMonitor_kT\n";
  return (rep_stream.str());
}

