CMS 3D CMS Logo

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 DQMOneEDAnalyzer< edm::LuminosityBlockCache< hcaldqm::Cache > > hcaldqm::DQModule edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmEndRun (edm::Run const &r, edm::EventSetup const &) override
 
 LEDTask (edm::ParameterSet const &)
 
 ~LEDTask () override
 
- Public Member Functions inherited from hcaldqm::DQTask
void analyze (edm::Event const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQTask (edm::ParameterSet const &)
 
std::shared_ptr< hcaldqm::CacheglobalBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) const override
 
void globalEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
 ~DQTask () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< hcaldqm::Cache > >
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 
- Public Member Functions inherited from hcaldqm::DQModule
 DQModule (edm::ParameterSet const &)
 
virtual ~DQModule () noexcept(false)
 

Public Attributes

 debug
 
 ledCalibrationChannels
 
 ledTask
 
 mtype
 
 name
 
 ptype
 
 runkeyName
 
 runkeyVal
 
 subsystem
 
 tagHBHE
 
 tagHF
 
 tagHO
 
 tagRaw
 

Protected Member Functions

virtual void _dump ()
 
bool _isApplicable (edm::Event const &) override
 
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 &)
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Protected Attributes

hcaldqm::Container2D _cADCvsTS_SubdetPM
 
hcaldqm::ContainerSingle2D _cLowSignal_CrateSlot
 
hcaldqm::Container2D _cMissing_depth
 
hcaldqm::Container2D _cMissing_FEDuTCA
 
hcaldqm::ContainerProf1D _cShapeCut_FEDSlot
 
hcaldqm::ContainerProf2D _cSignalMean_depth
 
hcaldqm::ContainerProf2D _cSignalMean_FEDuTCA
 
hcaldqm::Container1D _cSignalMean_Subdet
 
hcaldqm::ContainerProf2D _cSignalRMS_depth
 
hcaldqm::ContainerProf2D _cSignalRMS_FEDuTCA
 
hcaldqm::Container1D _cSignalRMS_Subdet
 
hcaldqm::Container1D _cSumQ_SubdetPM
 
hcaldqm::ContainerProf2D _cTDCTime_depth
 
hcaldqm::Container1D _cTDCTime_SubdetPM
 
hcaldqm::ContainerProf2D _cTimingMean_depth
 
hcaldqm::ContainerProf2D _cTimingMean_FEDuTCA
 
hcaldqm::Container1D _cTimingMean_Subdet
 
hcaldqm::ContainerProf2D _cTimingRMS_depth
 
hcaldqm::ContainerProf2D _cTimingRMS_FEDuTCA
 
hcaldqm::Container1D _cTimingRMS_Subdet
 
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
 
hcaldqm::filter::HashFilter _filter_uTCA
 
hcaldqm::filter::HashFilter _filter_VME
 
hcaldqm::Container2D _LED_ADCvsBX_Subdet
 
hcaldqm::Container2D _LED_ADCvsEvn_Subdet
 
std::map< HcalSubdetector, std::vector< HcalDetId > > _ledCalibrationChannels
 
double _lowHBHE
 
double _lowHF
 
double _lowHO
 
int _nevents
 
edm::InputTag _tagHO
 
edm::InputTag _tagQIE10
 
edm::InputTag _tagQIE11
 
edm::InputTag _tagTrigger
 
edm::InputTag _taguMN
 
edm::EDGetTokenT< HODigiCollection_tokHO
 
edm::EDGetTokenT< QIE10DigiCollection_tokQIE10
 
edm::EDGetTokenT< QIE11DigiCollection_tokQIE11
 
edm::EDGetTokenT< HcalTBTriggerData_tokTrigger
 
edm::EDGetTokenT< HcalUMNioDigi_tokuMN
 
hcaldqm::ContainerXXX< int > _xEntries
 
hcaldqm::ContainerXXX< double > _xSignalSum
 
hcaldqm::ContainerXXX< double > _xSignalSum2
 
hcaldqm::ContainerXXX< double > _xTimingSum
 
hcaldqm::ContainerXXX< double > _xTimingSum2
 
edm::ESGetToken< HcalDbService, HcalDbRecordhcalDbServiceToken_
 
- Protected Attributes inherited from hcaldqm::DQTask
ContainerI _cEvsPerLS
 
ContainerI _cEvsTotal
 
ContainerS _cProcessingTypeName
 
ContainerS _cRunKeyName
 
ContainerI _cRunKeyVal
 
edm::ESHandle< HcalDbService_dbService
 
HcalElectronicsMap const * _emap = nullptr
 
int _procLSs
 
edm::InputTag _tagRaw
 
edm::EDGetTokenT< FEDRawDataCollection_tokRaw
 
std::vector< uint32_t > _vcdaqEids
 
ContainerXXX< uint32_t > _xQuality
 
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcdhcalChannelQualityToken_
 
edm::ESGetToken< HcalDbService, HcalDbRecordhcalDbServiceToken_
 
edm::ESGetToken< RunInfo, RunInfoRcdrunInfoToken_
 
- Protected Attributes inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< hcaldqm::Cache > >
edm::EDPutTokenT< DQMTokenrunToken_
 
- 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 DQMOneEDAnalyzer< edm::LuminosityBlockCache< hcaldqm::Cache > >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from hcaldqm::DQTask
static void fillPSetDescription (edm::ParameterSetDescription &des)
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from hcaldqm::DQModule
static void fillPSetDescription (edm::ParameterSetDescription &desc)
 

Detailed Description

Definition at line 22 of file LEDTask.h.

Constructor & Destructor Documentation

◆ LEDTask()

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

Definition at line 8 of file LEDTask.cc.

References _lowHBHE, _lowHF, _lowHO, _nevents, _tagHO, _tagQIE10, _tagQIE11, _tagTrigger, _taguMN, _tokHO, _tokQIE10, _tokQIE11, _tokTrigger, _tokuMN, edm::ParameterSet::getUntrackedParameter(), and ProducerED_cfi::InputTag.

