16 folderName_ ( iConfig.getParameter<
std::
string>(
"FolderName") )
22 , met_variable_binning_ ( iConfig.getParameter<
edm::
ParameterSet>(
"histoPSet").getParameter<
std::vector<double> >(
"metBinning") )
27 , metSelection_ ( iConfig.getParameter<
std::
string>(
"metSelection") )
28 , jetSelection_ ( iConfig.getParameter<
std::
string>(
"jetSelection") )
29 , eleSelection_ ( iConfig.getParameter<
std::
string>(
"eleSelection") )
30 , muoSelection_ ( iConfig.getParameter<
std::
string>(
"muoSelection") )
31 , njets_ ( iConfig.getParameter<unsigned>(
"njets" ) )
32 , nelectrons_ ( iConfig.getParameter<unsigned>(
"nelectrons" ) )
33 , nmuons_ ( iConfig.getParameter<unsigned>(
"nmuons" ) )
68 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, min, max);
69 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, min, max);
73 int nbins = binning.size()-1;
74 std::vector<float> fbinning(binning.begin(),binning.end());
75 float* arr = &fbinning[0];
76 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, arr);
77 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, arr);
81 me.
numerator = ibooker.
bookProfile(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
82 me.
denominator = ibooker.
bookProfile(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
86 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
87 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
91 int nbinsX = binningX.size()-1;
92 std::vector<float> fbinningX(binningX.begin(),binningX.end());
93 float* arrX = &fbinningX[0];
94 int nbinsY = binningY.size()-1;
95 std::vector<float> fbinningY(binningY.begin(),binningY.end());
96 float* arrY = &fbinningY[0];
98 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, arrX, nbinsY, arrY);
99 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, arrX, nbinsY, arrY);
112 histname =
"deltaphi_metjet1"; histtitle =
"DPHI_METJ1";
116 histname =
"deltaphi_jet1jet2"; histtitle =
"DPHI_J1J2";
120 histname =
"met"; histtitle =
"PFMET";
124 histname =
"met_variable"; histtitle =
"PFMET";
128 histname =
"metVsLS"; histtitle =
"PFMET vs LS";
132 histname =
"metPhi"; histtitle =
"PFMET phi";
154 float met = pfmet.
pt();
158 std::vector<reco::PFJet>
jets;
159 if ( jetHandle->size() <
njets_ )
return;
160 for (
auto const & j : *jetHandle ) {
165 float deltaPhi_met_j1= 10.0;
166 float deltaPhi_j1_j2 = 10.0;
168 if (!jets.empty()) deltaPhi_met_j1 = fabs(
deltaPhi( pfmet.
phi(), jets[0].phi() ));
169 if (jets.size() >= 2) deltaPhi_j1_j2 = fabs(
deltaPhi( jets[0].
phi(), jets[1].
phi() ));
172 std::vector<reco::GsfElectron>
electrons;
174 for (
auto const &
e : *eleHandle ) {
183 for (
auto const &
v : *vtxHandle) {
184 bool isFake =
v.isFake() ;
194 if ( muoHandle->size() <
nmuons_ )
return;
195 std::vector<reco::Muon>
muons;
196 for (
auto const &
m : *muoHandle ) {
197 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;
200 if ( muons.size() <
nmuons_ )
return;
225 pset.
add<
unsigned> (
"nbins");
226 pset.
add<
double>(
"xmin" );
227 pset.
add<
double>(
"xmax" );
232 pset.
add<
unsigned int> (
"nbins", 2500 );
233 pset.
add<
double> (
"xmin", 0.);
234 pset.
add<
double> (
"xmax", 2500.);
251 desc.
add<
unsigned>(
"njets", 0);
252 desc.
add<
unsigned>(
"nelectrons", 0);
253 desc.
add<
unsigned>(
"nmuons", 0);
256 genericTriggerEventPSet.
add<
bool>(
"andOr");
258 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions",{});
259 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
260 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
261 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
262 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
264 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths",{});
265 genericTriggerEventPSet.add<
std::string>(
"hltDBKey",
"");
266 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
267 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel",1);
276 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.};
277 histoPSet.add<std::vector<double> >(
"metBinning",
bins);
285 descriptions.
add(
"metMonitoring", desc);
void setMETitle(METME &me, const std::string &titleX, const std::string &titleY)
T getParameter(std::string const &) const
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
#define DEFINE_FWK_MODULE(type)
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_
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)
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
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 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)