CMS 3D CMS Logo

HcalNominalCoder.cc
Go to the documentation of this file.
2 
4  lf = CaloSamples(df.id(), df.size());
5  for (int i = 0; i < df.size(); i++)
6  lf[i] = df[i].nominal_fC();
7  lf.setPresamples(df.presamples());
8 }
10  lf = CaloSamples(df.id(), df.size());
11  for (int i = 0; i < df.size(); i++)
12  lf[i] = df[i].nominal_fC();
13  lf.setPresamples(df.presamples());
14 }
16  lf = CaloSamples(df.id(), df.size());
17  for (int i = 0; i < df.size(); i++)
18  lf[i] = df[i].nominal_fC();
19  lf.setPresamples(df.presamples());
20 }
22  lf = CaloSamples(df.id(), df.size());
23  for (int i = 0; i < df.size(); i++)
24  lf[i] = df[i].nominal_fC();
25  lf.setPresamples(df.presamples());
26 }
28  lf = CaloSamples(df.id(), df.size());
29  for (int i = 0; i < df.size(); i++)
30  lf[i] = df[i].nominal_fC();
31  lf.setPresamples(df.presamples());
32 }
33 
35  template <class Digi>
36  void process(const CaloSamples& clf, Digi& df, int fCapIdOffset) {
37  df = Digi(clf.id());
38  df.setSize(clf.size());
39  df.setPresamples(clf.presamples());
40  for (int i = 0; i < clf.size(); i++) {
41  int capId = (fCapIdOffset + i) % 4;
42  for (int q = 1; q < 128; q++) {
43  df.setSample(i, HcalQIESample(q, capId, 0, 0));
44  if (df[i].nominal_fC() > clf[i]) {
45  df.setSample(i, HcalQIESample(q - 1, capId, 0, 0));
46  break;
47  }
48  }
49  }
50  }
51 } // namespace HcalNominalCoderTemplate
52 
53 void HcalNominalCoder::fC2adc(const CaloSamples& clf, HBHEDataFrame& df, int fCapIdOffset) const {
54  HcalNominalCoderTemplate::process(clf, df, fCapIdOffset);
55 }
56 void HcalNominalCoder::fC2adc(const CaloSamples& clf, HFDataFrame& df, int fCapIdOffset) const {
57  HcalNominalCoderTemplate::process(clf, df, fCapIdOffset);
58 }
59 void HcalNominalCoder::fC2adc(const CaloSamples& clf, HODataFrame& df, int fCapIdOffset) const {
60  HcalNominalCoderTemplate::process(clf, df, fCapIdOffset);
61 }
62 void HcalNominalCoder::fC2adc(const CaloSamples& clf, ZDCDataFrame& df, int fCapIdOffset) const {
63  HcalNominalCoderTemplate::process(clf, df, fCapIdOffset);
64 }
65 void HcalNominalCoder::fC2adc(const CaloSamples& clf, HcalCalibDataFrame& df, int fCapIdOffset) const {
66  HcalNominalCoderTemplate::process(clf, df, fCapIdOffset);
67 }
mps_fire.i
i
Definition: mps_fire.py:428
CaloSamples::size
int size() const
get the size
Definition: CaloSamples.h:24
TrendClient_cfi.Digi
Digi
Definition: TrendClient_cfi.py:7
HcalQIESample
Definition: HcalQIESample.h:32
HcalNominalCoder.h
HcalNominalCoder::adc2fC
void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const override
Definition: HcalNominalCoder.cc:3
ZDCDataFrame
Definition: ZDCDataFrame.h:15
HBHEDataFrame
Definition: HBHEDataFrame.h:14
HcalCalibDataFrame
Definition: HcalCalibDataFrame.h:15
CaloSamples::setPresamples
void setPresamples(int pre)
set presample information
Definition: CaloSamples.cc:33
HcalNominalCoder::fC2adc
void fC2adc(const CaloSamples &clf, HBHEDataFrame &df, int fCapIdOffset) const override
Definition: HcalNominalCoder.cc:53
CaloSamples::id
DetId id() const
get the (generic) id
Definition: CaloSamples.h:21
HFDataFrame
Definition: HFDataFrame.h:14
submitPVResolutionJobs.q
q
Definition: submitPVResolutionJobs.py:84
CaloSamples
Definition: CaloSamples.h:14
hgcalPerformanceValidation.df
df
Definition: hgcalPerformanceValidation.py:640
CaloSamples::presamples
int presamples() const
access presample information
Definition: CaloSamples.h:36
HODataFrame
Definition: HODataFrame.h:14
HcalNominalCoderTemplate
Definition: HcalNominalCoder.cc:34
HcalNominalCoderTemplate::process
void process(const CaloSamples &clf, Digi &df, int fCapIdOffset)
Definition: HcalNominalCoder.cc:36