9  : DQTask(ps), hcalDbServiceToken_(esConsumes<HcalDbService, HcalDbRecord, edm::Transition::BeginRun>()) {
10  _nevents = ps.getUntrackedParameter<int>("nevents", 2000);
11  // tags
12  _tagQIE11 = ps.getUntrackedParameter<edm::InputTag>("tagHE", edm::InputTag("hcalDigis"));
13  _tagHO = ps.getUntrackedParameter<edm::InputTag>("tagHO", edm::InputTag("hcalDigis"));
14  _tagQIE10 = ps.getUntrackedParameter<edm::InputTag>("tagHF", edm::InputTag("hcalDigis"));
15  _tagTrigger = ps.getUntrackedParameter<edm::InputTag>("tagTrigger", edm::InputTag("tbunpacker"));
16  _taguMN = ps.getUntrackedParameter<edm::InputTag>("taguMN", edm::InputTag("hcalDigis"));
17  _tokQIE11 = consumes<QIE11DigiCollection>(_tagQIE11);
18  _tokHO = consumes<HODigiCollection>(_tagHO);
19  _tokQIE10 = consumes<QIE10DigiCollection>(_tagQIE10);
20  _tokTrigger = consumes<HcalTBTriggerData>(_tagTrigger);
21  _tokuMN = consumes<HcalUMNioDigi>(_taguMN);
22 
23  // constants
24  _lowHBHE = ps.getUntrackedParameter<double>("lowHBHE", 20);
25  _lowHO = ps.getUntrackedParameter<double>("lowHO", 20);
26  _lowHF = ps.getUntrackedParameter<double>("lowHF", 20);
27 }
double _lowHBHE
Definition: LEDTask.h:62
DQTask(edm::ParameterSet const &)
Definition: DQTask.cc:8
edm::InputTag _taguMN
Definition: LEDTask.h:47
edm::EDGetTokenT< HcalTBTriggerData > _tokTrigger
Definition: LEDTask.h:51
double _lowHF
Definition: LEDTask.h:64
edm::InputTag _tagHO
Definition: LEDTask.h:44
edm::InputTag _tagQIE11
Definition: LEDTask.h:43
edm::EDGetTokenT< QIE11DigiCollection > _tokQIE11
Definition: LEDTask.h:48
edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbServiceToken_
Definition: LEDTask.h:53
int _nevents
Definition: LEDTask.h:61
edm::EDGetTokenT< QIE10DigiCollection > _tokQIE10
Definition: LEDTask.h:50
edm::EDGetTokenT< HcalUMNioDigi > _tokuMN
Definition: LEDTask.h:52
double _lowHO
Definition: LEDTask.h:63
edm::InputTag _tagTrigger
Definition: LEDTask.h:46
edm::EDGetTokenT< HODigiCollection > _tokHO
Definition: LEDTask.h:49
edm::InputTag _tagQIE10
Definition: LEDTask.h:45

◆ ~LEDTask()

LEDTask::~LEDTask ( )
inlineoverride

Definition at line 25 of file LEDTask.h.

25 {}

Member Function Documentation

◆ _dump()

void LEDTask::_dump ( )
protectedvirtual

Definition at line 297 of file LEDTask.cc.

References _cMissing_depth, _cMissing_FEDuTCA, _cSignalMean_depth, _cSignalMean_FEDuTCA, _cSignalMean_Subdet, _cSignalRMS_depth, _cSignalRMS_FEDuTCA, _cSignalRMS_Subdet, _cTimingMean_depth, _cTimingMean_FEDuTCA, _cTimingMean_Subdet, _cTimingRMS_depth, _cTimingRMS_FEDuTCA, _cTimingRMS_Subdet, _ehashmap, hcaldqm::DQTask::_emap, hcaldqm::DQModule::_ptype, _xEntries, _xSignalSum, _xSignalSum2, _xTimingSum, _xTimingSum2, HcalElectronicsMap::allPrecisionId(), runTauDisplay::eid, hcaldqm::Container2D::fill(), hcaldqm::ContainerProf2D::fill(), hcaldqm::Container1D::fill(), hcaldqm::fLocal, hcaldqm::ContainerXXX< STDTYPE >::get(), hcaldqm::electronicsmap::ElectronicsMap::lookup(), dqmiodumpmetadata::n, hcaldqm::Container1D::reset(), and mathSSE::sqrt().

Referenced by _process(), and dqmEndRun().

297  {
306 
307  if (_ptype == fLocal) { // hidefed2crate
312  }
313 
314  std::vector<HcalGenericDetId> dids = _emap->allPrecisionId();
315  for (std::vector<HcalGenericDetId>::const_iterator it = dids.begin(); it != dids.end(); ++it) {
316  if (!it->isHcalDetId())
317  continue;
318  HcalDetId did = HcalDetId(it->rawId());
320  int n = _xEntries.get(did);
321  double msig = _xSignalSum.get(did) / n;
322  double mtim = _xTimingSum.get(did) / n;
323  double rsig = sqrt(_xSignalSum2.get(did) / n - msig * msig);
324  double rtim = sqrt(_xTimingSum2.get(did) / n - mtim * mtim);
325 
326  // channels missing or low signal
327  if (n == 0) {
328  _cMissing_depth.fill(did);
329  if (_ptype == fLocal) { // hidefed2crate
330  if (!eid.isVMEid())
332  }
333  continue;
334  }
335  _cSignalMean_Subdet.fill(did, msig);
336  _cSignalMean_depth.fill(did, msig);
337  _cSignalRMS_Subdet.fill(did, rsig);
338  _cSignalRMS_depth.fill(did, rsig);
339  _cTimingMean_Subdet.fill(did, mtim);
340  _cTimingMean_depth.fill(did, mtim);
341  _cTimingRMS_Subdet.fill(did, rtim);
342  _cTimingRMS_depth.fill(did, rtim);
343  if (_ptype == fLocal) { // hidefed2crate
344  if (!eid.isVMEid()) {
349  }
350  }
351  }
352 }
hcaldqm::Container2D _cMissing_FEDuTCA
Definition: LEDTask.h:95
hcaldqm::ContainerProf2D _cSignalMean_depth
Definition: LEDTask.h:83
hcaldqm::ContainerProf2D _cTimingMean_FEDuTCA
Definition: LEDTask.h:89
hcaldqm::ContainerProf2D _cTimingMean_depth
Definition: LEDTask.h:85
void fill(HcalDetId const &) override
hcaldqm::Container2D _cMissing_depth
Definition: LEDTask.h:94
hcaldqm::ContainerXXX< int > _xEntries
Definition: LEDTask.h:69
hcaldqm::ContainerXXX< double > _xTimingSum
Definition: LEDTask.h:70
hcaldqm::ContainerProf2D _cSignalRMS_FEDuTCA
Definition: LEDTask.h:90
ProcessingType _ptype
Definition: DQModule.h:44
virtual void fill(uint32_t)
Definition: Container1D.cc:73
virtual void reset()
Definition: Container1D.cc:60
T sqrt(T t)
Definition: SSEVec.h:19
HcalElectronicsMap const * _emap
Definition: DQTask.h:81
hcaldqm::ContainerProf2D _cSignalMean_FEDuTCA
Definition: LEDTask.h:88
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_FEDuTCA
Definition: LEDTask.h:91
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:197
hcaldqm::Container1D _cTimingRMS_Subdet
Definition: LEDTask.h:77
std::vector< HcalGenericDetId > allPrecisionId() const
void fill(HcalDetId const &) override
Definition: Container2D.cc:52
hcaldqm::ContainerXXX< double > _xSignalSum2
Definition: LEDTask.h:68
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
Definition: LEDTask.h:56
Readout chain identification for Hcal.
hcaldqm::Container1D _cSignalMean_Subdet
Definition: LEDTask.h:74

◆ _isApplicable()

bool LEDTask::_isApplicable ( edm::Event const &  e)
overrideprotectedvirtual

Reimplemented from hcaldqm::DQTask.

Definition at line 587 of file LEDTask.cc.

References hcaldqm::DQModule::_logger, hcaldqm::DQModule::_ptype, _tagTrigger, _tokTrigger, _tokuMN, Logger::dqmthrow(), MillePedeFileConverter_cfg::e, HcalUMNioDigi::eventType(), hcaldqm::constants::EVENTTYPE_LED, hcaldqm::fOnline, edm::InputTag::instance(), edm::InputTag::label(), and HcalTBTriggerData::wasLEDTrigger().

