CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
METplusTrackMonitor Class Reference

#include <METplusTrackMonitor.h>

Inheritance diagram for METplusTrackMonitor:
one::DQMEDAnalyzer< T > TriggerDQMBase one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 METplusTrackMonitor (const edm::ParameterSet &)
 
 ~METplusTrackMonitor ()(true) override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from TriggerDQMBase
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbins, double xmin, double xmax)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbinsX, double xmin, double xmax, double ymin, double ymax)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbinsX, double xmin, double xmax, unsigned nbinsY, double ymin, double ymax)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const std::vector< double > &binningY)
 
void setMETitle (ObjME &me, const std::string &titleX, const std::string &titleY)
 
 TriggerDQMBase ()=default
 
virtual ~TriggerDQMBase ()=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from TriggerDQMBase
static void fillHistoLSPSetDescription (edm::ParameterSetDescription &pset)
 
static void fillHistoPSetDescription (edm::ParameterSetDescription &pset)
 
static MEbinning getHistoLSPSet (const edm::ParameterSet &pset)
 
static MEbinning getHistoPSet (const edm::ParameterSet &pset)
 

Protected Member Functions

void analyze (edm::Event const &iEvent, edm::EventSetup const &iSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 

Private Member Functions

bool getHLTObj (const edm::Handle< trigger::TriggerEvent > &trigSummary, const edm::InputTag &filterTag, trigger::TriggerObject &obj) const
 

Private Attributes

ObjME deltaphimetj1ME_
 
ObjME deltaphimetmuonME_
 
std::unique_ptr< GenericTriggerEventFlagden_genTriggerEventFlag_
 
MEbinning eta_binning_
 
std::string folderName_
 
std::string histoSuffix_
 
edm::InputTag hltMetCleanTag_
 
edm::InputTag hltMetTag_
 
StringCutObjectSelector< reco::PFJet, true > jetSelection_
 
edm::EDGetTokenT< reco::PFJetCollectionjetToken_
 
double leadJetEtaCut_
 
MEbinning ls_binning_
 
double maxMatchDeltaR_
 
MEbinning met_binning_
 
std::vector< double > met_variable_binning_
 
ObjME metME_variableBinning_
 
ObjME metPhiME_
 
StringCutObjectSelector< reco::CaloMET, true > metSelection_
 
edm::EDGetTokenT< reco::CaloMETCollectionmetToken_
 
ObjME metVsHltMet_
 
ObjME metVsHltMetClean_
 
ObjME metVsLS_
 
ObjME muonEtaME_
 
ObjME muonEtaVsPhi_
 
std::vector< double > muonPt_variable_binning_
 
ObjME muonPtME_variableBinning_
 
ObjME muonPtVsLS_
 
StringCutObjectSelector< reco::Muon, true > muonSelection_
 
edm::EDGetTokenT< reco::MuonCollectionmuonToken_
 
unsigned njets_
 
unsigned nmuons_
 
std::unique_ptr< GenericTriggerEventFlagnum_genTriggerEventFlag_
 
MEbinning phi_binning_
 
MEbinning pt_binning_
 
bool requireLeadMatched_
 
edm::EDGetTokenT< trigger::TriggerEventtheTrigSummary_
 
edm::InputTag trackLegFilterTag_
 
StringCutObjectSelector< reco::Vertex, true > vtxSelection_
 
edm::EDGetTokenT< reco::VertexCollectionvtxToken_
 

Detailed Description

Definition at line 50 of file METplusTrackMonitor.h.

Constructor & Destructor Documentation

METplusTrackMonitor::METplusTrackMonitor ( const edm::ParameterSet iConfig)

Definition at line 16 of file METplusTrackMonitor.cc.

References deltaphimetj1ME_, deltaphimetmuonME_, TriggerDQMBase::ObjME::denominator, metME_variableBinning_, metPhiME_, metVsHltMet_, metVsHltMetClean_, metVsLS_, muonEtaVsPhi_, muonPtME_variableBinning_, muonPtVsLS_, and TriggerDQMBase::ObjME::numerator.

16  :
17  folderName_ ( iConfig.getParameter<std::string>("FolderName") )
18  , metToken_ ( consumes<reco::CaloMETCollection> (iConfig.getParameter<edm::InputTag>("met") ) )
19  , muonToken_ ( consumes<reco::MuonCollection> (iConfig.getParameter<edm::InputTag>("muons") ) )
20  , jetToken_ ( consumes<reco::PFJetCollection> (iConfig.getParameter<edm::InputTag>("jets") ) )
21  , vtxToken_ ( consumes<reco::VertexCollection> (iConfig.getParameter<edm::InputTag>("vertices") ) )
22  , theTrigSummary_ ( consumes<trigger::TriggerEvent> (iConfig.getParameter<edm::InputTag>("trigSummary") ) )
23  , hltMetTag_ ( iConfig.getParameter<edm::InputTag>("hltMetFilter") )
24  , hltMetCleanTag_ ( iConfig.getParameter<edm::InputTag>("hltMetCleanFilter") )
25  , trackLegFilterTag_ ( iConfig.getParameter<edm::InputTag>("trackLegFilter") )
26  , met_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("metBinning") )
27  , muonPt_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("ptBinning") )
33  , num_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"), consumesCollector(), *this))
34  , den_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"), consumesCollector(), *this))
35  , metSelection_ ( iConfig.getParameter<std::string>("metSelection") )
36  , muonSelection_ ( iConfig.getParameter<std::string>("muonSelection") )
37  , jetSelection_ ( iConfig.getParameter<std::string>("jetSelection") )
38  , vtxSelection_ ( iConfig.getParameter<std::string>("vtxSelection") )
39  , nmuons_ ( iConfig.getParameter<unsigned>("nmuons") )
40  , njets_ ( iConfig.getParameter<unsigned>("njets") )
41  , leadJetEtaCut_ ( iConfig.getParameter<double>("leadJetEtaCut") )
42  , requireLeadMatched_ ( iConfig.getParameter<bool>("requireLeadMatched") )
43  , maxMatchDeltaR_ ( iConfig.getParameter<double>("maxMatchDeltaR") )
44 {
45 
48  metVsLS_.numerator = nullptr;
49  metVsLS_.denominator = nullptr;
50  metPhiME_.numerator = nullptr;
51  metPhiME_.denominator = nullptr;
52  deltaphimetj1ME_.numerator = nullptr;
53  deltaphimetj1ME_.denominator = nullptr;
54  metVsHltMet_.numerator = nullptr; // numerator only, only available from passed filter
55  metVsHltMetClean_.numerator = nullptr; // numerator only, only available from passed filter
56 
59  muonPtVsLS_.numerator = nullptr;
60  muonPtVsLS_.denominator = nullptr;
61  deltaphimetmuonME_.numerator = nullptr;
63  muonEtaVsPhi_.numerator = nullptr;
64  muonEtaVsPhi_.denominator = nullptr;
65 
66 }
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
T getParameter(std::string const &) const
MonitorElement * numerator
edm::InputTag hltMetCleanTag_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
edm::InputTag trackLegFilterTag_
std::vector< double > muonPt_variable_binning_
edm::EDGetTokenT< reco::MuonCollection > muonToken_
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
MonitorElement * denominator
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
std::vector< double > met_variable_binning_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
StringCutObjectSelector< reco::CaloMET, true > metSelection_
StringCutObjectSelector< reco::PFJet, true > jetSelection_
StringCutObjectSelector< reco::Muon, true > muonSelection_
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
StringCutObjectSelector< reco::Vertex, true > vtxSelection_
edm::EDGetTokenT< reco::CaloMETCollection > metToken_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
METplusTrackMonitor::~METplusTrackMonitor ( )
inlineoverride

