1 #ifndef TOPSINGLELEPTONDQM
2 #define TOPSINGLELEPTONDQM
50 namespace TopSingleLepton {
77 return label.substr(label.find(
':') + 1);
82 return label.substr(0, label.find(
':'));
87 const std::vector<std::string>
labels);
98 if (
booked(histName.c_str()))
103 if (
booked(histName.c_str()))
104 hists_.find(histName.c_str())->
second->Fill(xValue, yValue);
108 double zValue)
const {
109 if (
booked(histName.c_str()))
110 hists_.find(histName.c_str())->
second->Fill(xValue, yValue, zValue);
119 std::vector<edm::EDGetTokenT<edm::View<reco::MET> > >
mets_;
148 std::unique_ptr<StringCutObjectSelector<reco::PFCandidate> >
elecIso_;
150 std::unique_ptr<StringCutObjectSelector<reco::PFCandidate> >
elecSelect_;
154 std::unique_ptr<StringCutObjectSelector<reco::Vertex> >
pvSelect_;
157 std::unique_ptr<StringCutObjectSelector<reco::PFCandidate> >
muonIso_;
160 std::unique_ptr<StringCutObjectSelector<reco::PFCandidate> >
muonSelect_;
186 std::map<std::string, MonitorElement*>
hists_;
194 for (
unsigned int idx = 0;
idx < labels.size(); ++
idx) {
195 hists_[(channel +
"Mon_").c_str()]
197 hists_[(channel +
"Eff_").c_str()]
198 ->setBinLabel(idx + 1,
"[" +
selectionPath(labels[idx]) +
"]|[" +
207 const std::vector<std::string>
labels)
const {
208 for (
unsigned int idx = 0;
idx < labels.size(); ++
idx) {
210 fill((channel +
"Mon_").c_str(), idx + 0.5);
212 int evts =
hists_.find((channel +
"Mon_").c_str())
213 ->second->getBinContent(idx + 1);
214 double value =
hists_.find((channel +
"Eff_").c_str())
215 ->second->getBinContent(idx + 1);
217 (channel +
"Eff_").c_str(), idx + 0.5,
298 return label.substr(0, label.find(
':'));
303 return label.substr(label.find(
':') + 1);
329 std::pair<edm::ParameterSet, std::unique_ptr<TopSingleLepton::MonitorEnsemble> > >
331 std::unique_ptr<SelectionStep<reco::PFCandidate> >
MuonStep;
333 std::unique_ptr<SelectionStep<reco::Vertex> >
PvStep;
334 std::unique_ptr<SelectionStep<reco::MET> >
METStep;
335 std::vector<std::unique_ptr<SelectionStep<reco::Jet> > >
JetSteps;
336 std::vector<std::unique_ptr<SelectionStep<reco::CaloJet> > >
CaloJetSteps;
337 std::vector<std::unique_ptr<SelectionStep<reco::PFJet> > >
PFJetSteps;
339 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_
extra jetID selection on calo jets
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > muonSelect_
extra selection on muons
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecSelect_
extra selection on electrons
define MonitorEnsembple to be used
TopSingleLeptonDQM(const edm::ParameterSet &cfg)
default constructor
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_
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecIso_
extra isolation criterion on electron
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::Vertex > > vertexSelect_
string cut selector
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
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
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
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::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
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup)
do this during the event loop
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