13 folderName_ ( iConfig.getParameter<
std::
string>(
"FolderName") )
17 , eleToken_ ( mayConsume<
edm::
View<
reco::GsfElectron> > (iConfig.getParameter<
edm::InputTag>(
"electrons") ) )
18 , muon_variable_binning_ ( iConfig.getParameter<
edm::
ParameterSet>(
"histoPSet").getParameter<
std::vector<double> >(
"muonBinning") )
19 , muoneta_variable_binning_ ( iConfig.getParameter<
edm::
ParameterSet>(
"histoPSet").getParameter<
std::vector<double> >(
"muonetaBinning") )
22 , muPt_variable_binning_2D_ ( iConfig.getParameter<
edm::
ParameterSet>(
"histoPSet").getParameter<
std::vector<double> >(
"muPtBinning2D") )
23 , elePt_variable_binning_2D_ ( iConfig.getParameter<
edm::
ParameterSet>(
"histoPSet").getParameter<
std::vector<double> >(
"elePtBinning2D") )
24 , muEta_variable_binning_2D_ ( iConfig.getParameter<
edm::
ParameterSet>(
"histoPSet").getParameter<
std::vector<double> >(
"muEtaBinning2D") )
25 , eleEta_variable_binning_2D_ ( iConfig.getParameter<
edm::
ParameterSet>(
"histoPSet").getParameter<
std::vector<double> >(
"eleEtaBinning2D") )
28 , metSelection_ ( iConfig.getParameter<
std::
string>(
"metSelection") )
29 , muonSelection_ ( iConfig.getParameter<
std::
string>(
"muonSelection") )
30 , eleSelection_ ( iConfig.getParameter<
std::
string>(
"eleSelection") )
31 , nmuons_ ( iConfig.getParameter<unsigned
int>(
"nmuons" ) )
32 , nelectrons_ ( iConfig.getParameter<unsigned
int>(
"nelectrons" ) )
94 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, min, max);
95 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, min, max);
100 int nbins = binning.size()-1;
101 std::vector<float> fbinning(binning.begin(), binning.end());
102 float* arr = &fbinning[0];
103 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, arr);
104 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, arr);
109 me.
numerator = ibooker.
bookProfile(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
110 me.
denominator = ibooker.
bookProfile(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
115 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
116 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
121 int nbinsX = binningX.size()-1;
122 std::vector<float> fbinningX(binningX.begin(), binningX.end());
123 float* arrX = &fbinningX[0];
124 int nbinsY = binningY.size()-1;
125 std::vector<float> fbinningY(binningY.begin(), binningY.end());
126 float* arrY = &fbinningY[0];
128 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, arrX, nbinsY, arrY);
129 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, arrX, nbinsY, arrY);
140 histname =
"muon_pt"; histtitle =
"muon PT";
144 histname =
"muon_pt_variable"; histtitle =
"muon PT";
148 histname =
"muonVsLS"; histtitle =
"muon pt vs LS";
152 histname =
"muon_phi"; histtitle =
"Muon phi";
157 histname =
"muon_eta"; histtitle =
"Muon eta";
162 histname =
"muon_eta_variablebinning"; histtitle =
"Muon eta";
166 histname =
"muon_dxy"; histtitle =
"Muon dxy";
170 histname =
"muon_dz"; histtitle =
"Muon dz";
175 histname =
"muon_etaphi"; histtitle =
"Muon eta-phi";
179 histname =
"electron_pt_variable"; histtitle =
"electron PT";
183 histname =
"electron_eta"; histtitle =
"electron eta";
187 histname =
"elePt_muPt"; histtitle =
"electron pt vs muon pt";
191 histname =
"eleEta_muEta"; histtitle =
"electron #eta vs muon #eta";
224 if (not
v.isFake()) {
225 pv.SetXYZ(
v.x(),
v.y(),
v.z());
232 std::vector<reco::Muon>
muons;
233 if ( muonHandle->size() <
nmuons_ )
return;
234 for (
auto const &
p : *muonHandle ) {
237 if ( muons.size() <
nmuons_ )
return;
241 std::vector<reco::GsfElectron>
electrons;
243 for (
auto const &
e : *eleHandle ) {
261 if(electrons.size()>0)
285 if(electrons.size()>0)
299 pset.
add<
int> (
"nbins");
300 pset.
add<
double>(
"xmin" );
301 pset.
add<
double>(
"xmax" );
306 pset.
add<
int> (
"nbins", 2500);
321 desc.
add<
unsigned int>(
"nmuons", 0);
322 desc.
add<
unsigned int>(
"nelectrons", 0);
325 genericTriggerEventPSet.
add<
bool>(
"andOr");
327 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions",{});
328 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
329 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
330 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
331 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
333 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths",{});
334 genericTriggerEventPSet.add<
std::string>(
"hltDBKey",
"");
335 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
336 genericTriggerEventPSet.add<
bool>(
"errorReplyL1",
false);
337 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel", 1);
338 genericTriggerEventPSet.add<
bool>(
"andOrL1",
false);
339 genericTriggerEventPSet.add<
bool>(
"l1BeforeMask",
false);
340 genericTriggerEventPSet.add<std::vector<std::string> >(
"l1Algorithms",{});
349 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.};
350 histoPSet.add<std::vector<double> >(
"muonBinning",
bins);
352 std::vector<double> etabins = {-3.,-2.5,-2.,-1.5,-1.,-.5, 0.,.5, 1., 1.5, 2., 2.5, 3.};
353 histoPSet.add<std::vector<double> >(
"muonetaBinning", etabins);
355 std::vector<double> bins_2D = {0., 40., 80., 100., 120., 140., 160., 180., 200., 240., 280., 350., 450., 1000.};
356 std::vector<double> eta_bins_2D = {-3.,-2.,-1., 0., 1., 2., 3.};
357 std::vector<double> phi_bins_2D = {-3.1415,-2.5132,-1.8849,-1.2566,-0.6283, 0, 0.6283, 1.2566, 1.8849, 2.5132, 3.1415};
358 histoPSet.add<std::vector<double> >(
"elePtBinning2D", bins_2D);
359 histoPSet.add<std::vector<double> >(
"muPtBinning2D", bins_2D);
360 histoPSet.add<std::vector<double> >(
"eleEtaBinning2D", eta_bins_2D);
361 histoPSet.add<std::vector<double> >(
"muEtaBinning2D", eta_bins_2D);
369 descriptions.
add(
"muonMonitoring", desc);
std::vector< double > muPt_variable_binning_2D_
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::PFMETCollection > metToken_
StringCutObjectSelector< reco::MET, true > metSelection_
void setTitle(MuonME &me, const std::string &titleX, const std::string &titleY)
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MuonME muonEtaME_variableBinning_
#define DEFINE_FWK_MODULE(type)
MuonMonitor(const edm::ParameterSet &)
std::vector< double > muoneta_variable_binning_
const MEbinning dxy_binning_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
MonitorElement * denominator
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
LuminosityBlockNumber_t luminosityBlock() const
const MEbinning phi_binning_
std::vector< double > muEta_variable_binning_2D_
std::vector< Muon > MuonCollection
collection of Muon objects
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
edm::EDGetTokenT< edm::View< reco::GsfElectron > > eleToken_
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
MonitorElement * book1D(Args &&...args)
static MEbinning getHistoPSet(edm::ParameterSet const &pset)
edm::EDGetTokenT< reco::MuonCollection > muonToken_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< double > elePt_variable_binning_2D_
std::vector< double > muon_variable_binning_
static MEbinning getHistoLSPSet(edm::ParameterSet const &pset)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
XYZPointD XYZPoint
point in space with cartesian internal representation
MuonME muonME_variableBinning_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void bookME(DQMStore::IBooker &, MuonME &me, const std::string &histname, const std::string &histtitle, int nbins, double xmin, double xmax)
MuonME eleME_variableBinning_
StringCutObjectSelector< reco::Muon, true > muonSelection_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
const MEbinning eta_binning_
MonitorElement * numerator
std::vector< double > eleEta_variable_binning_2D_
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)