Definition at line 55 of file METplusTrackMonitor.h.

References analyze(), bookHistograms(), fillDescriptions(), getHLTObj(), iEvent, and haddnano::obj.

55 { }

Member Function Documentation

void METplusTrackMonitor::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprotected

Definition at line 131 of file METplusTrackMonitor.cc.

References CaloMET_cfi::caloMet, hiPixelPairStep_cff::deltaPhi, deltaphimetj1ME_, deltaphimetmuonME_, boostedElectronIsolation_cff::deltaR, den_genTriggerEventFlag_, TriggerDQMBase::ObjME::denominator, PVValHelper::eta, MonitorElement::Fill(), edm::Event::getByToken(), getHLTObj(), hltMetCleanTag_, hltMetTag_, edm::EventBase::id(), muon::isTightMuon(), edm::HandleBase::isValid(), fwrapper::jets, jetSelection_, jetToken_, leadJetEtaCut_, eostools::ls(), edm::EventID::luminosityBlock(), funct::m, maxMatchDeltaR_, RazorAnalyzer::met, metME_variableBinning_, metPhiME_, metSelection_, metToken_, metVsHltMet_, metVsHltMetClean_, metVsLS_, reco::HitPattern::MISSING_INNER_HITS, muonEtaME_, muonEtaVsPhi_, muonPtME_variableBinning_, muonPtVsLS_, extraflags_cff::muons, muonSelection_, muonToken_, njets_, nmuons_, num_genTriggerEventFlag_, TriggerDQMBase::ObjME::numerator, phi, reco::LeafCandidate::phi(), jets_cff::primaryVertices, EnergyCorrector::pt, trigger::TriggerObject::pt(), reco::LeafCandidate::pt(), MetAnalyzer::pv(), requireLeadMatched_, theTrigSummary_, reco::HitPattern::TRACK_HITS, trackLegFilterTag_, findQualityFiles::v, vtxSelection_, and vtxToken_.