587  {
588  if (_ptype != fOnline) {
589  // local
591  if (!e.getByToken(_tokTrigger, ctrigger))
592  _logger.dqmthrow("Collection HcalTBTriggerData isn't available " + _tagTrigger.label() + " " +
594  return ctrigger->wasLEDTrigger();
595  } else {
596  // fOnline mode
598  if (!e.getByToken(_tokuMN, cumn)) {
599  return false;
600  }
601 
602  return (cumn->eventType() == constants::EVENTTYPE_LED);
603  }
604 
605  return false;
606 }
edm::EDGetTokenT< HcalTBTriggerData > _tokTrigger
Definition: LEDTask.h:51
std::string const & instance() const
Definition: InputTag.h:37
void dqmthrow(std::string const &msg) const
Definition: Logger.h:12
bool wasLEDTrigger() const
returns true if this was a LED trigger
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< HcalUMNioDigi > _tokuMN
Definition: LEDTask.h:52
ProcessingType _ptype
Definition: DQModule.h:44
uint8_t const EVENTTYPE_LED
Definition: Constants.h:296
Logger _logger
Definition: DQModule.h:55
edm::InputTag _tagTrigger
Definition: LEDTask.h:46
uint8_t eventType() const

◆ _process()

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

Implements hcaldqm::DQTask.

Definition at line 354 of file LEDTask.cc.

References _cADCvsTS_SubdetPM, _cLowSignal_CrateSlot, _cShapeCut_FEDSlot, _cSumQ_SubdetPM, _cTDCTime_depth, _cTDCTime_SubdetPM, hcaldqm::DQTask::_dbService, _dump(), _ehashmap, hcaldqm::DQModule::_evsTotal, _LED_ADCvsBX_Subdet, _LED_ADCvsEvn_Subdet, _ledCalibrationChannels, hcaldqm::DQModule::_logger, _lowHBHE, _lowHF, _lowHO, hcaldqm::DQModule::_ptype, _tagHO, _tagQIE10, _tagQIE11, _tokHO, _tokQIE10, _tokQIE11, _xEntries, _xSignalSum, _xSignalSum2, _xTimingSum, _xTimingSum2, gpuClustering::adc, hcaldqm::utilities::aveTS(), edm::SortedCollection< T, SORT >::begin(), edm::DataFrameContainer::begin(), hcaldqm::constants::CALIBEVENTS_MIN, HcalDetId::depth(), QIE11DataFrame::detid(), QIE10DataFrame::detid(), Logger::dqmthrow(), MillePedeFileConverter_cfg::e, runTauDisplay::eid, HODataFrame::elecId(), edm::SortedCollection< T, SORT >::end(), edm::DataFrameContainer::end(), hcaldqm::Container2D::fill(), hcaldqm::ContainerSingle2D::fill(), hcaldqm::ContainerProf2D::fill(), hcaldqm::Container1D::fill(), spr::find(), hcaldqm::fLocal, hcaldqm::fOnline, hcaldqm::ContainerXXX< STDTYPE >::get(), HcalBarrel, HcalCalibration, HcalEndcap, HcalForward, HcalOther, HcalOuter, mps_fire::i, HODataFrame::id(), HcalDetId::ieta(), edm::InputTag::instance(), HcalDetId::iphi(), edm::InputTag::label(), hcaldqm::electronicsmap::ElectronicsMap::lookup(), QIE11DataFrame::samples(), QIE10DataFrame::samples(), HODataFrame::size(), AlCaHLTBitMon_QueryRunRegistry::string, HcalOtherDetId::subdet(), HcalDetId::subdet(), hcaldqm::utilities::sumQ(), protons_cff::time, cond::impl::to_string(), and Logger::warn().

354  {
358 
359  if (!e.getByToken(_tokHO, c_ho))
360  _logger.dqmthrow("Collection HODigiCollection isn't available " + _tagHO.label() + " " + _tagHO.instance());
361  if (!e.getByToken(_tokQIE10, c_QIE10))
362  _logger.dqmthrow("Collection QIE10DigiCollection isn't available " + _tagQIE10.label() + " " +
363  _tagQIE10.instance());
364  if (!e.getByToken(_tokQIE11, c_QIE11))
365  _logger.dqmthrow("Collection QIE11DigiCollection isn't available " + _tagQIE11.label() + " " +
366  _tagQIE11.instance());
367 
368  // int currentEvent = e.eventAuxiliary().id().event();
369 
370  for (QIE11DigiCollection::const_iterator it = c_QIE11->begin(); it != c_QIE11->end(); ++it) {
371  const QIE11DataFrame digi = static_cast<const QIE11DataFrame>(*it);
372  HcalDetId const& did = digi.detid();
373  if ((did.subdet() != HcalBarrel) && (did.subdet() != HcalEndcap)) {
374  // LED monitoring from calibration channels
375  if (did.subdet() == HcalOther) {
376  HcalOtherDetId hodid(digi.detid());
377  if (hodid.subdet() == HcalCalibration) {
380  for (int i = 0; i < digi.samples(); i++) {
381  if (_ptype == fOnline) {
382  _LED_ADCvsBX_Subdet.fill(HcalDetId(HcalEndcap, 16, 1, 1), e.bunchCrossing(), digi[i].adc());
383  } else if (_ptype == fLocal) {
385  HcalDetId(HcalEndcap, 16, 1, 1), e.eventAuxiliary().id().event(), digi[i].adc());
386  }
387  }
390  did) != _ledCalibrationChannels[HcalBarrel].end()) {
391  for (int i = 0; i < digi.samples(); i++) {
392  if (_ptype == fOnline) {
393  _LED_ADCvsBX_Subdet.fill(HcalDetId(HcalBarrel, 1, 1, 1), e.bunchCrossing(), digi[i].adc());
394  } else if (_ptype == fLocal) {
396  HcalDetId(HcalBarrel, 1, 1, 1), e.eventAuxiliary().id().event(), digi[i].adc());
397  }
398  }
399  }
400  }
401  }
402  continue;
403  }
404  uint32_t rawid = _ehashmap.lookup(did);
405  if (!rawid) {
406  std::string unknown_id_string = "Detid " + std::to_string(int(did)) + ", ieta " + std::to_string(did.ieta());
407  unknown_id_string += ", iphi " + std::to_string(did.iphi()) + ", depth " + std::to_string(did.depth());
408  unknown_id_string += ", is not in emap. Skipping.";
409  _logger.warn(unknown_id_string);
410  continue;
411  }
412  HcalElectronicsId const& eid(rawid);
413 
414  CaloSamples digi_fC = hcaldqm::utilities::loadADC2fCDB<QIE11DataFrame>(_dbService, did, digi);
415  //double sumQ = hcaldqm::utilities::sumQ_v10<QIE11DataFrame>(digi, 2.5, 0, digi.samples()-1);
416  double sumQ = hcaldqm::utilities::sumQDB<QIE11DataFrame>(_dbService, digi_fC, did, digi, 0, digi.samples() - 1);
417  if (sumQ >= _lowHBHE) {
418  //double aveTS = hcaldqm::utilities::aveTS_v10<QIE11DataFrame>(digi, 2.5, 0,digi.samples()-1);
419  double aveTS = hcaldqm::utilities::aveTSDB<QIE11DataFrame>(_dbService, digi_fC, did, digi, 0, digi.size() - 1);
420 
421  _xSignalSum.get(did) += sumQ;
422  _xSignalSum2.get(did) += sumQ * sumQ;
423  _xTimingSum.get(did) += aveTS;
424  _xTimingSum2.get(did) += aveTS * aveTS;
425  _xEntries.get(did)++;
426 
427  if (_ptype == fLocal) { // hidefed2crate
428  for (int i = 0; i < digi.samples(); i++) {
429  //_cShapeCut_FEDSlot.fill(eid, i, digi.sample(i).nominal_fC()-2.5);
431  eid, i, hcaldqm::utilities::adc2fCDBMinusPedestal<QIE11DataFrame>(_dbService, digi_fC, did, digi, i));
432  }
433  }
434  if (_ptype == fOnline || _ptype == fLocal) {
435  for (int iTS = 0; iTS < digi.samples(); ++iTS) {
436  _cADCvsTS_SubdetPM.fill(did, iTS, digi[iTS].adc());
437  }
438  }
439  if (_ptype == fOnline) {
440  for (int iTS = 0; iTS < digi.samples(); ++iTS) {
441  if (digi[iTS].tdc() < 50) {
442  double time = iTS * 25. + (digi[iTS].tdc() / 2.);
444  _cTDCTime_depth.fill(did, time);
445  }
446  }
447  _cSumQ_SubdetPM.fill(did, sumQ);
448 
449  // Low signal in SOI
450  short soi = -1;
451  for (int i = 0; i < digi.samples(); i++) {
452  if (digi[i].soi()) {
453  soi = i;
454  break;
455  }
456  }
457  if (digi[soi].adc() < 30) {
459  }
460  }
461  }
462  }
463  for (HODigiCollection::const_iterator it = c_ho->begin(); it != c_ho->end(); ++it) {
464  const HODataFrame digi = (const HODataFrame)(*it);
465  HcalDetId did = digi.id();
466  if (did.subdet() != HcalOuter) {
467  // LED monitoring from calibration channels
468  if (did.subdet() == HcalOther) {
469  HcalOtherDetId hodid(did);
470  if (hodid.subdet() == HcalCalibration) {
473  for (int i = 0; i < digi.size(); i++) {
474  if (_ptype == fOnline) {
475  _LED_ADCvsBX_Subdet.fill(HcalDetId(HcalOuter, 1, 1, 4), e.bunchCrossing(), digi[i].adc());
476  } else if (_ptype == fLocal) {
478  HcalDetId(HcalOuter, 1, 1, 4), e.eventAuxiliary().id().event(), digi[i].adc());
479  }
480  }
481  }
482  }
483  }
484  continue;
485  }
486  HcalElectronicsId eid = digi.elecId();
487  //double sumQ = hcaldqm::utilities::sumQ<HODataFrame>(digi, 8.5, 0, digi.size()-1);
488  CaloSamples digi_fC = hcaldqm::utilities::loadADC2fCDB<HODataFrame>(_dbService, did, digi);
489  double sumQ = hcaldqm::utilities::sumQDB<HODataFrame>(_dbService, digi_fC, did, digi, 0, digi.size() - 1);
490  if (sumQ >= _lowHO) {
491  //double aveTS = hcaldqm::utilities::aveTS<HODataFrame>(digi, 8.5, 0, digi.size()-1);
492  double aveTS = hcaldqm::utilities::aveTSDB<HODataFrame>(_dbService, digi_fC, did, digi, 0, digi.size() - 1);
493 
494  _xSignalSum.get(did) += sumQ;
495  _xSignalSum2.get(did) += sumQ * sumQ;
496  _xTimingSum.get(did) += aveTS;
497  _xTimingSum2.get(did) += aveTS * aveTS;
498  _xEntries.get(did)++;
499 
500  if (_ptype == fLocal) { // hidefed2crate
501  for (int i = 0; i < digi.size(); i++) {
502  //_cShapeCut_FEDSlot.fill(eid, i, digi.sample(i).nominal_fC()-8.5);
504  eid, i, hcaldqm::utilities::adc2fCDBMinusPedestal<HODataFrame>(_dbService, digi_fC, did, digi, i));
505  }
506  }
507  if (_ptype == fOnline || _ptype == fLocal) {
508  for (int iTS = 0; iTS < digi.size(); ++iTS) {
509  _cADCvsTS_SubdetPM.fill(did, iTS, digi.sample(iTS).adc());
510  }
511  }
512  if (_ptype == fOnline) {
513  _cSumQ_SubdetPM.fill(did, sumQ);
514  }
515  }
516  }
517 
518  for (QIE10DigiCollection::const_iterator it = c_QIE10->begin(); it != c_QIE10->end(); ++it) {
519  const QIE10DataFrame digi = static_cast<const QIE10DataFrame>(*it);
520  HcalDetId did = digi.detid();
521  if (did.subdet() != HcalForward) {
522  // LED monitoring from calibration channels
523  if (did.subdet() == HcalOther) {
524  HcalOtherDetId hodid(digi.detid());
525  if (hodid.subdet() == HcalCalibration) {
528  did) != _ledCalibrationChannels[HcalForward].end()) {
529  for (int i = 0; i < digi.samples(); i++) {
530  if (_ptype == fOnline) {
531  _LED_ADCvsBX_Subdet.fill(HcalDetId(HcalForward, 29, 1, 1), e.bunchCrossing(), digi[i].adc());
532  } else if (_ptype == fLocal) {
534  HcalDetId(HcalForward, 29, 1, 1), e.eventAuxiliary().id().event(), digi[i].adc());
535  }
536  }
537  }
538  }
539  }
540  continue;
541  }
543  //double sumQ = hcaldqm::utilities::sumQ_v10<QIE10DataFrame>(digi, 2.5, 0, digi.samples()-1);
544  CaloSamples digi_fC = hcaldqm::utilities::loadADC2fCDB<QIE10DataFrame>(_dbService, did, digi);
545  double sumQ = hcaldqm::utilities::sumQDB<QIE10DataFrame>(_dbService, digi_fC, did, digi, 0, digi.samples() - 1);
546  if (sumQ >= _lowHF) {
547  //double aveTS = hcaldqm::utilities::aveTS_v10<QIE10DataFrame>(digi, 2.5, 0, digi.samples()-1);
548  double aveTS = hcaldqm::utilities::aveTSDB<QIE10DataFrame>(_dbService, digi_fC, did, digi, 0, digi.size() - 1);
549 
550  _xSignalSum.get(did) += sumQ;
551  _xSignalSum2.get(did) += sumQ * sumQ;
552  _xTimingSum.get(did) += aveTS;
553  _xTimingSum2.get(did) += aveTS * aveTS;
554  _xEntries.get(did)++;
555 
556  if (_ptype == fLocal) { // hidefed2crate
557  for (int i = 0; i < digi.samples(); ++i) {
558  // Note: this used to be digi.sample(i).nominal_fC() - 2.5, but this branch doesn't exist in QIE10DataFrame.
559  // Instead, use lookup table.
560  //_cShapeCut_FEDSlot.fill(eid, i, constants::adc2fC[digi[i].adc()]);
562  eid, i, hcaldqm::utilities::adc2fCDBMinusPedestal<QIE10DataFrame>(_dbService, digi_fC, did, digi, i));
563  }
564  }
565  if (_ptype == fOnline || _ptype == fLocal) {
566  for (int iTS = 0; iTS < digi.samples(); ++iTS) {
567  _cADCvsTS_SubdetPM.fill(did, iTS, digi[iTS].adc());
568  }
569  }
570  if (_ptype == fOnline) {
571  for (int iTS = 0; iTS < digi.samples(); ++iTS) {
572  if (digi[iTS].le_tdc() < 50) {
573  double time = iTS * 25. + (digi[iTS].le_tdc() / 2.);
575  _cTDCTime_depth.fill(did, time);
576  }
577  }
578  _cSumQ_SubdetPM.fill(did, sumQ);
579  }
580  }
581  }
582 
584  this->_dump();
585 }
constexpr DetId detid() const
Get the detector id.
double aveTS(DIGI const &digi, double ped=0, int i=0, int j=3)
Definition: Utilities.h:115
double _lowHBHE
Definition: LEDTask.h:62
void fill(HcalDetId const &) override
std::string const & instance() const
Definition: InputTag.h:37
double _lowHF
Definition: LEDTask.h:64
void dqmthrow(std::string const &msg) const
Definition: Logger.h:12
std::vector< T >::const_iterator const_iterator
std::string to_string(const V &value)
Definition: OMSAccess.h:77
edm::InputTag _tagHO
Definition: LEDTask.h:44
std::string const & label() const
Definition: InputTag.h:36
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::InputTag _tagQIE11
Definition: LEDTask.h:43
edm::EDGetTokenT< QIE11DigiCollection > _tokQIE11
Definition: LEDTask.h:48
hcaldqm::ContainerXXX< int > _xEntries
Definition: LEDTask.h:69
constexpr DetId detid() const
Get the detector id.
edm::EDGetTokenT< QIE10DigiCollection > _tokQIE10
Definition: LEDTask.h:50
hcaldqm::ContainerXXX< double > _xTimingSum
Definition: LEDTask.h:70
hcaldqm::ContainerProf2D _cTDCTime_depth
Definition: LEDTask.h:101
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
ProcessingType _ptype
Definition: DQModule.h:44
virtual void fill(uint32_t)
Definition: Container1D.cc:73
double _lowHO
Definition: LEDTask.h:63
constexpr HcalElectronicsId const & elecId() const
Definition: HODataFrame.h:24
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
void warn(std::string const &msg) const
Definition: Logger.h:13
hcaldqm::ContainerSingle2D _cLowSignal_CrateSlot
Definition: LEDTask.h:102
Logger _logger
Definition: DQModule.h:55
const_iterator begin() const
hcaldqm::Container2D _LED_ADCvsEvn_Subdet
Definition: LEDTask.h:107
const_iterator end() const
const_iterator end() const
int const CALIBEVENTS_MIN
Definition: Constants.h:246
hcaldqm::ContainerXXX< double > _xTimingSum2
Definition: LEDTask.h:71
constexpr int samples() const
total number of samples in the digi
hcaldqm::Container1D _cTDCTime_SubdetPM
Definition: LEDTask.h:100
edm::EDGetTokenT< HODigiCollection > _tokHO
Definition: LEDTask.h:49
hcaldqm::ContainerXXX< double > _xSignalSum
Definition: LEDTask.h:67
const_iterator begin() const
The iterator returned can not safely be used across threads.
std::map< HcalSubdetector, std::vector< HcalDetId > > _ledCalibrationChannels
Definition: LEDTask.h:105
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
constexpr int size() const
total number of samples in the digi
Definition: HODataFrame.h:27
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:197
edm::ESHandle< HcalDbService > _dbService
Definition: DQTask.h:80
void fill(HcalDetId const &) override
Definition: Container2D.cc:52
virtual void _dump()
Definition: LEDTask.cc:297
hcaldqm::ContainerXXX< double > _xSignalSum2
Definition: LEDTask.h:68
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
Definition: LEDTask.h:56
hcaldqm::Container2D _LED_ADCvsBX_Subdet
Definition: LEDTask.h:106
hcaldqm::Container1D _cSumQ_SubdetPM
Definition: LEDTask.h:99
hcaldqm::ContainerProf1D _cShapeCut_FEDSlot
Definition: LEDTask.h:80
edm::InputTag _tagQIE10
Definition: LEDTask.h:45
virtual void fill(int, int)
hcaldqm::Container2D _cADCvsTS_SubdetPM
Definition: LEDTask.h:98
Readout chain identification for Hcal.
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
constexpr int samples() const
total number of samples in the digi
constexpr HcalDetId const & id() const
Definition: HODataFrame.h:23
uint16_t *__restrict__ uint16_t const *__restrict__ adc
double sumQ(DIGI const &digi, double ped, int i=0, int j=3)
Definition: Utilities.h:127
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164

