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::OccupancyTask Class Reference

#include <OccupancyTask.h>

Inheritance diagram for ecaldqm::OccupancyTask:
ecaldqm::DQWorkerTask ecaldqm::DQWorker

Public Types

enum  MESets {
  kDigi, kDigiProjEta, kDigiProjPhi, kDigiAll,
  kDigiDCC, kRecHit1D, kRecHitThr, kRecHitThrProjEta,
  kRecHitThrProjPhi, kRecHitThrAll, kTPDigi, kTPDigiProjEta,
  kTPDigiProjPhi, kTPDigiThr, kTPDigiThrProjEta, kTPDigiThrProjPhi,
  kTPDigiThrAll, nMESets
}
 
- Public Types inherited from ecaldqm::DQWorker
enum  MESets { nMESets }
 

Public Member Functions

void analyze (const void *, Collections)
 
bool filterRunType (const std::vector< short > &)
 
 OccupancyTask (const edm::ParameterSet &, const edm::ParameterSet &)
 
void runOnDigis (const EcalDigiCollection &)
 
void runOnRecHits (const EcalRecHitCollection &, Collections)
 
void runOnTPDigis (const EcalTrigPrimDigiCollection &)
 
 ~OccupancyTask ()
 
- 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 recHitThreshold_
 
float tpThreshold_
 

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 11 of file OccupancyTask.h.

Member Enumeration Documentation

Enumerator
kDigi 
kDigiProjEta 
kDigiProjPhi 
kDigiAll 
kDigiDCC 
kRecHit1D 
kRecHitThr 
kRecHitThrProjEta 
kRecHitThrProjPhi 
kRecHitThrAll 
kTPDigi 
kTPDigiProjEta 
kTPDigiProjPhi 
kTPDigiThr 
kTPDigiThrProjEta 
kTPDigiThrProjPhi 
kTPDigiThrAll 
nMESets 

Definition at line 24 of file OccupancyTask.h.

24  {
25  kDigi, // h2f
26  kDigiProjEta, // h1f
27  kDigiProjPhi, // h1f
28  kDigiAll,
29  kDigiDCC,
30  // kRecHit, // h2f
31  // kRecHitProjEta, // h1f
32  // kRecHitProjPhi, // h1f
33  kRecHit1D,
34  kRecHitThr, // h2f
35  kRecHitThrProjEta, // h1f
36  kRecHitThrProjPhi, // h1f
37  kRecHitThrAll, // h1f
38  kTPDigi, // h2f
39  kTPDigiProjEta, // h1f
40  kTPDigiProjPhi, // h1f
41  kTPDigiThr, // h2f
42  kTPDigiThrProjEta, // h1f
43  kTPDigiThrProjPhi, // h1f
45  nMESets
46  };

Constructor & Destructor Documentation

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

Definition at line 7 of file OccupancyTask.cc.

References ecaldqm::DQWorkerTask::collectionMask_, edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::kEBDigi, ecaldqm::kEBRecHit, ecaldqm::kEEDigi, ecaldqm::kEERecHit, ecaldqm::kTrigPrimDigi, ecaldqm::DQWorker::name_, recHitThreshold_, and tpThreshold_.

7  :
8  DQWorkerTask(_params, _paths, "OccupancyTask"),
10  tpThreshold_(0.)
11  {
13  (0x1 << kEBDigi) |
14  (0x1 << kEEDigi) |
15  (0x1 << kTrigPrimDigi) |
16  (0x1 << kEBRecHit) |
17  (0x1 << kEERecHit);
18 
19  edm::ParameterSet const& taskParams(_params.getUntrackedParameterSet(name_));
20 
21  recHitThreshold_ = taskParams.getUntrackedParameter<double>("recHitThreshold");
22  tpThreshold_ = taskParams.getUntrackedParameter<double>("tpThreshold", 1.0);
23  }
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
std::string name_
Definition: DQWorker.h:55
ecaldqm::OccupancyTask::~OccupancyTask ( )

Definition at line 25 of file OccupancyTask.cc.

26  {
27  }

Member Function Documentation

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

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 56 of file OccupancyTask.h.

References ecaldqm::kEBDigi, ecaldqm::kEBRecHit, ecaldqm::kEEDigi, ecaldqm::kEERecHit, ecaldqm::kTrigPrimDigi, runOnDigis(), runOnRecHits(), and runOnTPDigis().

56  {
57  switch(_collection){
58  case kEBDigi:
59  case kEEDigi:
60  runOnDigis(*static_cast<const EcalDigiCollection*>(_p));
61  break;
62  case kTrigPrimDigi:
63  runOnTPDigis(*static_cast<const EcalTrigPrimDigiCollection*>(_p));
64  break;
65  case kEBRecHit:
66  case kEERecHit:
67  runOnRecHits(*static_cast<const EcalRecHitCollection*>(_p), _collection);
68  break;
69  default:
70  break;
71  }
72  }
void runOnDigis(const EcalDigiCollection &)
void runOnTPDigis(const EcalTrigPrimDigiCollection &)
void runOnRecHits(const EcalRecHitCollection &, Collections)
bool ecaldqm::OccupancyTask::filterRunType ( const std::vector< short > &  _runType)
virtual
void ecaldqm::OccupancyTask::runOnDigis ( const EcalDigiCollection _digis)

Definition at line 45 of file OccupancyTask.cc.

References edm::DataFrameContainer::begin(), edm::DataFrameContainer::end(), errorMatrix2Lands_multiChannel::id, kDigi, kDigiAll, kDigiDCC, kDigiProjEta, kDigiProjPhi, and ecaldqm::DQWorker::MEs_.

