#include <TimingTask.h>
Public Types | |
enum | MESets { kTimeMap, kTimeAmp, kTimeAll, kTimeAllMap, kTimeAmpAll, nMESets } |
Public Member Functions | |
void | analyze (const void *, Collections) |
bool | filterRunType (const std::vector< short > &) |
void | runOnRecHits (const EcalRecHitCollection &, Collections) |
TimingTask (const edm::ParameterSet &, const edm::ParameterSet &) | |
~TimingTask () | |
Static Public Member Functions | |
static void | setMEData (std::vector< MEData > &) |
Private Attributes | |
float | energyThresholdEB_ |
float | energyThresholdEE_ |
Definition at line 10 of file TimingTask.h.
Reimplemented from ecaldqm::DQWorker.
Definition at line 21 of file TimingTask.h.
{ kTimeMap, kTimeAmp, kTimeAll, kTimeAllMap, kTimeAmpAll, nMESets };
data refman pasoursint CMSSW_5_2_7_hltpatch2 src DQM EcalBarrelMonitorTasks src TimingTask cc ecaldqm::TimingTask::TimingTask | ( | const edm::ParameterSet & | _params, |
const edm::ParameterSet & | _paths | ||
) |
Definition at line 8 of file TimingTask.cc.
References edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::kEBRecHit, and ecaldqm::kEERecHit.
{ collectionMask_ = (0x1 << kEBRecHit) | (0x1 << kEERecHit); edm::ParameterSet const& taskParams(_params.getUntrackedParameterSet(name_)); energyThresholdEB_ = taskParams.getUntrackedParameter<double>("energyThresholdEB"); energyThresholdEE_ = taskParams.getUntrackedParameter<double>("energyThresholdEE"); }
ecaldqm::TimingTask::~TimingTask | ( | ) |
Definition at line 23 of file TimingTask.cc.
{ }
void ecaldqm::TimingTask::analyze | ( | const void * | _p, |
Collections | _collection | ||
) | [inline, virtual] |
Reimplemented from ecaldqm::DQWorkerTask.
Definition at line 37 of file TimingTask.h.
References ecaldqm::kEBRecHit, ecaldqm::kEERecHit, and runOnRecHits().
{ switch(_collection){ case kEBRecHit: case kEERecHit: runOnRecHits(*static_cast<const EcalRecHitCollection*>(_p), _collection); break; default: break; } }
bool ecaldqm::TimingTask::filterRunType | ( | const std::vector< short > & | _runType | ) | [virtual] |
Reimplemented from ecaldqm::DQWorkerTask.
Definition at line 28 of file TimingTask.cc.
References EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, EcalDCCHeaderBlock::MTCC, EcalDCCHeaderBlock::PHYSICS_GLOBAL, and EcalDCCHeaderBlock::PHYSICS_LOCAL.
{ for(int iFED(0); iFED < 54; iFED++){ if ( _runType[iFED] == EcalDCCHeaderBlock::COSMIC || _runType[iFED] == EcalDCCHeaderBlock::MTCC || _runType[iFED] == EcalDCCHeaderBlock::COSMICS_GLOBAL || _runType[iFED] == EcalDCCHeaderBlock::PHYSICS_GLOBAL || _runType[iFED] == EcalDCCHeaderBlock::COSMICS_LOCAL || _runType[iFED] == EcalDCCHeaderBlock::PHYSICS_LOCAL ) return true; } return false; }
void ecaldqm::TimingTask::runOnRecHits | ( | const EcalRecHitCollection & | _hits, |
Collections | _collection | ||
) |
Definition at line 43 of file TimingTask.cc.
References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), relval_parameters_module::energy, energyThresholdEB_, energyThresholdEE_, ecaldqm::kEBRecHit, EcalRecHit::kGood, EcalRecHit::kOutOfTime, kTimeAll, kTimeAllMap, kTimeAmp, kTimeAmpAll, kTimeMap, ecaldqm::DQWorker::MEs_, dtDQMClient_cfg::threshold, and cond::rpcobgas::time.
Referenced by analyze().
{ uint32_t mask(~((0x1 << EcalRecHit::kGood) | (0x1 << EcalRecHit::kOutOfTime))); float threshold(_collection == kEBRecHit ? energyThresholdEB_ : energyThresholdEE_); for(EcalRecHitCollection::const_iterator hitItr(_hits.begin()); hitItr != _hits.end(); ++hitItr){ if(hitItr->checkFlagMask(mask)) continue; DetId id(hitItr->id()); float time(hitItr->time()); float energy(hitItr->energy()); MEs_[kTimeAmp]->fill(id, energy, time); MEs_[kTimeAmpAll]->fill(id, energy, time); if(energy > threshold){ MEs_[kTimeAll]->fill(id, time); MEs_[kTimeMap]->fill(id, time); MEs_[kTimeAllMap]->fill(id, time); } } }
void ecaldqm::TimingTask::setMEData | ( | std::vector< MEData > & | _data | ) | [static] |
Reimplemented from ecaldqm::DQWorker.
Definition at line 70 of file TimingTask.cc.
References MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, EcalDQMBinningService::AxisSpecs::edges, EcalDQMBinningService::AxisSpecs::high, i, EcalDQMBinningService::kCrystal, EcalDQMBinningService::kEcal2P, EcalDQMBinningService::kEcal3P, EcalDQMBinningService::kSM, EcalDQMBinningService::kSuperCrystal, kTimeAll, kTimeAllMap, kTimeAmp, kTimeAmpAll, kTimeMap, EcalDQMBinningService::kUser, EcalDQMBinningService::AxisSpecs::low, EcalDQMBinningService::AxisSpecs::nbins, and funct::pow().
{ BinService::AxisSpecs axis, axisE, axisT; axis.low = -20.; axis.high = 20.; _data[kTimeMap] = MEData("TimeMap", BinService::kSM, BinService::kCrystal, MonitorElement::DQM_KIND_TPROFILE2D, 0, 0, &axis); axis.nbins = 100; axis.low = -25.; axis.high = 25.; _data[kTimeAll] = MEData("TimeAll", BinService::kEcal2P, BinService::kUser, MonitorElement::DQM_KIND_TH1F, &axis); axis.low = -7.; axis.high = 7.; _data[kTimeAllMap] = MEData("TimeAllMap", BinService::kEcal3P, BinService::kSuperCrystal, MonitorElement::DQM_KIND_TPROFILE2D, 0, 0, &axis); axisE.nbins = 25; axisE.low = -0.5; axisE.high = 2.; axisE.edges = new double[axisE.nbins + 1]; for(int i = 0; i <= axisE.nbins; i++) axisE.edges[i] = pow((float)10., axisE.low + (axisE.high - axisE.low) / axisE.nbins * i); axisT.nbins = 200; axisT.low = -50.; axisT.high = 50.; axisT.edges = new double[axisT.nbins + 1]; for(int i = 0; i <= axisT.nbins; i++) axisT.edges[i] = axisT.low + (axisT.high - axisT.low) / axisT.nbins * i; _data[kTimeAmp] = MEData("TimeAmp", BinService::kSM, BinService::kUser, MonitorElement::DQM_KIND_TH2F, &axisE, &axisT); _data[kTimeAmpAll] = MEData("TimeAmpAll", BinService::kEcal2P, BinService::kUser, MonitorElement::DQM_KIND_TH2F, &axisE, &axisT); }
float ecaldqm::TimingTask::energyThresholdEB_ [private] |
Definition at line 33 of file TimingTask.h.
Referenced by runOnRecHits().
float ecaldqm::TimingTask::energyThresholdEE_ [private] |
Definition at line 34 of file TimingTask.h.
Referenced by runOnRecHits().