EwkMuLumiMonitorDQM

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
#ifndef EwkMuLumiMonitorDQM_H
#define EwkMuLumiMonitorDQM_H

/** \class EwkMuLumiMonitorDQM
 *
 *  DQM offline for EWK MuLumiMonitor: intended for luminosity purposes using
 *Z/W
 *  \authors:  Michele de Gruttola, INFN Naples - Maria Cepeda, CIEMAT
 *  on behalf EWK-Muon group
 *
 */

#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/MakerMacros.h"

#include "FWCore/Utilities/interface/InputTag.h"
#include "DataFormats/Candidate/interface/Candidate.h"
#include "DataFormats/Candidate/interface/CandidateFwd.h"
#include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
#include "DataFormats/RecoCandidate/interface/IsoDepositFwd.h"
#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
#include "DataFormats/MuonReco/interface/Muon.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/CaloTowers/interface/CaloTowerDefs.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DQMServices/Core/interface/DQMStore.h"

namespace trigger {
  class TriggerEvent;
}
namespace reco {
  class BeamSpot;
  class MET;
}  // namespace reco

class EwkMuLumiMonitorDQM : public DQMEDAnalyzer {
public:
  EwkMuLumiMonitorDQM(const edm::ParameterSet&);
  void analyze(const edm::Event&, const edm::EventSetup&) override;
  //Book histograms
  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
  void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;

  void init_histograms();
  double muIso(const reco::Muon&);
  double tkIso(const reco::Track&, edm::Handle<reco::TrackCollection>, edm::Handle<CaloTowerCollection>);
  bool IsMuMatchedToHLTMu(const reco::Muon&, const std::vector<reco::Particle>&, double, double);

private:
  edm::InputTag trigTag_;
  edm::EDGetTokenT<edm::TriggerResults> trigToken_;
  edm::EDGetTokenT<trigger::TriggerEvent> trigEvToken_;
  edm::EDGetTokenT<reco::BeamSpot> beamSpotToken_;  // offlineBeamSpot
  edm::EDGetTokenT<edm::View<reco::Muon> > muonToken_;
  edm::EDGetTokenT<reco::TrackCollection> trackToken_;
  edm::EDGetTokenT<CaloTowerCollection> caloTowerToken_;
  edm::EDGetTokenT<edm::View<reco::MET> > metToken_;
  bool metIncludesMuons_;

  // const std::string hltPath_;
  //  const std::string L3FilterName_;

  double ptMuCut_;
  double etaMuCut_;

  bool isRelativeIso_;
  bool isCombinedIso_;
  double isoCut03_;

  double deltaRTrk_;
  double ptThreshold_;
  double deltaRVetoTrk_;
  double maxDPtRel_;
  double maxDeltaR_;
  double mtMin_;
  double mtMax_;
  double acopCut_;
  double dxyCut_;

  MonitorElement* mass2HLT_;
  MonitorElement* highMass2HLT_;
  // MonitorElement* highest_mupt2HLT_;
  // MonitorElement* lowest_mupt2HLT_;

  MonitorElement* mass1HLT_;
  MonitorElement* highMass1HLT_;
  //  MonitorElement* highest_mupt1HLT_;
  // MonitorElement* lowest_mupt1HLT_;

  MonitorElement* massNotIso_;
  MonitorElement* highMassNotIso_;
  // MonitorElement* highest_muptNotIso_;
  // MonitorElement* lowest_muptNotIso_;

  MonitorElement* massGlbSta_;
  MonitorElement* highMassGlbSta_;
  // MonitorElement* highest_muptGlbSta_;
  // MonitorElement* lowest_muptGlbSta_;

  MonitorElement* massGlbTrk_;
  MonitorElement* highMassGlbTrk_;
  //  MonitorElement* highest_muptGlbTrk_;
  // MonitorElement* lowest_muptGlbTrk_;

  MonitorElement* TMass_;

  MonitorElement* massIsBothGlbTrkThanW_;
  MonitorElement* highMassIsBothGlbTrkThanW_;

  unsigned int nall;
  unsigned int nEvWithHighPtMu;
  unsigned int nInKinRange;
  unsigned int nsel;
  unsigned int niso;
  unsigned int nhlt;
  unsigned int n1hlt;
  unsigned int n2hlt;
  unsigned int nNotIso;
  unsigned int nGlbSta;
  unsigned int nGlbTrk;
  unsigned int nTMass;
  unsigned int nW;

  bool isZGolden1HLT_;
  bool isZGolden2HLT_;
  bool isZGoldenNoIso_;
  bool isZGlbSta_;
  bool isZGlbTrk_;
  bool isW_;

  bool isValidHltConfig_;
  HLTConfigProvider hltConfigProvider_;
};

#endif

/* Local Variables: */
/* show-trailing-whitespace: t */
/* truncate-lines: t */
/* End: */