96 : folderName_(iConfig.getParameter<std::
string>(
"FolderName")),
97 requireValidHLTPaths_(iConfig.getParameter<bool>(
"requireValidHLTPaths")),
98 hltPathsAreValid_(
false),
103 theTrigSummary_(consumes<trigger::TriggerEvent>(iConfig.getParameter<edm::
InputTag>(
"trigSummary"))),
104 hltMetTag_(iConfig.getParameter<edm::
InputTag>(
"hltMetFilter")),
105 hltMetCleanTag_(iConfig.getParameter<edm::
InputTag>(
"hltMetCleanFilter")),
106 trackLegFilterTag_(iConfig.getParameter<edm::
InputTag>(
"trackLegFilter")),
108 iConfig.getParameter<edm::
ParameterSet>(
"histoPSet").getParameter<std::
vector<double> >(
"metBinning")),
109 muonPt_variable_binning_(
110 iConfig.getParameter<edm::
ParameterSet>(
"histoPSet").getParameter<std::
vector<double> >(
"ptBinning")),
122 iConfig.getParameter<edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
124 iConfig.getParameter<edm::
ParameterSet>(
"denGenericTriggerEventPSet"), consumesCollector(), *this)),
126 muonSelection_(iConfig.getParameter<std::
string>(
"muonSelection")),
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";
281 float met = caloMet.
pt();
282 float metPhi = caloMet.
phi();
286 if (jetsHandle->size() <
njets_)
288 std::vector<reco::PFJet>
jets;
289 for (
auto const&
j : *jetsHandle) {
297 float deltaphi_metjet1 = !(jets.empty()) ? fabs(
deltaPhi(caloMet.
phi(), jets[0].phi())) : 10.0;
301 if (primaryVertices->empty())
304 for (
auto const&
v : *primaryVertices) {
315 if (muonHandle->size() <
nmuons_)
317 std::vector<reco::Muon>
muons;
318 for (
auto const&
m : *muonHandle) {
340 if (!triggerSummary.
isValid()) {
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;
365 float deltaphi_metmuon = !(muons.empty()) ? fabs(
deltaPhi(caloMet.
phi(), 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);
445 genericTriggerEventPSet.
add<
bool>(
"andOr");
447 genericTriggerEventPSet.
add<std::vector<int> >(
"dcsPartitions", {});
448 genericTriggerEventPSet.
add<
bool>(
"andOrDcs",
false);
449 genericTriggerEventPSet.
add<
bool>(
"errorReplyDcs",
true);
451 genericTriggerEventPSet.
add<
bool>(
"andOrHlt",
true);
453 genericTriggerEventPSet.
add<std::vector<std::string> >(
"hltPaths", {});
455 genericTriggerEventPSet.
add<
bool>(
"errorReplyHlt",
false);
456 genericTriggerEventPSet.
add<
unsigned int>(
"verbosityLevel", 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.};
480 histoPSet.
add<std::vector<double> >(
"metBinning", bins);
481 histoPSet.add<std::vector<double> >(
"ptBinning", bins);
489 descriptions.
add(
"metPlusTrackMonitoring", desc);
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
edm::InputTag hltMetCleanTag_
METplusTrackMonitor(const edm::ParameterSet &)
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
double pt() const final
transverse momentum
bool getHLTObj(const edm::Handle< trigger::TriggerEvent > &trigSummary, const edm::InputTag &filterTag, trigger::TriggerObject &obj) const
virtual void setCurrentFolder(std::string const &fullpath)
tuple caloMet
____________________________________________________________________________||
eta_binning_(getHistoPSet(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< edm::ParameterSet >("etaPSet")))
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
den_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter< edm::ParameterSet >("denGenericTriggerEventPSet"), consumesCollector(),*this))
dqm::reco::MonitorElement MonitorElement
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
const std::string folderName_
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
ls_binning_(getHistoPSet(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< edm::ParameterSet >("lsPSet")))
Log< level::Error, false > LogError
std::vector< Vertex > VertexCollection
LuminosityBlockNumber_t luminosityBlock() const
edm::InputTag trackLegFilterTag_
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
dqm::reco::DQMStore DQMStore
phi_binning_(getHistoPSet(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< edm::ParameterSet >("phiPSet")))
std::vector< Muon > MuonCollection
collection of Muon objects
std::vector< double > muonPt_variable_binning_
edm::EDGetTokenT< reco::MuonCollection > muonToken_
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
Single trigger physics object (e.g., an isolated muon)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
pt_binning_(getHistoPSet(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< edm::ParameterSet >("ptPSet")))
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
ObjME muonPtME_variableBinning_
nmuons_(iConfig.getParameter< unsigned int >("nmuons"))
std::vector< double > met_variable_binning_
MonitorElement * denominator
const bool requireValidHLTPaths_
MonitorElement * numerator
tuple key
prepare the HTCondor submission files and eventually submit them
njets_(iConfig.getParameter< unsigned int >("njets"))
metSelection_(iConfig.getParameter< std::string >("metSelection"))
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
metToken_(consumes< reco::PFMETCollection >(iConfig.getParameter< edm::InputTag >("met")))
met_variable_binning_(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< std::vector< double > >("metBinning"))
StringCutObjectSelector< reco::CaloMET, true > metSelection_
num_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter< edm::ParameterSet >("numGenericTriggerEventPSet"), consumesCollector(),*this))
met_binning_(getHistoPSet(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< edm::ParameterSet >("metPSet")))
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
StringCutObjectSelector< reco::PFJet, true > jetSelection_
vtxSelection_(iConfig.getParameter< std::string >("vertexSelection"))
StringCutObjectSelector< reco::Muon, true > muonSelection_
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
std::vector< size_type > Keys
StringCutObjectSelector< reco::Vertex, true > vtxSelection_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< reco::CaloMETCollection > metToken_
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbins, const double xmin, const double xmax, const bool bookDen=true)
~METplusTrackMonitor() noexcept(true) override
std::vector< PFJet > PFJetCollection
collection of PFJet objects
ObjME metME_variableBinning_
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
jetSelection_(iConfig.getParameter< std::string >("jetSelection"))
double phi() const final
momentum azimuthal angle
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_