Referenced by analyze().

46  {
47  for(EcalDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
48  DetId id(digiItr->id());
49  MEs_[kDigi]->fill(id);
50  MEs_[kDigiProjEta]->fill(id);
51  MEs_[kDigiProjPhi]->fill(id);
52  MEs_[kDigiAll]->fill(id);
53  MEs_[kDigiDCC]->fill(id);
54  }
55  }
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const_iterator begin() const
Definition: DetId.h:20
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
const_iterator end() const
void ecaldqm::OccupancyTask::runOnRecHits ( const EcalRecHitCollection _hits,
Collections  _collection 
)

Definition at line 77 of file OccupancyTask.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), errorMatrix2Lands_multiChannel::id, EcalDQMBinningService::kEB, ecaldqm::kEBRecHit, EcalDQMBinningService::kEE, EcalRecHit::kGood, kRecHit1D, kRecHitThr, kRecHitThrAll, kRecHitThrProjEta, kRecHitThrProjPhi, ecaldqm::DQWorker::MEs_, recHitThreshold_, and edm::SortedCollection< T, SORT >::size().

Referenced by analyze().

78  {
79  uint32_t mask(~(0x1 << EcalRecHit::kGood));
80 
81  for(EcalRecHitCollection::const_iterator hitItr(_hits.begin()); hitItr != _hits.end(); ++hitItr){
82  DetId id(hitItr->id());
83 
84 // MEs_[kRecHit]->fill(id);
85 // MEs_[kRecHitProjEta]->fill(id);
86 // MEs_[kRecHitProjPhi]->fill(id);
87 
88  if(!hitItr->checkFlagMask(mask) && hitItr->energy() > recHitThreshold_){
89  MEs_[kRecHitThr]->fill(id);
90  MEs_[kRecHitThrProjEta]->fill(id);
91  MEs_[kRecHitThrProjPhi]->fill(id);
92  MEs_[kRecHitThrAll]->fill(id);
93  }
94  }
95 
96  if(_collection == kEBRecHit)
97  MEs_[kRecHit1D]->fill((unsigned)BinService::kEB + 1, float(_hits.size()));
98  else
99  MEs_[kRecHit1D]->fill((unsigned)BinService::kEE + 1, float(_hits.size()));
100  }
std::vector< EcalRecHit >::const_iterator const_iterator
const_iterator end() const
Definition: DetId.h:20
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
size_type size() const
const_iterator begin() const
void ecaldqm::OccupancyTask::runOnTPDigis ( const EcalTrigPrimDigiCollection _digis)

Definition at line 58 of file OccupancyTask.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), errorMatrix2Lands_multiChannel::id, kTPDigi, kTPDigiProjEta, kTPDigiProjPhi, kTPDigiThr, kTPDigiThrAll, kTPDigiThrProjEta, kTPDigiThrProjPhi, ecaldqm::DQWorker::MEs_, and tpThreshold_.

Referenced by analyze().

59  {
60  for(EcalTrigPrimDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
61  EcalTrigTowerDetId const& id(digiItr->id());
62 
63  MEs_[kTPDigi]->fill(id);
64  MEs_[kTPDigiProjEta]->fill(id);
65  MEs_[kTPDigiProjPhi]->fill(id);
66 
67  if(digiItr->compressedEt() > tpThreshold_){
68  MEs_[kTPDigiThr]->fill(id);
69  MEs_[kTPDigiThrProjEta]->fill(id);
70  MEs_[kTPDigiThrProjPhi]->fill(id);
71  MEs_[kTPDigiThrAll]->fill(id);
72  }
73  }
74  }
std::vector< T >::const_iterator const_iterator
const_iterator end() const
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
const_iterator begin() const
void ecaldqm::OccupancyTask::setMEData ( std::vector< MEData > &  _data)
static

Definition at line 104 of file OccupancyTask.cc.

References MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH2F, EcalDQMBinningService::AxisSpecs::high, EcalDQMBinningService::kCrystal, EcalDQMBinningService::kDCC, kDigi, kDigiAll, kDigiDCC, kDigiProjEta, kDigiProjPhi, EcalDQMBinningService::kEcal2P, EcalDQMBinningService::kEcal3P, EcalDQMBinningService::kProjEta, EcalDQMBinningService::kProjPhi, kRecHit1D, kRecHitThr, kRecHitThrAll, kRecHitThrProjEta, kRecHitThrProjPhi, EcalDQMBinningService::kSM, EcalDQMBinningService::kSuperCrystal, kTPDigi, kTPDigiProjEta, kTPDigiProjPhi, kTPDigiThr, kTPDigiThrAll, kTPDigiThrProjEta, kTPDigiThrProjPhi, EcalDQMBinningService::kTriggerTower, EcalDQMBinningService::kUser, EcalDQMBinningService::AxisSpecs::low, and EcalDQMBinningService::AxisSpecs::nbins.

105  {
107 
113 
114  axis.nbins = 100;
115  axis.low = 0.;
116  axis.high = 6000.;
129  }

Member Data Documentation

float ecaldqm::OccupancyTask::recHitThreshold_
private

Definition at line 51 of file OccupancyTask.h.

Referenced by OccupancyTask(), and runOnRecHits().

float ecaldqm::OccupancyTask::tpThreshold_
private

Definition at line 52 of file OccupancyTask.h.

Referenced by OccupancyTask(), and runOnTPDigis().