CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
LEDTask Class Reference

#include <LEDTask.h>

Inheritance diagram for LEDTask:
hcaldqm::DQTask DQMEDAnalyzer hcaldqm::DQModule edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &r, edm::EventSetup const &)
 
 LEDTask (edm::ParameterSet const &)
 
virtual ~LEDTask ()
 
- Public Member Functions inherited from hcaldqm::DQTask
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQTask (edm::ParameterSet const &)
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual ~DQTask ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 
- Public Member Functions inherited from hcaldqm::DQModule
 DQModule (edm::ParameterSet const &)
 
virtual ~DQModule ()
 

Public Attributes

tuple ledTask
 

Protected Member Functions

virtual void _dump ()
 
virtual bool _isApplicable (edm::Event const &)
 
virtual void _process (edm::Event const &, edm::EventSetup const &)
 
virtual void _resetMonitors (hcaldqm::UpdateFreq)
 
- Protected Member Functions inherited from hcaldqm::DQTask
virtual int _getCalibType (edm::Event const &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Protected Attributes

hcaldqm::Container2D _cMissing_depth
 
hcaldqm::Container2D _cMissing_FEDuTCA
 
hcaldqm::Container2D _cMissing_FEDVME
 
hcaldqm::ContainerProf1D _cShapeCut_FEDSlot
 
hcaldqm::ContainerProf2D _cSignalMean_depth
 
hcaldqm::ContainerProf2D _cSignalMean_FEDuTCA
 
hcaldqm::ContainerProf2D _cSignalMean_FEDVME
 
hcaldqm::Container1D _cSignalMean_Subdet
 
hcaldqm::ContainerProf2D _cSignalRMS_depth
 
hcaldqm::ContainerProf2D _cSignalRMS_FEDuTCA
 
hcaldqm::ContainerProf2D _cSignalRMS_FEDVME
 
hcaldqm::Container1D _cSignalRMS_Subdet
 
hcaldqm::ContainerProf2D _cTimingMean_depth
 
hcaldqm::ContainerProf2D _cTimingMean_FEDuTCA
 
hcaldqm::ContainerProf2D _cTimingMean_FEDVME
 
hcaldqm::Container1D _cTimingMean_Subdet
 
hcaldqm::ContainerProf2D _cTimingRMS_depth
 
hcaldqm::ContainerProf2D _cTimingRMS_FEDuTCA
 
hcaldqm::ContainerProf2D _cTimingRMS_FEDVME
 
hcaldqm::Container1D _cTimingRMS_Subdet
 
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
 
HcalElectronicsMap const * _emap
 
hcaldqm::filter::HashFilter _filter_uTCA
 
hcaldqm::filter::HashFilter _filter_VME
 
double _lowHBHE
 
double _lowHF
 
double _lowHO
 
edm::InputTag _tagHBHE
 
edm::InputTag _tagHF
 
edm::InputTag _tagHO
 
edm::InputTag _tagTrigger
 
edm::EDGetTokenT
< HBHEDigiCollection
_tokHBHE
 
edm::EDGetTokenT
< HFDigiCollection
_tokHF
 
edm::EDGetTokenT
< HODigiCollection
_tokHO
 
edm::EDGetTokenT
< HcalTBTriggerData
_tokTrigger
 
hcaldqm::ContainerXXX< int > _xEntries
 
hcaldqm::ContainerXXX< double > _xSignalSum
 
hcaldqm::ContainerXXX< double > _xSignalSum2
 
hcaldqm::ContainerXXX< double > _xTimingSum
 
hcaldqm::ContainerXXX< double > _xTimingSum2
 
- Protected Attributes inherited from hcaldqm::DQTask
ContainerI _cEvsPerLS
 
ContainerI _cEvsTotal
 
ContainerS _cProcessingTypeName
 
ContainerS _cRunKeyName
 
ContainerI _cRunKeyVal
 
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
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 21 of file LEDTask.h.

Constructor & Destructor Documentation

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

Definition at line 7 of file LEDTask.cc.

References _lowHBHE, _lowHF, _lowHO, _tagHBHE, _tagHF, _tagHO, _tagTrigger, _tokHBHE, _tokHF, _tokHO, _tokTrigger, edm::ParameterSet::getUntrackedParameter(), and HLT_25ns10e33_v2_cff::InputTag.

7  :
8  DQTask(ps)
9 {
10  // tags
11  _tagHBHE = ps.getUntrackedParameter<edm::InputTag>("tagHBHE",
12  edm::InputTag("hcalDigis"));
13  _tagHO = ps.getUntrackedParameter<edm::InputTag>("tagHO",
14  edm::InputTag("hcalDigis"));
15  _tagHF = ps.getUntrackedParameter<edm::InputTag>("tagHF",
16  edm::InputTag("hcalDigis"));
17  _tagTrigger = ps.getUntrackedParameter<edm::InputTag>("tagTrigger",
18  edm::InputTag("tbunpacker"));
19  _tokHBHE = consumes<HBHEDigiCollection>(_tagHBHE);
20  _tokHO = consumes<HODigiCollection>(_tagHO);
21  _tokHF = consumes<HFDigiCollection>(_tagHF);
22  _tokTrigger = consumes<HcalTBTriggerData>(_tagTrigger);
23 
24  // constants
25  _lowHBHE = ps.getUntrackedParameter<double>("lowHBHE",
26  20);
27  _lowHO = ps.getUntrackedParameter<double>("lowHO",
28  20);
29  _lowHF = ps.getUntrackedParameter<double>("lowHF",
30  20);
31 }
double _lowHBHE
Definition: LEDTask.h:62
DQTask(edm::ParameterSet const &)
Definition: DQTask.cc:7
edm::EDGetTokenT< HcalTBTriggerData > _tokTrigger
Definition: LEDTask.h:53
double _lowHF
Definition: LEDTask.h:64
edm::EDGetTokenT< HBHEDigiCollection > _tokHBHE
Definition: LEDTask.h:50
edm::InputTag _tagHO
Definition: LEDTask.h:47
edm::InputTag _tagHF
Definition: LEDTask.h:48
double _lowHO
Definition: LEDTask.h:63
edm::InputTag _tagTrigger
Definition: LEDTask.h:49
edm::InputTag _tagHBHE
Definition: LEDTask.h:46
edm::EDGetTokenT< HODigiCollection > _tokHO
Definition: LEDTask.h:51
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: LEDTask.h:52
virtual LEDTask::~LEDTask ( )
inlinevirtual

Definition at line 25 of file LEDTask.h.

26  {}

Member Function Documentation

void LEDTask::_dump ( )
protectedvirtual

Definition at line 206 of file LEDTask.cc.

References _cMissing_depth, _cMissing_FEDuTCA, _cMissing_FEDVME, _cSignalMean_depth, _cSignalMean_FEDuTCA, _cSignalMean_FEDVME, _cSignalMean_Subdet, _cSignalRMS_depth, _cSignalRMS_FEDuTCA, _cSignalRMS_FEDVME, _cSignalRMS_Subdet, _cTimingMean_depth, _cTimingMean_FEDuTCA, _cTimingMean_FEDVME, _cTimingMean_Subdet, _cTimingRMS_depth, _cTimingRMS_FEDuTCA, _cTimingRMS_FEDVME, _cTimingRMS_Subdet, _ehashmap, _emap, _xEntries, _xSignalSum, _xSignalSum2, _xTimingSum, _xTimingSum2, HcalElectronicsMap::allPrecisionId(), hcaldqm::Container2D::fill(), hcaldqm::Container1D::fill(), hcaldqm::ContainerXXX< STDTYPE >::get(), hcaldqm::electronicsmap::ElectronicsMap::lookup(), gen::n, hcaldqm::Container1D::reset(), and mathSSE::sqrt().

Referenced by _process(), and endRun().

207 {
216 
225 
226  std::vector<HcalGenericDetId> dids = _emap->allPrecisionId();
227  for (std::vector<HcalGenericDetId>::const_iterator it=dids.begin();
228  it!=dids.end(); ++it)
229  {
230  if (!it->isHcalDetId())
231  continue;
232  HcalDetId did = HcalDetId(it->rawId());
234  int n = _xEntries.get(did);
235  double msig = _xSignalSum.get(did)/n;
236  double mtim = _xTimingSum.get(did)/n;
237  double rsig = sqrt(_xSignalSum2.get(did)/n-msig*msig);
238  double rtim = sqrt(_xTimingSum2.get(did)/n-mtim*mtim);
239 
240  // channels missing or low signal
241  if (n==0)
242  {
243  _cMissing_depth.fill(did);
244  if (eid.isVMEid())
245  _cMissing_FEDVME.fill(eid);
246  else
247  _cMissing_FEDuTCA.fill(eid);
248  continue;
249  }
250  _cSignalMean_Subdet.fill(did, msig);
251  _cSignalMean_depth.fill(did, msig);
252  _cSignalRMS_Subdet.fill(did, rsig);
253  _cSignalRMS_depth.fill(did, rsig);
254  _cTimingMean_Subdet.fill(did, mtim);
255  _cTimingMean_depth.fill(did, mtim);
256  _cTimingRMS_Subdet.fill(did, rtim);
257  _cTimingRMS_depth.fill(did, rtim);
258  if (eid.isVMEid())
259  {
260  _cSignalMean_FEDVME.fill(eid, msig);
261  _cSignalRMS_FEDVME.fill(eid, rsig);
262  _cTimingMean_FEDVME.fill(eid, mtim);
263  _cTimingRMS_FEDVME.fill(eid, rtim);
264  }
265  else
266  {
267  _cSignalMean_FEDuTCA.fill(eid, msig);
268  _cSignalRMS_FEDuTCA.fill(eid, rsig);
269  _cTimingMean_FEDuTCA.fill(eid, mtim);
270  _cTimingRMS_FEDuTCA.fill(eid, rtim);
271  }
272  }
273 }
hcaldqm::Container2D _cMissing_FEDuTCA
Definition: LEDTask.h:100
hcaldqm::Container2D _cMissing_FEDVME
Definition: LEDTask.h:99
hcaldqm::ContainerProf2D _cSignalMean_depth
Definition: LEDTask.h:83
hcaldqm::ContainerProf2D _cTimingMean_FEDuTCA
Definition: LEDTask.h:91
hcaldqm::ContainerProf2D _cTimingMean_depth
Definition: LEDTask.h:85
hcaldqm::ContainerProf2D _cSignalMean_FEDVME
Definition: LEDTask.h:88
hcaldqm::Container2D _cMissing_depth
Definition: LEDTask.h:98
hcaldqm::ContainerProf2D _cTimingMean_FEDVME
Definition: LEDTask.h:90
hcaldqm::ContainerProf2D _cSignalRMS_FEDVME
Definition: LEDTask.h:92
hcaldqm::ContainerXXX< int > _xEntries
Definition: LEDTask.h:69
hcaldqm::ContainerXXX< double > _xTimingSum
Definition: LEDTask.h:70
virtual void fill(HcalDetId const &)
Definition: Container2D.cc:59
hcaldqm::ContainerProf2D _cSignalRMS_FEDuTCA
Definition: LEDTask.h:93
virtual void fill(uint32_t)
Definition: Container1D.cc:82
virtual void reset()
Definition: Container1D.cc:65
T sqrt(T t)
Definition: SSEVec.h:18
std::vector< HcalGenericDetId > allPrecisionId() const
hcaldqm::ContainerProf2D _cSignalMean_FEDuTCA
Definition: LEDTask.h:89
hcaldqm::ContainerProf2D _cTimingRMS_depth
Definition: LEDTask.h:86
hcaldqm::Container1D _cSignalRMS_Subdet
Definition: LEDTask.h:75
hcaldqm::ContainerXXX< double > _xTimingSum2
Definition: LEDTask.h:71
hcaldqm::ContainerProf2D _cTimingRMS_FEDVME
Definition: LEDTask.h:94
hcaldqm::ContainerProf2D _cTimingRMS_FEDuTCA
Definition: LEDTask.h:95
hcaldqm::ContainerXXX< double > _xSignalSum
Definition: LEDTask.h:67
hcaldqm::Container1D _cTimingMean_Subdet
Definition: LEDTask.h:76
hcaldqm::ContainerProf2D _cSignalRMS_depth
Definition: LEDTask.h:84
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:249
hcaldqm::Container1D _cTimingRMS_Subdet
Definition: LEDTask.h:77
hcaldqm::ContainerXXX< double > _xSignalSum2
Definition: LEDTask.h:68
HcalElectronicsMap const * _emap
Definition: LEDTask.h:56
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
Definition: LEDTask.h:57
Readout chain identification for Hcal.
hcaldqm::Container1D _cSignalMean_Subdet
Definition: LEDTask.h:74
bool LEDTask::_isApplicable ( edm::Event const &  e)
protectedvirtual

Reimplemented from hcaldqm::DQTask.

Definition at line 369 of file LEDTask.cc.

References hcaldqm::DQModule::_logger, hcaldqm::DQModule::_ptype, _tagTrigger, _tokTrigger, Logger::dqmthrow(), hcaldqm::fOnline, edm::Event::getByToken(), edm::InputTag::instance(), and edm::InputTag::label().

370 {
371  if (_ptype!=fOnline)
372  {
373  // local
375  if (!e.getByToken(_tokTrigger, ctrigger))
376  _logger.dqmthrow("Collection HcalTBTriggerData isn't available "
377  + _tagTrigger.label() + " " + _tagTrigger.instance());
378  return ctrigger->wasLEDTrigger();
379  }
380 
381  return false;
382 }
edm::EDGetTokenT< HcalTBTriggerData > _tokTrigger
Definition: LEDTask.h:53
ProcessingType _ptype
Definition: DQModule.h:59
void dqmthrow(std::string const &msg) const
Definition: Logger.h:15
Logger _logger
Definition: DQModule.h:70
edm::InputTag _tagTrigger
Definition: LEDTask.h:49
std::string const & label() const
Definition: InputTag.h:36
std::string const & instance() const
Definition: InputTag.h:37
void LEDTask::_process ( edm::Event const &  e,
edm::EventSetup const &  es 
)
protectedvirtual

Implements hcaldqm::DQTask.

Definition at line 275 of file LEDTask.cc.

References _cShapeCut_FEDSlot, _dump(), hcaldqm::DQModule::_evsTotal, hcaldqm::DQModule::_logger, _lowHBHE, _lowHF, _lowHO, hcaldqm::DQModule::_ptype, _tagHBHE, _tagHF, _tagHO, _tokHBHE, _tokHF, _tokHO, _xEntries, _xSignalSum, _xSignalSum2, _xTimingSum, _xTimingSum2, hcaldqm::utilities::aveTS(), hcaldqm::constants::CALIBEVENTS_MIN, Logger::dqmthrow(), hcaldqm::Container1D::fill(), hcaldqm::fOnline, hcaldqm::ContainerXXX< STDTYPE >::get(), edm::Event::getByToken(), i, edm::InputTag::instance(), edm::InputTag::label(), HFDataFrame::size(), HBHEDataFrame::size(), HODataFrame::size(), and hcaldqm::utilities::sumQ().

277 {
281 
282  if (!e.getByToken(_tokHBHE, chbhe))
283  _logger.dqmthrow("Collection HBHEDigiCollection isn't available "
284  + _tagHBHE.label() + " " + _tagHBHE.instance());
285  if (!e.getByToken(_tokHO, cho))
286  _logger.dqmthrow("Collection HODigiCollection isn't available "
287  + _tagHO.label() + " " + _tagHO.instance());
288  if (!e.getByToken(_tokHF, chf))
289  _logger.dqmthrow("Collection HFDigiCollection isn't available "
290  + _tagHF.label() + " " + _tagHF.instance());
291 
292 // int currentEvent = e.eventAuxiliary().id().event();
293 
294  for (HBHEDigiCollection::const_iterator it=chbhe->begin();
295  it!=chbhe->end(); ++it)
296  {
297  const HBHEDataFrame digi = (const HBHEDataFrame)(*it);
298  double sumQ = hcaldqm::utilities::sumQ<HBHEDataFrame>(digi, 2.5, 0,
299  digi.size()-1);
300  if (sumQ<_lowHBHE)
301  continue;
302  HcalDetId did = digi.id();
303  HcalElectronicsId eid = digi.elecId();
304 
305  double aveTS = hcaldqm::utilities::aveTS<HBHEDataFrame>(digi, 2.5, 0,
306  digi.size()-1);
307  _xSignalSum.get(did)+=sumQ;
308  _xSignalSum2.get(did)+=sumQ*sumQ;
309  _xTimingSum.get(did)+=aveTS;
310  _xTimingSum2.get(did)+=aveTS*aveTS;
311  _xEntries.get(did)++;
312 
313  for (int i=0; i<digi.size(); i++)
314  _cShapeCut_FEDSlot.fill(eid, i,
315  digi.sample(i).nominal_fC()-2.5);
316  }
317  for (HODigiCollection::const_iterator it=cho->begin();
318  it!=cho->end(); ++it)
319  {
320  const HODataFrame digi = (const HODataFrame)(*it);
321  double sumQ = hcaldqm::utilities::sumQ<HODataFrame>(digi, 8.5, 0,
322  digi.size()-1);
323  if (sumQ<_lowHO)
324  continue;
325  HcalDetId did = digi.id();
326  HcalElectronicsId eid = digi.elecId();
327 
328  double aveTS = hcaldqm::utilities::aveTS<HODataFrame>(digi, 8.5, 0,
329  digi.size()-1);
330  _xSignalSum.get(did)+=sumQ;
331  _xSignalSum2.get(did)+=sumQ*sumQ;
332  _xTimingSum.get(did)+=aveTS;
333  _xTimingSum2.get(did)+=aveTS*aveTS;
334  _xEntries.get(did)++;
335 
336  for (int i=0; i<digi.size(); i++)
337  _cShapeCut_FEDSlot.fill(eid, i,
338  digi.sample(i).nominal_fC()-8.5);
339  }
340  for (HFDigiCollection::const_iterator it=chf->begin();
341  it!=chf->end(); ++it)
342  {
343  const HFDataFrame digi = (const HFDataFrame)(*it);
344  double sumQ = hcaldqm::utilities::sumQ<HFDataFrame>(digi, 2.5, 0,
345  digi.size()-1);
346  if (sumQ<_lowHF)
347  continue;
348  HcalDetId did = digi.id();
349  HcalElectronicsId eid = digi.elecId();
350 
351  double aveTS = hcaldqm::utilities::aveTS<HFDataFrame>(digi, 2.5, 0,
352  digi.size()-1);
353  _xSignalSum.get(did)+=sumQ;
354  _xSignalSum2.get(did)+=sumQ*sumQ;
355  _xTimingSum.get(did)+=aveTS;
356  _xTimingSum2.get(did)+=aveTS*aveTS;
357  _xEntries.get(did)++;
358 
359  for (int i=0; i<digi.size(); i++)
360  _cShapeCut_FEDSlot.fill(eid, i,
361  digi.sample(i).nominal_fC()-2.5);
362  }
363 
364  if (_ptype==fOnline && _evsTotal>0 &&
366  this->_dump();
367 }
int i
Definition: DBlmapReader.cc:9
double aveTS(DIGI const &digi, double ped=0, int i=0, int j=3)
Definition: Utilities.h:65
double _lowHBHE
Definition: LEDTask.h:62
double _lowHF
Definition: LEDTask.h:64
edm::EDGetTokenT< HBHEDigiCollection > _tokHBHE
Definition: LEDTask.h:50
int size() const
total number of samples in the digi
Definition: HBHEDataFrame.h:26
std::vector< HBHEDataFrame >::const_iterator const_iterator
edm::InputTag _tagHO
Definition: LEDTask.h:47
edm::InputTag _tagHF
Definition: LEDTask.h:48
hcaldqm::ContainerXXX< int > _xEntries
Definition: LEDTask.h:69
hcaldqm::ContainerXXX< double > _xTimingSum
Definition: LEDTask.h:70
ProcessingType _ptype
Definition: DQModule.h:59
virtual void fill(uint32_t)
Definition: Container1D.cc:82
double _lowHO
Definition: LEDTask.h:63
void dqmthrow(std::string const &msg) const
Definition: Logger.h:15
int size() const
total number of samples in the digi
Definition: HODataFrame.h:27
Logger _logger
Definition: DQModule.h:70
edm::InputTag _tagHBHE
Definition: LEDTask.h:46
int const CALIBEVENTS_MIN
Definition: Constants.h:214
hcaldqm::ContainerXXX< double > _xTimingSum2
Definition: LEDTask.h:71
int size() const
total number of samples in the digi
Definition: HFDataFrame.h:26
edm::EDGetTokenT< HODigiCollection > _tokHO
Definition: LEDTask.h:51
hcaldqm::ContainerXXX< double > _xSignalSum
Definition: LEDTask.h:67
std::string const & label() const
Definition: InputTag.h:36
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:249
virtual void _dump()
Definition: LEDTask.cc:206
hcaldqm::ContainerXXX< double > _xSignalSum2
Definition: LEDTask.h:68
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: LEDTask.h:52
hcaldqm::ContainerProf1D _cShapeCut_FEDSlot
Definition: LEDTask.h:80
Readout chain identification for Hcal.
std::string const & instance() const
Definition: InputTag.h:37
double sumQ(DIGI const &digi, double ped, int i=0, int j=3)
Definition: Utilities.h:79
void LEDTask::_resetMonitors ( hcaldqm::UpdateFreq  uf)
protectedvirtual

Reimplemented from hcaldqm::DQTask.

Definition at line 201 of file LEDTask.cc.

202 {
203  DQTask::_resetMonitors(uf);
204 }
void LEDTask::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  r,
edm::EventSetup const &  es 
)
virtual

Reimplemented from hcaldqm::DQTask.

Definition at line 33 of file LEDTask.cc.

References _cMissing_depth, _cMissing_FEDuTCA, _cMissing_FEDVME, _cShapeCut_FEDSlot, _cSignalMean_depth, _cSignalMean_FEDuTCA, _cSignalMean_FEDVME, _cSignalMean_Subdet, _cSignalRMS_depth, _cSignalRMS_FEDuTCA, _cSignalRMS_FEDVME, _cSignalRMS_Subdet, _cTimingMean_depth, _cTimingMean_FEDuTCA, _cTimingMean_FEDVME, _cTimingMean_Subdet, _cTimingRMS_depth, _cTimingRMS_FEDuTCA, _cTimingRMS_FEDVME, _cTimingRMS_Subdet, _ehashmap, _emap, _filter_uTCA, _filter_VME, hcaldqm::DQModule::_name, hcaldqm::DQModule::_ptype, hcaldqm::DQModule::_subsystem, _xEntries, _xSignalSum, _xSignalSum2, _xTimingSum, _xTimingSum2, hcaldqm::ContainerXXX< STDTYPE >::book(), hcaldqm::ContainerProf2D::book(), hcaldqm::ContainerProf1D::book(), hcaldqm::Container2D::book(), hcaldqm::Container1D::book(), bookHistograms(), hcaldqm::constants::CRATE_uTCA_MIN, hcaldqm::constants::CRATE_VME_MIN, hcaldqm::electronicsmap::fD2EHashMap, hcaldqm::hashfunctions::fDChannel, hcaldqm::hashfunctions::fdepth, hcaldqm::hashfunctions::fElectronics, hcaldqm::quantity::ffC_1000, hcaldqm::quantity::ffC_3000, hcaldqm::hashfunctions::fFED, hcaldqm::hashfunctions::fFEDSlot, hcaldqm::quantity::fFiberuTCAFiberCh, hcaldqm::quantity::fFiberVMEFiberCh, hcaldqm::filter::fFilter, hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, hcaldqm::quantity::fieta, hcaldqm::quantity::fiphi, hcaldqm::fLocal, hcaldqm::quantity::fN, hcaldqm::quantity::fSlotuTCA, hcaldqm::quantity::fSpigot, hcaldqm::hashfunctions::fSubdet, hcaldqm::quantity::fTiming_TS, hcaldqm::quantity::fTiming_TS200, edm::EventSetup::get(), hcaldqm::ContainerProf2D::initialize(), hcaldqm::Container2D::initialize(), hcaldqm::ContainerProf1D::initialize(), hcaldqm::ContainerXXX< STDTYPE >::initialize(), hcaldqm::filter::HashFilter::initialize(), hcaldqm::electronicsmap::ElectronicsMap::initialize(), hcaldqm::Container1D::initialize(), edm::RunAuxiliary::run(), edm::Run::runAuxiliary(), hcaldqm::constants::SLOT_uTCA_MIN, and hcaldqm::constants::SPIGOT_MIN.

35 {
36  if (_ptype==fLocal)
37  if (r.runAuxiliary().run()==1)
38  return;
39 
40  DQTask::bookHistograms(ib, r, es);
41 
43  es.get<HcalDbRecord>().get(dbService);
44  _emap = dbService->getHcalMapping();
45 
46  std::vector<uint32_t> vhashVME;
47  std::vector<uint32_t> vhashuTCA;
48  std::vector<uint32_t> vhashC36;
49  vhashVME.push_back(HcalElectronicsId(constants::FIBERCH_MIN,
51  vhashuTCA.push_back(HcalElectronicsId(CRATE_uTCA_MIN, SLOT_uTCA_MIN,
52  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
54  vhashVME);
56  vhashuTCA);
57 
58  // INITIALIZE
59  _cSignalMean_Subdet.initialize(_name, "SignalMean",
63  _cSignalRMS_Subdet.initialize(_name, "SignalRMS",
67  _cTimingMean_Subdet.initialize(_name, "TimingMean",
71  _cTimingRMS_Subdet.initialize(_name, "TimingRMS",
75 
76  _cSignalMean_FEDVME.initialize(_name, "SignalMean",
86  _cSignalRMS_FEDVME.initialize(_name, "SignalRMS",
96  _cTimingMean_FEDVME.initialize(_name, "TimingMean",
101  _cTimingMean_FEDuTCA.initialize(_name, "TimingMean",
106  _cTimingRMS_FEDVME.initialize(_name, "TimingRMS",
111  _cTimingRMS_FEDuTCA.initialize(_name, "TimingRMS",
116 
121 
122  _cSignalMean_depth.initialize(_name, "SignalMean",
127  _cSignalRMS_depth.initialize(_name, "SignalRMS",
132  _cTimingMean_depth.initialize(_name, "TimingMean",
137  _cTimingRMS_depth.initialize(_name, "TimingRMS",
142 
143  _cMissing_depth.initialize(_name, "Missing",
148  _cMissing_FEDVME.initialize(_name, "Missing",
158 
159 
160  // initialize compact containers
166 
167  // BOOK
172 
177 
186 
191 
197 
199 }
hcaldqm::Container2D _cMissing_FEDuTCA
Definition: LEDTask.h:100
hcaldqm::Container2D _cMissing_FEDVME
Definition: LEDTask.h:99
hcaldqm::ContainerProf2D _cSignalMean_depth
Definition: LEDTask.h:83
hcaldqm::ContainerProf2D _cTimingMean_FEDuTCA
Definition: LEDTask.h:91
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *qy=new ValueQuantity(quantity::fN), int debug=0)
Definition: Container1D.cc:40
int const CRATE_VME_MIN
Definition: Constants.h:60
hcaldqm::ContainerProf2D _cTimingMean_depth
Definition: LEDTask.h:85
hcaldqm::ContainerProf2D _cSignalMean_FEDVME
Definition: LEDTask.h:88
hcaldqm::Container2D _cMissing_depth
Definition: LEDTask.h:98
void initialize(HcalElectronicsMap const *, ElectronicsMapType etype=fHcalElectronicsMap)
hcaldqm::ContainerProf2D _cTimingMean_FEDVME
Definition: LEDTask.h:90
int const SPIGOT_MIN
Definition: Constants.h:85
hcaldqm::ContainerProf2D _cSignalRMS_FEDVME
Definition: LEDTask.h:92
int const FIBER_VME_MIN
Definition: Constants.h:90
hcaldqm::filter::HashFilter _filter_uTCA
Definition: LEDTask.h:58
hcaldqm::ContainerXXX< int > _xEntries
Definition: LEDTask.h:69
void bookHistograms(fwlite::EventContainer &eventCont)
int const FIBERCH_MIN
Definition: Constants.h:100
hcaldqm::ContainerXXX< double > _xTimingSum
Definition: LEDTask.h:70
hcaldqm::ContainerProf2D _cSignalRMS_FEDuTCA
Definition: LEDTask.h:93
ProcessingType _ptype
Definition: DQModule.h:59
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *, int debug=0)
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *, Quantity *qz=new ValueQuantity(quantity::fEnergy), int debug=0)
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *, Quantity *qz=new ValueQuantity(quantity::fN), int debug=0)
Definition: Container2D.cc:32
int const FIBER_uTCA_MIN1
Definition: Constants.h:93
std::string _name
Definition: DQModule.h:57
hcaldqm::ContainerProf2D _cSignalMean_FEDuTCA
Definition: LEDTask.h:89
hcaldqm::ContainerProf2D _cTimingRMS_depth
Definition: LEDTask.h:86
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
hcaldqm::Container1D _cSignalRMS_Subdet
Definition: LEDTask.h:75
hcaldqm::filter::HashFilter _filter_VME
Definition: LEDTask.h:59
int const CRATE_uTCA_MIN
Definition: Constants.h:65
hcaldqm::ContainerXXX< double > _xTimingSum2
Definition: LEDTask.h:71
hcaldqm::ContainerProf2D _cTimingRMS_FEDVME
Definition: LEDTask.h:94
hcaldqm::ContainerProf2D _cTimingRMS_FEDuTCA
Definition: LEDTask.h:95
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
Definition: Container2D.cc:895
virtual void book(HcalElectronicsMap const *)
Definition: ContainerXXX.h:99
hcaldqm::ContainerXXX< double > _xSignalSum
Definition: LEDTask.h:67
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
Definition: Container1D.cc:957
hcaldqm::Container1D _cTimingMean_Subdet
Definition: LEDTask.h:76
hcaldqm::ContainerProf2D _cSignalRMS_depth
Definition: LEDTask.h:84
hcaldqm::Container1D _cTimingRMS_Subdet
Definition: LEDTask.h:77
std::string _subsystem
Definition: DQModule.h:64
hcaldqm::ContainerXXX< double > _xSignalSum2
Definition: LEDTask.h:68
HcalElectronicsMap const * _emap
Definition: LEDTask.h:56
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
Definition: LEDTask.h:57
hcaldqm::ContainerProf1D _cShapeCut_FEDSlot
Definition: LEDTask.h:80
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:91
virtual void initialize(FilterType ftype, HashType htype, std::vector< uint32_t > const &)
Definition: HashFilter.cc:26
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
Readout chain identification for Hcal.
int const SLOT_uTCA_MIN
Definition: Constants.h:72
hcaldqm::Container1D _cSignalMean_Subdet
Definition: LEDTask.h:74
virtual void LEDTask::endRun ( edm::Run const &  r,
edm::EventSetup const &   
)
inlinevirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 30 of file LEDTask.h.

References _dump(), hcaldqm::DQModule::_ptype, hcaldqm::fLocal, edm::RunAuxiliary::run(), and edm::Run::runAuxiliary().

31  {
33  if (r.runAuxiliary().run()==1)
34  return;
35  this->_dump();
36  }
ProcessingType _ptype
Definition: DQModule.h:59
virtual void _dump()
Definition: LEDTask.cc:206

Member Data Documentation

hcaldqm::Container2D LEDTask::_cMissing_depth
protected

Definition at line 98 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::Container2D LEDTask::_cMissing_FEDuTCA
protected

Definition at line 100 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::Container2D LEDTask::_cMissing_FEDVME
protected

Definition at line 99 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::ContainerProf1D LEDTask::_cShapeCut_FEDSlot
protected

Definition at line 80 of file LEDTask.h.

Referenced by _process(), and bookHistograms().

hcaldqm::ContainerProf2D LEDTask::_cSignalMean_depth
protected

Definition at line 83 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::ContainerProf2D LEDTask::_cSignalMean_FEDuTCA
protected

Definition at line 89 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::ContainerProf2D LEDTask::_cSignalMean_FEDVME
protected

Definition at line 88 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::Container1D LEDTask::_cSignalMean_Subdet
protected

Definition at line 74 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::ContainerProf2D LEDTask::_cSignalRMS_depth
protected

Definition at line 84 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::ContainerProf2D LEDTask::_cSignalRMS_FEDuTCA
protected

Definition at line 93 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::ContainerProf2D LEDTask::_cSignalRMS_FEDVME
protected

Definition at line 92 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::Container1D LEDTask::_cSignalRMS_Subdet
protected

Definition at line 75 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::ContainerProf2D LEDTask::_cTimingMean_depth
protected

Definition at line 85 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::ContainerProf2D LEDTask::_cTimingMean_FEDuTCA
protected

Definition at line 91 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::ContainerProf2D LEDTask::_cTimingMean_FEDVME
protected

Definition at line 90 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::Container1D LEDTask::_cTimingMean_Subdet
protected

Definition at line 76 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::ContainerProf2D LEDTask::_cTimingRMS_depth
protected

Definition at line 86 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::ContainerProf2D LEDTask::_cTimingRMS_FEDuTCA
protected

Definition at line 95 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::ContainerProf2D LEDTask::_cTimingRMS_FEDVME
protected

Definition at line 94 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::Container1D LEDTask::_cTimingRMS_Subdet
protected

Definition at line 77 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::electronicsmap::ElectronicsMap LEDTask::_ehashmap
protected

Definition at line 57 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

HcalElectronicsMap const* LEDTask::_emap
protected

Definition at line 56 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

hcaldqm::filter::HashFilter LEDTask::_filter_uTCA
protected

Definition at line 58 of file LEDTask.h.

Referenced by bookHistograms().

hcaldqm::filter::HashFilter LEDTask::_filter_VME
protected

Definition at line 59 of file LEDTask.h.

Referenced by bookHistograms().

double LEDTask::_lowHBHE
protected

Definition at line 62 of file LEDTask.h.

Referenced by _process(), and LEDTask().

double LEDTask::_lowHF
protected

Definition at line 64 of file LEDTask.h.

Referenced by _process(), and LEDTask().

double LEDTask::_lowHO
protected

Definition at line 63 of file LEDTask.h.

Referenced by _process(), and LEDTask().

edm::InputTag LEDTask::_tagHBHE
protected

Definition at line 46 of file LEDTask.h.

Referenced by _process(), and LEDTask().

edm::InputTag LEDTask::_tagHF
protected

Definition at line 48 of file LEDTask.h.

Referenced by _process(), and LEDTask().

edm::InputTag LEDTask::_tagHO
protected

Definition at line 47 of file LEDTask.h.

Referenced by _process(), and LEDTask().

edm::InputTag LEDTask::_tagTrigger
protected

Definition at line 49 of file LEDTask.h.

Referenced by _isApplicable(), and LEDTask().

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

Definition at line 50 of file LEDTask.h.

Referenced by _process(), and LEDTask().

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

Definition at line 52 of file LEDTask.h.

Referenced by _process(), and LEDTask().

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

Definition at line 51 of file LEDTask.h.

Referenced by _process(), and LEDTask().

edm::EDGetTokenT<HcalTBTriggerData> LEDTask::_tokTrigger
protected

Definition at line 53 of file LEDTask.h.

Referenced by _isApplicable(), and LEDTask().

hcaldqm::ContainerXXX<int> LEDTask::_xEntries
protected

Definition at line 69 of file LEDTask.h.

Referenced by _dump(), _process(), and bookHistograms().

hcaldqm::ContainerXXX<double> LEDTask::_xSignalSum
protected

Definition at line 67 of file LEDTask.h.

Referenced by _dump(), _process(), and bookHistograms().

hcaldqm::ContainerXXX<double> LEDTask::_xSignalSum2
protected

Definition at line 68 of file LEDTask.h.

Referenced by _dump(), _process(), and bookHistograms().

hcaldqm::ContainerXXX<double> LEDTask::_xTimingSum
protected

Definition at line 70 of file LEDTask.h.

Referenced by _dump(), _process(), and bookHistograms().

hcaldqm::ContainerXXX<double> LEDTask::_xTimingSum2
protected

Definition at line 71 of file LEDTask.h.

Referenced by _dump(), _process(), and bookHistograms().

tuple LEDTask.ledTask
Initial value:
1 = cms.EDAnalyzer(
2  "LEDTask",
3 
4  # standard parameters
5  name = cms.untracked.string("LEDTask"),
6  debug = cms.untracked.int32(0),
7  runkeyVal = cms.untracked.int32(0),
8  runkeyName = cms.untracked.string("pp_run"),
9  ptype = cms.untracked.int32(0),
10  mtype = cms.untracked.bool(True),
11  subsystem = cms.untracked.string("HcalCalib"),
12 
13  # tags
14  tagHBHE = cms.untracked.InputTag("hcalDigis"),
15  tagHO = cms.untracked.InputTag("hcalDigis"),
16  tagHF = cms.untracked.InputTag("hcalDigis"),
17  tagRaw = cms.untracked.InputTag('hltHcalCalibrationRaw')
18 )

Definition at line 3 of file LEDTask.py.