#ifndef trackCutMonitor_P_vs_Msqr_hh
#define trackCutMonitor_P_vs_Msqr_hh

#include "StHbtMaker/Infrastructure/StHbtTypes.hh"
#include "StHbtMaker/Infrastructure/StHbtTrack.hh"
#include "TH1.h"
#include "TH2.h"
#include "TH2D.h"
#include "StHbtMaker/Base/StHbtCutMonitor.hh"

//_________________
class trackCutMonitor_P_vs_Msqr : public StHbtCutMonitor {
 private:
  TH2D* mHisto;
  int mCharge;

 public:
  trackCutMonitor_P_vs_Msqr();   // default constructor
  trackCutMonitor_P_vs_Msqr(const trackCutMonitor_P_vs_Msqr&);   // copy constructor
  trackCutMonitor_P_vs_Msqr(const trackCutMonitor_P_vs_Msqr&, int charge);   // copy constructor with charge setting
  trackCutMonitor_P_vs_Msqr(int charge);
  trackCutMonitor_P_vs_Msqr(int charge, const char* TitCutMoni);
  trackCutMonitor_P_vs_Msqr(int charge,
			    const char* TitCutMoni, const char* title, 
			    int nbins1 ,double minX1, double maxX1,
			    int nbins2 ,double minY2, double maxY2);

  virtual ~trackCutMonitor_P_vs_Msqr();

  void Fill(const StHbtTrack* track);
  virtual StHbtString Report();
  virtual void Finish();
  TH2D* Histo();
  
  // These dummy Fill() functions were introduced to remove a compiler
  //   warning related to overloaded base-class Fill() functions being 
  //   hidden by a single version of Fill() in this derived class
  void Fill(const StHbtParticleCollection* d) {;}
  void Fill(const StHbtEvent *d1, const StHbtParticleCollection* d2) {;}
  void Fill(const StHbtPair* d) {;}
  void Fill(const StHbtKink* d) {;}
  void Fill(const StHbtV0* d) {;}
  void Fill(const StHbtEvent* d) {;}

#ifdef __ROOT__  
 ClassDef(trackCutMonitor_P_vs_Msqr, 1)
#endif
};

#endif
