CMS 3D CMS Logo

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

#include <ZDCTask.h>

Inheritance diagram for ZDCTask:
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
 
 ZDCTask (edm::ParameterSet const &)
 
 ~ZDCTask () 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
 

Public Attributes

 cut
 
 debug
 
 name
 
 ped
 
 runkeyName
 
 runkeyVal
 
 tagQIE10
 
 zdcQIE10Task
 
 zdcTask
 

Protected Member Functions

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

Protected Attributes

MonitorElement_cADC
 
std::map< std::string, MonitorElement * > _cADC_EChannel
 
MonitorElement_cADC_vs_TS
 
std::map< std::string, MonitorElement * > _cADC_vs_TS_EChannel
 
MonitorElement_cShape
 
std::map< std::string, MonitorElement * > _cShape_EChannel
 
double _cut
 
int _ped
 
edm::InputTag _tagQIE10
 
edm::EDGetTokenT< ZDCDigiCollection_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< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 

Detailed Description

Definition at line 22 of file ZDCTask.h.

Constructor & Destructor Documentation

◆ ZDCTask()

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

Definition at line 7 of file ZDCTask.cc.

7  {
8  // tags
9  _tagQIE10 = ps.getUntrackedParameter<edm::InputTag>("tagQIE10", edm::InputTag("hcalDigis"));
10  _tokQIE10 = consumes<ZDCDigiCollection>(_tagQIE10);
11 
12  // cuts
13  _cut = ps.getUntrackedParameter<double>("cut", 50.0);
14  _ped = ps.getUntrackedParameter<int>("ped", 4);
15 }

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

◆ ~ZDCTask()

ZDCTask::~ZDCTask ( )
inlineoverride

Definition at line 25 of file ZDCTask.h.

25 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 181 of file ZDCTask.cc.

181  {
183  if (!e.getByToken(_tokQIE10, cqie10))
184  edm::LogError("Collection ZDCDigiCollection isn't available" + _tagQIE10.label() + " " + _tagQIE10.instance());
185 
186  for (uint32_t i = 0; i < cqie10->size(); i++) {
187  ZDCDataFrame frame = static_cast<ZDCDataFrame>((*cqie10)[i]);
188  HcalElectronicsId eid = frame.elecId();
189 
190  char histoname[300];
191  sprintf(histoname, "%d_%d_%d_%d", eid.fiberChanId(), eid.fiberIndex(), eid.spigot(), eid.dccid());
192 
193  // compute the signal, ped subracted
194  //double q = hcaldqm::utilities::sumQ_v10<ZDCDataFrame>(frame, constants::adc2fC[_ped], 0, frame.size()-1);
195 
196  // iterate thru all TS and fill
197  for (int j = 0; j < frame.size(); j++) {
198  _cShape_EChannel[histoname]->Fill(j, frame[j].nominal_fC());
199  _cShape->Fill(j, frame[j].nominal_fC());
200 
201  _cADC_EChannel[histoname]->Fill(frame[j].adc());
202  _cADC->Fill(frame[j].adc());
203 
204  _cADC_vs_TS_EChannel[histoname]->Fill(j, frame[j].adc());
205  _cADC_vs_TS->Fill(j, frame[j].adc());
206  }
207  }
208 }

References gpuClustering::adc, MillePedeFileConverter_cfg::e, runTauDisplay::eid, amptDefault_cfi::frame, mps_fire::i, dqmiolumiharvest::j, and edm::SortedCollection< T, SORT >::size().

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 17 of file ZDCTask.cc.

