Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:33:11

0001 #ifndef L1ValidatorHists_h
0002 #define L1ValidatorHists_h
0003 
0004 #include "TH1F.h"
0005 //#include <TH2F.h>
0006 
0007 //#include <DataFormats/HepMCCandidate/interface/GenParticle.h>
0008 #include <DataFormats/Candidate/interface/LeafCandidate.h>
0009 
0010 #include <string>
0011 
0012 #include "DQMServices/Core/interface/DQMStore.h"
0013 
0014 /*#define DECLARE_HISTS(TYPE) \
0015 TH2F * ## TYPE ## _N_Pt; \
0016 TH2F * ## TYPE ## _N_Eta; \
0017 TH2F * ## TYPE ## _Eff_Pt; \
0018 TH2F * ## TYPE ## _Eff_Eta; \
0019 TH2F * ## TYPE ## _dR; \
0020 TH2F * ## TYPE ## _dPt;
0021 */
0022 
0023 class L1ValidatorHists {
0024 public:
0025   typedef dqm::legacy::DQMStore DQMStore;
0026   typedef dqm::legacy::MonitorElement MonitorElement;
0027 
0028   L1ValidatorHists();
0029   ~L1ValidatorHists();
0030 
0031   void Book(DQMStore::IBooker &, std::string dirname);
0032   void Write();
0033 
0034   int NEvents;
0035 
0036   // enum Type{ IsoEG, NonIsoEG, CenJet, ForJet, TauJet, Muon, Number };
0037   enum Type { Egamma, Jet, Tau, Muon, Number };
0038   std::string Name[4];
0039 
0040   // Each object has gen (pt, eta, phi, pdg), reco (pt, eta, phi, pdg)
0041   // split by pdg (CenJet, ETM, ETT, ForJet, HTM, HTT, IsoEG, Mu, NoIsoEG,
0042   // TauJet): 10 needs efficiency (by pt, eta), fake rate (by pt, eta), dR (by
0043   // pt, (eta?))
0044   /**TH2F *IsoEG_N_Pt_Eta, *IsoEG_Eff_Pt, *IsoEG_Eff_Eta, *IsoEG_dR_Pt,
0045    *IsoEG_dPt_Pt; TH2F *NonIsoEG_N_Pt_Eta, *NonIsoEG_Eff_Pt, *NonIsoEG_Eff_Eta,
0046    *NonIsoEG_dR_Pt, *NonIsoEG_dPt_Pt; TH2F *CenJet_N_Pt_Eta, *CenJet_Eff_Pt,
0047    *CenJet_Eff_Eta, *CenJet_dR_Pt, *CenJet_dPt_Pt; TH2F *Muon_N_Pt_Eta,
0048    *Muon_Eff_Pt, *Muon_Eff_Eta, *Muon_dR_Pt, *Muon_dPt_Pt;*/
0049 
0050   /*DECLARE_HISTS(IsoEG)
0051   DECLARE_HISTS(NonIsoEG)
0052   DECLARE_HISTS(CenJet)
0053   DECLARE_HISTS(ForJet)
0054   DECLARE_HISTS(TauJet)
0055   DECLARE_HISTS(Muon)*/
0056 
0057   MonitorElement *N[Type::Number];
0058 
0059   MonitorElement *Eff_Pt[Type::Number];
0060   MonitorElement *Eff_Pt_Denom[Type::Number];
0061   MonitorElement *Eff_Pt_Nomin[Type::Number];
0062   MonitorElement *Eff_Eta[Type::Number];
0063   MonitorElement *Eff_Eta_Denom[Type::Number];
0064   MonitorElement *Eff_Eta_Nomin[Type::Number];
0065   MonitorElement *TurnOn_15[Type::Number];
0066   MonitorElement *TurnOn_15_Denom[Type::Number];
0067   MonitorElement *TurnOn_15_Nomin[Type::Number];
0068   MonitorElement *TurnOn_30[Type::Number];
0069   MonitorElement *TurnOn_30_Denom[Type::Number];
0070   MonitorElement *TurnOn_30_Nomin[Type::Number];
0071   MonitorElement *dR[Type::Number];
0072   MonitorElement *dPt[Type::Number];
0073   MonitorElement *dR_vs_Pt[Type::Number];
0074   MonitorElement *dPt_vs_Pt[Type::Number];
0075 
0076   // add the rest...
0077   // TH2F *ETM_Delta, *ETT_Delta, *HTM_Delta, *HTT_Delta;
0078 
0079   void Fill(int, const reco::LeafCandidate *, const reco::LeafCandidate *);
0080   void FillNumber(int, int);
0081   //  private:
0082   //    void NormalizeSlices(TH2F *Hist);
0083 };
0084 
0085 #endif