// -*- mode: C++ -*-

//
// Pibero Djawotho <pibero@indiana.edu>
// Indiana University
// 14 August 2007
//

#ifndef ST_MC_UPSILON_QA_MAKER
#define ST_MC_UPSILON_QA_MAKER

// ROOT
class TFile;
class TH1;
class TH2;
class TNtuple;

// STAR
class StTrack;
class StMcTrack;

// STAR
#include "StMaker.h"
#include "StThreeVectorF.hh"

class StMcUpsilonQAMaker : public StMaker {
public:
  StMcUpsilonQAMaker(const char* name = "StMcUpsilonQAMaker") : StMaker(name) {}
  ~StMcUpsilonQAMaker() {}

  int Init();
  int Make();
  int Finish();

private:
  bool accept(StMcTrack* mcTrack) const;
  bool accept(StTrack* track) const;
  StTrack* findPartner(StMcTrack* mcTrack);
  StThreeVectorF dca(StTrack* track, const StThreeVectorF& point) const;

  TFile* mFile;

  TNtuple* mMcTuple;
  TNtuple* mRcTuple;

  TH1* mUpsilonPtMc;
  TH1* mUpsilonPtRc;
  TH1* mUpsilonPtEff;
  TH1* mElectronPtMc;
  TH1* mElectronPtRc;
  TH1* mElectronPtEff;
  TH1* mPositronPtMc;
  TH1* mPositronPtRc;
  TH1* mPositronPtEff;

  ClassDef(StMcUpsilonQAMaker, 1);
};

#endif