17  {
18  //############################## hardcode manually the zdc mapping #############################
19  //############################# this follows from https://github.com/cms-sw/cmssw/blob/CMSSW_8_0_X/EventFilter/CastorRawToDigi/src/ZdcUnpacker.cc#L118
20  //##############################################################################################
22  //PZDC
23  std::map<HcalElectronicsId, DetId> myEMap;
25  eid.setHTR(18, 8, 1);
26  myEMap[eid] = DetId(0x54000051); //PZDC EM1
27 
28  eid = HcalElectronicsId(1, 1, 0, 3);
29  eid.setHTR(18, 8, 1);
30  myEMap[eid] = DetId(0x54000052); //PZDC EM2
31 
32  eid = HcalElectronicsId(2, 1, 0, 3);
33  eid.setHTR(18, 8, 1);
34  myEMap[eid] = DetId(0x54000053); //PZDC EM3
35 
36  eid = HcalElectronicsId(0, 2, 0, 3);
37  eid.setHTR(18, 8, 1);
38  myEMap[eid] = DetId(0x54000061); //PZDC HAD1
39 
40  eid = HcalElectronicsId(1, 2, 0, 3);
41  eid.setHTR(18, 8, 1);
42  myEMap[eid] = DetId(0x54000054); //PZDC EM4
43 
44  eid = HcalElectronicsId(2, 2, 0, 3);
45  eid.setHTR(18, 8, 1);
46  myEMap[eid] = DetId(0x54000055); //PZDC EM5
47 
48  eid = HcalElectronicsId(0, 3, 0, 3);
49  eid.setHTR(18, 8, 1);
50  myEMap[eid] = DetId(0x54000062); //PZDC HAD2
51 
52  eid = HcalElectronicsId(1, 3, 0, 3);
53  eid.setHTR(18, 8, 1);
54  myEMap[eid] = DetId(0x54000063); //PZDC HAD3
55 
56  eid = HcalElectronicsId(2, 3, 0, 3);
57  eid.setHTR(18, 8, 1);
58  myEMap[eid] = DetId(0x54000064); //PZDC HAD4
59 
60  //NZDC
61  eid = HcalElectronicsId(0, 1, 1, 3);
62  eid.setHTR(18, 8, 0);
63  myEMap[eid] = DetId(0x54000011); //NZDC EM1
64 
65  eid = HcalElectronicsId(1, 1, 1, 3);
66  eid.setHTR(18, 8, 0);
67  myEMap[eid] = DetId(0x54000012); //NZDC EM2
68 
69  eid = HcalElectronicsId(2, 1, 1, 3);
70  eid.setHTR(18, 8, 0);
71  myEMap[eid] = DetId(0x54000013); //NZDC EM3
72 
73  eid = HcalElectronicsId(0, 2, 1, 3);
74  eid.setHTR(18, 8, 0);
75  myEMap[eid] = DetId(0x54000015); //NZDC EM5
76 
77  eid = HcalElectronicsId(1, 2, 1, 3);
78  eid.setHTR(18, 8, 0);
79  myEMap[eid] = DetId(0x54000021); //NZDC HAD1
80 
81  eid = HcalElectronicsId(2, 2, 1, 3);
82  eid.setHTR(18, 8, 0);
83  myEMap[eid] = DetId(0x54000014); //NZDC EM4
84 
85  eid = HcalElectronicsId(0, 3, 1, 3);
86  eid.setHTR(18, 8, 0);
87  myEMap[eid] = DetId(0x54000022); //NZDC HAD2
88 
89  eid = HcalElectronicsId(1, 3, 1, 3);
90  eid.setHTR(18, 8, 0);
91  myEMap[eid] = DetId(0x54000023); //NZDC HAD3
92 
93  eid = HcalElectronicsId(2, 3, 1, 3);
94  eid.setHTR(18, 8, 0);
95  myEMap[eid] = DetId(0x54000024); //NZDC HAD4
96  //##################################### end hardcoding ###################################
97 
98  ib.cd();
99 
100  //quantities for axis
103 
105 
106  //book histos per channel
107  for (std::map<HcalElectronicsId, DetId>::const_iterator itr = myEMap.begin(); itr != myEMap.end(); ++itr) {
108  char histoname[300];
109 
110  sprintf(histoname,
111  "%d_%d_%d_%d",
112  itr->first.fiberChanId(),
113  itr->first.fiberIndex(),
114  itr->first.spigot(),
115  itr->first.dccid());
116 
117  ib.setCurrentFolder("Hcal/ZDCTask/Shape_perChannel");
118  _cShape_EChannel[histoname] = ib.bookProfile(histoname,
119  histoname,
120  xAxisShape.nbins(),
121  xAxisShape.min(),
122  xAxisShape.max(),
123  yAxisShape.nbins(),
124  yAxisShape.min(),
125  yAxisShape.max());
126  _cShape_EChannel[histoname]->setAxisTitle("Timing", 1);
127  _cShape_EChannel[histoname]->setAxisTitle("fC QIE8", 2);
128 
129  ib.setCurrentFolder("Hcal/ZDCTask/ADC_perChannel");
130  _cADC_EChannel[histoname] = ib.book1DD(histoname, histoname, xAxisADC.nbins(), xAxisADC.min(), xAxisADC.max());
131  _cADC_EChannel[histoname]->getTH1()->SetBit(
133  _cADC_EChannel[histoname]->setAxisTitle("ADC QIE8", 1);
134 
135  ib.setCurrentFolder("Hcal/ZDCTask/ADC_vs_TS_perChannel");
136  _cADC_vs_TS_EChannel[histoname] = ib.book2D(histoname,
137  histoname,
138  xAxisShape.nbins(),
139  xAxisShape.min(),
140  xAxisShape.max(),
141  xAxisADC.nbins(),
142  xAxisADC.min(),
143  xAxisADC.max());
144  _cADC_vs_TS_EChannel[histoname]->getTH1()->SetBit(
146  _cADC_vs_TS_EChannel[histoname]->setAxisTitle("Timing", 1);
147  _cADC_vs_TS_EChannel[histoname]->setAxisTitle("ADC QIE8", 2);
148  }
149 
150  //book global histos
151  ib.setCurrentFolder("Hcal/ZDCTask");
152 
153  _cShape = ib.bookProfile("Shape",
154  "Shape",
155  xAxisShape.nbins(),
156  xAxisShape.min(),
157  xAxisShape.max(),
158  yAxisShape.nbins(),
159  yAxisShape.min(),
160  yAxisShape.max());
161  _cShape->setAxisTitle("Timing", 1);
162  _cShape->setAxisTitle("fC QIE8", 2);
163 
164  _cADC = ib.book1DD("ADC", "ADC", xAxisADC.nbins(), xAxisADC.min(), xAxisADC.max());
166  _cADC->setAxisTitle("ADC QIE8", 1);
167 
168  _cADC_vs_TS = ib.book2D("ADC_vs_TS",
169  "ADC_vs_TS",
170  xAxisShape.nbins(),
171  xAxisShape.min(),
172  xAxisShape.max(),
173  xAxisADC.nbins(),
174  xAxisADC.min(),
175  xAxisADC.max());
177  _cADC_vs_TS->setAxisTitle("Timing", 1);
178  _cADC_vs_TS->setAxisTitle("ADC QIE8", 2);
179 }

References hcaldqm::constants::BIT_OFFSET, runTauDisplay::eid, hcaldqm::quantity::fADC_128, hcaldqm::quantity::ffC_10000, hcaldqm::quantity::fTiming_TS, hcaldqm::quantity::fYAxis, cuy::ib, hcaldqm::quantity::ValueQuantity::max(), hcaldqm::quantity::ValueQuantity::min(), and hcaldqm::quantity::ValueQuantity::nbins().

Member Data Documentation

◆ _cADC

MonitorElement* ZDCTask::_cADC
protected

Definition at line 47 of file ZDCTask.h.

◆ _cADC_EChannel

std::map<std::string, MonitorElement*> ZDCTask::_cADC_EChannel
protected

Definition at line 42 of file ZDCTask.h.

◆ _cADC_vs_TS

MonitorElement* ZDCTask::_cADC_vs_TS
protected

Definition at line 48 of file ZDCTask.h.

◆ _cADC_vs_TS_EChannel

std::map<std::string, MonitorElement*> ZDCTask::_cADC_vs_TS_EChannel
protected

Definition at line 43 of file ZDCTask.h.

◆ _cShape

MonitorElement* ZDCTask::_cShape
protected

Definition at line 46 of file ZDCTask.h.

◆ _cShape_EChannel

std::map<std::string, MonitorElement*> ZDCTask::_cShape_EChannel
protected

Definition at line 41 of file ZDCTask.h.

◆ _cut

double ZDCTask::_cut
protected

Definition at line 37 of file ZDCTask.h.

◆ _ped

int ZDCTask::_ped
protected

Definition at line 38 of file ZDCTask.h.

◆ _tagQIE10

edm::InputTag ZDCTask::_tagQIE10
protected

Definition at line 33 of file ZDCTask.h.

◆ _tokQIE10

edm::EDGetTokenT<ZDCDigiCollection> ZDCTask::_tokQIE10
protected

Definition at line 34 of file ZDCTask.h.

◆ cut

ZDCTask.cut

Definition at line 17 of file ZDCTask.py.

◆ debug

ZDCTask.debug

◆ name

ZDCTask.name

Definition at line 8 of file ZDCTask.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().

◆ ped

ZDCTask.ped

Definition at line 18 of file ZDCTask.py.

◆ runkeyName

ZDCTask.runkeyName

Definition at line 11 of file ZDCTask.py.

◆ runkeyVal

ZDCTask.runkeyVal

Definition at line 10 of file ZDCTask.py.

◆ tagQIE10

ZDCTask.tagQIE10

Definition at line 14 of file ZDCTask.py.

◆ zdcQIE10Task

ZDCTask.zdcQIE10Task

Definition at line 21 of file ZDCTask.py.

◆ zdcTask

ZDCTask.zdcTask

Definition at line 4 of file ZDCTask.py.

hcaldqm::quantity::fADC_128
Definition: ValueQuantity.h:15
mps_fire.i
i
Definition: mps_fire.py:428
edm::InputTag::instance
std::string const & instance() const
Definition: InputTag.h:37
hcaldqm::quantity::ValueQuantity
Definition: ValueQuantity.h:319
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
hcaldqm::quantity::ffC_10000
Definition: ValueQuantity.h:18
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::SortedCollection::size
size_type size() const
Definition: SortedCollection.h:215
hcaldqm::constants::BIT_OFFSET
const int BIT_OFFSET
Definition: Constants.h:282
edm::Handle
Definition: AssociativeIterator.h:50
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
DetId
Definition: DetId.h:17
ZDCTask::_cut
double _cut
Definition: ZDCTask.h:37
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
HcalElectronicsId
Readout chain identification for Hcal.
Definition: HcalElectronicsId.h:32
ZDCDataFrame
Definition: ZDCDataFrame.h:15
hcaldqm::quantity::fYAxis
Definition: Quantity.h:25
ZDCTask::_tokQIE10
edm::EDGetTokenT< ZDCDigiCollection > _tokQIE10
Definition: ZDCTask.h:34
dqm::impl::MonitorElement::getTH1
virtual TH1 * getTH1()
Definition: MonitorElement.cc:972
ZDCTask::_ped
int _ped
Definition: ZDCTask.h:38
ZDCTask::_cShape_EChannel
std::map< std::string, MonitorElement * > _cShape_EChannel
Definition: ZDCTask.h:41
runTauDisplay.eid
eid
Definition: runTauDisplay.py:298
cuy.ib
ib
Definition: cuy.py:661
ZDCTask::_cADC_vs_TS_EChannel
std::map< std::string, MonitorElement * > _cADC_vs_TS_EChannel
Definition: ZDCTask.h:43
ZDCTask::_cADC_vs_TS
MonitorElement * _cADC_vs_TS
Definition: ZDCTask.h:48
ZDCTask::_cShape
MonitorElement * _cShape
Definition: ZDCTask.h:46
ZDCTask::_cADC_EChannel
std::map< std::string, MonitorElement * > _cADC_EChannel
Definition: ZDCTask.h:42
amptDefault_cfi.frame
frame
Definition: amptDefault_cfi.py:12
ZDCTask::_cADC
MonitorElement * _cADC
Definition: ZDCTask.h:47
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
hcaldqm::quantity::fTiming_TS
Definition: ValueQuantity.h:21
ZDCTask::_tagQIE10
edm::InputTag _tagQIE10
Definition: ZDCTask.h:33
edm::Log
Definition: MessageLogger.h:70
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:791
edm::InputTag
Definition: InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37