94 : folderName_(iConfig.getParameter<
std::
string>(
"FolderName")),
95 requireValidHLTPaths_(iConfig.getParameter<
bool>(
"requireValidHLTPaths")),
96 hltPathsAreValid_(
false),
102 hltMetTag_(iConfig.getParameter<
edm::
InputTag>(
"hltMetFilter")),
103 trackLegFilterTag_(iConfig.getParameter<
edm::
InputTag>(
"trackLegFilter")),
104 met_variable_binning_(
106 muonPt_variable_binning_(
108 met_binning_(getHistoPSet(
114 eta_binning_(getHistoPSet(
116 phi_binning_(getHistoPSet(
119 iConfig.getParameter<
edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
121 iConfig.getParameter<
edm::
ParameterSet>(
"denGenericTriggerEventPSet"), consumesCollector(), *this)),
122 metSelection_(iConfig.getParameter<
std::
string>(
"metSelection")),
123 muonSelection_(iConfig.getParameter<
std::
string>(
"muonSelection")),
124 jetSelection_(iConfig.getParameter<
std::
string>(
"jetSelection")),
125 vtxSelection_(iConfig.getParameter<
std::
string>(
"vtxSelection")),
126 nmuons_(iConfig.getParameter<unsigned>(
"nmuons")),
127 njets_(iConfig.getParameter<unsigned>(
"njets")),
128 leadJetEtaCut_(iConfig.getParameter<double>(
"leadJetEtaCut")),
129 requireLeadMatched_(iConfig.getParameter<
bool>(
"requireLeadMatched")),
130 maxMatchDeltaR_(iConfig.getParameter<double>(
"maxMatchDeltaR")) {}
160 histname =
"met_variable";
161 histtitle =
"CaloMET";
165 histname =
"metVsLS";
166 histtitle =
"CaloMET vs LS";
179 histtitle =
"CaloMET phi";
183 histname =
"deltaphi_metjet1";
184 histtitle =
"dPhi(CaloMET, jet1)";
188 histname =
"metVsHltMet";
189 histtitle =
"CaloMET vs hltMet";
204 histname =
"muonPt_variable";
205 histtitle =
"Muon PT";
209 histname =
"muonEta";
210 histtitle =
"Muon eta";
214 histname =
"deltaphi_muonmet";
215 histtitle =
"dPhi(Muon, CaloMET)";
219 histname =
"muonEtaVsPhi";
220 histtitle =
"Muon eta vs phi";
233 histname =
"muonPtVsLS";
234 histtitle =
"Muon PT vs LS";
269 if (jetsHandle->size() <
njets_)
271 std::vector<reco::PFJet>
jets;
272 for (
auto const&
j : *jetsHandle) {
298 if (muonHandle->size() <
nmuons_)
300 std::vector<reco::Muon>
muons;
301 for (
auto const&
m : *muonHandle) {
317 int ls =
iEvent.id().luminosityBlock();
324 edm::LogError(
"METplusTrackMonitor") <<
"Invalid collection: TriggerSummary" 332 if (!passesHltMetFilter)
343 double leadMuonPt = !(
muons.empty()) ?
muons[0].
pt() : -1.0;
344 double leadMuonEta = !(
muons.empty()) ?
muons[0].
eta() : 10.0;
345 double leadMuonPhi = !(
muons.empty()) ?
muons[0].
phi() : 10.0;
359 if (!passesTrackLegFilter)
381 double leadingPt = -1.0;
383 size_t filterIndex =
trigSummary->filterIndex(filterTag);
386 if (!(filterIndex >=
trigSummary->sizeFilters())) {
388 for (
unsigned short key :
keys) {
390 if (foundObject.
pt() > leadingPt) {
392 leadingPt =
obj.pt();
397 return (leadingPt > 0.0);
403 desc.add<
bool>(
"requireValidHLTPaths",
true);
418 desc.add<
unsigned>(
"njets", 0);
419 desc.add<
unsigned>(
"nmuons", 0);
420 desc.add<
double>(
"leadJetEtaCut", 2.4);
421 desc.add<
bool>(
"requireLeadMatched",
true);
422 desc.add<
double>(
"maxMatchDeltaR", 0.1);
445 std::vector<double>
bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
446 170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
457 descriptions.
add(
"metPlusTrackMonitoring",
desc);
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
METplusTrackMonitor(const edm::ParameterSet &)
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
virtual void setCurrentFolder(std::string const &fullpath)
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)
Log< level::Error, false > LogError
std::vector< Vertex > VertexCollection
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
edm::InputTag trackLegFilterTag_
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
dqm::reco::DQMStore DQMStore
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)
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
ObjME muonPtME_variableBinning_
std::vector< double > met_variable_binning_
MonitorElement * denominator
const bool requireValidHLTPaths_
MonitorElement * numerator
key
prepare the HTCondor submission files and eventually submit them
#define DEFINE_FWK_MODULE(type)
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
StringCutObjectSelector< reco::CaloMET, true > metSelection_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
StringCutObjectSelector< reco::PFJet, true > jetSelection_
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 &)
static void fillPSetDescription(edm::ParameterSetDescription &desc)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
bool getHLTObj(const edm::Handle< trigger::TriggerEvent > &trigSummary, const edm::InputTag &filterTag, trigger::TriggerObject &obj) const