#include <HLTTauDQMSource.h>
Public Member Functions | |
HLTTauDQMSource (const edm::ParameterSet &) | |
~HLTTauDQMSource () | |
Protected Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
Fake Analyze. | |
void | beginJob () |
BeginJob. | |
void | beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) |
Luminosity Block. | |
void | beginRun (const edm::Run &r, const edm::EventSetup &c) |
BeginRun. | |
void | endJob () |
Endjob. | |
void | endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) |
DQM Client Diagnostic. | |
void | endRun (const edm::Run &r, const edm::EventSetup &c) |
EndRun. | |
Private Member Functions | |
LVColl | getFilterCollection (size_t index, int id, const trigger::TriggerEvent &trigEv, double) |
Private Attributes | |
std::vector< HLTTauDQMCaloPlotter > | caloPlotters |
std::vector< edm::ParameterSet > | config_ |
std::vector< std::string > | configType_ |
int | counterEvt_ |
DQMStore * | dbe_ |
bool | doRefAnalysis_ |
double | EtMax_ |
double | HLTMatchDr_ |
double | L1MatchDr_ |
std::vector< HLTTauDQML1Plotter > | l1Plotters |
std::vector < HLTTauDQMLitePathPlotter > | litePathPlotters |
int | NEtaBins_ |
int | NPhiBins_ |
int | NPtBins_ |
std::vector< HLTTauDQMPathPlotter > | pathPlotters |
int | prescaleEvt_ |
counter | |
std::vector< double > | ptThres_ |
std::vector< edm::InputTag > | refFilter_ |
std::vector< int > | refID_ |
std::vector < HLTTauDQMSummaryPlotter > | summaryPlotters |
std::vector< HLTTauDQMTrkPlotter > | trackPlotters |
edm::InputTag | triggerEvent_ |
every n events |
Definition at line 59 of file HLTTauDQMSource.h.
HLTTauDQMSource::HLTTauDQMSource | ( | const edm::ParameterSet & | ps | ) |
Definition at line 7 of file HLTTauDQMSource.cc.
References caloPlotters, config_, configType_, doRefAnalysis_, EtMax_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLTMatchDr_, i, L1MatchDr_, l1Plotters, litePathPlotters, NEtaBins_, NPhiBins_, NPtBins_, pathPlotters, prescaleEvt_, ptThres_, refFilter_, refID_, summaryPlotters, tmp, trackPlotters, and triggerEvent_.
:counterEvt_(0) { //Get General Monitoring Parameters config_ = ps.getParameter<std::vector<edm::ParameterSet> >("MonitorSetup"); configType_ = ps.getParameter<std::vector<std::string> >("ConfigType"); doRefAnalysis_ = ps.getParameter<bool>("doMatching"); NPtBins_ = ps.getUntrackedParameter<int>("PtHistoBins",20); NEtaBins_ = ps.getUntrackedParameter<int>("EtaHistoBins",20); NPhiBins_ = ps.getUntrackedParameter<int>("PhiHistoBins",32); EtMax_ = ps.getUntrackedParameter<double>("EtHistoMax",100); L1MatchDr_ = ps.getUntrackedParameter<double>("L1MatchDeltaR",0.5); HLTMatchDr_ = ps.getUntrackedParameter<double>("HLTMatchDeltaR",0.3); refFilter_ = ps.getUntrackedParameter<std::vector<edm::InputTag> >("matchFilter"); refID_ = ps.getUntrackedParameter<std::vector<int> >("matchObjectID"); ptThres_ = ps.getUntrackedParameter<std::vector<double> >("matchObjectMinPt"); prescaleEvt_ = ps.getUntrackedParameter<int>("prescaleEvt", -1); triggerEvent_ = ps.getParameter < edm::InputTag > ("TriggerEvent"); //Read The Configuration for(unsigned int i=0;i<config_.size();++i) { if(configType_[i] == "L1") { HLTTauDQML1Plotter tmp(config_[i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,L1MatchDr_); l1Plotters.push_back(tmp); } if(configType_[i] == "Calo") { HLTTauDQMCaloPlotter tmp(config_[i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,HLTMatchDr_); caloPlotters.push_back(tmp); } else if(configType_[i] == "Track") { HLTTauDQMTrkPlotter tmp(config_[i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,HLTMatchDr_); trackPlotters.push_back(tmp); } else if(configType_[i] == "Path") { HLTTauDQMPathPlotter tmp(config_[i],doRefAnalysis_); pathPlotters.push_back(tmp); } else if(configType_[i] == "LitePath") { HLTTauDQMLitePathPlotter tmp(config_[i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,HLTMatchDr_); litePathPlotters.push_back(tmp); } else if(configType_[i] == "Summary") { HLTTauDQMSummaryPlotter tmp(config_[i]); summaryPlotters.push_back(tmp); } } }
HLTTauDQMSource::~HLTTauDQMSource | ( | ) |
Definition at line 73 of file HLTTauDQMSource.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void HLTTauDQMSource::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Fake Analyze.
Implements edm::EDAnalyzer.
Definition at line 101 of file HLTTauDQMSource.cc.
References caloPlotters, counterEvt_, doRefAnalysis_, exception, edm::Event::getByLabel(), getFilterCollection(), i, gen::k, l1Plotters, litePathPlotters, pathPlotters, prescaleEvt_, ptThres_, dt_dqm_sourceclient_common_cff::reco, refFilter_, refID_, trackPlotters, and triggerEvent_.
{ using namespace std; using namespace edm; using namespace reco; using namespace l1extra; using namespace trigger; //Apply the prescaler if(counterEvt_ > prescaleEvt_) { //Do Analysis here //Create dummy Match Collections std::vector<LVColl> refC; if(doRefAnalysis_) { Handle<TriggerEvent> trigEv; //get The triggerEvent bool gotTEV =true; try { gotTEV*= iEvent.getByLabel(triggerEvent_,trigEv); } catch (cms::Exception& exception) { gotTEV =false; } if(gotTEV) for(unsigned int i=0;i<refFilter_.size();++i) { size_t ID =trigEv->filterIndex(refFilter_[i]); refC.push_back(getFilterCollection(ID,refID_[i],*trigEv,ptThres_[i])); } } //fill the empty slots with empty collections LVColl dummy; for(int k=refFilter_.size();k<3;k++) { refC.push_back(dummy); } //Path Plotters for(unsigned int i=0;i<pathPlotters.size();++i) pathPlotters[i].analyze(iEvent,iSetup,refC); //Lite Path Plotters for(unsigned int i=0;i<litePathPlotters.size();++i) litePathPlotters[i].analyze(iEvent,iSetup,refC); //L1 Plotters for(unsigned int i=0;i<l1Plotters.size();++i) l1Plotters[i].analyze(iEvent,iSetup,refC); //Calo Plotters for(unsigned int i=0;i<caloPlotters.size();++i) caloPlotters[i].analyze(iEvent,iSetup,refC[0]); //Track Plotters for(unsigned int i=0;i<trackPlotters.size();++i) trackPlotters[i].analyze(iEvent,iSetup,refC[0]); } else counterEvt_++; }
void HLTTauDQMSource::beginJob | ( | void | ) | [protected, virtual] |
void HLTTauDQMSource::beginLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | context | ||
) | [protected, virtual] |
Luminosity Block.
Reimplemented from edm::EDAnalyzer.
Definition at line 94 of file HLTTauDQMSource.cc.
{ }
void HLTTauDQMSource::beginRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
void HLTTauDQMSource::endJob | ( | void | ) | [protected, virtual] |
Endjob.
Reimplemented from edm::EDAnalyzer.
Definition at line 191 of file HLTTauDQMSource.cc.
{
return;
}
void HLTTauDQMSource::endLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
DQM Client Diagnostic.
Reimplemented from edm::EDAnalyzer.
Definition at line 180 of file HLTTauDQMSource.cc.
References i, EcalCondTools::plot(), and summaryPlotters.
{ //Summary Plotters for(unsigned int i=0;i<summaryPlotters.size();++i) summaryPlotters[i].plot(); }
void HLTTauDQMSource::endRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
LVColl HLTTauDQMSource::getFilterCollection | ( | size_t | index, |
int | id, | ||
const trigger::TriggerEvent & | trigEv, | ||
double | ptCut | ||
) | [private] |
Definition at line 197 of file HLTTauDQMSource.cc.
References a, abs, trigger::TriggerEvent::filterKeys(), trigger::TriggerEvent::getObjects(), i, trigger::TriggerObject::id(), dbtoconf::out, trigger::TriggerObject::px(), trigger::TriggerObject::py(), trigger::TriggerObject::pz(), trigger::TriggerEvent::sizeFilters(), and mathSSE::sqrt().
Referenced by analyze().
{ using namespace trigger; //Create output Collection LVColl out; //get All the final trigger objects const TriggerObjectCollection& TOC(trigEv.getObjects()); //filter index if(index!=trigEv.sizeFilters()) { const Keys& KEYS = trigEv.filterKeys(index); for(size_t i = 0;i<KEYS.size();++i) { const TriggerObject& TO(TOC[KEYS[i]]); LV a(TO.px(),TO.py(),TO.pz(),sqrt(TO.px()*TO.px()+TO.py()*TO.py()+TO.pz()*TO.pz())); if(abs(TO.id()) == id) if(a.pt()>ptCut) out.push_back(a); } } return out; }
std::vector<HLTTauDQMCaloPlotter> HLTTauDQMSource::caloPlotters [private] |
Definition at line 126 of file HLTTauDQMSource.h.
Referenced by analyze(), and HLTTauDQMSource().
std::vector<edm::ParameterSet> HLTTauDQMSource::config_ [private] |
Definition at line 91 of file HLTTauDQMSource.h.
Referenced by HLTTauDQMSource().
std::vector<std::string> HLTTauDQMSource::configType_ [private] |
Definition at line 92 of file HLTTauDQMSource.h.
Referenced by HLTTauDQMSource().
int HLTTauDQMSource::counterEvt_ [private] |
Definition at line 114 of file HLTTauDQMSource.h.
Referenced by analyze().
DQMStore* HLTTauDQMSource::dbe_ [private] |
Definition at line 90 of file HLTTauDQMSource.h.
bool HLTTauDQMSource::doRefAnalysis_ [private] |
Definition at line 95 of file HLTTauDQMSource.h.
Referenced by analyze(), and HLTTauDQMSource().
double HLTTauDQMSource::EtMax_ [private] |
Definition at line 99 of file HLTTauDQMSource.h.
Referenced by HLTTauDQMSource().
double HLTTauDQMSource::HLTMatchDr_ [private] |
Definition at line 101 of file HLTTauDQMSource.h.
Referenced by HLTTauDQMSource().
double HLTTauDQMSource::L1MatchDr_ [private] |
Definition at line 100 of file HLTTauDQMSource.h.
Referenced by HLTTauDQMSource().
std::vector<HLTTauDQML1Plotter> HLTTauDQMSource::l1Plotters [private] |
Definition at line 125 of file HLTTauDQMSource.h.
Referenced by analyze(), and HLTTauDQMSource().
std::vector<HLTTauDQMLitePathPlotter> HLTTauDQMSource::litePathPlotters [private] |
Definition at line 129 of file HLTTauDQMSource.h.
Referenced by analyze(), and HLTTauDQMSource().
int HLTTauDQMSource::NEtaBins_ [private] |
Definition at line 97 of file HLTTauDQMSource.h.
Referenced by HLTTauDQMSource().
int HLTTauDQMSource::NPhiBins_ [private] |
Definition at line 98 of file HLTTauDQMSource.h.
Referenced by HLTTauDQMSource().
int HLTTauDQMSource::NPtBins_ [private] |
Definition at line 96 of file HLTTauDQMSource.h.
Referenced by HLTTauDQMSource().
std::vector<HLTTauDQMPathPlotter> HLTTauDQMSource::pathPlotters [private] |
Definition at line 128 of file HLTTauDQMSource.h.
Referenced by analyze(), and HLTTauDQMSource().
int HLTTauDQMSource::prescaleEvt_ [private] |
counter
Definition at line 115 of file HLTTauDQMSource.h.
Referenced by analyze(), and HLTTauDQMSource().
std::vector<double> HLTTauDQMSource::ptThres_ [private] |
Definition at line 106 of file HLTTauDQMSource.h.
Referenced by analyze(), and HLTTauDQMSource().
std::vector<edm::InputTag> HLTTauDQMSource::refFilter_ [private] |
Definition at line 104 of file HLTTauDQMSource.h.
Referenced by analyze(), and HLTTauDQMSource().
std::vector<int> HLTTauDQMSource::refID_ [private] |
Definition at line 105 of file HLTTauDQMSource.h.
Referenced by analyze(), and HLTTauDQMSource().
std::vector<HLTTauDQMSummaryPlotter> HLTTauDQMSource::summaryPlotters [private] |
Definition at line 130 of file HLTTauDQMSource.h.
Referenced by endLuminosityBlock(), and HLTTauDQMSource().
std::vector<HLTTauDQMTrkPlotter> HLTTauDQMSource::trackPlotters [private] |
Definition at line 127 of file HLTTauDQMSource.h.
Referenced by analyze(), and HLTTauDQMSource().
edm::InputTag HLTTauDQMSource::triggerEvent_ [private] |
every n events
Definition at line 118 of file HLTTauDQMSource.h.
Referenced by analyze(), and HLTTauDQMSource().