CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
NoCQTask Class Reference

#include <NoCQTask.h>

Inheritance diagram for NoCQTask:
hcaldqm::DQTask one::DQMEDAnalyzer< one::DQMLuminosityBlockElements > hcaldqm::DQModule one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
 NoCQTask (edm::ParameterSet const &)
 
 ~NoCQTask () override
 
- Public Member Functions inherited from hcaldqm::DQTask
void analyze (edm::Event const &, edm::EventSetup const &) override
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQTask (edm::ParameterSet const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
 ~DQTask () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< one::DQMLuminosityBlockElements >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from hcaldqm::DQModule
 DQModule (edm::ParameterSet const &)
 
virtual ~DQModule ()(false)
 

Protected Member Functions

void _process (edm::Event const &, edm::EventSetup const &) override
 
void _resetMonitors (hcaldqm::UpdateFreq) override
 
- Protected Member Functions inherited from hcaldqm::DQTask
virtual int _getCalibType (edm::Event const &)
 
virtual bool _isApplicable (edm::Event const &)
 

Protected Attributes

hcaldqm::Container2D _cBadQuality_depth
 
hcaldqm::Container2D _cOccupancy_depth
 
hcaldqm::Container2D _cOccupancyCut_depth
 
hcaldqm::ContainerProf2D _cTimingCut_depth
 
double _cutSumQ_HBHE
 
double _cutSumQ_HF
 
double _cutSumQ_HO
 
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
 
edm::InputTag _tagHBHE
 
edm::InputTag _tagHF
 
edm::InputTag _tagHO
 
edm::InputTag _tagReport
 
edm::EDGetTokenT< HBHEDigiCollection_tokHBHE
 
edm::EDGetTokenT< HFDigiCollection_tokHF
 
edm::EDGetTokenT< HODigiCollection_tokHO
 
edm::EDGetTokenT< HcalUnpackerReport_tokReport
 
- Protected Attributes inherited from hcaldqm::DQTask
ContainerI _cEvsPerLS
 
ContainerI _cEvsTotal
 
ContainerS _cProcessingTypeName
 
ContainerS _cRunKeyName
 
ContainerI _cRunKeyVal
 
edm::ESHandle< HcalDbService_dbService
 
HcalElectronicsMap const * _emap
 
int _procLSs
 
edm::InputTag _tagRaw
 
edm::EDGetTokenT< FEDRawDataCollection_tokRaw
 
std::vector< uint32_t > _vcdaqEids
 
ContainerXXX< uint32_t > _xQuality
 
- Protected Attributes inherited from hcaldqm::DQModule
int _currentLS
 
int _debug
 
int _evsPerLS
 
int _evsTotal
 
Logger _logger
 
int _maxLS
 
ModuleType _mtype
 
std::string _name
 
ProcessingType _ptype
 
std::string _runkeyName
 
int _runkeyVal
 
std::string _subsystem
 

Detailed Description

Definition at line 17 of file NoCQTask.h.

Constructor & Destructor Documentation

NoCQTask::NoCQTask ( edm::ParameterSet const &  ps)

Definition at line 6 of file NoCQTask.cc.

References _cutSumQ_HBHE, _cutSumQ_HF, _cutSumQ_HO, _tagHBHE, _tagHF, _tagHO, _tagReport, _tokHBHE, _tokHF, _tokHO, _tokReport, and edm::ParameterSet::getUntrackedParameter().

6  : DQTask(ps) {
7  _tagHBHE = ps.getUntrackedParameter<edm::InputTag>("tagHBHE", edm::InputTag("hcalDigis"));
8  _tagHO = ps.getUntrackedParameter<edm::InputTag>("tagHO", edm::InputTag("hcalDigis"));
9  _tagHF = ps.getUntrackedParameter<edm::InputTag>("tagHF", edm::InputTag("hcalDigis"));
10  _tagReport = ps.getUntrackedParameter<edm::InputTag>("tagReport", edm::InputTag("hcalDigis"));
11 
12  _tokHBHE = consumes<HBHEDigiCollection>(_tagHBHE);
13  _tokHO = consumes<HODigiCollection>(_tagHO);
14  _tokHF = consumes<HFDigiCollection>(_tagHF);
15  _tokReport = consumes<HcalUnpackerReport>(_tagReport);
16 
17  _cutSumQ_HBHE = ps.getUntrackedParameter<double>("cutSumQ_HBHE", 20);
18  _cutSumQ_HO = ps.getUntrackedParameter<double>("cutSumQ_HO", 20);
19  _cutSumQ_HF = ps.getUntrackedParameter<double>("cutSumQ_HF", 20);
20 }
DQTask(edm::ParameterSet const &)
Definition: DQTask.cc:5
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: NoCQTask.h:36
edm::EDGetTokenT< HcalUnpackerReport > _tokReport
Definition: NoCQTask.h:37
edm::EDGetTokenT< HODigiCollection > _tokHO
Definition: NoCQTask.h:35
edm::InputTag _tagHF
Definition: NoCQTask.h:32
edm::InputTag _tagHBHE
Definition: NoCQTask.h:30
edm::InputTag _tagReport
Definition: NoCQTask.h:33
double _cutSumQ_HF
Definition: NoCQTask.h:39
edm::InputTag _tagHO
Definition: NoCQTask.h:31
double _cutSumQ_HO
Definition: NoCQTask.h:39
edm::EDGetTokenT< HBHEDigiCollection > _tokHBHE
Definition: NoCQTask.h:34
double _cutSumQ_HBHE
Definition: NoCQTask.h:39
NoCQTask::~NoCQTask ( )
inlineoverride

Member Function Documentation

void NoCQTask::_process ( edm::Event const &  e,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements hcaldqm::DQTask.

Definition at line 66 of file NoCQTask.cc.

References _cBadQuality_depth, _cOccupancy_depth, _cOccupancyCut_depth, _cTimingCut_depth, _cutSumQ_HBHE, _cutSumQ_HF, _cutSumQ_HO, hcaldqm::DQModule::_logger, _tagHBHE, _tagHF, _tagHO, _tagReport, _tokHBHE, _tokHF, _tokHO, _tokReport, HcalUnpackerReport::bad_quality_begin(), HcalUnpackerReport::bad_quality_end(), edm::SortedCollection< T, SORT >::begin(), Logger::dqmthrow(), edm::SortedCollection< T, SORT >::end(), hcaldqm::Container2D::fill(), hcaldqm::ContainerProf2D::fill(), edm::Event::getByToken(), edm::InputTag::instance(), HcalGenericDetId::isHcalDetId(), edm::InputTag::label(), and hcaldqm::utilities::sumQ().

Referenced by ~NoCQTask().

66  {
71 
72  if (!e.getByToken(_tokHBHE, chbhe))
73  _logger.dqmthrow("Collection HBHEDigiCollection isn't available" + _tagHBHE.label() + " " + _tagHBHE.instance());
74  if (!e.getByToken(_tokHO, cho))
75  _logger.dqmthrow("Collection HODigiCollection isn't available" + _tagHO.label() + " " + _tagHO.instance());
76  if (!e.getByToken(_tokHF, chf))
77  _logger.dqmthrow("Collection HFDigiCollection isn't available" + _tagHF.label() + " " + _tagHF.instance());
78  if (!e.getByToken(_tokReport, creport))
79  _logger.dqmthrow("Collection HcalUnpackerReport isn't available" + _tagReport.label() + " " +
81 
82  // RAW Bad Quality
83  for (std::vector<DetId>::const_iterator it = creport->bad_quality_begin(); it != creport->bad_quality_end(); ++it) {
84  if (!HcalGenericDetId(*it).isHcalDetId())
85  continue;
86 
88  }
89 
90  // DIGI HBH, HO, HF
91  for (HBHEDigiCollection::const_iterator it = chbhe->begin(); it != chbhe->end(); ++it) {
92  double sumQ = hcaldqm::utilities::sumQ<HBHEDataFrame>(*it, 2.5, 0, it->size() - 1);
93  HcalDetId const& did = it->id();
94 
96  if (sumQ > _cutSumQ_HBHE) {
97  double timing = hcaldqm::utilities::aveTS<HBHEDataFrame>(*it, 2.5, 0, it->size() - 1);
99  _cTimingCut_depth.fill(did, timing);
100  }
101  }
102 
103  for (HODigiCollection::const_iterator it = cho->begin(); it != cho->end(); ++it) {
104  double sumQ = hcaldqm::utilities::sumQ<HODataFrame>(*it, 8.5, 0, it->size() - 1);
105  HcalDetId const& did = it->id();
106 
107  _cOccupancy_depth.fill(did);
108  if (sumQ > _cutSumQ_HO) {
109  double timing = hcaldqm::utilities::aveTS<HODataFrame>(*it, 8.5, 0, it->size() - 1);
111  _cTimingCut_depth.fill(did, timing);
112  }
113  }
114 
115  for (HFDigiCollection::const_iterator it = chf->begin(); it != chf->end(); ++it) {
116  double sumQ = hcaldqm::utilities::sumQ<HFDataFrame>(*it, 2.5, 0, it->size() - 1);
117  HcalDetId const& did = it->id();
118 
119  _cOccupancy_depth.fill(did);
120  if (sumQ > _cutSumQ_HF) {
121  double timing = hcaldqm::utilities::aveTS<HFDataFrame>(*it, 2.5, 0, it->size() - 1);
123  _cTimingCut_depth.fill(did, timing);
124  }
125  }
126 }
hcaldqm::Container2D _cOccupancy_depth
Definition: NoCQTask.h:44
void fill(HcalDetId const &) override
std::vector< T >::const_iterator const_iterator
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: NoCQTask.h:36
edm::EDGetTokenT< HcalUnpackerReport > _tokReport
Definition: NoCQTask.h:37
hcaldqm::ContainerProf2D _cTimingCut_depth
Definition: NoCQTask.h:43
void dqmthrow(std::string const &msg) const
Definition: Logger.h:12
edm::EDGetTokenT< HODigiCollection > _tokHO
Definition: NoCQTask.h:35
edm::InputTag _tagHF
Definition: NoCQTask.h:32
DetIdVector::const_iterator bad_quality_begin() const
Logger _logger
Definition: DQModule.h:54
edm::InputTag _tagHBHE
Definition: NoCQTask.h:30
bool isHcalDetId() const
const_iterator end() const
edm::InputTag _tagReport
Definition: NoCQTask.h:33
double _cutSumQ_HF
Definition: NoCQTask.h:39
hcaldqm::Container2D _cBadQuality_depth
Definition: NoCQTask.h:46
std::string const & label() const
Definition: InputTag.h:36
void fill(HcalDetId const &) override
Definition: Container2D.cc:52
edm::InputTag _tagHO
Definition: NoCQTask.h:31
double _cutSumQ_HO
Definition: NoCQTask.h:39
edm::EDGetTokenT< HBHEDigiCollection > _tokHBHE
Definition: NoCQTask.h:34
std::string const & instance() const
Definition: InputTag.h:37
hcaldqm::Container2D _cOccupancyCut_depth
Definition: NoCQTask.h:45
const_iterator begin() const
double _cutSumQ_HBHE
Definition: NoCQTask.h:39
DetIdVector::const_iterator bad_quality_end() const
double sumQ(DIGI const &digi, double ped, int i=0, int j=3)
Definition: Utilities.h:126
void NoCQTask::_resetMonitors ( hcaldqm::UpdateFreq  uf)
overrideprotectedvirtual

Reimplemented from hcaldqm::DQTask.

Definition at line 64 of file NoCQTask.cc.

Referenced by ~NoCQTask().

64 { DQTask::_resetMonitors(uf); }
void NoCQTask::beginLuminosityBlock ( edm::LuminosityBlock const &  lb,
edm::EventSetup const &  es 
)
override

Definition at line 128 of file NoCQTask.cc.

Referenced by ~NoCQTask().

128  {
129  DQTask::beginLuminosityBlock(lb, es);
130 }
void NoCQTask::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  r,
edm::EventSetup const &  es 
)
override

Definition at line 22 of file NoCQTask.cc.

References _cBadQuality_depth, _cOccupancy_depth, _cOccupancyCut_depth, _cTimingCut_depth, hcaldqm::DQTask::_emap, hcaldqm::DQModule::_name, hcaldqm::DQModule::_subsystem, hcaldqm::ContainerProf2D::book(), hcaldqm::Container2D::book(), bookHistograms(), hcaldqm::hashfunctions::fdepth, hcaldqm::quantity::fieta, hcaldqm::quantity::fiphi, hcaldqm::quantity::fN, hcaldqm::quantity::fTiming_TS200, edm::EventSetup::get(), HcalDbService::getHcalMapping(), hcaldqm::ContainerProf2D::initialize(), and hcaldqm::Container2D::initialize().

Referenced by ~NoCQTask().

22  {
23  DQTask::bookHistograms(ib, r, es);
24 
26  es.get<HcalDbRecord>().get(dbs);
27  _emap = dbs->getHcalMapping();
28 
30  "TimingCut",
35  0);
37  "Occupancy",
42  0);
44  "OccupancyCut",
49  0);
51  "BadQuality",
56  0);
57 
62 }
hcaldqm::Container2D _cOccupancy_depth
Definition: NoCQTask.h:44
hcaldqm::ContainerProf2D _cTimingCut_depth
Definition: NoCQTask.h:43
std::string _name
Definition: DQModule.h:41
HcalElectronicsMap const * _emap
Definition: DQTask.h:59
virtual void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
Definition: Container2D.cc:25
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fEnergy), int debug=0) override
hcaldqm::Container2D _cBadQuality_depth
Definition: NoCQTask.h:46
const HcalElectronicsMap * getHcalMapping() const
std::string _subsystem
Definition: DQModule.h:48
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
Definition: Container2D.cc:558
hcaldqm::Container2D _cOccupancyCut_depth
Definition: NoCQTask.h:45
void NoCQTask::endLuminosityBlock ( edm::LuminosityBlock const &  lb,
edm::EventSetup const &  es 
)
override

