// -*- C++ -*-

//
// Pibero Djawotho <pibero@indiana.edu>
// Indiana University
// 8 October 2006
//

#ifndef StUpsilonTreeReader_h
#define StUpsilonTreeReader_h

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

// Local
class Event;
class Track;
class EmcHit;

// ROOT
#include "TObject.h"

class StUpsilonTreeReader : public TObject {
public:
  StUpsilonTreeReader(int nfiles = 1000000 , const char* filelist = "");
  ~StUpsilonTreeReader();

  bool accept(Event* event) const;
  bool accept(Track* track) const;
  bool isolated(Track* track) const;
  EmcHit* getTower(int id) const;

  int EventLoop();

private:
  TFile*   mFile;
  TChain*  mChain;
  Event*   mEvent;
  TNtuple* mUps;
//  TNtuple* mIso;
//  TNtuple* mIso2;
 // TNtuple* mMix;
  TH1* mTriggerIds;
  TH1* mRefMult;
  TH1* mZvertex;
  TH2* RefMult_vs_vz;
  TH1* good_RefMult;

  ClassDef(StUpsilonTreeReader, 1);
};

#endif