◆ _resetMonitors()

void LEDTask::_resetMonitors ( hcaldqm::UpdateFreq  uf)
overrideprotectedvirtual

Reimplemented from hcaldqm::DQTask.

Definition at line 295 of file LEDTask.cc.

295 { DQTask::_resetMonitors(uf); }

◆ bookHistograms()

void LEDTask::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  r,
edm::EventSetup const &  es 
)
overridevirtual

Reimplemented from hcaldqm::DQTask.

Definition at line 29 of file LEDTask.cc.

References _cADCvsTS_SubdetPM, _cLowSignal_CrateSlot, _cMissing_depth, _cMissing_FEDuTCA, _cShapeCut_FEDSlot, _cSignalMean_depth, _cSignalMean_FEDuTCA, _cSignalMean_Subdet, _cSignalRMS_depth, _cSignalRMS_FEDuTCA, _cSignalRMS_Subdet, _cSumQ_SubdetPM, _cTDCTime_depth, _cTDCTime_SubdetPM, _cTimingMean_depth, _cTimingMean_FEDuTCA, _cTimingMean_Subdet, _cTimingRMS_depth, _cTimingRMS_FEDuTCA, _cTimingRMS_Subdet, _ehashmap, hcaldqm::DQTask::_emap, _filter_uTCA, _filter_VME, _LED_ADCvsBX_Subdet, _LED_ADCvsEvn_Subdet, _ledCalibrationChannels, hcaldqm::DQModule::_name, _nevents, hcaldqm::DQModule::_ptype, hcaldqm::DQModule::_subsystem, _xEntries, _xSignalSum, _xSignalSum2, _xTimingSum, _xTimingSum2, HcalElectronicsMap::allElectronicsId(), hcaldqm::ContainerXXX< STDTYPE >::book(), hcaldqm::ContainerProf1D::book(), hcaldqm::ContainerProf2D::book(), hcaldqm::ContainerSingle2D::book(), hcaldqm::Container2D::book(), hcaldqm::Container1D::book(), bookHistograms(), HcalCalibDetId::calibFlavor(), HcalCalibDetId::CalibrationBox, HcalCalibDetId::cboxChannel(), hcaldqm::constants::CRATE_uTCA_MIN, hcaldqm::constants::CRATE_VME_MIN, runTauDisplay::eid, hcaldqm::quantity::fADC_256_4, hcaldqm::quantity::fBX_36, hcaldqm::quantity::fCrateuTCA, hcaldqm::electronicsmap::fD2EHashMap, hcaldqm::hashfunctions::fDChannel, hcaldqm::hashfunctions::fdepth, hcaldqm::hashfunctions::fElectronics, hcaldqm::quantity::ffC_3000, hcaldqm::quantity::ffC_generic_10000, hcaldqm::quantity::ffC_generic_400000, hcaldqm::hashfunctions::fFED, hcaldqm::hashfunctions::fFEDSlot, hcaldqm::quantity::fFiberuTCAFiberCh, 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::fOffline, hcaldqm::fOnline, hcaldqm::quantity::fQIE10ADC_256, hcaldqm::quantity::fQIE10fC_400000, hcaldqm::quantity::fSlotuTCA, hcaldqm::hashfunctions::fSubdet, hcaldqm::hashfunctions::fSubdetPM, hcaldqm::quantity::fTime_ns_250, hcaldqm::quantity::fTiming_TS, hcaldqm::quantity::fTiming_TS200, edm::EventSetup::getHandle(), HcalDbService::getHcalMapping(), HcalBarrel, hcalDbServiceToken_, HcalEmpty, HcalEndcap, HcalForward, HcalOther, HcalOuter, HcalCalibDetId::hcalSubdet(), mps_fire::i, cuy::ib, HcalCalibDetId::ieta(), hcaldqm::ContainerProf1D::initialize(), hcaldqm::ContainerXXX< STDTYPE >::initialize(), hcaldqm::ContainerProf2D::initialize(), hcaldqm::filter::HashFilter::initialize(), hcaldqm::Container2D::initialize(), hcaldqm::ContainerSingle2D::initialize(), hcaldqm::electronicsmap::ElectronicsMap::initialize(), hcaldqm::Container1D::initialize(), HcalCalibDetId::iphi(), HcalElectronicsMap::lookup(), hcaldqm::constants::SLOT_uTCA_MIN, and hcaldqm::constants::SPIGOT_MIN.

