1 #ifndef TOPDILEPTONOFFLINEDQM
2 #define TOPDILEPTONOFFLINEDQM
38 namespace TopDiLeptonOffline {
64 std::string
monitorPath(
const std::string&
label)
const {
return label.substr(label.find(
':')+1); };
67 std::string
selectionPath(
const std::string&
label)
const {
return label.substr(0, label.find(
':')); };
79 bool booked(
const std::string histName)
const {
return hists_.find(histName.c_str())!=
hists_.end(); };
81 void fill(
const std::string histName,
double value)
const {
if(
booked(histName.c_str()))
hists_.find(histName.c_str())->
second->Fill(value); };
83 void fill(
const std::string histName,
double xValue,
double yValue)
const {
if(
booked(histName.c_str()))
hists_.find(histName.c_str())->
second->Fill(xValue, yValue); };
85 void fill(
const std::string histName,
double xValue,
double yValue,
double zValue)
const {
if(
booked(histName.c_str()))
hists_.find(histName.c_str())->
second->Fill(xValue, yValue, zValue); };
95 std::vector<edm::InputTag>
mets_;
145 std::map<std::string,MonitorElement*>
hists_;
152 hists_[hist.c_str()]->getTH1()->SetOption(
"TEXT");
153 hists_[hist.c_str()]->setBinLabel( 1 ,
"Run" , 1);
154 hists_[hist.c_str()]->setBinLabel( 2 ,
"Block" , 1);
155 hists_[hist.c_str()]->setBinLabel( 3 ,
"Event" , 1);
156 hists_[hist.c_str()]->setBinLabel( 6 ,
"pt_{L2L3}(jet1)" , 1);
157 hists_[hist.c_str()]->setBinLabel( 7 ,
"pt_{L2L3}(jet2)" , 1);
158 hists_[hist.c_str()]->setBinLabel( 8 ,
"MET_{Calo}" , 1);
159 hists_[hist.c_str()]->setAxisTitle(
"logged evts" , 2);
161 if(hist==
"diMuonLogger_"){
162 hists_[hist.c_str()]->setBinLabel( 4 ,
"pt(muon)" , 1);
163 hists_[hist.c_str()]->setBinLabel( 5 ,
"pt(muon)" , 1);
165 if(hist==
"diElecLogger_"){
166 hists_[hist.c_str()]->setBinLabel( 4 ,
"pt(elec)" , 1);
167 hists_[hist.c_str()]->setBinLabel( 5 ,
"pt(elec)" , 1);
169 if(hist==
"elecMuLogger_"){
170 hists_[hist.c_str()]->setBinLabel( 4 ,
"pt(elec)" , 1);
171 hists_[hist.c_str()]->setBinLabel( 5 ,
"pt(muon)" , 1);
178 for(
unsigned int idx=0; idx<labels.size(); ++idx){
179 hists_[(channel+
"Mon_").c_str()]->setBinLabel( idx+1,
"["+
monitorPath(labels[idx])+
"]", 1);
187 for(
unsigned int idx=0; idx<labels.size(); ++idx){
189 fill((channel+
"Mon_").c_str(), idx+0.5 );
191 int evts =
hists_.find((channel+
"Mon_").c_str())->second->getBinContent(idx+1);
192 double value =
hists_.find((channel+
"Eff_").c_str())->second->getBinContent(idx+1);
202 if( muons.size()>1 ){ type=
DIMUON; }
else if( elecs.size()>1 ){ type=
DIELEC; }
else if( !elecs.empty() && !muons.empty() ){ type=
ELECMU; }
264 std::string
objectType(
const std::string&
label) {
return label.substr(0, label.find(
':')); };
291 std::map<std::string, std::pair<edm::ParameterSet, TopDiLeptonOffline::MonitorEnsemble*> >
selection_;
std::string selectionPath(const std::string &label) const
StringCutObjectSelector< reco::JetID > * jetIDSelect_
extra jetID selection on calo jets
StringCutObjectSelector< reco::BeamSpot > * beamspotSelect_
string cut selector
void fill(const std::string histName, double value) const
fill histogram if it had been booked before
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup)
do this during the event loop
bool acceptHLT(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
StringCutObjectSelector< reco::GsfElectron > * elecIso_
extra isolation criterion on electron
DecayChannel decayChannel(const std::vector< const reco::Muon * > &muons, const std::vector< const reco::GsfElectron * > &elecs) const
determine dileptonic decay channel
void loggerBinLabels(std::string hist)
set labels for event logging histograms
std::string monitorPath(const std::string &label) const
int elecMuLogged_
number of logged interesting events
std::string selectionStep(const std::string &label)
void fill(const std::string histName, double xValue, double yValue) const
fill histogram if it had been booked before (2-dim version)
edm::InputTag elecs_
input sources for monitoring
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
std::vector< std::string > selectionOrder_
bool booked(const std::string histName) const
check if histogram was booked
edm::InputTag triggerTable_
trigger table
std::vector< std::string > triggerPaths_
trigger paths
StringCutObjectSelector< reco::Vertex > * vertexSelect_
string cut selector
U second(std::pair< T, U > const &p)
StringCutObjectSelector< reco::Muon > * muonIso_
extra isolation criterion on muon
std::map< std::string, std::pair< edm::ParameterSet, TopDiLeptonOffline::MonitorEnsemble * > > selection_
edm::InputTag electronId_
electronId label
std::string jetCorrector_
jetCorrector
std::string label_
instance label
StringCutObjectSelector< reco::Muon > * muonSelect_
extra selection on muons
Level
different verbosity levels
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
TopHLTDiLeptonOfflineDQM(const edm::ParameterSet &cfg)
default constructor
void book(std::string directory)
book histograms in subdirectory directory
std::vector< std::string > diMuonPaths_
trigger paths for di muon channel
edm::InputTag beamspot_
beamspot
reco::LeafCandidate::LorentzVector LorentzVector
double lowerEdge_
mass window upper and lower edge
define MonitorEnsembple to be used
Level verbosity_
verbosity level for booking
std::string objectType(const std::string &label)
std::map< std::string, MonitorElement * > hists_
histogram container
Helper class to define histograms for monitoring of muon/electron/jet/met quantities.
StringCutObjectSelector< reco::GsfElectron > * elecSelect_
extra selection on electrons
edm::InputTag vertex_
primary vertex
~MonitorEnsemble()
default destructor
DQMStore * store_
storage manager
std::vector< edm::InputTag > mets_
considers a vector of METs
DecayChannel
different decay channels
std::vector< std::string > elecMuPaths_
MonitorEnsemble(const char *label, const edm::ParameterSet &cfg)
default contructor
edm::InputTag jetIDLabel_
jetID as an extra selection type
~TopHLTDiLeptonOfflineDQM()
default destructor
edm::InputTag triggerTable_
trigger table
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="")
math::XYZTLorentzVector LorentzVector
Lorentz vector.
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms