CMS 3D CMS Logo

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

#include <FCDTask.h>

Inheritance diagram for FCDTask:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Classes

struct  FCDChannel
 

Public Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 FCDTask (edm::ParameterSet const &)
 
 ~FCDTask () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Public Attributes

 crate
 
 debug
 
 fcd_channels
 
 fcd_channels_tuple
 
 fcdChannels
 
 fcdTask
 
 fiber
 
 fiber_channel
 
 mtype
 
 name
 
 ptype
 
 runkeyName
 
 runkeyVal
 
 slot
 
 subsystem
 
 tagFCDDigis
 

Protected Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Protected Attributes

std::map< HcalElectronicsId, MonitorElement * > _cADC
 
std::map< HcalElectronicsId, MonitorElement * > _cADC_vs_TS
 
std::vector< FCDChannel_channels
 
std::map< HcalElectronicsId, MonitorElement * > _cTDC
 
std::map< HcalElectronicsId, MonitorElement * > _cTDCTime
 
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
 
HcalElectronicsMap const * _emap
 
std::vector< HcalElectronicsId_fcd_eids
 
edm::InputTag _tagQIE10
 
edm::EDGetTokenT< QIE10DigiCollection_tokQIE10
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 

Detailed Description

Definition at line 13 of file FCDTask.h.

Constructor & Destructor Documentation

◆ FCDTask()

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

Definition at line 9 of file FCDTask.cc.

9  {
10  // tags
11  _tagQIE10 = ps.getUntrackedParameter<edm::InputTag>("tagQIE10", edm::InputTag("hcalDigis", "ZDC"));
12  _tokQIE10 = consumes<QIE10DigiCollection>(_tagQIE10);
13 
14  // channels
15  edm::ParameterSet channelPSet = ps.getParameter<edm::ParameterSet>("fcdChannels");
16  std::vector<int32_t> crates = channelPSet.getUntrackedParameter<std::vector<int32_t> >("crate");
17  std::vector<int32_t> slots = channelPSet.getUntrackedParameter<std::vector<int32_t> >("slot");
18  std::vector<int32_t> fibers = channelPSet.getUntrackedParameter<std::vector<int32_t> >("fiber");
19  std::vector<int32_t> fiberChannels = channelPSet.getUntrackedParameter<std::vector<int32_t> >("fiber_channel");
20  for (unsigned int i = 0; i < crates.size(); ++i) {
21  _channels.push_back({crates[i], slots[i], fibers[i], fiberChannels[i]});
22  }
23 }

References _channels, _tagQIE10, _tokQIE10, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), mps_fire::i, and HLT_FULL_cff::InputTag.

◆ ~FCDTask()

FCDTask::~FCDTask ( )
inlineoverride

Definition at line 24 of file FCDTask.h.

24 {}

Member Function Documentation

◆ analyze()