29  {
30  if (_ptype == fLocal)
31  if (r.runAuxiliary().run() == 1)
32  return;
33 
35 
36  edm::ESHandle<HcalDbService> dbService = es.getHandle(hcalDbServiceToken_);
37  _emap = dbService->getHcalMapping();
38 
39  // Book LED calibration channels from emap
40  std::vector<HcalElectronicsId> eids = _emap->allElectronicsId();
41  for (unsigned i = 0; i < eids.size(); i++) {
42  HcalElectronicsId eid = eids[i];
43  DetId id = _emap->lookup(eid);
44  if (HcalGenericDetId(id.rawId()).isHcalCalibDetId()) {
45  HcalCalibDetId calibId(id);
46  if (calibId.calibFlavor() == HcalCalibDetId::CalibrationBox) {
47  HcalSubdetector this_subdet = HcalEmpty;
48  switch (calibId.hcalSubdet()) {
49  case HcalBarrel:
50  this_subdet = HcalBarrel;
51  break;
52  case HcalEndcap:
53  this_subdet = HcalEndcap;
54  break;
55  case HcalOuter:
56  this_subdet = HcalOuter;
57  break;
58  case HcalForward:
59  this_subdet = HcalForward;
60  break;
61  default:
62  this_subdet = HcalEmpty;
63  break;
64  }
65  _ledCalibrationChannels[this_subdet].push_back(
66  HcalDetId(HcalOther, calibId.ieta(), calibId.iphi(), calibId.cboxChannel()));
67  }
68  }
69  }
70 
71  std::vector<uint32_t> vhashVME;
72  std::vector<uint32_t> vhashuTCA;
73  std::vector<uint32_t> vhashC36;
74  vhashVME.push_back(
76  vhashuTCA.push_back(HcalElectronicsId(CRATE_uTCA_MIN, SLOT_uTCA_MIN, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
79 
80  // INITIALIZE
82  "SignalMean",
86  0);
88  "SignalRMS",
92  0);
94  "TimingMean",
98  0);
100  "TimingRMS",
104  0);
105 
106  if (_ptype == fLocal) { // hidefed2crate
108  "SignalMean",
113  0);
115  "SignalRMS",
120  0);
122  "TimingMean",
127  0);
129  "TimingRMS",
134  0);
135 
137  "Shape",
141  0);
142  }
143 
145  "SignalMean",
150  0);
152  "SignalRMS",
157  0);
159  "TimingMean",
164  0);
166  "TimingRMS",
171  0);
172 
174  "Missing",
179  0);
180  if (_ptype != fOffline) { // hidefed2crate
182  "Missing",
187  0);
188  }
189 
190  // Plots for LED in global
191  if (_ptype == fOnline || _ptype == fLocal) {
193  "ADCvsTS",
198  0);
199  }
200  if (_ptype == fOnline) {
202  "LowSignal",
206  0);
208  "SumQ",
212  0);
214  "TDCTime",
218  0);
220  "TDCTime",
225  0);
227  "LED_ADCvsBX",
232  0);
233  } else if (_ptype == fLocal) {
235  "LED_ADCvsEvn",
240  0);
241  }
242 
243  // initialize compact containers
249 
250  // BOOK
255 
260 
262  if (_ptype == fLocal) { // hidefed2crate
269  }
270  if (_ptype == fOnline || _ptype == fLocal) {
272  }
273  if (_ptype == fOnline) {
278  }
279 
280  if (_ptype == fOnline) {
282  } else if (_ptype == fLocal) {
284  }
285 
291 
293 }
void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, int debug=0) override
hcaldqm::Container2D _cMissing_FEDuTCA
Definition: LEDTask.h:95
hcaldqm::ContainerProf2D _cSignalMean_depth
Definition: LEDTask.h:83
hcaldqm::ContainerProf2D _cTimingMean_FEDuTCA
Definition: LEDTask.h:89
virtual void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN), int debug=0)
Definition: Container1D.cc:33
int const CRATE_VME_MIN
Definition: Constants.h:95
hcaldqm::ContainerProf2D _cTimingMean_depth
Definition: LEDTask.h:85
hcaldqm::Container2D _cMissing_depth
Definition: LEDTask.h:94
void initialize(HcalElectronicsMap const *, ElectronicsMapType etype=fHcalElectronicsMap)
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
virtual void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
int const SPIGOT_MIN
Definition: Constants.h:120
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
const HcalElectronicsMap * getHcalMapping() const
int const FIBER_VME_MIN
Definition: Constants.h:125
hcaldqm::filter::HashFilter _filter_uTCA
Definition: LEDTask.h:57
edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbServiceToken_
Definition: LEDTask.h:53
hcaldqm::ContainerXXX< int > _xEntries
Definition: LEDTask.h:69
int _nevents
Definition: LEDTask.h:61
int const FIBERCH_MIN
Definition: Constants.h:134
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
example_stream void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
hcaldqm::ContainerXXX< double > _xTimingSum
Definition: LEDTask.h:70
hcaldqm::ContainerProf2D _cTDCTime_depth
Definition: LEDTask.h:101
hcaldqm::ContainerProf2D _cSignalRMS_FEDuTCA
Definition: LEDTask.h:90
ProcessingType _ptype
Definition: DQModule.h:44
HcalSubdetector
Definition: HcalAssistant.h:31
int const FIBER_uTCA_MIN1
Definition: Constants.h:128
hcaldqm::ContainerSingle2D _cLowSignal_CrateSlot
Definition: LEDTask.h:102
std::string _name
Definition: DQModule.h:42
HcalElectronicsMap const * _emap
Definition: DQTask.h:81
std::vector< HcalElectronicsId > allElectronicsId() const
hcaldqm::ContainerProf2D _cSignalMean_FEDuTCA
Definition: LEDTask.h:88
hcaldqm::ContainerProf2D _cTimingRMS_depth
Definition: LEDTask.h:86
hcaldqm::Container1D _cSignalRMS_Subdet
Definition: LEDTask.h:75
hcaldqm::filter::HashFilter _filter_VME
Definition: LEDTask.h:58
int const CRATE_uTCA_MIN
Definition: Constants.h:100
hcaldqm::Container2D _LED_ADCvsEvn_Subdet
Definition: LEDTask.h:107
Definition: DetId.h:17
hcaldqm::ContainerXXX< double > _xTimingSum2
Definition: LEDTask.h:71
hcaldqm::Container1D _cTDCTime_SubdetPM
Definition: LEDTask.h:100
hcaldqm::ContainerProf2D _cTimingRMS_FEDuTCA
Definition: LEDTask.h:91
virtual void book(HcalElectronicsMap const *)
Definition: ContainerXXX.h:87
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:592
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
hcaldqm::Container1D _cTimingMean_Subdet
Definition: LEDTask.h:76
std::map< HcalSubdetector, std::vector< HcalDetId > > _ledCalibrationChannels
Definition: LEDTask.h:105
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::ContainerProf2D _cSignalRMS_depth
Definition: LEDTask.h:84
hcaldqm::Container1D _cTimingRMS_Subdet
Definition: LEDTask.h:77
virtual void initialize(FilterType ftype, hashfunctions::HashType htype, std::vector< uint32_t > const &)
Definition: HashFilter.cc:17
std::string _subsystem
Definition: DQModule.h:49
hcaldqm::ContainerXXX< double > _xSignalSum2
Definition: LEDTask.h:68
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
Definition: LEDTask.h:56
hcaldqm::Container2D _LED_ADCvsBX_Subdet
Definition: LEDTask.h:106
hcaldqm::Container1D _cSumQ_SubdetPM
Definition: LEDTask.h:99
hcaldqm::ContainerProf1D _cShapeCut_FEDSlot
Definition: LEDTask.h:80
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:81
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
Definition: Container2D.cc:567
hcaldqm::Container2D _cADCvsTS_SubdetPM
Definition: LEDTask.h:98
Readout chain identification for Hcal.
int const SLOT_uTCA_MIN
Definition: Constants.h:107
ib
Definition: cuy.py:661
hcaldqm::Container1D _cSignalMean_Subdet
Definition: LEDTask.h:74

