1 #ifndef TOPDILEPTONOFFLINEDQM
2 #define TOPDILEPTONOFFLINEDQM
50 namespace TopDiLeptonOffline {
88 return label.substr(label.find(
':') + 1);
93 return label.substr(0, label.find(
':'));
97 const std::vector<const reco::PFCandidate*>& elecs)
104 const std::vector<std::string>
labels);
115 if (
booked(histName.c_str()))
120 if (
booked(histName.c_str()))
121 hists_.find(histName.c_str())->
second->Fill(xValue, yValue);
125 double zValue)
const {
126 if (
booked(histName.c_str()))
127 hists_.find(histName.c_str())->
second->Fill(xValue, yValue, zValue);
141 std::vector<edm::EDGetTokenT<edm::View<reco::MET> > >
mets_;
168 std::unique_ptr<StringCutObjectSelector<reco::PFCandidate> >
elecIso_;
170 std::unique_ptr<StringCutObjectSelector<reco::PFCandidate> >
elecSelect_;
173 std::unique_ptr<StringCutObjectSelector<reco::PFCandidate, true> >
muonIso_;
176 std::unique_ptr< StringCutObjectSelector<reco::PFCandidate, true> >
muonSelect_;
194 std::map<std::string, MonitorElement*>
hists_;
201 hists_[hist.c_str()]->getTH1()->SetOption(
"TEXT");
202 hists_[hist.c_str()]->setBinLabel(1,
"Run", 1);
203 hists_[hist.c_str()]->setBinLabel(2,
"Block", 1);
204 hists_[hist.c_str()]->setBinLabel(3,
"Event", 1);
205 hists_[hist.c_str()]->setBinLabel(6,
"pt_{L2L3}(jet1)", 1);
206 hists_[hist.c_str()]->setBinLabel(7,
"pt_{L2L3}(jet2)", 1);
207 hists_[hist.c_str()]->setBinLabel(8,
"MET_{Calo}", 1);
208 hists_[hist.c_str()]->setAxisTitle(
"logged evts", 2);
210 if (hist ==
"diMuonLogger_") {
211 hists_[hist.c_str()]->setBinLabel(4,
"pt(muon)", 1);
212 hists_[hist.c_str()]->setBinLabel(5,
"pt(muon)", 1);
214 if (hist ==
"diElecLogger_") {
215 hists_[hist.c_str()]->setBinLabel(4,
"pt(elec)", 1);
216 hists_[hist.c_str()]->setBinLabel(5,
"pt(elec)", 1);
218 if (hist ==
"elecMuLogger_") {
219 hists_[hist.c_str()]->setBinLabel(4,
"pt(elec)", 1);
220 hists_[hist.c_str()]->setBinLabel(5,
"pt(muon)", 1);
226 for (
unsigned int idx = 0;
idx < labels.size(); ++
idx) {
227 hists_[(channel +
"Mon_").c_str()]
229 hists_[(channel +
"Eff_").c_str()]
230 ->setBinLabel(idx + 1,
"[" +
selectionPath(labels[idx]) +
"]|[" +
239 const std::vector<std::string>
labels)
const {
240 for (
unsigned int idx = 0;
idx < labels.size(); ++
idx) {
242 fill((channel +
"Mon_").c_str(), idx + 0.5);
244 int evts =
hists_.find((channel +
"Mon_").c_str())
245 ->second->getBinContent(idx + 1);
246 double value =
hists_.find((channel +
"Eff_").c_str())
247 ->second->getBinContent(idx + 1);
249 (channel +
"Eff_").c_str(), idx + 0.5,
257 const std::vector<const reco::PFCandidate*>&
muons,
258 const std::vector<const reco::PFCandidate*>& elecs)
const {
260 if (muons.size() > 1) {
262 }
else if (elecs.size() > 1) {
264 }
else if (!elecs.empty() && !muons.empty()) {
342 return label.substr(0, label.find(
':'));
347 return label.substr(label.find(
':') + 1);
373 std::pair<edm::ParameterSet, std::unique_ptr<TopDiLeptonOffline::MonitorEnsemble > > >
375 std::unique_ptr<SelectionStep<reco::PFCandidate> >
MuonStep;
377 std::unique_ptr<SelectionStep<reco::Vertex> >
PvStep;
378 std::unique_ptr<SelectionStep<reco::MET> >
METStep;
379 std::vector<std::unique_ptr<SelectionStep<reco::Jet> > >
JetSteps;
380 std::vector<std::unique_ptr<SelectionStep<reco::CaloJet> > >
CaloJetSteps;
381 std::vector<std::unique_ptr<SelectionStep<reco::PFJet> > >
PFJetSteps;
383 std::vector<edm::ParameterSet>
sel_;
std::string selectionPath(const std::string &label) const
std::string selectionStep(const std::string &label)
std::vector< std::string > selectionOrder_
~TopDiLeptonOfflineDQM()
default destructor
void fill(const std::string histName, double value) const
fill histogram if it had been booked before
std::unique_ptr< SelectionStep< reco::Vertex > > PvStep
Level verbosity_
verbosity level for booking
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
define MonitorEnsembple to be used
std::vector< std::unique_ptr< SelectionStep< reco::CaloJet > > > CaloJetSteps
edm::EDGetTokenT< std::vector< reco::Vertex > > vertex_
primary vertex
MonitorEnsemble(const char *label, const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup)
do this during the event loop
void loggerBinLabels(std::string hist)
set labels for event logging histograms
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecIso_
extra isolation criterion on electron
std::string monitorPath(const std::string &label) const
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > vertexSelect_
string cut selector
std::vector< edm::ParameterSet > sel_
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
void fill(const std::string histName, double xValue, double yValue) const
fill histogram if it had been booked before (2-dim version)
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
bool booked(const std::string histName) const
check if histogram was booked
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
std::vector< std::unique_ptr< SelectionStep< reco::Jet > > > JetSteps
U second(std::pair< T, U > const &p)
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
extra jetID selection on calo jets
edm::EDGetTokenT< edm::View< reco::PFCandidate > > muons_
std::unique_ptr< SelectionStep< reco::PFCandidate > > MuonStep
double lowerEdge_
mass window upper and lower edge
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
std::vector< std::string > elecMuPaths_
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecSelect_
extra selection on electrons
std::unique_ptr< SelectionStep< reco::MET > > METStep
Level
different verbosity levels
std::string jetCorrector_
jetCorrector
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
TopDiLeptonOfflineDQM(const edm::ParameterSet &cfg)
default constructor
std::unique_ptr< SelectionStep< reco::PFCandidate > > ElectronStep
int elecMuLogged_
number of logged interesting events
std::vector< std::string > diMuonPaths_
trigger paths for di muon channel
std::string label_
instance label
reco::LeafCandidate::LorentzVector LorentzVector
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::map< std::string, MonitorElement * > hists_
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
void book(DQMStore::IBooker &ibooker)
book histograms in subdirectory directory
std::map< std::string, std::pair< edm::ParameterSet, std::unique_ptr< TopDiLeptonOffline::MonitorEnsemble > > > selection_
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
std::unique_ptr< StringCutObjectSelector< reco::BeamSpot > > beamspotSelect_
string cut selector
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > muonSelect_
extra selection on muons
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
std::vector< std::string > triggerPaths_
trigger paths
~MonitorEnsemble()
default destructor
DecayChannel
different decay channels
std::string objectType(const std::string &label)
DecayChannel decayChannel(const std::vector< const reco::PFCandidate * > &muons, const std::vector< const reco::PFCandidate * > &elecs) const
determine dileptonic decay channel
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > muonIso_
extra isolation criterion on muon
void fill(const std::string histName, double xValue, double yValue, double zValue) const
fill histogram if it had been booked before (2-dim version)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
edm::EDGetTokenT< reco::BeamSpot > beamspot_
beamspot
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
math::XYZTLorentzVector LorentzVector
Lorentz vector.
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
std::vector< std::unique_ptr< SelectionStep< reco::PFJet > > > PFJetSteps