1 #ifndef TOPSINGLELEPTONDQM 2 #define TOPSINGLELEPTONDQM 80 return label.substr(label.find(
':') + 1);
85 return label.substr(0, label.find(
':'));
90 const std::vector<std::string>
labels);
93 std::string channel,
const std::vector<std::string> labels)
const;
101 if (
booked(histName.c_str()))
106 if (
booked(histName.c_str()))
107 hists_.find(histName.c_str())->
second->Fill(xValue, yValue);
111 double zValue)
const {
112 if (
booked(histName.c_str()))
113 hists_.find(histName.c_str())->
second->Fill(xValue, yValue, zValue);
122 std::vector<edm::EDGetTokenT<edm::View<reco::MET> > >
mets_;
158 std::unique_ptr<StringCutObjectSelector<reco::PFCandidate> >
elecSelect_;
162 std::unique_ptr<StringCutObjectSelector<reco::Vertex> >
pvSelect_;
165 std::unique_ptr<StringCutObjectSelector<reco::PFCandidate> >
muonIso_;
168 std::unique_ptr<StringCutObjectSelector<reco::PFCandidate> >
muonSelect_;
196 std::map<std::string, MonitorElement*>
hists_;
204 for (
unsigned int idx = 0;
idx < labels.size(); ++
idx) {
205 hists_[(channel +
"Mon_").c_str()]
207 hists_[(channel +
"Eff_").c_str()]
208 ->setBinLabel(idx + 1,
"[" +
selectionPath(labels[idx]) +
"]|[" +
217 const std::vector<std::string>
labels)
const {
218 for (
unsigned int idx = 0;
idx < labels.size(); ++
idx) {
220 fill((channel +
"Mon_").c_str(), idx + 0.5);
222 int evts =
hists_.find((channel +
"Mon_").c_str())
223 ->second->getBinContent(idx + 1);
224 double value =
hists_.find((channel +
"Eff_").c_str())
225 ->second->getBinContent(idx + 1);
227 (channel +
"Eff_").c_str(), idx + 0.5,
308 return label.substr(0, label.find(
':'));
313 return label.substr(label.find(
':') + 1);
339 std::pair<edm::ParameterSet, std::unique_ptr<TopSingleLepton::MonitorEnsemble> > >
341 std::unique_ptr<SelectionStep<reco::PFCandidate> >
MuonStep;
343 std::unique_ptr<SelectionStep<reco::Vertex> >
PvStep;
344 std::unique_ptr<SelectionStep<reco::MET> >
METStep;
345 std::vector<std::unique_ptr<SelectionStep<reco::Jet> > >
JetSteps;
346 std::vector<std::unique_ptr<SelectionStep<reco::CaloJet> > >
CaloJetSteps;
347 std::vector<std::unique_ptr<SelectionStep<reco::PFJet> > >
PFJetSteps;
349 std::vector<edm::ParameterSet>
sel_;
std::map< std::string, MonitorElement * > hists_
histogram container
std::string selectionPath(const std::string &label) const
void fill(const std::string histName, double xValue, double yValue, double zValue) const
fill histogram if it had been booked before (2-dim version)
int logged_
number of logged interesting events
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
double btagEffWP_
btag working points
MonitorEnsemble(const char *label, const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
default contructor
edm::EDGetTokenT< edm::View< reco::PFCandidate > > muons_
std::unique_ptr< SelectionStep< reco::PFCandidate > > ElectronStep
void fill(const std::string histName, double xValue, double yValue) const
fill histogram if it had been booked before (2-dim version)
std::unique_ptr< StringCutObjectSelector< reco::BeamSpot > > beamspotSelect_
string cut selector
edm::EDConsumerBase tmpConsumerBase
std::vector< std::string > triggerPaths_
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > muonSelect_
extra selection on muons
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecSelect_
extra selection on electrons
def setup(process, global_tag, zero_tesla=False)
define MonitorEnsembple to be used
virtual example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
edm::EDGetTokenT< reco::BeamSpot > beamspot__
std::map< std::string, std::pair< edm::ParameterSet, std::unique_ptr< TopSingleLepton::MonitorEnsemble > > > selection_
edm::EDGetTokenT< reco::JetTagCollection > btagCSV_
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
std::vector< std::string > triggerPaths_
trigger paths
std::vector< std::string > selectionOrder_
edm::EDGetTokenT< reco::JetCorrector > mJetCorrector
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
std::string selectionStep(const std::string &label)
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
Level verbosity_
verbosity level for booking
double lowerEdge_
mass window upper and lower edge
U second(std::pair< T, U > const &p)
std::vector< std::unique_ptr< SelectionStep< reco::Jet > > > JetSteps
std::unique_ptr< StringCutObjectSelector< reco::PFJet > > jetSelection_
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > vertexSelect_
string cut selector
std::string jetSelect_
extra selection on jets
edm::InputTag beamspot_
beamspot
void fill(const std::string histName, double value) const
fill histogram if it had been booked before
~MonitorEnsemble()
default destructor
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
void book(DQMStore::IBooker &ibooker)
book histograms in subdirectory directory
edm::EDGetTokenT< edm::TriggerResults > triggerTable__
trigger table
std::unique_ptr< SelectionStep< reco::PFCandidate > > MuonStep
std::unique_ptr< SelectionStep< reco::MET > > METStep
std::string label_
instance label
edm::EDGetTokenT< reco::JetTagCollection > btagVtx_
Level
different verbosity levels
std::string objectType(const std::string &label)
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > pvSelect_
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
std::unique_ptr< StringCutObjectSelector< reco::PFJet > > jetlooseSelection_
std::vector< edm::ParameterSet > sel_
edm::EDGetTokenT< reco::JetTagCollection > btagEff_
btag discriminator labels
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
std::string jetCorrector_
jetCorrector
std::vector< std::unique_ptr< SelectionStep< reco::PFJet > > > PFJetSteps
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
~TopSingleLeptonDQM()
default destructor
std::string monitorPath(const std::string &label) const
virtual example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
std::unique_ptr< SelectionStep< reco::Vertex > > PvStep
edm::EDGetTokenT< reco::JetTagCollection > btagPur_
bool booked(const std::string histName) const
check if histogram was booked
std::vector< std::unique_ptr< SelectionStep< reco::CaloJet > > > CaloJetSteps
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > muonIso_
extra isolation criterion on muon