1 #ifndef TOPSINGLELEPTONDQM_MINIAOD 2 #define TOPSINGLELEPTONDQM_MINIAOD 57 return label.substr(label.find(
':') + 1);
62 return label.substr(0, label.find(
':'));
67 const std::vector<std::string>
labels);
70 std::string channel,
const std::vector<std::string> labels)
const;
78 if (
booked(histName.c_str()))
83 if (
booked(histName.c_str()))
84 hists_.find(histName.c_str())->
second->Fill(xValue, yValue);
88 double zValue)
const {
89 if (
booked(histName.c_str()))
90 hists_.find(histName.c_str())->
second->Fill(xValue, yValue, zValue);
99 std::vector<edm::EDGetTokenT<edm::View<pat::MET> > >
mets_;
118 std::unique_ptr<StringCutObjectSelector<pat::Electron> >
elecIso_;
120 std::unique_ptr<StringCutObjectSelector<pat::Electron> >
elecSelect_;
124 std::unique_ptr<StringCutObjectSelector<reco::Vertex> >
pvSelect_;
127 std::unique_ptr<StringCutObjectSelector<pat::Muon> >
muonIso_;
141 std::unique_ptr<StringCutObjectSelector<pat::Jet> >
jetSelect;
157 std::map<std::string, MonitorElement*>
hists_;
164 for (
unsigned int idx = 0;
idx < labels.size(); ++
idx) {
165 hists_[(channel +
"Mon_").c_str()]
167 hists_[(channel +
"Eff_").c_str()]
168 ->setBinLabel(idx + 1,
"[" +
selectionPath(labels[idx]) +
"]|[" +
177 const std::vector<std::string>
labels)
const {
178 for (
unsigned int idx = 0;
idx < labels.size(); ++
idx) {
180 fill((channel +
"Mon_").c_str(), idx + 0.5);
182 int evts =
hists_.find((channel +
"Mon_").c_str())
183 ->second->getBinContent(idx + 1);
184 double value =
hists_.find((channel +
"Eff_").c_str())
185 ->second->getBinContent(idx + 1);
187 (channel +
"Eff_").c_str(), idx + 0.5,
228 return label.substr(0, label.find(
':'));
233 return label.substr(label.find(
':') + 1);
259 std::pair<edm::ParameterSet, std::unique_ptr<TopSingleLepton_miniAOD::MonitorEnsemble> > >
261 std::unique_ptr<SelectionStep<pat::Muon> >
MuonStep;
263 std::unique_ptr<SelectionStep<reco::Vertex> >
PvStep;
264 std::unique_ptr<SelectionStep<pat::MET> >
METStep;
265 std::vector<std::unique_ptr<SelectionStep<pat::Jet> > >
JetSteps;
268 std::vector<edm::ParameterSet>
sel_;
std::unique_ptr< StringCutObjectSelector< pat::Muon > > muonIso_
extra isolation criterion on muon
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
extra jetID selection on calo jets
std::vector< edm::EDGetTokenT< edm::View< pat::MET > > > mets_
considers a vector of METs
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > vertexSelect_
string cut selector
std::unique_ptr< StringCutObjectSelector< pat::Muon > > muonSelect_
extra selection on muons
std::unique_ptr< SelectionStep< reco::Vertex > > PvStep
~MonitorEnsemble()
default destructor
std::string objectType(const std::string &label)
bool booked(const std::string histName) const
check if histogram was booked
std::unique_ptr< StringCutObjectSelector< pat::Electron > > elecIso_
extra isolation criterion on electron
edm::EDGetTokenT< edm::View< pat::Jet > > jets_
input sources for monitoring
virtual example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
MonitorEnsemble(const char *label, const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
default contructor
edm::EDGetTokenT< edm::View< pat::Electron > > elecs_
def setup(process, global_tag, zero_tesla=False)
std::unique_ptr< StringCutObjectSelector< reco::BeamSpot > > beamspotSelect_
string cut selector
std::map< std::string, std::pair< edm::ParameterSet, std::unique_ptr< TopSingleLepton_miniAOD::MonitorEnsemble > > > selection_
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
~TopSingleLeptonDQM_miniAOD()
default destructor
double btagEffWP_
btag working points
std::vector< edm::ParameterSet > sel_
std::vector< std::string > selectionOrder_
U second(std::pair< T, U > const &p)
edm::InputTag beamspot_
beamspot
Level
different verbosity levels
edm::EDGetTokenT< reco::BeamSpot > beamspot__
std::string selectionStep(const std::string &label)
std::unique_ptr< StringCutObjectSelector< pat::Jet > > jetSelect
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > pvSelect_
std::string monitorPath(const std::string &label) const
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
edm::EDConsumerBase tmpConsumerBase
virtual example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
void fill(const std::string histName, double value) const
fill histogram if it had been booked before
std::map< std::string, MonitorElement * > hists_
histogram container
std::vector< std::string > triggerPaths_
trigger paths
std::unique_ptr< SelectionStep< pat::MET > > METStep
edm::EDGetTokenT< reco::JetTagCollection > btagVtx_
std::string jetCorrector_
jetCorrector
void fill(const std::string histName, double xValue, double yValue) const
fill histogram if it had been booked before (2-dim version)
std::vector< std::unique_ptr< SelectionStep< pat::Jet > > > JetSteps
std::unique_ptr< SelectionStep< pat::Muon > > MuonStep
edm::EDGetTokenT< edm::View< pat::Muon > > muons_
edm::EDGetTokenT< reco::JetTagCollection > btagPur_
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
void fill(const std::string histName, double xValue, double yValue, double zValue) const
fill histogram if it had been booked before (2-dim version)
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
edm::EDGetTokenT< reco::JetTagCollection > btagCSV_
double lowerEdge_
mass window upper and lower edge
void book(DQMStore::IBooker &ibooker)
book histograms in subdirectory directory
int logged_
number of logged interesting events
std::string selectionPath(const std::string &label) const
std::string label_
instance label
std::vector< std::string > triggerPaths_
std::unique_ptr< StringCutObjectSelector< pat::Electron > > elecSelect_
extra selection on electrons
edm::EDGetTokenT< reco::JetTagCollection > btagEff_
btag discriminator labels
Level verbosity_
verbosity level for booking
std::unique_ptr< SelectionStep< pat::Electron > > ElectronStep
edm::EDGetTokenT< edm::TriggerResults > triggerTable__
trigger table
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type