20 folderName_ ( iConfig.getParameter<
std::
string>(
"FolderName") )
25 , met_variable_binning_ ( iConfig.getParameter<
edm::
ParameterSet>(
"histoPSet").getParameter<
std::vector<double> >(
"metBinning") )
30 , metSelection_ ( iConfig.getParameter<
std::
string>(
"metSelection") )
31 , jetSelection_ ( iConfig.getParameter<
std::
string>(
"jetSelection") )
32 , eleSelection_ ( iConfig.getParameter<
std::
string>(
"eleSelection") )
33 , muoSelection_ ( iConfig.getParameter<
std::
string>(
"muoSelection") )
34 , njets_ ( iConfig.getParameter<
int>(
"njets" ) )
35 , nelectrons_ ( iConfig.getParameter<
int>(
"nelectrons" ) )
36 , nmuons_ ( iConfig.getParameter<
int>(
"nmuons" ) )
85 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, min, max);
86 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, min, max);
90 int nbins = binning.size()-1;
91 std::vector<float> fbinning(binning.begin(),binning.end());
92 float* arr = &fbinning[0];
93 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, arr);
94 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, arr);
98 me.
numerator = ibooker.
bookProfile(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
99 me.
denominator = ibooker.
bookProfile(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
103 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
104 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
108 int nbinsX = binningX.size()-1;
109 std::vector<float> fbinningX(binningX.begin(),binningX.end());
110 float* arrX = &fbinningX[0];
111 int nbinsY = binningY.size()-1;
112 std::vector<float> fbinningY(binningY.begin(),binningY.end());
113 float* arrY = &fbinningY[0];
115 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, arrX, nbinsY, arrY);
116 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, arrX, nbinsY, arrY);
129 histname =
"met"; histtitle =
"PFMET";
133 histname =
"met_variable"; histtitle =
"PFMET";
137 histname =
"metVsLS"; histtitle =
"PFMET vs LS";
141 histname =
"metPhi"; histtitle =
"PFMET phi";
165 float met = pfmet.
pt();
170 std::vector<reco::PFJet>
jets;
171 if (
int(jetHandle->size()) <
njets_ )
return;
172 for (
auto const & j : *jetHandle ) {
175 if (
int(jets.size()) <
njets_ )
return;
179 std::vector<reco::GsfElectron>
electrons;
180 if (
int(eleHandle->size()) <
nelectrons_ )
return;
181 for (
auto const &
e : *eleHandle ) {
188 if (
int(muoHandle->size()) <
nmuons_ )
return;
189 std::vector<reco::Muon>
muons;
190 for (
auto const &
m : *muoHandle ) {
193 if (
int(muons.size()) <
nmuons_ )
return;
216 pset.
add<
int> (
"nbins");
217 pset.
add<
double>(
"xmin" );
218 pset.
add<
double>(
"xmax" );
223 pset.
add<
int> (
"nbins", 2500);
239 desc.
add<
int>(
"njets", 0);
240 desc.
add<
int>(
"nelectrons", 0);
241 desc.
add<
int>(
"nmuons", 0);
244 genericTriggerEventPSet.
add<
bool>(
"andOr");
246 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions",{});
247 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
248 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
249 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
250 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
252 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths",{});
253 genericTriggerEventPSet.add<
std::string>(
"hltDBKey",
"");
254 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
255 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel",1);
264 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.};
265 histoPSet.add<std::vector<double> >(
"metBinning",
bins);
273 descriptions.
add(
"metMonitoring", desc);
MonitorElement * numerator
T getParameter(std::string const &) const
virtual double pt() const final
transverse momentum
const MEbinning phi_binning_
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
StringCutObjectSelector< reco::Muon, true > muoSelection_
GenericTriggerEventFlag * den_genTriggerEventFlag_
LuminosityBlockNumber_t luminosityBlock() const
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
METME metME_variableBinning_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
std::vector< Muon > MuonCollection
collection of Muon objects
virtual double phi() const final
momentum azimuthal angle
StringCutObjectSelector< reco::PFJet, true > jetSelection_
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
static MEbinning getHistoPSet(edm::ParameterSet pset)
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
bool accept(const edm::Event &event, const edm::EventSetup &setup)
To be called from analyze/filter() methods.
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
static MEbinning getHistoLSPSet(edm::ParameterSet pset)
edm::EDGetTokenT< reco::PFMETCollection > metToken_
MonitorElement * book1D(Args &&...args)
GenericTriggerEventFlag * num_genTriggerEventFlag_
edm::EDGetTokenT< reco::MuonCollection > muoToken_
MonitorElement * denominator
void setMETitle(METME &me, std::string titleX, std::string titleY)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void bookME(DQMStore::IBooker &, METME &me, const std::string &histname, const std::string &histtitle, int nbins, double xmin, double xmax)
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
std::vector< double > met_variable_binning_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< PFJet > PFJetCollection
collection of PFJet objects
StringCutObjectSelector< reco::MET, true > metSelection_
METMonitor(const edm::ParameterSet &)
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)