Definition at line 132 of file NoCQTask.cc.

References DEFINE_FWK_MODULE.

Referenced by ~NoCQTask().

132  {
133  DQTask::endLuminosityBlock(lb, es);
134 }

Member Data Documentation

hcaldqm::Container2D NoCQTask::_cBadQuality_depth
protected

Definition at line 46 of file NoCQTask.h.

Referenced by _process(), and bookHistograms().

hcaldqm::Container2D NoCQTask::_cOccupancy_depth
protected

Definition at line 44 of file NoCQTask.h.

Referenced by _process(), and bookHistograms().

hcaldqm::Container2D NoCQTask::_cOccupancyCut_depth
protected

Definition at line 45 of file NoCQTask.h.

Referenced by _process(), and bookHistograms().

hcaldqm::ContainerProf2D NoCQTask::_cTimingCut_depth
protected

Definition at line 43 of file NoCQTask.h.

Referenced by _process(), and bookHistograms().

double NoCQTask::_cutSumQ_HBHE
protected

Definition at line 39 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

double NoCQTask::_cutSumQ_HF
protected

Definition at line 39 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

double NoCQTask::_cutSumQ_HO
protected

Definition at line 39 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

hcaldqm::electronicsmap::ElectronicsMap NoCQTask::_ehashmap
protected

Definition at line 41 of file NoCQTask.h.

edm::InputTag NoCQTask::_tagHBHE
protected

Definition at line 30 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::InputTag NoCQTask::_tagHF
protected

Definition at line 32 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::InputTag NoCQTask::_tagHO
protected

Definition at line 31 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::InputTag NoCQTask::_tagReport
protected

Definition at line 33 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::EDGetTokenT<HBHEDigiCollection> NoCQTask::_tokHBHE
protected

Definition at line 34 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::EDGetTokenT<HFDigiCollection> NoCQTask::_tokHF
protected

Definition at line 36 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::EDGetTokenT<HODigiCollection> NoCQTask::_tokHO
protected

Definition at line 35 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::EDGetTokenT<HcalUnpackerReport> NoCQTask::_tokReport
protected

Definition at line 37 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().