#include <DTLocalTriggerBaseTest.h>
Public Member Functions | |
DTLocalTriggerBaseTest () | |
Constructor. | |
virtual | ~DTLocalTriggerBaseTest () |
Destructor. | |
Protected Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
Analyze. | |
void | beginJob () |
BeginJob. | |
void | beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context) |
Perform begin lumiblock operations. | |
void | beginRun (edm::Run const &run, edm::EventSetup const &context) |
BeginRun. | |
void | bookCmsHistos (std::string hTag, std::string folder="", bool isGlb=false) |
Book the new MEs (CMS summary) | |
void | bookSectorHistos (int wheel, int sector, std::string hTag, std::string folder="") |
Book the new MEs (for each sector) | |
void | bookWheelHistos (int wheel, std::string hTag, std::string folder="") |
Book the new MEs (for each wheel) | |
std::string | category () |
Get message logger name. | |
void | endJob () |
EndJob. | |
void | endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context) |
Perform client diagnostic in online. | |
void | endRun (edm::Run const &run, edm::EventSetup const &context) |
Perform client diagnostic in offline. | |
std::string | fullName (std::string htype) |
Create fullname from histo partial name. | |
template<class T > | |
T * | getHisto (MonitorElement *me) |
Convert ME to Histogram fo type T. | |
std::string | getMEName (std::string histoTag, std::string subfolder, const DTChamberId &chambid) |
Get the ME name (by chamber) | |
std::string | getMEName (std::string histoTag, std::string subfolder, int wh) |
Get the ME name (by wheel) | |
std::pair< float, float > | phiRange (const DTChamberId &id) |
Calculate phi range for histograms. | |
virtual void | runClientDiagnostic ()=0 |
Perform client analysis. | |
void | setConfig (const edm::ParameterSet &ps, std::string name) |
Set configuration variables. | |
std::string & | topFolder (bool isDCC) |
Get top folder name. | |
Protected Attributes | |
std::string | baseFolderDCC |
std::string | baseFolderDDU |
std::map< std::string, MonitorElement * > | cmsME |
DQMStore * | dbe |
std::string | hwSource |
std::vector< std::string > | hwSources |
edm::ESHandle< DTGeometry > | muonGeom |
int | nevents |
unsigned int | nLumiSegs |
edm::ParameterSet | parameters |
int | prescaleFactor |
int | run |
bool | runOnline |
std::map< int, std::map < std::string, MonitorElement * > > | secME |
std::string | sourceFolder |
std::string | testName |
std::string | trigSource |
std::vector< std::string > | trigSources |
std::map< int, std::map < std::string, MonitorElement * > > | whME |
* DQM Base for TriggerTests
Definition at line 39 of file DTLocalTriggerBaseTest.h.
DTLocalTriggerBaseTest::DTLocalTriggerBaseTest | ( | ) | [inline] |
DTLocalTriggerBaseTest::~DTLocalTriggerBaseTest | ( | ) | [virtual] |
Destructor.
Definition at line 36 of file DTLocalTriggerBaseTest.cc.
References python::rootplot::argparse::category, and nevents.
{ LogVerbatim(category()) << "[" << testName << "Test]: analyzed " << nevents << " events"; }
void DTLocalTriggerBaseTest::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Analyze.
Implements edm::EDAnalyzer.
Definition at line 67 of file DTLocalTriggerBaseTest.cc.
References python::rootplot::argparse::category, LogTrace, and nevents.
void DTLocalTriggerBaseTest::beginJob | ( | void | ) | [protected, virtual] |
BeginJob.
Reimplemented from edm::EDAnalyzer.
Reimplemented in DTFineDelayCorr, DTLocalTriggerLutTest, DTLocalTriggerSynchTest, DTLocalTriggerTest, DTLocalTriggerTPTest, DTTriggerEfficiencyTest, and DTTriggerLutTest.
Definition at line 42 of file DTLocalTriggerBaseTest.cc.
References python::rootplot::argparse::category, and nevents.
{ LogVerbatim(category()) << "[" << testName << "Test]: BeginJob"; nevents = 0; nLumiSegs = 0; }
void DTLocalTriggerBaseTest::beginLuminosityBlock | ( | edm::LuminosityBlock const & | lumiSeg, |
edm::EventSetup const & | context | ||
) | [protected, virtual] |
Perform begin lumiblock operations.
Reimplemented from edm::EDAnalyzer.
Definition at line 57 of file DTLocalTriggerBaseTest.cc.
References python::rootplot::argparse::category, LogTrace, edm::LuminosityBlockBase::run(), and DTTTrigCorrFirst::run.
void DTLocalTriggerBaseTest::beginRun | ( | edm::Run const & | run, |
edm::EventSetup const & | context | ||
) | [protected, virtual] |
BeginRun.
Reimplemented from edm::EDAnalyzer.
Reimplemented in DTFineDelayCorr, DTLocalTriggerEfficiencyTest, DTLocalTriggerLutTest, DTLocalTriggerSynchTest, DTLocalTriggerTest, DTLocalTriggerTPTest, DTTriggerEfficiencyTest, and DTTriggerLutTest.
Definition at line 50 of file DTLocalTriggerBaseTest.cc.
References python::rootplot::argparse::category, and edm::EventSetup::get().
Referenced by DTTriggerLutTest::beginRun(), DTLocalTriggerTPTest::beginRun(), DTTriggerEfficiencyTest::beginRun(), DTLocalTriggerTest::beginRun(), DTFineDelayCorr::beginRun(), DTLocalTriggerLutTest::beginRun(), and DTLocalTriggerSynchTest::beginRun().
{ LogVerbatim(category()) << "[" << testName << "Test]: BeginRun"; context.get<MuonGeometryRecord>().get(muonGeom); }
void DTLocalTriggerBaseTest::bookCmsHistos | ( | std::string | hTag, |
std::string | folder = "" , |
||
bool | isGlb = false |
||
) | [protected] |
Book the new MEs (CMS summary)
Definition at line 262 of file DTLocalTriggerBaseTest.cc.
References python::rootplot::argparse::category, newFWLiteAna::fullName, LogTrace, and MonitorElement::setAxisTitle().
{ bool isDCC = hwSource == "DCC"; string basedir = topFolder(isDCC); if (folder != "") { basedir += folder +"/" ; } dbe->setCurrentFolder(basedir); string hname = isGlb ? hTag : fullName(hTag); LogTrace(category()) << "[" << testName << "Test]: booking " << basedir << hname; MonitorElement* me = dbe->book2D(hname.c_str(),hname.c_str(),12,1,13,5,-2,3); me->setAxisTitle("Sector",1); me->setAxisTitle("Wheel",2); cmsME[hname] = me; }
void DTLocalTriggerBaseTest::bookSectorHistos | ( | int | wheel, |
int | sector, | ||
std::string | hTag, | ||
std::string | folder = "" |
||
) | [protected] |
Book the new MEs (for each sector)
Definition at line 200 of file DTLocalTriggerBaseTest.cc.
References python::rootplot::argparse::category, newFWLiteAna::fullName, LogTrace, and MonitorElement::setBinLabel().
Referenced by DTLocalTriggerEfficiencyTest::beginRun(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().
{ stringstream wh; wh << wheel; stringstream sc; sc << sector; int sectorid = (wheel+3) + (sector-1)*5; bool isDCC = hwSource=="DCC" ; string basedir = topFolder(isDCC)+"Wheel"+wh.str()+"/Sector"+sc.str()+"/"; if (folder!="") { basedir += folder +"/"; } dbe->setCurrentFolder(basedir); string fullTag = fullName(hTag); string hname = fullTag + "_W" + wh.str()+"_Sec" +sc.str(); LogTrace(category()) << "[" << testName << "Test]: booking " << basedir << hname; if (hTag.find("BXDistribPhi") != string::npos){ MonitorElement* me = dbe->book2D(hname.c_str(),hname.c_str(),25,-4.5,20.5,4,0.5,4.5); me->setBinLabel(1,"MB1",2); me->setBinLabel(2,"MB2",2); me->setBinLabel(3,"MB3",2); me->setBinLabel(4,"MB4",2); secME[sectorid][fullTag] = me; return; } else if (hTag.find("QualDistribPhi") != string::npos){ MonitorElement* me = dbe->book2D(hname.c_str(),hname.c_str(),7,-0.5,6.5,4,0.5,4.5); me->setBinLabel(1,"MB1",2); me->setBinLabel(2,"MB2",2); me->setBinLabel(3,"MB3",2); me->setBinLabel(4,"MB4",2); me->setBinLabel(1,"LI",1); me->setBinLabel(2,"LO",1); me->setBinLabel(3,"HI",1); me->setBinLabel(4,"HO",1); me->setBinLabel(5,"LL",1); me->setBinLabel(6,"HL",1); me->setBinLabel(7,"HH",1); secME[sectorid][fullTag] = me; return; } else if (hTag.find("Phi") != string::npos || hTag.find("TkvsTrig") != string::npos ){ MonitorElement* me = dbe->book1D(hname.c_str(),hname.c_str(),4,0.5,4.5); me->setBinLabel(1,"MB1",1); me->setBinLabel(2,"MB2",1); me->setBinLabel(3,"MB3",1); me->setBinLabel(4,"MB4",1); secME[sectorid][fullTag] = me; return; } if (hTag.find("Theta") != string::npos){ MonitorElement* me =dbe->book1D(hname.c_str(),hname.c_str(),3,0.5,3.5); me->setBinLabel(1,"MB1",1); me->setBinLabel(2,"MB2",1); me->setBinLabel(3,"MB3",1); secME[sectorid][fullTag] = me; return; } }
void DTLocalTriggerBaseTest::bookWheelHistos | ( | int | wheel, |
std::string | hTag, | ||
std::string | folder = "" |
||
) | [protected] |
Book the new MEs (for each wheel)
Reimplemented in DTTriggerEfficiencyTest.
Referenced by DTLocalTriggerEfficiencyTest::beginRun(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().
std::string DTLocalTriggerBaseTest::category | ( | void | ) | [inline, protected] |
Get message logger name.
Definition at line 112 of file DTLocalTriggerBaseTest.h.
Referenced by DTTriggerEfficiencyTest::bookChambHistos().
{ return "DTDQM|DTMonitorClient|" + testName + "Test"; } ;
void DTLocalTriggerBaseTest::endJob | ( | void | ) | [protected, virtual] |
EndJob.
Reimplemented from edm::EDAnalyzer.
Reimplemented in DTFineDelayCorr, and DTLocalTriggerSynchTest.
Definition at line 91 of file DTLocalTriggerBaseTest.cc.
References python::rootplot::argparse::category, and LogTrace.
Referenced by DTFineDelayCorr::endJob(), and DTLocalTriggerSynchTest::endJob().
void DTLocalTriggerBaseTest::endLuminosityBlock | ( | edm::LuminosityBlock const & | lumiSeg, |
edm::EventSetup const & | context | ||
) | [protected, virtual] |
Perform client diagnostic in online.
Reimplemented from edm::EDAnalyzer.
Definition at line 75 of file DTLocalTriggerBaseTest.cc.
References dtDQMClient_cfg::prescaleFactor.
{ if (!runOnline) return; LogVerbatim("DTDQM|DTMonitorClient|DTLocalTriggerTest") <<"[" << testName << "Test]: End of LS transition, performing the DQM client operation"; // counts number of lumiSegs and prescale nLumiSegs++; if ( nLumiSegs%prescaleFactor != 0 ) return; LogVerbatim("DTDQM|DTMonitorClient|DTLocalTriggerTest") <<"[" << testName << "Test]: "<<nLumiSegs<<" updates"; runClientDiagnostic(); }
void DTLocalTriggerBaseTest::endRun | ( | edm::Run const & | run, |
edm::EventSetup const & | context | ||
) | [protected, virtual] |
Perform client diagnostic in offline.
Reimplemented from edm::EDAnalyzer.
Definition at line 98 of file DTLocalTriggerBaseTest.cc.
References python::rootplot::argparse::category, and LogTrace.
{ LogTrace(category()) << "[" << testName << "Test] endRun called!"; if (!runOnline) { LogVerbatim(category()) << "[" << testName << "Test] Client called in offline mode, performing client operations"; runClientDiagnostic(); } }
std::string DTLocalTriggerBaseTest::fullName | ( | std::string | htype | ) | [protected] |
Create fullname from histo partial name.
Referenced by DTTriggerEfficiencyTest::bookChambHistos(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().
T * DTLocalTriggerBaseTest::getHisto | ( | MonitorElement * | me | ) | [protected] |
Convert ME to Histogram fo type T.
Definition at line 141 of file DTLocalTriggerBaseTest.h.
References MonitorElement::getRootObject().
{ return me ? dynamic_cast<T*>(me->getRootObject()) : 0; }
std::string DTLocalTriggerBaseTest::getMEName | ( | std::string | histoTag, |
std::string | subfolder, | ||
const DTChamberId & | chambid | ||
) | [protected] |
Get the ME name (by chamber)
Referenced by DTLocalTriggerEfficiencyTest::runClientDiagnostic().
std::string DTLocalTriggerBaseTest::getMEName | ( | std::string | histoTag, |
std::string | subfolder, | ||
int | wh | ||
) | [protected] |
Get the ME name (by wheel)
Reimplemented in DTTriggerEfficiencyTest.
pair< float, float > DTLocalTriggerBaseTest::phiRange | ( | const DTChamberId & | id | ) | [protected] |
Calculate phi range for histograms.
Definition at line 333 of file DTLocalTriggerBaseTest.cc.
References DTLayerId, DTTopology::firstChannel(), DTTopology::lastChannel(), edm::max(), edm::min(), GeomDet::position(), DTLayer::specificTopology(), GeomDet::toLocal(), DTTopology::wirePosition(), and x.
{ float min,max; int station = id.station(); int sector = id.sector(); int wheel = id.wheel(); const DTLayer *layer = muonGeom->layer(DTLayerId(id,1,1)); DTTopology topo = layer->specificTopology(); min = topo.wirePosition(topo.firstChannel()); max = topo.wirePosition(topo.lastChannel()); if (station == 4){ const DTLayer *layer2; float lposx; if (sector == 4){ layer2 = muonGeom->layer(DTLayerId(wheel,station,13,1,1)); lposx = layer->toLocal(layer2->position()).x(); } else if (sector == 10){ layer2 = muonGeom->layer(DTLayerId(wheel,station,14,1,1)); lposx = layer->toLocal(layer2->position()).x(); } else return make_pair(min,max); DTTopology topo2 = layer2->specificTopology(); if (lposx>0){ max = lposx*.5+topo2.wirePosition(topo2.lastChannel()); min -= lposx*.5; } else{ min = lposx*.5+topo2.wirePosition(topo2.firstChannel()); max -= lposx*.5; } } return make_pair(min,max); }
virtual void DTLocalTriggerBaseTest::runClientDiagnostic | ( | ) | [protected, pure virtual] |
Perform client analysis.
Implemented in DTFineDelayCorr, DTLocalTriggerEfficiencyTest, DTLocalTriggerLutTest, DTLocalTriggerSynchTest, DTLocalTriggerTest, DTLocalTriggerTPTest, DTTriggerEfficiencyTest, and DTTriggerLutTest.
void DTLocalTriggerBaseTest::setConfig | ( | const edm::ParameterSet & | ps, |
std::string | name | ||
) | [protected] |
Set configuration variables.
Referenced by DTLocalTriggerEfficiencyTest::DTLocalTriggerEfficiencyTest().
std::string& DTLocalTriggerBaseTest::topFolder | ( | bool | isDCC | ) | [inline, protected] |
Get top folder name.
Definition at line 109 of file DTLocalTriggerBaseTest.h.
References baseFolderDCC, and baseFolderDDU.
Referenced by DTTriggerEfficiencyTest::bookChambHistos().
{ return isDCC ? baseFolderDCC : baseFolderDDU; } ;
std::string DTLocalTriggerBaseTest::baseFolderDCC [protected] |
Definition at line 128 of file DTLocalTriggerBaseTest.h.
Referenced by DTLocalTriggerEfficiencyTest::DTLocalTriggerEfficiencyTest(), and topFolder().
std::string DTLocalTriggerBaseTest::baseFolderDDU [protected] |
Definition at line 129 of file DTLocalTriggerBaseTest.h.
Referenced by DTLocalTriggerEfficiencyTest::DTLocalTriggerEfficiencyTest(), and topFolder().
std::map<std::string,MonitorElement*> DTLocalTriggerBaseTest::cmsME [protected] |
Definition at line 135 of file DTLocalTriggerBaseTest.h.
DQMStore* DTLocalTriggerBaseTest::dbe [protected] |
Definition at line 124 of file DTLocalTriggerBaseTest.h.
Referenced by DTTriggerEfficiencyTest::bookChambHistos(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().
std::string DTLocalTriggerBaseTest::hwSource [protected] |
Definition at line 131 of file DTLocalTriggerBaseTest.h.
Referenced by DTLocalTriggerEfficiencyTest::beginRun(), DTTriggerEfficiencyTest::bookChambHistos(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().
std::vector<std::string> DTLocalTriggerBaseTest::hwSources [protected] |
Definition at line 122 of file DTLocalTriggerBaseTest.h.
Referenced by DTLocalTriggerEfficiencyTest::beginRun(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().
edm::ESHandle<DTGeometry> DTLocalTriggerBaseTest::muonGeom [protected] |
Definition at line 132 of file DTLocalTriggerBaseTest.h.
Referenced by DTLocalTriggerEfficiencyTest::beginRun().
int DTLocalTriggerBaseTest::nevents [protected] |
Definition at line 112 of file DTLocalTriggerBaseTest.h.
unsigned int DTLocalTriggerBaseTest::nLumiSegs [protected] |
Definition at line 117 of file DTLocalTriggerBaseTest.h.
edm::ParameterSet DTLocalTriggerBaseTest::parameters [protected] |
Definition at line 126 of file DTLocalTriggerBaseTest.h.
Referenced by DTLocalTriggerEfficiencyTest::beginRun().
int DTLocalTriggerBaseTest::prescaleFactor [protected] |
Definition at line 118 of file DTLocalTriggerBaseTest.h.
int DTLocalTriggerBaseTest::run [protected] |
Definition at line 119 of file DTLocalTriggerBaseTest.h.
bool DTLocalTriggerBaseTest::runOnline [protected] |
Definition at line 127 of file DTLocalTriggerBaseTest.h.
std::map<int,std::map<std::string,MonitorElement*> > DTLocalTriggerBaseTest::secME [protected] |
Definition at line 133 of file DTLocalTriggerBaseTest.h.
Referenced by DTLocalTriggerEfficiencyTest::runClientDiagnostic().
std::string DTLocalTriggerBaseTest::sourceFolder [protected] |
Definition at line 125 of file DTLocalTriggerBaseTest.h.
std::string DTLocalTriggerBaseTest::testName [protected] |
Definition at line 120 of file DTLocalTriggerBaseTest.h.
Referenced by DTTriggerEfficiencyTest::bookChambHistos().
std::string DTLocalTriggerBaseTest::trigSource [protected] |
Definition at line 130 of file DTLocalTriggerBaseTest.h.
Referenced by DTLocalTriggerEfficiencyTest::beginRun(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().
std::vector<std::string> DTLocalTriggerBaseTest::trigSources [protected] |
Definition at line 121 of file DTLocalTriggerBaseTest.h.
Referenced by DTLocalTriggerEfficiencyTest::beginRun(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().
std::map<int,std::map<std::string,MonitorElement*> > DTLocalTriggerBaseTest::whME [protected] |
Definition at line 134 of file DTLocalTriggerBaseTest.h.
Referenced by DTLocalTriggerEfficiencyTest::runClientDiagnostic().