//================================================================== // // TTopHepg.cc // // This code TEMPLATE reads the stntuple "TGenpBlock" (filled from HEPG bank) // and searches for and plots various t - W - b particle properties from // ttbar decay. // // Version 0.0: P. Koehn 03/04/02 // //================================================================== #if !defined (__CINT__) || defined (__MAKECINT__) #include "TF1.h" #include "TPad.h" #include "TH1.h" #include "TH2.h" #include "TCanvas.h" #include "TProfile.h" #include "misc.hh" // very useful utility methods #include "TBranch.h" #include #include #endif class TTopHepg: public TStnModule { //----------------------------------------------------------------------------- // data members //----------------------------------------------------------------------------- public: TFile* histFile; TDirectory* dir; const char* histDir; struct Hist_t { TH1F* fNParticles; // total number of particles TH1F* fPt; TH1F* fEta; TH1F* fParent; TH1F* tPt; TH1F* tEta; TH1F* bPt; TH1F* bEta; TH1F* wPt; TH1F* wEta; TH1F* lPt; TH1F* lEta; }; protected: TGenpBlock* fGenpBlock; Hist_t fHist; Int_t totev, pdg_code, im, bm, wm; //----------------------------------------------------------------------------- // methods //----------------------------------------------------------------------------- public: TTopHepg(const char* name="TTopHepg", const char* title="TTopHepg"); TTopHepg(TFile* file, const char* name="TTopHepg", const char* title="TTopHepg"); ~TTopHepg(); // ****** getters ****** Hist_t* GetHist () { return &fHist;} // ****** setters // ****** other methods void spew(); void BookHistograms(); void PlotHistograms(int run_number, int slide); // ****** overloaded methods of TStnModule ****** int BeginJob(); int BeginRun(); int Event (int ientry); //int EndRun (); int EndJob (); };