Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:55:41

0001 #ifndef EwkMuLumiMonitorDQM_H
0002 #define EwkMuLumiMonitorDQM_H
0003 
0004 /** \class EwkMuLumiMonitorDQM
0005  *
0006  *  DQM offline for EWK MuLumiMonitor: intended for luminosity purposes using
0007  *Z/W
0008  *  \authors:  Michele de Gruttola, INFN Naples - Maria Cepeda, CIEMAT
0009  *  on behalf EWK-Muon group
0010  *
0011  */
0012 
0013 #include "FWCore/Framework/interface/Frameworkfwd.h"
0014 #include "FWCore/Framework/interface/MakerMacros.h"
0015 
0016 #include "FWCore/Utilities/interface/InputTag.h"
0017 #include "DataFormats/Candidate/interface/Candidate.h"
0018 #include "DataFormats/Candidate/interface/CandidateFwd.h"
0019 #include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
0020 #include "DataFormats/RecoCandidate/interface/IsoDepositFwd.h"
0021 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
0022 #include "DataFormats/MuonReco/interface/Muon.h"
0023 #include "DataFormats/TrackReco/interface/Track.h"
0024 #include "DataFormats/CaloTowers/interface/CaloTowerDefs.h"
0025 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0026 #include "DQMServices/Core/interface/DQMStore.h"
0027 
0028 namespace trigger {
0029   class TriggerEvent;
0030 }
0031 namespace reco {
0032   class BeamSpot;
0033   class MET;
0034 }  // namespace reco
0035 
0036 class EwkMuLumiMonitorDQM : public DQMEDAnalyzer {
0037 public:
0038   EwkMuLumiMonitorDQM(const edm::ParameterSet&);
0039   void analyze(const edm::Event&, const edm::EventSetup&) override;
0040   //Book histograms
0041   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0042   void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0043 
0044   void init_histograms();
0045   double muIso(const reco::Muon&);
0046   double tkIso(const reco::Track&, edm::Handle<reco::TrackCollection>, edm::Handle<CaloTowerCollection>);
0047   bool IsMuMatchedToHLTMu(const reco::Muon&, const std::vector<reco::Particle>&, double, double);
0048 
0049 private:
0050   edm::InputTag trigTag_;
0051   edm::EDGetTokenT<edm::TriggerResults> trigToken_;
0052   edm::EDGetTokenT<trigger::TriggerEvent> trigEvToken_;
0053   edm::EDGetTokenT<reco::BeamSpot> beamSpotToken_;  // offlineBeamSpot
0054   edm::EDGetTokenT<edm::View<reco::Muon> > muonToken_;
0055   edm::EDGetTokenT<reco::TrackCollection> trackToken_;
0056   edm::EDGetTokenT<CaloTowerCollection> caloTowerToken_;
0057   edm::EDGetTokenT<edm::View<reco::MET> > metToken_;
0058   bool metIncludesMuons_;
0059 
0060   // const std::string hltPath_;
0061   //  const std::string L3FilterName_;
0062 
0063   double ptMuCut_;
0064   double etaMuCut_;
0065 
0066   bool isRelativeIso_;
0067   bool isCombinedIso_;
0068   double isoCut03_;
0069 
0070   double deltaRTrk_;
0071   double ptThreshold_;
0072   double deltaRVetoTrk_;
0073   double maxDPtRel_;
0074   double maxDeltaR_;
0075   double mtMin_;
0076   double mtMax_;
0077   double acopCut_;
0078   double dxyCut_;
0079 
0080   MonitorElement* mass2HLT_;
0081   MonitorElement* highMass2HLT_;
0082   // MonitorElement* highest_mupt2HLT_;
0083   // MonitorElement* lowest_mupt2HLT_;
0084 
0085   MonitorElement* mass1HLT_;
0086   MonitorElement* highMass1HLT_;
0087   //  MonitorElement* highest_mupt1HLT_;
0088   // MonitorElement* lowest_mupt1HLT_;
0089 
0090   MonitorElement* massNotIso_;
0091   MonitorElement* highMassNotIso_;
0092   // MonitorElement* highest_muptNotIso_;
0093   // MonitorElement* lowest_muptNotIso_;
0094 
0095   MonitorElement* massGlbSta_;
0096   MonitorElement* highMassGlbSta_;
0097   // MonitorElement* highest_muptGlbSta_;
0098   // MonitorElement* lowest_muptGlbSta_;
0099 
0100   MonitorElement* massGlbTrk_;
0101   MonitorElement* highMassGlbTrk_;
0102   //  MonitorElement* highest_muptGlbTrk_;
0103   // MonitorElement* lowest_muptGlbTrk_;
0104 
0105   MonitorElement* TMass_;
0106 
0107   MonitorElement* massIsBothGlbTrkThanW_;
0108   MonitorElement* highMassIsBothGlbTrkThanW_;
0109 
0110   unsigned int nall;
0111   unsigned int nEvWithHighPtMu;
0112   unsigned int nInKinRange;
0113   unsigned int nsel;
0114   unsigned int niso;
0115   unsigned int nhlt;
0116   unsigned int n1hlt;
0117   unsigned int n2hlt;
0118   unsigned int nNotIso;
0119   unsigned int nGlbSta;
0120   unsigned int nGlbTrk;
0121   unsigned int nTMass;
0122   unsigned int nW;
0123 
0124   bool isZGolden1HLT_;
0125   bool isZGolden2HLT_;
0126   bool isZGoldenNoIso_;
0127   bool isZGlbSta_;
0128   bool isZGlbTrk_;
0129   bool isW_;
0130 
0131   bool isValidHltConfig_;
0132   HLTConfigProvider hltConfigProvider_;
0133 };
0134 
0135 #endif
0136 
0137 /* Local Variables: */
0138 /* show-trailing-whitespace: t */
0139 /* truncate-lines: t */
0140 /* End: */