Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:12

0001 #ifndef DQMExample_Step1_H
0002 #define DQMExample_Step1_H
0003 
0004 // Framework
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 #include "FWCore/ServiceRegistry/interface/Service.h"
0007 #include "FWCore/Utilities/interface/InputTag.h"
0008 
0009 // event
0010 #include "FWCore/Framework/interface/Event.h"
0011 #include "FWCore/Framework/interface/EventSetup.h"
0012 
0013 // DQM
0014 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0015 #include "DQMServices/Core/interface/DQMStore.h"
0016 
0017 // Candidate handling
0018 #include "DataFormats/Candidate/interface/Candidate.h"
0019 #include "DataFormats/Candidate/interface/CandidateFwd.h"
0020 
0021 // Electron
0022 #include "DataFormats/EgammaCandidates/interface/Electron.h"
0023 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
0024 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
0025 
0026 // PFMET
0027 #include "DataFormats/METReco/interface/PFMET.h"
0028 #include "DataFormats/METReco/interface/PFMETCollection.h"
0029 
0030 // Vertex utilities
0031 #include "DataFormats/VertexReco/interface/Vertex.h"
0032 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0033 
0034 // CaloJets
0035 #include "DataFormats/JetReco/interface/CaloJet.h"
0036 
0037 // Conversions
0038 #include "CommonTools/Egamma/interface/ConversionTools.h"
0039 
0040 // Trigger
0041 #include "DataFormats/Common/interface/TriggerResults.h"
0042 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
0043 #include "DataFormats/HLTReco/interface/TriggerObject.h"
0044 #include "FWCore/Common/interface/TriggerNames.h"
0045 
0046 class DQMExample_Step1 : public DQMEDAnalyzer {
0047 public:
0048   DQMExample_Step1(const edm::ParameterSet &ps);
0049   ~DQMExample_Step1() override;
0050 
0051 protected:
0052   void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override;
0053   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0054   void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override;
0055 
0056 private:
0057   // histos booking function
0058   void bookHistos(DQMStore::IBooker &);
0059 
0060   // other functions
0061   bool MediumEle(const edm::Event &iEvent, const edm::EventSetup &iESetup, const reco::GsfElectron &electron);
0062   double Distance(const reco::Candidate &c1, const reco::Candidate &c2);
0063   double DistancePhi(const reco::Candidate &c1, const reco::Candidate &c2);
0064   double calcDeltaPhi(double phi1, double phi2);
0065 
0066   // private variables
0067   math::XYZPoint PVPoint_;
0068 
0069   // variables from config file
0070   edm::EDGetTokenT<reco::GsfElectronCollection> theElectronCollection_;
0071   edm::EDGetTokenT<reco::ConversionCollection> theConversionCollection_;
0072   edm::EDGetTokenT<reco::CaloJetCollection> theCaloJetCollection_;
0073   edm::EDGetTokenT<reco::PFMETCollection> thePfMETCollection_;
0074   edm::EDGetTokenT<reco::VertexCollection> thePVCollection_;
0075   edm::EDGetTokenT<reco::BeamSpot> theBSCollection_;
0076   edm::EDGetTokenT<trigger::TriggerEvent> triggerEvent_;
0077   edm::EDGetTokenT<edm::TriggerResults> triggerResults_;
0078   edm::InputTag triggerFilter_;
0079   std::string triggerPath_;
0080 
0081   double ptThrL1_;
0082   double ptThrL2_;
0083   double ptThrJet_;
0084   double ptThrMet_;
0085 
0086   int nElectrons;
0087   int nBJets;
0088 
0089   // Histograms
0090   MonitorElement *h_vertex_number;
0091 
0092   MonitorElement *h_pfMet;
0093 
0094   MonitorElement *h_eMultiplicity;
0095   MonitorElement *h_ePt_leading;
0096   MonitorElement *h_eEta_leading;
0097   MonitorElement *h_ePhi_leading;
0098   MonitorElement *h_ePt_leading_matched;
0099   MonitorElement *h_eEta_leading_matched;
0100   MonitorElement *h_ePhi_leading_matched;
0101 
0102   MonitorElement *h_eMultiplicity_HLT;
0103   MonitorElement *h_ePt_leading_HLT;
0104   MonitorElement *h_eEta_leading_HLT;
0105   MonitorElement *h_ePhi_leading_HLT;
0106   MonitorElement *h_ePt_leading_HLT_matched;
0107   MonitorElement *h_eEta_leading_HLT_matched;
0108   MonitorElement *h_ePhi_leading_HLT_matched;
0109 
0110   MonitorElement *h_jMultiplicity;
0111   MonitorElement *h_jPt_leading;
0112   MonitorElement *h_jEta_leading;
0113   MonitorElement *h_jPhi_leading;
0114 
0115   MonitorElement *h_ePt_diff;
0116 };
0117 
0118 #endif