96 : folderName_(iConfig.getParameter<
std::
string>(
"FolderName")),
97 requireValidHLTPaths_(iConfig.getParameter<
bool>(
"requireValidHLTPaths")),
98 hltPathsAreValid_(
false),
104 hltMetTag_(iConfig.getParameter<
edm::
InputTag>(
"hltMetFilter")),
105 hltMetCleanTag_(iConfig.getParameter<
edm::
InputTag>(
"hltMetCleanFilter")),
106 trackLegFilterTag_(iConfig.getParameter<
edm::
InputTag>(
"trackLegFilter")),
107 met_variable_binning_(
109 muonPt_variable_binning_(
111 met_binning_(getHistoPSet(
117 eta_binning_(getHistoPSet(
119 phi_binning_(getHistoPSet(
122 iConfig.getParameter<
edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
124 iConfig.getParameter<
edm::
ParameterSet>(
"denGenericTriggerEventPSet"), consumesCollector(), *this)),
125 metSelection_(iConfig.getParameter<
std::
string>(
"metSelection")),
126 muonSelection_(iConfig.getParameter<
std::
string>(
"muonSelection")),
127 jetSelection_(iConfig.getParameter<
std::
string>(
"jetSelection")),
128 vtxSelection_(iConfig.getParameter<
std::
string>(
"vtxSelection")),
129 nmuons_(iConfig.getParameter<unsigned>(
"nmuons")),
130 njets_(iConfig.getParameter<unsigned>(
"njets")),
131 leadJetEtaCut_(iConfig.getParameter<double>(
"leadJetEtaCut")),
132 requireLeadMatched_(iConfig.getParameter<
bool>(
"requireLeadMatched")),
133 maxMatchDeltaR_(iConfig.getParameter<double>(
"maxMatchDeltaR")) {}
163 histname =
"met_variable";
164 histtitle =
"CaloMET";
168 histname =
"metVsLS";
169 histtitle =
"CaloMET vs LS";
182 histtitle =
"CaloMET phi";
186 histname =
"deltaphi_metjet1";
187 histtitle =
"dPhi(CaloMET, jet1)";
191 histname =
"metVsHltMet";
192 histtitle =
"CaloMET vs hltMet";
205 histname =
"metVsHltMetClean";
206 histtitle =
"CaloMET vs hltMetClean";
221 histname =
"muonPt_variable";
222 histtitle =
"Muon PT";
226 histname =
"muonEta";
227 histtitle =
"Muon eta";
231 histname =
"deltaphi_muonmet";
232 histtitle =
"dPhi(Muon, CaloMET)";
236 histname =
"muonEtaVsPhi";
237 histtitle =
"Muon eta vs phi";
250 histname =
"muonPtVsLS";
251 histtitle =
"Muon PT vs LS";
286 if (jetsHandle->size() <
njets_)
288 std::vector<reco::PFJet>
jets;
289 for (
auto const&
j : *jetsHandle) {
315 if (muonHandle->size() <
nmuons_)
317 std::vector<reco::Muon>
muons;
318 for (
auto const&
m : *muonHandle) {
334 int ls =
iEvent.id().luminosityBlock();
341 edm::LogError(
"METplusTrackMonitor") <<
"Invalid collection: TriggerSummary"
350 if (!passesHltMetFilter || !passesHltMetCleanFilter)
362 double leadMuonPt = !(
muons.empty()) ?
muons[0].
pt() : -1.0;
363 double leadMuonEta = !(
muons.empty()) ?
muons[0].
eta() : 10.0;
364 double leadMuonPhi = !(
muons.empty()) ?
muons[0].
phi() : 10.0;
378 if (!passesTrackLegFilter)
400 double leadingPt = -1.0;
402 size_t filterIndex =
trigSummary->filterIndex(filterTag);
405 if (!(filterIndex >=
trigSummary->sizeFilters())) {
407 for (
unsigned short key :
keys) {
409 if (foundObject.
pt() > leadingPt) {
411 leadingPt =
obj.pt();
416 return (leadingPt > 0.0);
422 desc.add<
bool>(
"requireValidHLTPaths",
true);
438 desc.add<
unsigned>(
"njets", 0);
439 desc.add<
unsigned>(
"nmuons", 0);
440 desc.add<
double>(
"leadJetEtaCut", 2.4);
441 desc.add<
bool>(
"requireLeadMatched",
true);
442 desc.add<
double>(
"maxMatchDeltaR", 0.1);
477 std::vector<double>
bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
478 170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
489 descriptions.
add(
"metPlusTrackMonitoring",
desc);