◆ dqmEndRun()

void LEDTask::dqmEndRun ( edm::Run const &  r,
edm::EventSetup const &   
)
inlineoverridevirtual

Reimplemented from DQMOneEDAnalyzer< edm::LuminosityBlockCache< hcaldqm::Cache > >.

Definition at line 28 of file LEDTask.h.

References _dump(), hcaldqm::DQModule::_ptype, and hcaldqm::fLocal.

28  {
29  if (_ptype == hcaldqm::fLocal)
30  if (r.runAuxiliary().run() == 1)
31  return;
32  this->_dump();
33  }
ProcessingType _ptype
Definition: DQModule.h:44
virtual void _dump()
Definition: LEDTask.cc:297

Member Data Documentation

◆ _cADCvsTS_SubdetPM

hcaldqm::Container2D LEDTask::_cADCvsTS_SubdetPM
protected

Definition at line 98 of file LEDTask.h.

Referenced by _process(), and bookHistograms().

◆ _cLowSignal_CrateSlot

hcaldqm::ContainerSingle2D LEDTask::_cLowSignal_CrateSlot
protected

Definition at line 102 of file LEDTask.h.

Referenced by _process(), and bookHistograms().

◆ _cMissing_depth

hcaldqm::Container2D LEDTask::_cMissing_depth
protected