Referenced by ~METplusTrackMonitor().

132  {
133 
134  // Filter out events if Trigger Filtering is requested
135  if(den_genTriggerEventFlag_->on() && !den_genTriggerEventFlag_->accept(iEvent, iSetup)) return;
136 
138  iEvent.getByToken(metToken_, metHandle);
139  reco::CaloMET caloMet = metHandle->front();
140  if(!metSelection_(caloMet)) return;
141 
142  float met = caloMet.pt();
143  float metPhi = caloMet.phi();
144 
146  iEvent.getByToken(jetToken_, jetsHandle);
147  if(jetsHandle->size() < njets_) return;
148  std::vector<reco::PFJet> jets;
149  for(auto const & j : *jetsHandle) {
150  if(jetSelection_(j)) jets.push_back(j);
151  }
152  if(jets.size() < njets_) return;
153  if(njets_ > 0 && !(jets.empty()) && fabs(jets[0].eta()) > leadJetEtaCut_) return;
154  float deltaphi_metjet1 = !(jets.empty()) ? fabs(deltaPhi(caloMet.phi(), jets[0].phi())) : 10.0;
155 
157  iEvent.getByToken(vtxToken_, primaryVertices);
158  if(primaryVertices->empty()) return;
159  const reco::Vertex* pv = nullptr;
160  for(auto const& v: *primaryVertices) {
161  if (!vtxSelection_(v)) continue;
162  pv = &v;
163  break;
164  }
165  if(pv == nullptr) return;
166 
168  iEvent.getByToken(muonToken_, muonHandle);
169  if(muonHandle->size() < nmuons_) return;
170  std::vector<reco::Muon> muons;
171  for(auto const & m : *muonHandle) {
172  bool passTightID = muon::isTightMuon(m, *pv) &&
173  m.innerTrack()->hitPattern().trackerLayersWithoutMeasurement(reco::HitPattern::MISSING_INNER_HITS) == 0 &&
174  m.innerTrack()->hitPattern().trackerLayersWithoutMeasurement(reco::HitPattern::TRACK_HITS) == 0;
175  if(muonSelection_(m) && passTightID) muons.push_back(m);
176  }
177  if(muons.size() < nmuons_) return;
178 
179  // Filling MET leg histograms (denominator)
181  metPhiME_.denominator->Fill(metPhi);
182  deltaphimetj1ME_.denominator->Fill(deltaphi_metjet1);
183 
184  int ls = iEvent.id().luminosityBlock();
185  metVsLS_.denominator->Fill(ls, met);
186 
187  // Apply the selection for the MET leg numerator
188  edm::Handle<trigger::TriggerEvent> triggerSummary;
189  iEvent.getByToken(theTrigSummary_, triggerSummary);
190  if(!triggerSummary.isValid()) {
191  edm::LogError("METplusTrackMonitor") << "Invalid collection: TriggerSummary" << "\n";
192  return;
193  }
194 
195  trigger::TriggerObject hltMet, hltMetClean;
196  bool passesHltMetFilter = getHLTObj(triggerSummary, hltMetTag_, hltMet);
197  bool passesHltMetCleanFilter = getHLTObj(triggerSummary, hltMetCleanTag_, hltMetClean);
198 
199  if(!passesHltMetFilter || !passesHltMetCleanFilter) return;
200 
201  // Filling MET leg histograms (numerator)
203  metPhiME_.numerator->Fill(metPhi);
204  deltaphimetj1ME_.numerator->Fill(deltaphi_metjet1);
205  metVsLS_.numerator->Fill(ls, met);
206  metVsHltMet_.numerator->Fill(hltMet.pt(), met);
207  metVsHltMetClean_.numerator->Fill(hltMetClean.pt(), met);
208 
209  // Filling track leg histograms (denominator)
210  double leadMuonPt = !(muons.empty()) ? muons[0].pt() : -1.0;
211  double leadMuonEta = !(muons.empty()) ? muons[0].eta() : 10.0;
212  double leadMuonPhi = !(muons.empty()) ? muons[0].phi() : 10.0;
213  float deltaphi_metmuon = !(muons.empty()) ? fabs(deltaPhi(caloMet.phi(), muons[0].phi())) : 10.0;
214 
216  muonPtVsLS_.denominator->Fill(ls, leadMuonPt);
217  muonEtaME_.denominator->Fill(leadMuonEta);
218  deltaphimetmuonME_.denominator->Fill(deltaphi_metmuon);
219  muonEtaVsPhi_.denominator->Fill(leadMuonPhi, leadMuonEta);
220 
221  // Apply the selection for the track leg numerator
222  trigger::TriggerObject isoTrk;
223  bool passesTrackLegFilter = getHLTObj(triggerSummary, trackLegFilterTag_, isoTrk);
224 
225  // require track leg filter
226  if(!passesTrackLegFilter) return;
227 
228  // if requested, require lead selected muon is matched to the track leg filter object
229  if(requireLeadMatched_ && !(muons.empty()) && deltaR(muons[0], isoTrk) < maxMatchDeltaR_) return;
230 
231  // require the full HLT path is fired
232  if(num_genTriggerEventFlag_->on() && !num_genTriggerEventFlag_->accept(iEvent, iSetup)) return;
233 
234  // Filling track leg histograms (denominator)
236  muonPtVsLS_.numerator->Fill(ls, leadMuonPt);
237  muonEtaME_.numerator->Fill(leadMuonEta);
238  deltaphimetmuonME_.numerator->Fill(deltaphi_metmuon);
239  muonEtaVsPhi_.numerator->Fill(leadMuonPhi, leadMuonEta);
240 
241 }
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
MonitorElement * numerator
edm::InputTag hltMetCleanTag_
bool getHLTObj(const edm::Handle< trigger::TriggerEvent > &trigSummary, const edm::InputTag &filterTag, trigger::TriggerObject &obj) const
double pt() const final
transverse momentum
edm::InputTag trackLegFilterTag_
edm::EDGetTokenT< reco::MuonCollection > muonToken_
void Fill(long long x)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
int iEvent
Definition: GenABIO.cc:224
MonitorElement * denominator
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
vector< PseudoJet > jets
def pv(vc)
Definition: MetAnalyzer.py:7
bool isValid() const
Definition: HandleBase.h:74
caloMet
____________________________________________________________________________||
Definition: CaloMET_cfi.py:4
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
StringCutObjectSelector< reco::CaloMET, true > metSelection_
StringCutObjectSelector< reco::PFJet, true > jetSelection_
def ls(path, rec=False)
Definition: eostools.py:349
StringCutObjectSelector< reco::Muon, true > muonSelection_
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
primaryVertices
Definition: jets_cff.py:24
met
===> hadronic RAZOR
StringCutObjectSelector< reco::Vertex, true > vtxSelection_
edm::EDGetTokenT< reco::CaloMETCollection > metToken_
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
double phi() const final
momentum azimuthal angle
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
void METplusTrackMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotected

Definition at line 68 of file METplusTrackMonitor.cc.

References TriggerDQMBase::bookME(), deltaphimetj1ME_, deltaphimetmuonME_, den_genTriggerEventFlag_, eta_binning_, folderName_, ls_binning_, met_binning_, met_variable_binning_, metME_variableBinning_, metPhiME_, metVsHltMet_, metVsHltMetClean_, metVsLS_, muonEtaME_, muonEtaVsPhi_, muonPt_variable_binning_, muonPtME_variableBinning_, muonPtVsLS_, TriggerDQMBase::MEbinning::nbins, num_genTriggerEventFlag_, phi_binning_, pt_binning_, DQMStore::IBooker::setCurrentFolder(), TriggerDQMBase::setMETitle(), AlCaHLTBitMon_QueryRunRegistry::string, TriggerDQMBase::MEbinning::xmax, and TriggerDQMBase::MEbinning::xmin.

Referenced by ~METplusTrackMonitor().

71  {
72  std::string histname, histtitle;
73 
74  std::string currentFolder = folderName_;
75  ibooker.setCurrentFolder(currentFolder);
76 
77  // MET leg histograms
78 
79  histname = "met_variable"; histtitle = "CaloMET";
80  bookME(ibooker, metME_variableBinning_, histname, histtitle, met_variable_binning_);
81  setMETitle(metME_variableBinning_, "CaloMET [GeV]", "events / [GeV]");
82 
83  histname = "metVsLS"; histtitle = "CaloMET vs LS";
85  setMETitle(metVsLS_, "LS", "CaloMET [GeV]");
86 
87  histname = "metPhi"; histtitle = "CaloMET phi";
88  bookME(ibooker, metPhiME_, histname, histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
89  setMETitle(metPhiME_, "CaloMET #phi","events / 0.2 rad");
90 
91  histname = "deltaphi_metjet1"; histtitle = "dPhi(CaloMET, jet1)";
92  bookME(ibooker, deltaphimetj1ME_, histname, histtitle, phi_binning_.nbins, 0, phi_binning_.xmax);
93  setMETitle(deltaphimetj1ME_, "#Delta#phi (CaloMET, j1)", "events / 0.1 rad");
94 
95  histname = "metVsHltMet"; histtitle = "CaloMET vs hltMet";
97  setMETitle(metVsHltMet_, "hltMet (online) [GeV]", "CaloMET (offline) [GeV]");
98 
99  histname = "metVsHltMetClean"; histtitle = "CaloMET vs hltMetClean";
101  setMETitle(metVsHltMetClean_, "hltMetClean (online) [GeV]", "CaloMET (offline) [GeV]");
102 
103  // Track leg histograms
104 
105  histname = "muonPt_variable"; histtitle = "Muon PT";
106  bookME(ibooker, muonPtME_variableBinning_, histname, histtitle, muonPt_variable_binning_);
107  setMETitle(muonPtME_variableBinning_, "Muon p_{T} [GeV]", "events / [GeV]");
108 
109  histname = "muonEta"; histtitle = "Muon eta";
110  bookME(ibooker, muonEtaME_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
111  setMETitle(muonEtaME_, "Muon #eta", "events / 0.2");
112 
113  histname = "deltaphi_muonmet"; histtitle = "dPhi(Muon, CaloMET)";
114  bookME(ibooker, deltaphimetmuonME_, histname, histtitle, phi_binning_.nbins, 0, phi_binning_.xmax);
115  setMETitle(deltaphimetmuonME_, "#Delta#phi (Muon, CaloMET)", "events / 0.1 rad");
116 
117  histname = "muonEtaVsPhi"; histtitle = "Muon eta vs phi";
119  setMETitle(muonEtaVsPhi_, "Muon #phi", "Muon #eta");
120 
121  histname = "muonPtVsLS"; histtitle = "Muon PT vs LS";
123  setMETitle(muonPtVsLS_, "LS", "Muon p_{T} [GeV]");
124 
125  // Initialize the GenericTriggerEventFlag
128 
129  }
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
std::vector< double > muonPt_variable_binning_
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
std::vector< double > met_variable_binning_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbins, double xmin, double xmax)
void METplusTrackMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 243 of file METplusTrackMonitor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), create_public_pileup_plots::bins, TriggerDQMBase::fillHistoLSPSetDescription(), TriggerDQMBase::fillHistoPSetDescription(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ~METplusTrackMonitor().

244 {
246  desc.add<std::string> ( "FolderName", "HLT/MET" );
247 
248  desc.add<edm::InputTag>( "met", edm::InputTag("caloMet") );
249  desc.add<edm::InputTag>( "jets", edm::InputTag("ak4PFJetsCHS") );
250  desc.add<edm::InputTag>( "electrons", edm::InputTag("gedGsfElectrons") );
251  desc.add<edm::InputTag>( "muons", edm::InputTag("muons") );
252  desc.add<edm::InputTag>( "vertices", edm::InputTag("offlinePrimaryVertices") );
253  desc.add<edm::InputTag>( "trigSummary", edm::InputTag("hltTriggerSummaryAOD") );
254  desc.add<edm::InputTag>( "hltMetFilter", edm::InputTag("hltMET105", "", "HLT") );
255  desc.add<edm::InputTag>( "hltMetCleanFilter", edm::InputTag("hltMETClean65", "", "HLT") );
256  desc.add<edm::InputTag>( "trackLegFilter", edm::InputTag("hltTrk50Filter", "", "HLT") );
257 
258  desc.add<std::string>("metSelection", "pt > 0");
259  desc.add<std::string>("jetSelection", "pt > 0");
260  desc.add<std::string>("muonSelection", "pt > 0");
261  desc.add<std::string>("vtxSelection", "!isFake");
262  desc.add<unsigned>("njets", 0);
263  desc.add<unsigned>("nmuons", 0);
264  desc.add<double>("leadJetEtaCut", 2.4);
265  desc.add<bool>("requireLeadMatched", true);
266  desc.add<double>("maxMatchDeltaR", 0.1);
267 
268  edm::ParameterSetDescription genericTriggerEventPSet;
269  genericTriggerEventPSet.add<bool>("andOr");
270  genericTriggerEventPSet.add<edm::InputTag>("dcsInputTag", edm::InputTag("scalersRawToDigi") );
271  genericTriggerEventPSet.add<std::vector<int> >("dcsPartitions", {});
272  genericTriggerEventPSet.add<bool>("andOrDcs", false);
273  genericTriggerEventPSet.add<bool>("errorReplyDcs", true);
274  genericTriggerEventPSet.add<std::string>("dbLabel", "");
275  genericTriggerEventPSet.add<bool>("andOrHlt", true);
276  genericTriggerEventPSet.add<edm::InputTag>("hltInputTag", edm::InputTag("TriggerResults::HLT") );
277  genericTriggerEventPSet.add<std::vector<std::string> >("hltPaths", {});
278  genericTriggerEventPSet.add<std::string>("hltDBKey", "");
279  genericTriggerEventPSet.add<bool>("errorReplyHlt", false);
280  genericTriggerEventPSet.add<unsigned int>("verbosityLevel", 1);
281 
282  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
283  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
284 
290 
291  fillHistoPSetDescription(metPSet);
292  fillHistoPSetDescription(phiPSet);
293  fillHistoPSetDescription(ptPSet);
294  fillHistoPSetDescription(etaPSet);
295 
296  histoPSet.add<edm::ParameterSetDescription>("metPSet", metPSet);
297  histoPSet.add<edm::ParameterSetDescription>("phiPSet", phiPSet);
298  histoPSet.add<edm::ParameterSetDescription>("ptPSet", ptPSet);
299  histoPSet.add<edm::ParameterSetDescription>("etaPSet", etaPSet);
300 
301  std::vector<double> bins = {0.,20.,40.,60.,80.,90.,100.,110.,120.,130.,140.,150.,160.,170.,180.,190.,200.,220.,240.,260.,280.,300.,350.,400.,450.,1000.};
302 
303  histoPSet.add<std::vector<double> >("metBinning", bins);
304  histoPSet.add<std::vector<double> >("ptBinning", bins);
305 
308  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
309 
310  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
311 
312  descriptions.add("metPlusTrackMonitoring", desc);
313 }
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool METplusTrackMonitor::getHLTObj ( const edm::Handle< trigger::TriggerEvent > &  trigSummary,
const edm::InputTag filterTag,
trigger::TriggerObject obj 
) const
private

Definition at line 315 of file METplusTrackMonitor.cc.

References DEFINE_FWK_MODULE, trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), trigger::TriggerEvent::getObjects(), crabWrapper::key, relativeConstraints::keys, trigger::TriggerObject::pt(), trigger::TriggerEvent::sizeFilters(), and TriggerAnalyzer::triggerObjects.

