CMS 3D CMS Logo

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

#include <ZDCQIE10Task.h>

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

Public Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 ZDCQIE10Task (edm::ParameterSet const &)
 
 ~ZDCQIE10Task () 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
 
 EDProducer (const EDProducer &)=delete
 
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
 

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< uint32_t,
MonitorElement * > 
_cADC_EChannel
 
std::map< uint32_t,
MonitorElement * > 
_cADC_vs_TS_EChannel
 
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 >
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::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
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (edm::ParameterSet const &)
 

Detailed Description

Definition at line 13 of file ZDCQIE10Task.h.

Constructor & Destructor Documentation

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

Definition at line 4 of file ZDCQIE10Task.cc.

References _tagQIE10, _tokQIE10, edm::ParameterSet::getUntrackedParameter(), and HLT_FULL_cff::InputTag.

4  {
5  // tags
6  _tagQIE10 = ps.getUntrackedParameter<edm::InputTag>("tagQIE10", edm::InputTag("hcalDigis", "ZDC"));
7  _tokQIE10 = consumes<QIE10DigiCollection>(_tagQIE10);
8 }
edm::InputTag _tagQIE10
Definition: ZDCQIE10Task.h:24
edm::EDGetTokenT< QIE10DigiCollection > _tokQIE10
Definition: ZDCQIE10Task.h:25
ZDCQIE10Task::~ZDCQIE10Task ( )
inlineoverride

Definition at line 16 of file ZDCQIE10Task.h.

16 {}

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 94 of file ZDCQIE10Task.cc.

References _cADC_EChannel, _cADC_vs_TS_EChannel, _tagQIE10, _tokQIE10, gpuClustering::adc, QIE10DataFrame::detid(), edm::Event::getByToken(), mps_fire::i, edm::InputTag::instance(), edm::InputTag::label(), and QIE10DataFrame::samples().

