102 : folderName_(iConfig.getParameter<
std::
string>(
"FolderName")),
103 requireValidHLTPaths_(iConfig.getParameter<
bool>(
"requireValidHLTPaths")),
104 hltPathsAreValid_(
false),
105 metInputTag_(iConfig.getParameter<
edm::
InputTag>(
"met")),
106 jetInputTag_(iConfig.getParameter<
edm::
InputTag>(
"jets")),
107 eleInputTag_(iConfig.getParameter<
edm::
InputTag>(
"electrons")),
108 muoInputTag_(iConfig.getParameter<
edm::
InputTag>(
"muons")),
109 vtxInputTag_(iConfig.getParameter<
edm::
InputTag>(
"vertices")),
111 jetToken_(mayConsume<
reco::
JetView>(jetInputTag_)),
115 ht_variable_binning_(
116 iConfig.getParameter<
edm::
ParameterSet>(
"histoPSet").getParameter<
std::vector<double> >(
"htBinning")),
122 iConfig.getParameter<
edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
124 iConfig.getParameter<
edm::
ParameterSet>(
"denGenericTriggerEventPSet"), consumesCollector(), *this)),
125 metSelection_(iConfig.getParameter<
std::
string>(
"metSelection")),
126 jetSelection_(iConfig.getParameter<
std::
string>(
"jetSelection")),
127 eleSelection_(iConfig.getParameter<
std::
string>(
"eleSelection")),
128 muoSelection_(iConfig.getParameter<
std::
string>(
"muoSelection")),
129 jetSelection_HT_(iConfig.getParameter<
std::
string>(
"jetSelection_HT")),
130 njets_(iConfig.getParameter<unsigned>(
"njets")),
131 nelectrons_(iConfig.getParameter<unsigned>(
"nelectrons")),
132 nmuons_(iConfig.getParameter<unsigned>(
"nmuons")),
133 dEtaCut_(iConfig.getParameter<double>(
"dEtaCut")),
134 warningWasPrinted_(
false) {
141 }
else if (
quantity ==
"softdrop") {
145 <<
"the quantity '" <<
quantity <<
"' is undefined. Please check your config!" << std::endl;
185 histname =
"ht_variable";
191 histtitle =
"HT vs LS";
203 histname =
"deltaphi_metjet1";
204 histtitle =
"DPHI_METJ1";
208 histname =
"deltaphi_jet1jet2";
209 histtitle =
"DPHI_J1J2";
216 histname =
"mjj_variable";
224 histname =
"softdrop_variable";
225 histtitle =
"softdropmass";
249 <<
" is not available";
263 <<
" is not available";
268 std::vector<reco::Jet>
jets;
271 for (
auto const&
j : *jetHandle) {
280 float deltaPhi_met_j1 = 10.0;
281 float deltaPhi_j1_j2 = 10.0;
285 if (
jets.size() >= 2)
288 std::vector<reco::GsfElectron>
electrons;
294 for (
auto const&
e : *eleHandle) {
306 <<
" is not available";
318 for (
auto const&
v : *vtxHandle) {
319 bool isFake =
v.isFake();
332 <<
" is not available";
340 std::vector<reco::Muon>
muons;
344 if (muoHandle->size() <
nmuons_)
346 for (
auto const&
m : *muoHandle) {
347 if (
muoSelection_(
m) &&
m.isGlobalMuon() &&
m.isPFMuon() &&
m.globalTrack()->normalizedChi2() < 10. &&
348 m.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 &&
m.numberOfMatchedStations() > 1 &&
349 fabs(
m.muonBestTrack()->dxy(
vtx.position())) < 0.2 && fabs(
m.muonBestTrack()->dz(
vtx.position())) < 0.5 &&
350 m.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
351 m.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5)
362 <<
" is not available";
374 for (
auto const&
j : *jetHandle) {
385 int ls =
iEvent.id().luminosityBlock();
408 float mjj = (
jets[0].p4() +
jets[1].p4()).M();
428 float softdrop =
jets[0].p4().M();
445 desc.
add<
bool>(
"requireValidHLTPaths",
true);
457 desc.
add<
unsigned>(
"njets", 0);
458 desc.
add<
unsigned>(
"nelectrons", 0);
459 desc.
add<
unsigned>(
"nmuons", 0);
460 desc.
add<
double>(
"dEtaCut", 1.3);
483 std::vector<double>
bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140.,
484 150., 160., 170., 180., 190., 200., 220., 240., 260., 280., 300.,
485 350., 400., 450., 500., 550., 600., 650., 700., 750., 800., 850.,
486 900., 950., 1000., 1050., 1100., 1200., 1300., 1400., 1500., 2000., 2500.};
497 descriptions.
add(
"htMonitoring", desc);