Referenced by analyze(), and ~METplusTrackMonitor().

316 {
317 
318  double leadingPt = -1.0;
319 
320  size_t filterIndex = trigSummary->filterIndex( filterTag );
322 
323  if( !(filterIndex >= trigSummary->sizeFilters()) ) {
324  const trigger::Keys& keys = trigSummary->filterKeys( filterIndex );
325  for(unsigned short key : keys) {
326  trigger::TriggerObject foundObject = triggerObjects[key];
327  if(foundObject.pt() > leadingPt) {
328  obj = foundObject;
329  leadingPt = obj.pt();
330  }
331  }
332  }
333 
334  return (leadingPt > 0.0);
335 }
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:135
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:111
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:123
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:98
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
std::vector< size_type > Keys

Member Data Documentation

ObjME METplusTrackMonitor::deltaphimetj1ME_
private

Definition at line 92 of file METplusTrackMonitor.h.

Referenced by analyze(), bookHistograms(), and METplusTrackMonitor().

ObjME METplusTrackMonitor::deltaphimetmuonME_
private

Definition at line 99 of file METplusTrackMonitor.h.

Referenced by analyze(), bookHistograms(), and METplusTrackMonitor().

std::unique_ptr<GenericTriggerEventFlag> METplusTrackMonitor::den_genTriggerEventFlag_
private

