Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef TopDiLeptonDQM_H
0002 #define TopDiLeptonDQM_H
0003 
0004 #include <string>
0005 #include <vector>
0006 #include <iostream>
0007 #include <fstream>
0008 
0009 #include "FWCore/Framework/interface/Event.h"
0010 #include "FWCore/Framework/interface/Frameworkfwd.h"
0011 #include "FWCore/Utilities/interface/InputTag.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013 #include "FWCore/Framework/interface/MakerMacros.h"
0014 #include "FWCore/ServiceRegistry/interface/Service.h"
0015 #include "FWCore/Utilities/interface/EDMException.h"
0016 
0017 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0018 #include "DQMServices/Core/interface/DQMStore.h"
0019 
0020 #include "DataFormats/Common/interface/Ref.h"
0021 #include "DataFormats/Common/interface/Handle.h"
0022 #include "DataFormats/Common/interface/TriggerResults.h"
0023 #include "DataFormats/MuonReco/interface/Muon.h"
0024 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0025 #include "DataFormats/MuonReco/interface/MuonEnergy.h"
0026 #include "DataFormats/MuonReco/interface/MuonIsolation.h"
0027 #include "DataFormats/EgammaCandidates/interface/Electron.h"
0028 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
0029 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
0030 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
0031 #include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
0032 #include "DataFormats/VertexReco/interface/Vertex.h"
0033 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0034 
0035 class TH1F;
0036 class TH2F;
0037 
0038 class TopDiLeptonDQM : public DQMEDAnalyzer {
0039 public:
0040   explicit TopDiLeptonDQM(const edm::ParameterSet&);
0041   ~TopDiLeptonDQM() override;
0042 
0043 protected:
0044   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0045 
0046 private:
0047   void analyze(const edm::Event&, const edm::EventSetup&) override;
0048 
0049   std::string moduleName_;
0050   std::string outputFile_;
0051   edm::EDGetTokenT<edm::TriggerResults> triggerResults_;
0052   std::vector<std::string> hltPaths_;
0053   std::vector<std::string> hltPaths_sig_;
0054   std::vector<std::string> hltPaths_trig_;
0055 
0056   std::ofstream outfile;
0057 
0058   int N_sig[100];
0059   int N_trig[100];
0060   float Eff[100];
0061 
0062   int N_mumu;
0063   int N_muel;
0064   int N_elel;
0065 
0066   edm::EDGetTokenT<reco::VertexCollection> vertex_;
0067   double vertex_X_cut_;
0068   double vertex_Y_cut_;
0069   double vertex_Z_cut_;
0070 
0071   edm::EDGetTokenT<reco::MuonCollection> muons_;
0072   double muon_pT_cut_;
0073   double muon_eta_cut_;
0074   double muon_iso_cut_;
0075 
0076   edm::EDGetTokenT<reco::GsfElectronCollection> elecs_;
0077   double elec_pT_cut_;
0078   double elec_eta_cut_;
0079   double elec_iso_cut_;
0080   double elec_emf_cut_;
0081 
0082   double MassWindow_up_;
0083   double MassWindow_down_;
0084 
0085   MonitorElement* Events_;
0086   MonitorElement* Trigs_;
0087   MonitorElement* TriggerEff_;
0088   MonitorElement* Ntracks_;
0089 
0090   MonitorElement* Nmuons_;
0091   MonitorElement* Nmuons_iso_;
0092   MonitorElement* Nmuons_charge_;
0093   MonitorElement* VxVy_muons_;
0094   MonitorElement* Vz_muons_;
0095   MonitorElement* pT_muons_;
0096   MonitorElement* eta_muons_;
0097   MonitorElement* phi_muons_;
0098 
0099   MonitorElement* Nelecs_;
0100   MonitorElement* Nelecs_iso_;
0101   MonitorElement* Nelecs_charge_;
0102   MonitorElement* HoverE_elecs_;
0103   MonitorElement* pT_elecs_;
0104   MonitorElement* eta_elecs_;
0105   MonitorElement* phi_elecs_;
0106 
0107   MonitorElement* MuIso_emEt03_;
0108   MonitorElement* MuIso_hadEt03_;
0109   MonitorElement* MuIso_hoEt03_;
0110   MonitorElement* MuIso_nJets03_;
0111   MonitorElement* MuIso_nTracks03_;
0112   MonitorElement* MuIso_sumPt03_;
0113   MonitorElement* MuIso_CombRelIso03_;
0114 
0115   MonitorElement* ElecIso_cal_;
0116   MonitorElement* ElecIso_trk_;
0117   MonitorElement* ElecIso_CombRelIso_;
0118 
0119   MonitorElement* dimassRC_;
0120   MonitorElement* dimassWC_;
0121   MonitorElement* dimassRC_LOGX_;
0122   MonitorElement* dimassWC_LOGX_;
0123   MonitorElement* dimassRC_LOG10_;
0124   MonitorElement* dimassWC_LOG10_;
0125 
0126   MonitorElement* D_eta_muons_;
0127   MonitorElement* D_phi_muons_;
0128   MonitorElement* D_eta_elecs_;
0129   MonitorElement* D_phi_elecs_;
0130   MonitorElement* D_eta_lepts_;
0131   MonitorElement* D_phi_lepts_;
0132 };
0133 
0134 #endif
0135 
0136 /* Local Variables: */
0137 /* show-trailing-whitespace: t */
0138 /* truncate-lines: t */
0139 /* End: */