16 folderName_ ( iConfig.getParameter<
std::
string>(
"FolderName") )
17 , metInputTag_ ( iConfig.getParameter<
edm::InputTag> (
"met") )
18 , jetInputTag_ ( iConfig.getParameter<
edm::InputTag> (
"jets") )
19 , eleInputTag_ ( iConfig.getParameter<
edm::InputTag> (
"electrons") )
20 , muoInputTag_ ( iConfig.getParameter<
edm::InputTag> (
"muons") )
21 , vtxInputTag_ ( iConfig.getParameter<
edm::InputTag> (
"vertices") )
27 , met_variable_binning_ ( iConfig.getParameter<
edm::
ParameterSet>(
"histoPSet").getParameter<
std::vector<double> >(
"metBinning") )
32 , metSelection_ ( iConfig.getParameter<
std::
string>(
"metSelection") )
33 , jetSelection_ ( iConfig.getParameter<
std::
string>(
"jetSelection") )
34 , eleSelection_ ( iConfig.getParameter<
std::
string>(
"eleSelection") )
35 , muoSelection_ ( iConfig.getParameter<
std::
string>(
"muoSelection") )
36 , njets_ ( iConfig.getParameter<unsigned>(
"njets" ) )
37 , nelectrons_ ( iConfig.getParameter<unsigned>(
"nelectrons" ) )
38 , nmuons_ ( iConfig.getParameter<unsigned>(
"nmuons" ) )
79 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, min, max);
80 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, min, max);
84 int nbins = binning.size()-1;
85 std::vector<float> fbinning(binning.begin(),binning.end());
86 float* arr = &fbinning[0];
87 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, arr);
88 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, arr);
92 me.
numerator = ibooker.
bookProfile(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
93 me.
denominator = ibooker.
bookProfile(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
97 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
98 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
102 int nbinsX = binningX.size()-1;
103 std::vector<float> fbinningX(binningX.begin(),binningX.end());
104 float* arrX = &fbinningX[0];
105 int nbinsY = binningY.size()-1;
106 std::vector<float> fbinningY(binningY.begin(),binningY.end());
107 float* arrY = &fbinningY[0];
109 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, arrX, nbinsY, arrY);
110 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, arrX, nbinsY, arrY);
123 histname =
"deltaphi_metjet1"; histtitle =
"DPHI_METJ1";
127 histname =
"deltaphi_jet1jet2"; histtitle =
"DPHI_J1J2";
131 histname =
"met"; histtitle =
"PFMET";
135 histname =
"met_variable"; histtitle =
"PFMET";
139 histname =
"metVsLS"; histtitle =
"PFMET vs LS";
143 histname =
"metPhi"; histtitle =
"PFMET phi";
172 float met = pfmet.
pt();
175 std::vector<reco::PFJet>
jets;
179 if ( jetHandle->size() <
njets_ )
return;
180 for (
auto const & j : *jetHandle ) {
196 float deltaPhi_met_j1= 10.0;
197 float deltaPhi_j1_j2 = 10.0;
199 if (!jets.empty() ) deltaPhi_met_j1 = fabs(
deltaPhi( pfmet.
phi(), jets[0].phi() ));
200 if (jets.size() >= 2) deltaPhi_j1_j2 = fabs(
deltaPhi( jets[0].
phi(), jets[1].
phi() ));
202 std::vector<reco::GsfElectron>
electrons;
207 for (
auto const &
e : *eleHandle ) {
226 for (
auto const &
v : *vtxHandle) {
227 bool isFake =
v.isFake() ;
246 std::vector<reco::Muon>
muons;
250 if ( muoHandle->size() <
nmuons_ )
return;
251 for (
auto const &
m : *muoHandle ) {
252 bool pass =
m.isGlobalMuon() &&
m.isPFMuon() &&
m.globalTrack()->normalizedChi2() < 10. &&
m.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 &&
m.numberOfMatchedStations() > 1 && fabs(
m.muonBestTrack()->dxy(vtx.
position())) < 0.2 && fabs(
m.muonBestTrack()->dz(vtx.
position())) < 0.5 &&
m.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
m.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5;
255 if ( muons.size() <
nmuons_ )
return;
290 pset.
add<
unsigned> (
"nbins");
291 pset.
add<
double>(
"xmin" );
292 pset.
add<
double>(
"xmax" );
297 pset.
add<
unsigned int> (
"nbins", 2500 );
298 pset.
add<
double> (
"xmin", 0.);
299 pset.
add<
double> (
"xmax", 2500.);
316 desc.
add<
unsigned>(
"njets", 0);
317 desc.
add<
unsigned>(
"nelectrons", 0);
318 desc.
add<
unsigned>(
"nmuons", 0);
321 genericTriggerEventPSet.
add<
bool>(
"andOr");
323 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions",{});
324 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
325 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
326 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
327 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
329 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths",{});
330 genericTriggerEventPSet.add<
std::string>(
"hltDBKey",
"");
331 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
332 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel",1);
341 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.};
342 histoPSet.add<std::vector<double> >(
"metBinning",
bins);
350 descriptions.
add(
"metMonitoring", desc);
void setMETitle(METME &me, const std::string &titleX, const std::string &titleY)
T getParameter(std::string const &) const
edm::InputTag vtxInputTag_
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
MonitorElement * numerator
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::InputTag muoInputTag_
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
double pt() const final
transverse momentum
std::vector< Vertex > VertexCollection
collection of Vertex objects
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
StringCutObjectSelector< reco::Muon, true > muoSelection_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
edm::InputTag eleInputTag_
static MEbinning getHistoLSPSet(const edm::ParameterSet &pset)
LuminosityBlockNumber_t luminosityBlock() const
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
METME metME_variableBinning_
const Point & position() const
position
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
std::vector< Muon > MuonCollection
collection of Muon objects
StringCutObjectSelector< reco::PFJet, true > jetSelection_
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
#define DEFINE_FWK_MODULE(type)
void setCurrentFolder(std::string const &fullpath)
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
MonitorElement * denominator
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
edm::EDGetTokenT< reco::PFMETCollection > metToken_
MonitorElement * book1D(Args &&...args)
edm::EDGetTokenT< reco::MuonCollection > muoToken_
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)
static MEbinning phi_binning_
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
MonitorElement * book2D(Args &&...args)
std::vector< double > met_variable_binning_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::InputTag metInputTag_
std::vector< PFJet > PFJetCollection
collection of PFJet objects
StringCutObjectSelector< reco::MET, true > metSelection_
edm::InputTag jetInputTag_
METMonitor(const edm::ParameterSet &)
std::vector< bool > warningPrinted4token_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
double phi() const final
momentum azimuthal angle
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)