Definition at line 103 of file METplusTrackMonitor.h.

Referenced by analyze(), and bookHistograms().

MEbinning METplusTrackMonitor::eta_binning_
private

Definition at line 86 of file METplusTrackMonitor.h.

Referenced by bookHistograms().

std::string METplusTrackMonitor::folderName_
private

Definition at line 67 of file METplusTrackMonitor.h.

Referenced by bookHistograms().

std::string METplusTrackMonitor::histoSuffix_
private

Definition at line 68 of file METplusTrackMonitor.h.

edm::InputTag METplusTrackMonitor::hltMetCleanTag_
private

Definition at line 77 of file METplusTrackMonitor.h.

Referenced by analyze().

edm::InputTag METplusTrackMonitor::hltMetTag_
private

Definition at line 76 of file METplusTrackMonitor.h.

Referenced by analyze().

StringCutObjectSelector<reco::PFJet, true> METplusTrackMonitor::jetSelection_
private

Definition at line 107 of file METplusTrackMonitor.h.

Referenced by analyze().

edm::EDGetTokenT<reco::PFJetCollection> METplusTrackMonitor::jetToken_
private

Definition at line 72 of file METplusTrackMonitor.h.

Referenced by analyze().

double METplusTrackMonitor::leadJetEtaCut_
private

