CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
ecaldqm::TimingTask Class Reference

#include <TimingTask.h>

Inheritance diagram for ecaldqm::TimingTask:
ecaldqm::DQWorkerTask ecaldqm::DQWorker

Public Types

enum  MESets {
  kTimeMap, kTimeAmp, kTimeAll, kTimeAllMap,
  kTimeAmpAll, nMESets
}
 
- Public Types inherited from ecaldqm::DQWorker
enum  MESets { 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 ()
 
- Public Member Functions inherited from ecaldqm::DQWorkerTask
virtual void beginEvent (const edm::Event &, const edm::EventSetup &)
 
 DQWorkerTask (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
 
virtual void endEvent (const edm::Event &, const edm::EventSetup &)
 
virtual bool filterTrigger (const edm::TriggerResultsByName &)
 
virtual const std::vector
< std::pair< Collections,
Collections > > & 
getDependencies ()
 
virtual bool runsOn (unsigned)
 
virtual ~DQWorkerTask ()
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
virtual void bookMEs ()
 
 DQWorker (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 
const std::vector< MESet * > & getMEs ()
 
virtual std::string const & getName ()
 
virtual bool isInitialized ()
 
virtual void reset ()
 
virtual void setInitialized (bool _init)
 
virtual void setVerbosity (int _verbosity)
 
virtual ~DQWorker ()
 

Static Public Member Functions

static void setMEData (std::vector< MEData > &)
 
- Static Public Member Functions inherited from ecaldqm::DQWorker
static void setMEData (std::vector< MEData > &)
 

Private Attributes

float energyThresholdEB_
 
float energyThresholdEE_
 

Additional Inherited Members

- Static Public Attributes inherited from ecaldqm::DQWorker
static std::map< std::string,
std::vector< MEData > > 
meData
 
- Protected Member Functions inherited from ecaldqm::DQWorker
MESetcreateMESet_ (std::string const &, MEData const &, bool _readOnly=false) const
 
void meSet_ (unsigned, edm::ParameterSet const &)
 
- Protected Attributes inherited from ecaldqm::DQWorkerTask
uint32_t collectionMask_
 
std::vector< std::pair
< Collections, Collections > > 
dependencies_
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool initialized_
 
std::vector< MESet * > MEs_
 
std::string name_
 
int verbosity_
 

Detailed Description

Definition at line 10 of file TimingTask.h.

Member Enumeration Documentation

Enumerator
kTimeMap 
kTimeAmp 
kTimeAll 
kTimeAllMap 
kTimeAmpAll 
nMESets 

Definition at line 21 of file TimingTask.h.

Constructor & Destructor Documentation

ecaldqm::TimingTask::TimingTask ( const edm::ParameterSet _params,
const edm::ParameterSet _paths 
)

Definition at line 7 of file TimingTask.cc.

References ecaldqm::DQWorkerTask::collectionMask_, energyThresholdEB_, energyThresholdEE_, edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::kEBRecHit, ecaldqm::kEERecHit, and ecaldqm::DQWorker::name_.

7  :
8  DQWorkerTask(_params, _paths, "TimingTask"),
11  {
13  (0x1 << kEBRecHit) |
14  (0x1 << kEERecHit);
15 
16  edm::ParameterSet const& taskParams(_params.getUntrackedParameterSet(name_));
17 
18  energyThresholdEB_ = taskParams.getUntrackedParameter<double>("energyThresholdEB");
19  energyThresholdEE_ = taskParams.getUntrackedParameter<double>("energyThresholdEE");
20  }
DQWorkerTask(const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
Definition: DQWorkerTask.cc:5
ParameterSet const & getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
float energyThresholdEE_
Definition: TimingTask.h:34
float energyThresholdEB_
Definition: TimingTask.h:33
std::string name_
Definition: DQWorker.h:55
ecaldqm::TimingTask::~TimingTask ( )

Definition at line 22 of file TimingTask.cc.

23  {
24  }

Member Function Documentation

void ecaldqm::TimingTask::analyze ( const void *  _p,
Collections  _collection 
)
inlinevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 37 of file TimingTask.h.

References ecaldqm::kEBRecHit, ecaldqm::kEERecHit, and runOnRecHits().

37  {
38  switch(_collection){
39  case kEBRecHit:
40  case kEERecHit:
41  runOnRecHits(*static_cast<const EcalRecHitCollection*>(_p), _collection);
42  break;
43  default:
44  break;
45  }
46  }
void runOnRecHits(const EcalRecHitCollection &, Collections)
Definition: TimingTask.cc:42
bool ecaldqm::TimingTask::filterRunType ( const std::vector< short > &  _runType)
virtual
void ecaldqm::TimingTask::runOnRecHits ( const EcalRecHitCollection _hits,
Collections  _collection 
)

Definition at line 42 of file TimingTask.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), relval_parameters_module::energy, energyThresholdEB_, energyThresholdEE_, errorMatrix2Lands_multiChannel::id, ecaldqm::kEBRecHit, EcalRecHit::kGood, EcalRecHit::kOutOfTime, kTimeAll, kTimeAllMap, kTimeAmp, kTimeAmpAll, kTimeMap, ecaldqm::DQWorker::MEs_, dtDQMClient_cfg::threshold, and cond::rpcobgas::time.

Referenced by analyze().

43  {
44  uint32_t mask(~((0x1 << EcalRecHit::kGood) | (0x1 << EcalRecHit::kOutOfTime)));
45  float threshold(_collection == kEBRecHit ? energyThresholdEB_ : energyThresholdEE_);
46 
47  for(EcalRecHitCollection::const_iterator hitItr(_hits.begin()); hitItr != _hits.end(); ++hitItr){
48 
49  if(hitItr->checkFlagMask(mask)) continue;
50 
51  DetId id(hitItr->id());
52 
53  float time(hitItr->time());
54  float energy(hitItr->energy());
55 
56  MEs_[kTimeAmp]->fill(id, energy, time);
57  MEs_[kTimeAmpAll]->fill(id, energy, time);
58 
59  if(energy > threshold){
60  MEs_[kTimeAll]->fill(id, time);
61  MEs_[kTimeMap]->fill(id, time);
62  MEs_[kTimeAllMap]->fill(id, time);
63  }
64  }
65  }
std::vector< EcalRecHit >::const_iterator const_iterator
float energyThresholdEE_
Definition: TimingTask.h:34
const_iterator end() const
Definition: DetId.h:20
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
float energyThresholdEB_
Definition: TimingTask.h:33
const_iterator begin() const
void ecaldqm::TimingTask::setMEData ( std::vector< MEData > &  _data)
static

Definition at line 69 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().

70  {
71  BinService::AxisSpecs axis, axisE, axisT;
72 
73  axis.low = -20.;
74  axis.high = 20.;
75  _data[kTimeMap] = MEData("TimeMap", BinService::kSM, BinService::kCrystal, MonitorElement::DQM_KIND_TPROFILE2D, 0, 0, &axis);
76 
77  axis.nbins = 100;
78  axis.low = -25.;
79  axis.high = 25.;
81 
82  axis.low = -7.;
83  axis.high = 7.;
85 
86 
87  axisE.nbins = 25;
88  axisE.low = -0.5;
89  axisE.high = 2.;
90  axisE.edges = new double[axisE.nbins + 1];
91  for(int i = 0; i <= axisE.nbins; i++)
92  axisE.edges[i] = pow((float)10., axisE.low + (axisE.high - axisE.low) / axisE.nbins * i);
93 
94  axisT.nbins = 200;
95  axisT.low = -50.;
96  axisT.high = 50.;
97  axisT.edges = new double[axisT.nbins + 1];
98  for(int i = 0; i <= axisT.nbins; i++)
99  axisT.edges[i] = axisT.low + (axisT.high - axisT.low) / axisT.nbins * i;
100 
101  _data[kTimeAmp] = MEData("TimeAmp", BinService::kSM, BinService::kUser, MonitorElement::DQM_KIND_TH2F, &axisE, &axisT);
102  _data[kTimeAmpAll] = MEData("TimeAmpAll", BinService::kEcal2P, BinService::kUser, MonitorElement::DQM_KIND_TH2F, &axisE, &axisT);
103  }
int i
Definition: DBlmapReader.cc:9
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40

Member Data Documentation

float ecaldqm::TimingTask::energyThresholdEB_
private

Definition at line 33 of file TimingTask.h.

Referenced by runOnRecHits(), and TimingTask().

float ecaldqm::TimingTask::energyThresholdEE_
private

Definition at line 34 of file TimingTask.h.

Referenced by runOnRecHits(), and TimingTask().