void FCDTask::analyze ( edm::Event const &  e,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 72 of file FCDTask.cc.

72  {
74  if (!e.getByToken(_tokQIE10, digis))
75  edm::LogError("Collection QIE10DigiCollection for ZDC isn't available" + _tagQIE10.label() + " " +
77 
78  for (auto it = digis->begin(); it != digis->end(); it++) {
79  const QIE10DataFrame digi = static_cast<const QIE10DataFrame>(*it);
80  HcalGenericDetId const& gdid = digi.detid();
82  if (std::find(_fcd_eids.begin(), _fcd_eids.end(), eid) == _fcd_eids.end()) {
83  continue;
84  }
85 
86  for (int i = 0; i < digi.samples(); i++) {
87  // iter over all samples
88  _cADC[eid]->Fill(digi[i].adc());
89  _cADC_vs_TS[eid]->Fill(i, digi[i].adc());
90  _cTDC[eid]->Fill(digi[i].le_tdc());
91  if (digi[i].le_tdc() <= 50.) {
92  double tdctime = 25. * i + 0.5 * digi[i].le_tdc();
93  _cTDCTime[eid]->Fill(tdctime);
94  }
95  }
96  }
97 }

References _cADC, _cADC_vs_TS, _cTDC, _cTDCTime, _ehashmap, _fcd_eids, _tagQIE10, _tokQIE10, ecalLiteDTU::adc(), edm::DataFrameContainer::begin(), QIE10DataFrame::detid(), MillePedeFileConverter_cfg::e, runTauDisplay::eid, edm::DataFrameContainer::end(), spr::find(), mps_fire::i, edm::InputTag::instance(), edm::InputTag::label(), hcaldqm::electronicsmap::ElectronicsMap::lookup(), and QIE10DataFrame::samples().

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 25 of file FCDTask.cc.

25  {
27  es.get<HcalDbRecord>().get(dbService);
28  _emap = dbService->getHcalMapping();
30 
31  ib.cd();
32 
33  //book histos per channel
34  std::string histoname;
35  std::vector<HcalGenericDetId> gids = _emap->allPrecisionId();
36  for (auto& it_gid : gids) {
37  if (it_gid.genericSubdet() != HcalGenericDetId::HcalGenZDC) {
38  continue;
39  }
41  for (auto& it_channel : _channels) {
42  if ((eid.crateId() == it_channel.crate) && (eid.slot() == it_channel.slot) &&
43  (eid.fiberIndex() == it_channel.fiber) && (eid.fiberChanId() == it_channel.fiberChannel)) {
44  _fcd_eids.push_back(eid);
45  }
46  }
47  }
48  for (auto& it_eid : _fcd_eids) {
49  // EM Pos
50  histoname = std::to_string(it_eid.crateId()) + "-" + std::to_string(it_eid.slot()) + "-" +
51  std::to_string(it_eid.fiberIndex()) + "-" + std::to_string(it_eid.fiberChanId());
52  ib.setCurrentFolder("Hcal/FCDTask/ADC");
53  _cADC[it_eid] = ib.book1D(histoname.c_str(), histoname.c_str(), 256, 0, 256);
54  _cADC[it_eid]->setAxisTitle("ADC", 1);
55  _cADC[it_eid]->setAxisTitle("N", 2);
56 
57  ib.setCurrentFolder("Hcal/FCDTask/ADC_vs_TS"),
58  _cADC_vs_TS[it_eid] = ib.book2D(histoname.c_str(), histoname.c_str(), 10, 0, 10, 64, 0, 256);
59  _cADC_vs_TS[it_eid]->setAxisTitle("TS", 1);
60  _cADC_vs_TS[it_eid]->setAxisTitle("ADC", 2);
61 
62  ib.setCurrentFolder("Hcal/FCDTask/TDCTime");
63  _cTDCTime[it_eid] = ib.book1D(histoname.c_str(), histoname.c_str(), 500, 0., 250.);
64  _cTDCTime[it_eid]->setAxisTitle("TDC time [ns]", 1);
65 
66  ib.setCurrentFolder("Hcal/FCDTask/TDC");
67  _cTDC[it_eid] = ib.book1D(histoname.c_str(), histoname.c_str(), 64, -0.5, 63.5);
68  _cTDC[it_eid]->setAxisTitle("TDC", 1);
69  }
70 }

References _cADC, _cADC_vs_TS, _channels, _cTDC, _cTDCTime, _ehashmap, _emap, _fcd_eids, HcalElectronicsMap::allPrecisionId(), runTauDisplay::eid, hcaldqm::electronicsmap::fD2EHashMap, edm::EventSetup::get(), get, HcalDbService::getHcalMapping(), HcalGenericDetId::HcalGenZDC, cuy::ib, hcaldqm::electronicsmap::ElectronicsMap::initialize(), hcaldqm::electronicsmap::ElectronicsMap::lookup(), and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ _cADC

std::map<HcalElectronicsId, MonitorElement*> FCDTask::_cADC
protected

Definition at line 36 of file FCDTask.h.

Referenced by analyze(), and bookHistograms().

◆ _cADC_vs_TS

std::map<HcalElectronicsId, MonitorElement*> FCDTask::_cADC_vs_TS
protected

Definition at line 37 of file FCDTask.h.

Referenced by analyze(), and bookHistograms().

◆ _channels

std::vector<FCDChannel> FCDTask::_channels
protected

Definition at line 42 of file FCDTask.h.

Referenced by bookHistograms(), and FCDTask().

◆ _cTDC

std::map<HcalElectronicsId, MonitorElement*> FCDTask::_cTDC
protected

Definition at line 38 of file FCDTask.h.

Referenced by analyze(), and bookHistograms().

◆ _cTDCTime

std::map<HcalElectronicsId, MonitorElement*> FCDTask::_cTDCTime
protected

Definition at line 39 of file FCDTask.h.

Referenced by analyze(), and bookHistograms().

◆ _ehashmap

hcaldqm::electronicsmap::ElectronicsMap FCDTask::_ehashmap
protected

Definition at line 44 of file FCDTask.h.

Referenced by analyze(), and bookHistograms().

◆ _emap

HcalElectronicsMap const* FCDTask::_emap
protected

Definition at line 43 of file FCDTask.h.

Referenced by bookHistograms().

◆ _fcd_eids

std::vector<HcalElectronicsId> FCDTask::_fcd_eids
protected

Definition at line 41 of file FCDTask.h.

Referenced by analyze(), and bookHistograms().

◆ _tagQIE10

edm::InputTag FCDTask::_tagQIE10
protected

Definition at line 32 of file FCDTask.h.

Referenced by analyze(), and FCDTask().

◆ _tokQIE10

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

Definition at line 33 of file FCDTask.h.

Referenced by analyze(), and FCDTask().

◆ crate

FCDTask.crate

Definition at line 62 of file FCDTask.py.

◆ debug

FCDTask.debug

◆ fcd_channels

FCDTask.fcd_channels

Definition at line 61 of file FCDTask.py.

◆ fcd_channels_tuple

FCDTask.fcd_channels_tuple

Definition at line 6 of file FCDTask.py.

◆ fcdChannels

FCDTask.fcdChannels

Definition at line 87 of file FCDTask.py.

◆ fcdTask

FCDTask.fcdTask

Definition at line 73 of file FCDTask.py.

◆ fiber

FCDTask.fiber

Definition at line 64 of file FCDTask.py.

◆ fiber_channel

FCDTask.fiber_channel

Definition at line 65 of file FCDTask.py.

◆ mtype

FCDTask.mtype

Definition at line 81 of file FCDTask.py.

◆ name

FCDTask.name

Definition at line 76 of file FCDTask.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

FCDTask.ptype

Definition at line 80 of file FCDTask.py.

◆ runkeyName

FCDTask.runkeyName

Definition at line 79 of file FCDTask.py.

◆ runkeyVal

FCDTask.runkeyVal

Definition at line 78 of file FCDTask.py.

◆ slot

FCDTask.slot

Definition at line 63 of file FCDTask.py.

◆ subsystem

FCDTask.subsystem

Definition at line 82 of file FCDTask.py.

◆ tagFCDDigis

FCDTask.tagFCDDigis

Definition at line 85 of file FCDTask.py.

FCDTask::_cADC_vs_TS
std::map< HcalElectronicsId, MonitorElement * > _cADC_vs_TS
Definition: FCDTask.h:37
mps_fire.i
i
Definition: mps_fire.py:428
hcaldqm::electronicsmap::ElectronicsMap::lookup
uint32_t lookup(DetId const &)
Definition: ElectronicsMap.cc:122
edm::InputTag::instance
std::string const & instance() const
Definition: InputTag.h:37
HcalGenericDetId
Definition: HcalGenericDetId.h:15
QIE10DataFrame::samples
constexpr int samples() const
total number of samples in the digi
Definition: QIE10DataFrame.h:86
FCDTask::_channels
std::vector< FCDChannel > _channels
Definition: FCDTask.h:42
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
hcaldqm::electronicsmap::ElectronicsMap::initialize
void initialize(HcalElectronicsMap const *, ElectronicsMapType etype=fHcalElectronicsMap)
Definition: ElectronicsMap.cc:6
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::Handle
Definition: AssociativeIterator.h:50
FCDTask::_tagQIE10
edm::InputTag _tagQIE10
Definition: FCDTask.h:32
HcalDbService::getHcalMapping
const HcalElectronicsMap * getHcalMapping() const
Definition: HcalDbService.cc:343
ecalLiteDTU::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalLiteDTUSample.h:12
HcalElectronicsMap::allPrecisionId
std::vector< HcalGenericDetId > allPrecisionId() const
Definition: HcalElectronicsMap.cc:139
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
HcalGenericDetId::HcalGenZDC
Definition: HcalGenericDetId.h:24
QIE10DataFrame::detid
constexpr DetId detid() const
Get the detector id.
Definition: QIE10DataFrame.h:76
FCDTask::_cTDC
std::map< HcalElectronicsId, MonitorElement * > _cTDC
Definition: FCDTask.h:38
edm::ESHandle< HcalDbService >
HcalElectronicsId
Readout chain identification for Hcal.
Definition: HcalElectronicsId.h:32
FCDTask::_tokQIE10
edm::EDGetTokenT< QIE10DigiCollection > _tokQIE10
Definition: FCDTask.h:33
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FCDTask::_cADC
std::map< HcalElectronicsId, MonitorElement * > _cADC
Definition: FCDTask.h:36
edm::ParameterSet
Definition: ParameterSet.h:47
FCDTask::_emap
HcalElectronicsMap const * _emap
Definition: FCDTask.h:43
runTauDisplay.eid
eid
Definition: runTauDisplay.py:298
edm::DataFrameContainer::begin
const_iterator begin() const
The iterator returned can not safely be used across threads.
Definition: DataFrameContainer.h:149
cuy.ib
ib
Definition: cuy.py:662
get
#define get
FCDTask::_ehashmap
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
Definition: FCDTask.h:44
hcaldqm::electronicsmap::fD2EHashMap
Definition: ElectronicsMap.h:25
QIE10DataFrame
Definition: QIE10DataFrame.h:11
FCDTask::_cTDCTime
std::map< HcalElectronicsId, MonitorElement * > _cTDCTime
Definition: FCDTask.h:39
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HcalDbRecord
Definition: HcalDbRecord.h:30
edm::Log
Definition: MessageLogger.h:70
FCDTask::_fcd_eids
std::vector< HcalElectronicsId > _fcd_eids
Definition: FCDTask.h:41
edm::DataFrameContainer::end
const_iterator end() const
Definition: DataFrameContainer.h:152
edm::InputTag
Definition: InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37