94  {
96  if (!e.getByToken(_tokQIE10, digis))
97  edm::LogError("Collection QIE10DigiCollection for ZDC isn't available" + _tagQIE10.label() + " " +
99 
100  for (auto it = digis->begin(); it != digis->end(); it++) {
101  const QIE10DataFrame digi = static_cast<const QIE10DataFrame>(*it);
102  HcalZDCDetId const& did = digi.detid();
103 
104  for (int i = 0; i < digi.samples(); i++) {
105  // iter over all samples
106  if (_cADC_EChannel.find(did()) != _cADC_EChannel.end()) {
107  _cADC_EChannel[did()]->Fill(digi[i].adc());
108  }
109  if (_cADC_vs_TS_EChannel.find(did()) != _cADC_vs_TS_EChannel.end()) {
110  _cADC_vs_TS_EChannel[did()]->Fill(i, digi[i].adc());
111  }
112  }
113  }
114 }
edm::InputTag _tagQIE10
Definition: ZDCQIE10Task.h:24
edm::EDGetTokenT< QIE10DigiCollection > _tokQIE10
Definition: ZDCQIE10Task.h:25
constexpr DetId detid() const
Get the detector id.
std::map< uint32_t, MonitorElement * > _cADC_vs_TS_EChannel
Definition: ZDCQIE10Task.h:29
constexpr int samples() const
total number of samples in the digi
std::string const & label() const
Definition: InputTag.h:36
std::map< uint32_t, MonitorElement * > _cADC_EChannel
Definition: ZDCQIE10Task.h:28
std::string const & instance() const
Definition: InputTag.h:37
uint16_t *__restrict__ uint16_t const *__restrict__ adc
void ZDCQIE10Task::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  r,
edm::EventSetup const &  es 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 10 of file ZDCQIE10Task.cc.

References _cADC_EChannel, _cADC_vs_TS_EChannel, dqm::implementation::IBooker::book1DD(), dqm::implementation::NavigatorBase::cd(), HcalZDCDetId::EM, HcalZDCDetId::HAD, HcalZDCDetId::RPD, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and cond::impl::to_string().

10  {
11  ib.cd();
12 
13  //book histos per channel
14  std::string histoname;
15  for (int channel = 1; channel < 6; channel++) {
16  // EM Pos
17  HcalZDCDetId didp(HcalZDCDetId::EM, true, channel);
18  histoname = "EM_P_" + std::to_string(channel) + "_1";
19  ib.setCurrentFolder("Hcal/ZDCQIE10Task/ADC_perChannel");
20  _cADC_EChannel[didp()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
21  _cADC_EChannel[didp()]->setAxisTitle("ADC", 1);
22  _cADC_EChannel[didp()]->setAxisTitle("N", 2);
23  ib.setCurrentFolder("Hcal/ZDCQIE10Task/ADC_vs_TS_perChannel");
24  _cADC_vs_TS_EChannel[didp()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 10, 0, 10);
25  _cADC_vs_TS_EChannel[didp()]->setAxisTitle("TS", 1);
26  _cADC_vs_TS_EChannel[didp()]->setAxisTitle("sum ADC", 2);
27 
28  // EM Minus
29  HcalZDCDetId didm(HcalZDCDetId::EM, false, channel);
30  histoname = "EM_M_" + std::to_string(channel) + "_1";
31  ib.setCurrentFolder("Hcal/ZDCQIE10Task/ADC_perChannel");
32  _cADC_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
33  _cADC_EChannel[didm()]->setAxisTitle("ADC", 1);
34  _cADC_EChannel[didm()]->setAxisTitle("N", 2);
35  ib.setCurrentFolder("Hcal/ZDCQIE10Task/ADC_vs_TS_perChannel");
36  _cADC_vs_TS_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 10, 0, 10);
37  _cADC_vs_TS_EChannel[didm()]->setAxisTitle("TS", 1);
38  _cADC_vs_TS_EChannel[didm()]->setAxisTitle("sum ADC", 2);
39  }
40 
41  for (int channel = 1; channel < 5; channel++) {
42  // HAD Pos
43  HcalZDCDetId didp(HcalZDCDetId::HAD, true, channel);
44  histoname = "HAD_P_" + std::to_string(channel) + "_" + std::to_string(channel + 2);
45  ib.setCurrentFolder("Hcal/ZDCQIE10Task/ADC_perChannel");
46  _cADC_EChannel[didp()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
47  _cADC_EChannel[didp()]->setAxisTitle("ADC", 1);
48  _cADC_EChannel[didp()]->setAxisTitle("N", 2);
49  ib.setCurrentFolder("Hcal/ZDCQIE10Task/ADC_vs_TS_perChannel");
50  _cADC_vs_TS_EChannel[didp()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 10, 0, 10);
51  _cADC_vs_TS_EChannel[didp()]->setAxisTitle("TS", 1);
52  _cADC_vs_TS_EChannel[didp()]->setAxisTitle("sum ADC", 2);
53 
54  // HAD Minus
55  HcalZDCDetId didm(HcalZDCDetId::HAD, false, channel);
56  histoname = "HAD_M_" + std::to_string(channel) + "_" + std::to_string(channel + 2);
57  ib.setCurrentFolder("Hcal/ZDCQIE10Task/ADC_perChannel");
58  _cADC_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
59  _cADC_EChannel[didm()]->setAxisTitle("ADC", 1);
60  _cADC_EChannel[didm()]->setAxisTitle("N", 2);
61  ib.setCurrentFolder("Hcal/ZDCQIE10Task/ADC_vs_TS_perChannel");
62  _cADC_vs_TS_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 10, 0, 10);
63  _cADC_vs_TS_EChannel[didm()]->setAxisTitle("TS", 1);
64  _cADC_vs_TS_EChannel[didm()]->setAxisTitle("sum ADC", 2);
65  }
66 
67  for (int channel = 1; channel < 17; channel++) {
68  // RPD Pos
69  HcalZDCDetId didp(HcalZDCDetId::RPD, true, channel);
70  histoname = "RPD_P_" + std::to_string(channel) + "_2";
71  ib.setCurrentFolder("Hcal/ZDCQIE10Task/ADC_perChannel");
72  _cADC_EChannel[didp()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
73  _cADC_EChannel[didp()]->setAxisTitle("ADC", 1);
74  _cADC_EChannel[didp()]->setAxisTitle("N", 2);
75  ib.setCurrentFolder("Hcal/ZDCQIE10Task/ADC_vs_TS_perChannel");
76  _cADC_vs_TS_EChannel[didp()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 10, 0, 10);
77  _cADC_vs_TS_EChannel[didp()]->setAxisTitle("TS", 1);
78  _cADC_vs_TS_EChannel[didp()]->setAxisTitle("sum ADC", 2);
79 
80  // RPD Minus
81  HcalZDCDetId didm(HcalZDCDetId::RPD, false, channel);
82  histoname = "RPD_M_" + std::to_string(channel) + "_2";
83  ib.setCurrentFolder("Hcal/ZDCQIE10Task/ADC_perChannel");
84  _cADC_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 256, 0, 256);
85  _cADC_EChannel[didm()]->setAxisTitle("ADC", 1);
86  _cADC_EChannel[didm()]->setAxisTitle("N", 2);
87  ib.setCurrentFolder("Hcal/ZDCQIE10Task/ADC_vs_TS_perChannel");
88  _cADC_vs_TS_EChannel[didm()] = ib.book1DD(histoname.c_str(), histoname.c_str(), 10, 0, 10);
89  _cADC_vs_TS_EChannel[didm()]->setAxisTitle("TS", 1);
90  _cADC_vs_TS_EChannel[didm()]->setAxisTitle("sum ADC", 2);
91  }
92 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::string to_string(const V &value)
Definition: OMSAccess.h:71
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:155
std::map< uint32_t, MonitorElement * > _cADC_vs_TS_EChannel
Definition: ZDCQIE10Task.h:29
std::map< uint32_t, MonitorElement * > _cADC_EChannel
Definition: ZDCQIE10Task.h:28

Member Data Documentation

std::map<uint32_t, MonitorElement*> ZDCQIE10Task::_cADC_EChannel
protected

Definition at line 28 of file ZDCQIE10Task.h.

Referenced by analyze(), and bookHistograms().

std::map<uint32_t, MonitorElement*> ZDCQIE10Task::_cADC_vs_TS_EChannel
protected

Definition at line 29 of file ZDCQIE10Task.h.

Referenced by analyze(), and bookHistograms().

edm::InputTag ZDCQIE10Task::_tagQIE10
protected

Definition at line 24 of file ZDCQIE10Task.h.

Referenced by analyze(), and ZDCQIE10Task().

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

Definition at line 25 of file ZDCQIE10Task.h.

Referenced by analyze(), and ZDCQIE10Task().