Definition at line 113 of file METplusTrackMonitor.h.

Referenced by analyze().

MEbinning METplusTrackMonitor::ls_binning_
private

Definition at line 84 of file METplusTrackMonitor.h.

Referenced by bookHistograms().

double METplusTrackMonitor::maxMatchDeltaR_
private

Definition at line 116 of file METplusTrackMonitor.h.

Referenced by analyze().

MEbinning METplusTrackMonitor::met_binning_
private

Definition at line 83 of file METplusTrackMonitor.h.

Referenced by bookHistograms().

std::vector<double> METplusTrackMonitor::met_variable_binning_
private

Definition at line 80 of file METplusTrackMonitor.h.

Referenced by bookHistograms().

ObjME METplusTrackMonitor::metME_variableBinning_
private

Definition at line 89 of file METplusTrackMonitor.h.

Referenced by analyze(), bookHistograms(), and METplusTrackMonitor().

ObjME METplusTrackMonitor::metPhiME_
private

Definition at line 91 of file METplusTrackMonitor.h.

Referenced by analyze(), bookHistograms(), and METplusTrackMonitor().

StringCutObjectSelector<reco::CaloMET, true> METplusTrackMonitor::metSelection_
private

Definition at line 105 of file METplusTrackMonitor.h.

Referenced by analyze().