Definition at line 94 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _cMissing_FEDuTCA

hcaldqm::Container2D LEDTask::_cMissing_FEDuTCA
protected

Definition at line 95 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _cShapeCut_FEDSlot

hcaldqm::ContainerProf1D LEDTask::_cShapeCut_FEDSlot
protected

Definition at line 80 of file LEDTask.h.

Referenced by _process(), and bookHistograms().

◆ _cSignalMean_depth

hcaldqm::ContainerProf2D LEDTask::_cSignalMean_depth
protected

Definition at line 83 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _cSignalMean_FEDuTCA

hcaldqm::ContainerProf2D LEDTask::_cSignalMean_FEDuTCA
protected

Definition at line 88 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _cSignalMean_Subdet

hcaldqm::Container1D LEDTask::_cSignalMean_Subdet
protected

Definition at line 74 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _cSignalRMS_depth

hcaldqm::ContainerProf2D LEDTask::_cSignalRMS_depth
protected

Definition at line 84 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _cSignalRMS_FEDuTCA

hcaldqm::ContainerProf2D LEDTask::_cSignalRMS_FEDuTCA
protected

Definition at line 90 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _cSignalRMS_Subdet

hcaldqm::Container1D LEDTask::_cSignalRMS_Subdet
protected

Definition at line 75 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _cSumQ_SubdetPM

hcaldqm::Container1D LEDTask::_cSumQ_SubdetPM
protected

Definition at line 99 of file LEDTask.h.

Referenced by _process(), and bookHistograms().

◆ _cTDCTime_depth

hcaldqm::ContainerProf2D LEDTask::_cTDCTime_depth
protected

Definition at line 101 of file LEDTask.h.

Referenced by _process(), and bookHistograms().

◆ _cTDCTime_SubdetPM

hcaldqm::Container1D LEDTask::_cTDCTime_SubdetPM
protected

Definition at line 100 of file LEDTask.h.

Referenced by _process(), and bookHistograms().

◆ _cTimingMean_depth

hcaldqm::ContainerProf2D LEDTask::_cTimingMean_depth
protected

Definition at line 85 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _cTimingMean_FEDuTCA

hcaldqm::ContainerProf2D LEDTask::_cTimingMean_FEDuTCA
protected

Definition at line 89 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _cTimingMean_Subdet

hcaldqm::Container1D LEDTask::_cTimingMean_Subdet
protected

Definition at line 76 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _cTimingRMS_depth

hcaldqm::ContainerProf2D LEDTask::_cTimingRMS_depth
protected

Definition at line 86 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _cTimingRMS_FEDuTCA

hcaldqm::ContainerProf2D LEDTask::_cTimingRMS_FEDuTCA
protected

Definition at line 91 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _cTimingRMS_Subdet

hcaldqm::Container1D LEDTask::_cTimingRMS_Subdet
protected

Definition at line 77 of file LEDTask.h.

Referenced by _dump(), and bookHistograms().

◆ _ehashmap

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

Definition at line 56 of file LEDTask.h.

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

◆ _filter_uTCA

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

Definition at line 57 of file LEDTask.h.

Referenced by bookHistograms().

◆ _filter_VME

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

Definition at line 58 of file LEDTask.h.

Referenced by bookHistograms().

◆ _LED_ADCvsBX_Subdet

hcaldqm::Container2D LEDTask::_LED_ADCvsBX_Subdet
protected

Definition at line 106 of file LEDTask.h.

Referenced by _process(), and bookHistograms().

◆ _LED_ADCvsEvn_Subdet

hcaldqm::Container2D LEDTask::_LED_ADCvsEvn_Subdet
protected

Definition at line 107 of file LEDTask.h.

Referenced by _process(), and bookHistograms().

