File indexing completed on 2024-04-06 12:08:05
0001 #ifndef HiggsDQM_H
0002 #define HiggsDQM_H
0003
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "FWCore/Framework/interface/ESHandle.h"
0006 #include "FWCore/Framework/interface/LuminosityBlock.h"
0007 #include "FWCore/Framework/interface/Run.h"
0008 #include "FWCore/Framework/interface/Event.h"
0009 #include "FWCore/Framework/interface/EventSetup.h"
0010 #include "FWCore/Utilities/interface/InputTag.h"
0011 #include "DataFormats/Candidate/interface/Candidate.h"
0012 #include "DataFormats/Candidate/interface/CandidateFwd.h"
0013 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
0014 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0015 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0016 #include "DataFormats/JetReco/interface/CaloJet.h"
0017 #include "DataFormats/METReco/interface/CaloMETCollection.h"
0018 #include "DataFormats/METReco/interface/PFMETCollection.h"
0019 #include "DataFormats/METReco/interface/METCollection.h"
0020
0021
0022 #include "DataFormats/Common/interface/TriggerResults.h"
0023
0024 #include "DataFormats/Common/interface/Handle.h"
0025 #include "FWCore/Framework/interface/DataKeyTags.h"
0026 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0027 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
0028
0029 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0030 #include "DataFormats/GeometryCommonDetAlgo/interface/Measurement1D.h"
0031 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0032
0033 #include "DQMServices/Core/interface/DQMStore.h"
0034 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0035
0036 #include <iostream>
0037 #include <fstream>
0038 #include <string>
0039 #include <vector>
0040 #include <map>
0041
0042 class HiggsDQM : public DQMEDAnalyzer {
0043 public:
0044 HiggsDQM(const edm::ParameterSet& ps);
0045 ~HiggsDQM() override;
0046
0047 protected:
0048
0049 void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0050 void analyze(edm::Event const& e, edm::EventSetup const& eSetup) override;
0051
0052 private:
0053 double Distance(const reco::Candidate& c1, const reco::Candidate& c2);
0054 double DistancePhi(const reco::Candidate& c1, const reco::Candidate& c2);
0055 double calcDeltaPhi(double phi1, double phi2);
0056 void bookHistos(DQMStore* bei);
0057
0058 unsigned long long m_cacheID_;
0059 int nEvents_, irun, ievt;
0060 reco::CandidateCollection* leptonscands_;
0061 int leptonflavor;
0062 float pi;
0063
0064
0065 std::string theElecTriggerPathToPass;
0066 std::string theMuonTriggerPathToPass;
0067 edm::InputTag theTriggerResultsCollectionTag_;
0068 edm::InputTag theCaloJetCollectionLabel_;
0069 edm::EDGetTokenT<edm::TriggerResults> theTriggerResultsCollection_;
0070 edm::EDGetTokenT<reco::VertexCollection> vertexToken_;
0071 edm::EDGetTokenT<reco::MuonCollection> theMuonCollectionToken_;
0072 edm::EDGetTokenT<reco::GsfElectronCollection> theElectronCollectionToken_;
0073 edm::EDGetTokenT<reco::CaloJetCollection> theCaloJetCollectionToken_;
0074 edm::EDGetTokenT<reco::CaloMETCollection> theCaloMETCollectionToken_;
0075 edm::EDGetTokenT<reco::PFMETCollection> thePfMETCollectionToken_;
0076 double ptThrMu1_;
0077 double ptThrMu2_;
0078
0079
0080 MonitorElement* h_vertex_number;
0081 MonitorElement* h_vertex_chi2;
0082 MonitorElement* h_vertex_d0;
0083 MonitorElement* h_vertex_numTrks;
0084 MonitorElement* h_vertex_sumTrks;
0085 MonitorElement* h_jet_et;
0086 MonitorElement* h_jet2_et;
0087 MonitorElement* h_jet_count;
0088 MonitorElement* h_caloMet;
0089 MonitorElement* h_caloMet_phi;
0090 MonitorElement* h_pfMet;
0091 MonitorElement* h_pfMet_phi;
0092 int nfourlept, nElectron, nMuon, nLepton, nZEE, nZMuMu, nHiggs, nLooseIsolEle, nLooseIsolMu;
0093 MonitorElement* h_eMultiplicity;
0094 MonitorElement* h_mMultiplicity;
0095 MonitorElement* h_ePt;
0096 MonitorElement* h_eEta;
0097 MonitorElement* h_ePhi;
0098 MonitorElement* h_mPt_GMTM;
0099 MonitorElement* h_mEta_GMTM;
0100 MonitorElement* h_mPhi_GMTM;
0101 MonitorElement* h_mPt_GMPT;
0102 MonitorElement* h_mEta_GMPT;
0103 MonitorElement* h_mPhi_GMPT;
0104 MonitorElement* h_mPt_GM;
0105 MonitorElement* h_mEta_GM;
0106 MonitorElement* h_mPhi_GM;
0107 MonitorElement* h_mPt_TM;
0108 MonitorElement* h_mEta_TM;
0109 MonitorElement* h_mPhi_TM;
0110 MonitorElement* h_mPt_STAM;
0111 MonitorElement* h_mEta_STAM;
0112 MonitorElement* h_mPhi_STAM;
0113 MonitorElement* h_eCombIso;
0114 MonitorElement* h_mCombIso;
0115 MonitorElement* h_dimumass_GMGM;
0116 MonitorElement* h_dimumass_GMTM;
0117 MonitorElement* h_dimumass_TMTM;
0118 MonitorElement* h_dielemass;
0119 MonitorElement* h_lepcounts;
0120 };
0121
0122 #endif
0123
0124
0125
0126
0127