edm::EDGetTokenT<reco::CaloMETCollection> METplusTrackMonitor::metToken_
private

Definition at line 70 of file METplusTrackMonitor.h.

Referenced by analyze().

ObjME METplusTrackMonitor::metVsHltMet_
private

Definition at line 93 of file METplusTrackMonitor.h.

Referenced by analyze(), bookHistograms(), and METplusTrackMonitor().

ObjME METplusTrackMonitor::metVsHltMetClean_
private

Definition at line 94 of file METplusTrackMonitor.h.

Referenced by analyze(), bookHistograms(), and METplusTrackMonitor().

ObjME METplusTrackMonitor::metVsLS_
private

Definition at line 90 of file METplusTrackMonitor.h.

Referenced by analyze(), bookHistograms(), and METplusTrackMonitor().

ObjME METplusTrackMonitor::muonEtaME_
private

Definition at line 98 of file METplusTrackMonitor.h.

Referenced by analyze(), and bookHistograms().

ObjME METplusTrackMonitor::muonEtaVsPhi_
private

Definition at line 100 of file METplusTrackMonitor.h.

Referenced by analyze(), bookHistograms(), and METplusTrackMonitor().

std::vector<double> METplusTrackMonitor::muonPt_variable_binning_
private

Definition at line 81 of file METplusTrackMonitor.h.

Referenced by bookHistograms().

ObjME METplusTrackMonitor::muonPtME_variableBinning_
private

Definition at line 96 of file METplusTrackMonitor.h.

Referenced by analyze(), bookHistograms(), and METplusTrackMonitor().

ObjME METplusTrackMonitor::muonPtVsLS_
private

Definition at line 97 of file METplusTrackMonitor.h.

Referenced by analyze(), bookHistograms(), and METplusTrackMonitor().

StringCutObjectSelector<reco::Muon, true> METplusTrackMonitor::muonSelection_
private

Definition at line 106 of file METplusTrackMonitor.h.

Referenced by analyze().

edm::EDGetTokenT<reco::MuonCollection> METplusTrackMonitor::muonToken_
private

Definition at line 71 of file METplusTrackMonitor.h.

Referenced by analyze().

unsigned METplusTrackMonitor::njets_
private

Definition at line 111 of file METplusTrackMonitor.h.

Referenced by analyze().

unsigned METplusTrackMonitor::nmuons_
private

Definition at line 110 of file METplusTrackMonitor.h.

Referenced by analyze().

std::unique_ptr<GenericTriggerEventFlag> METplusTrackMonitor::num_genTriggerEventFlag_
private

Definition at line 102 of file METplusTrackMonitor.h.

Referenced by analyze(), and bookHistograms().

MEbinning METplusTrackMonitor::phi_binning_
private

Definition at line 87 of file METplusTrackMonitor.h.

Referenced by bookHistograms().

MEbinning METplusTrackMonitor::pt_binning_
private

Definition at line 85 of file METplusTrackMonitor.h.

Referenced by bookHistograms().

bool METplusTrackMonitor::requireLeadMatched_
private

Definition at line 115 of file METplusTrackMonitor.h.

Referenced by analyze().

edm::EDGetTokenT<trigger::TriggerEvent> METplusTrackMonitor::theTrigSummary_
private

Definition at line 74 of file METplusTrackMonitor.h.

Referenced by analyze().

edm::InputTag METplusTrackMonitor::trackLegFilterTag_
private

Definition at line 78 of file METplusTrackMonitor.h.

Referenced by analyze().

StringCutObjectSelector<reco::Vertex, true> METplusTrackMonitor::vtxSelection_
private

Definition at line 108 of file METplusTrackMonitor.h.

Referenced by analyze().

edm::EDGetTokenT<reco::VertexCollection> METplusTrackMonitor::vtxToken_
private

Definition at line 73 of file METplusTrackMonitor.h.

Referenced by analyze().