◆ _ledCalibrationChannels

std::map<HcalSubdetector, std::vector<HcalDetId> > LEDTask::_ledCalibrationChannels
protected

Definition at line 105 of file LEDTask.h.

Referenced by _process(), and bookHistograms().

◆ _lowHBHE

double LEDTask::_lowHBHE
protected

Definition at line 62 of file LEDTask.h.

Referenced by _process(), and LEDTask().

◆ _lowHF

double LEDTask::_lowHF
protected

Definition at line 64 of file LEDTask.h.

Referenced by _process(), and LEDTask().

◆ _lowHO

double LEDTask::_lowHO
protected

Definition at line 63 of file LEDTask.h.

Referenced by _process(), and LEDTask().

◆ _nevents

int LEDTask::_nevents
protected

Definition at line 61 of file LEDTask.h.

Referenced by bookHistograms(), and LEDTask().

◆ _tagHO

edm::InputTag LEDTask::_tagHO
protected

Definition at line 44 of file LEDTask.h.

Referenced by _process(), and LEDTask().

◆ _tagQIE10

edm::InputTag LEDTask::_tagQIE10
protected

Definition at line 45 of file LEDTask.h.

Referenced by _process(), and LEDTask().

◆ _tagQIE11

edm::InputTag LEDTask::_tagQIE11
protected

Definition at line 43 of file LEDTask.h.

Referenced by _process(), and LEDTask().

◆ _tagTrigger

edm::InputTag LEDTask::_tagTrigger
protected

Definition at line 46 of file LEDTask.h.

Referenced by _isApplicable(), and LEDTask().

◆ _taguMN

edm::InputTag LEDTask::_taguMN
protected

Definition at line 47 of file LEDTask.h.

Referenced by LEDTask().

◆ _tokHO

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

Definition at line 49 of file LEDTask.h.

Referenced by _process(), and LEDTask().

◆ _tokQIE10

edm::EDGetTokenT<QIE10DigiCollection> LEDTask::_tokQIE10
protected

Definition at line 50 of file LEDTask.h.

Referenced by _process(), and LEDTask().

◆ _tokQIE11

edm::EDGetTokenT<QIE11DigiCollection> LEDTask::_tokQIE11
protected

Definition at line 48 of file LEDTask.h.

Referenced by _process(), and LEDTask().

◆ _tokTrigger

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

Definition at line 51 of file LEDTask.h.

Referenced by _isApplicable(), and LEDTask().

◆ _tokuMN

edm::EDGetTokenT<HcalUMNioDigi> LEDTask::_tokuMN
protected

Definition at line 52 of file LEDTask.h.

Referenced by _isApplicable(), and LEDTask().

◆ _xEntries

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

Definition at line 69 of file LEDTask.h.

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

◆ _xSignalSum

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

Definition at line 67 of file LEDTask.h.

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

◆ _xSignalSum2

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

Definition at line 68 of file LEDTask.h.

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

◆ _xTimingSum

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

Definition at line 70 of file LEDTask.h.

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

◆ _xTimingSum2

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

Definition at line 71 of file LEDTask.h.

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

◆ debug

LEDTask.debug

◆ hcalDbServiceToken_

edm::ESGetToken<HcalDbService, HcalDbRecord> LEDTask::hcalDbServiceToken_
protected

Definition at line 53 of file LEDTask.h.

Referenced by bookHistograms().

◆ ledCalibrationChannels

LEDTask.ledCalibrationChannels

Definition at line 9 of file LEDTask.py.

◆ ledTask

LEDTask.ledTask

Definition at line 5 of file LEDTask.py.

◆ mtype

LEDTask.mtype

Definition at line 17 of file LEDTask.py.

◆ name

LEDTask.name

Definition at line 12 of file LEDTask.py.

Referenced by ElectronMVAID.ElectronMVAID.__call__(), FWLite.ElectronMVAID.__call__(), dirstructure.Directory.__create_pie_image(), DisplayManager.DisplayManager.__del__(), dqm_interfaces.DirID.__eq__(), dirstructure.Directory.__get_full_path(), dirstructure.Comparison.__get_img_name(), dataset.Dataset.__getDataType(), dataset.Dataset.__getFileInfoList(), dirstructure.Comparison.__make_image(), core.autovars.NTupleVariable.__repr__(), core.autovars.NTupleObjectType.__repr__(), core.autovars.NTupleObject.__repr__(), core.autovars.NTupleCollection.__repr__(), dirstructure.Directory.__repr__(), dqm_interfaces.DirID.__repr__(), dirstructure.Comparison.__repr__(), config.Service.__setattr__(), config.CFG.__str__(), counter.Counter.__str__(), average.Average.__str__(), FWLite.WorkingPoints._reformat_cut_definitions(), core.autovars.NTupleObjectType.addSubObjects(), core.autovars.NTupleObjectType.addVariables(), core.autovars.NTupleObjectType.allVars(), dataset.CMSDataset.buildListOfFiles(), dataset.LocalDataset.buildListOfFiles(), dataset.CMSDataset.buildListOfFilesDBS(), dirstructure.Directory.calcStats(), validation.Sample.digest(), python.rootplot.utilities.Hist.divide(), python.rootplot.utilities.Hist.divide_wilson(), DisplayManager.DisplayManager.Draw(), TreeCrawler.Package.dump(), core.autovars.NTupleVariable.fillBranch(), core.autovars.NTupleObject.fillBranches(), core.autovars.NTupleCollection.fillBranchesScalar(), core.autovars.NTupleCollection.fillBranchesVector(), core.autovars.NTupleCollection.get_cpp_declaration(), core.autovars.NTupleCollection.get_cpp_wrapper_class(), core.autovars.NTupleCollection.get_py_wrapper_class(), utils.StatisticalTest.get_status(), production_tasks.Task.getname(), dataset.CMSDataset.getPrimaryDatasetEntries(), dataset.PrivateDataset.getPrimaryDatasetEntries(), VIDSelectorBase.VIDSelectorBase.initialize(), personalPlayback.Applet.log(), core.autovars.NTupleVariable.makeBranch(), core.autovars.NTupleObject.makeBranches(), core.autovars.NTupleCollection.makeBranchesScalar(), core.autovars.NTupleCollection.makeBranchesVector(), dirstructure.Directory.print_report(), dataset.BaseDataset.printInfo(), dataset.Dataset.printInfo(), production_tasks.MonitorJobs.run(), python.rootplot.utilities.Hist.TGraph(), python.rootplot.utilities.Hist.TH1F(), counter.Counter.write(), and average.Average.write().

◆ ptype

LEDTask.ptype

Definition at line 16 of file LEDTask.py.

◆ runkeyName

LEDTask.runkeyName

Definition at line 15 of file LEDTask.py.

◆ runkeyVal

LEDTask.runkeyVal

Definition at line 14 of file LEDTask.py.

◆ subsystem

LEDTask.subsystem

Definition at line 18 of file LEDTask.py.

◆ tagHBHE

LEDTask.tagHBHE

Definition at line 21 of file LEDTask.py.

◆ tagHF

LEDTask.tagHF

Definition at line 23 of file LEDTask.py.

◆ tagHO

LEDTask.tagHO

Definition at line 22 of file LEDTask.py.

◆ tagRaw

LEDTask.tagRaw

Definition at line 24 of file LEDTask.py.