#include <DTTestPulsesTask.h>
Public Member Functions | |
DTTestPulsesTask (const edm::ParameterSet &ps) | |
Constructor. | |
virtual | ~DTTestPulsesTask () |
Destructor. | |
Protected Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
Analyze. | |
void | beginJob () |
BeginJob. | |
void | beginRun (const edm::Run &, const edm::EventSetup &) |
BeginRun. | |
void | bookHistos (const DTLayerId &dtLayer, std::string folder, std::string histoTag) |
Book the ME. | |
Private Attributes | |
DQMStore * | dbe |
edm::ESHandle< DTGeometry > | muonGeom |
int | nevents |
edm::ParameterSet | parameters |
edm::ESHandle< DTRangeT0 > | t0RangeMap |
std::pair< int, int > | t0sPeakRange |
std::map< int, MonitorElement * > | testPulsesOccupancies |
std::map< int, MonitorElement * > | testPulsesProfiles |
std::map< int, MonitorElement * > | testPulsesTimeBoxes |
Definition at line 37 of file DTTestPulsesTask.h.
DTTestPulsesTask::DTTestPulsesTask | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 38 of file DTTestPulsesTask.cc.
References gather_cfg::cout, cppFunctionSkipper::operator, and Parameters::parameters.
{ cout<<"[DTTestPulseTask]: Constructor"<<endl; parameters = ps; t0sPeakRange = make_pair( parameters.getUntrackedParameter<int>("t0sRangeLowerBound", -100), parameters.getUntrackedParameter<int>("t0sRangeUpperBound", 100)); dbe = edm::Service<DQMStore>().operator->(); }
DTTestPulsesTask::~DTTestPulsesTask | ( | ) | [virtual] |
Destructor.
Definition at line 54 of file DTTestPulsesTask.cc.
References gather_cfg::cout, and nevents.
void DTTestPulsesTask::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Analyze.
Implements edm::EDAnalyzer.
Definition at line 186 of file DTTestPulsesTask.cc.
References bookHistos(), edm::Event::getByLabel(), nevents, and edm::second().
{ nevents++; edm::Handle<DTDigiCollection> dtdigis; e.getByLabel("dtunpacker", dtdigis); DTDigiCollection::DigiRangeIterator dtLayerId_It; for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); ++dtLayerId_It){ for (DTDigiCollection::const_iterator digiIt = ((*dtLayerId_It).second).first; digiIt!=((*dtLayerId_It).second).second; ++digiIt){ // for clearness.. int layerIndex = ((*dtLayerId_It).first).rawId(); int chIndex = ((*dtLayerId_It).first).chamberId().rawId(); if ((int)(*digiIt).countsTDC() > t0sPeakRange.first && (int)(*digiIt).countsTDC() < t0sPeakRange.second ) { // Occupancies if (testPulsesOccupancies.find(layerIndex) != testPulsesOccupancies.end()) testPulsesOccupancies.find(layerIndex)->second->Fill((*digiIt).wire()); else { bookHistos( (*dtLayerId_It).first , string("TPOccupancy"), string("TestPulses") ); testPulsesOccupancies.find(layerIndex)->second->Fill((*digiIt).wire()); } // Profiles if (testPulsesProfiles.find(layerIndex) != testPulsesProfiles.end()) testPulsesProfiles.find(layerIndex)->second->Fill((*digiIt).wire(),(*digiIt).countsTDC()); else { bookHistos( (*dtLayerId_It).first , string("TPProfile"), string("TestPulses2D") ); testPulsesProfiles.find(layerIndex)->second->Fill((*digiIt).wire(),(*digiIt).countsTDC()); } } // Time Box if (testPulsesTimeBoxes.find(chIndex) != testPulsesTimeBoxes.end()) testPulsesTimeBoxes.find(chIndex)->second->Fill((*digiIt).countsTDC()); else { bookHistos( (*dtLayerId_It).first , string("TPTimeBox"), string("TestPulsesTB") ); testPulsesTimeBoxes.find(chIndex)->second->Fill((*digiIt).countsTDC()); } } } }
void DTTestPulsesTask::beginJob | ( | void | ) | [protected, virtual] |
BeginJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 61 of file DTTestPulsesTask.cc.
References gather_cfg::cout, and nevents.
void DTTestPulsesTask::beginRun | ( | const edm::Run & | run, |
const edm::EventSetup & | context | ||
) | [protected, virtual] |
BeginRun.
Reimplemented from edm::EDAnalyzer.
Definition at line 69 of file DTTestPulsesTask.cc.
References edm::EventSetup::get().
{ // Get the geometry context.get<MuonGeometryRecord>().get(muonGeom); // Get the pedestals tTrig (always get it, even if the TPRange is taken from conf) //context.get<DTRangeT0Rcd>().get(t0RangeMap); }
void DTTestPulsesTask::bookHistos | ( | const DTLayerId & | dtLayer, |
std::string | folder, | ||
std::string | histoTag | ||
) | [protected] |
DQMStore* DTTestPulsesTask::dbe [private] |
Definition at line 66 of file DTTestPulsesTask.h.
edm::ESHandle<DTGeometry> DTTestPulsesTask::muonGeom [private] |
Definition at line 70 of file DTTestPulsesTask.h.
int DTTestPulsesTask::nevents [private] |
Definition at line 64 of file DTTestPulsesTask.h.
Definition at line 68 of file DTTestPulsesTask.h.
edm::ESHandle<DTRangeT0> DTTestPulsesTask::t0RangeMap [private] |
Definition at line 72 of file DTTestPulsesTask.h.
std::pair<int, int> DTTestPulsesTask::t0sPeakRange [private] |
Definition at line 74 of file DTTestPulsesTask.h.
std::map<int, MonitorElement*> DTTestPulsesTask::testPulsesOccupancies [private] |
Definition at line 78 of file DTTestPulsesTask.h.
std::map<int, MonitorElement*> DTTestPulsesTask::testPulsesProfiles [private] |
Definition at line 77 of file DTTestPulsesTask.h.
std::map<int, MonitorElement*> DTTestPulsesTask::testPulsesTimeBoxes [private] |
Definition at line 79 of file DTTestPulsesTask.h.