CMS 3D CMS Logo

CastorNominalCoder.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 }
9 
11  template <class Digi>
12  void process(const CaloSamples& clf, Digi& df, int fCapIdOffset) {
13  df = Digi(clf.id());
14  df.setSize(clf.size());
15  df.setPresamples(clf.presamples());
16  for (int i = 0; i < clf.size(); i++) {
17  int capId = (fCapIdOffset + i) % 4;
18  for (int q = 1; q < 128; q++) {
19  df.setSample(i, HcalQIESample(q, capId, 0, 0));
20  if (df[i].nominal_fC() > clf[i]) {
21  df.setSample(i, HcalQIESample(q - 1, capId, 0, 0));
22  break;
23  }
24  }
25  }
26  }
27 } // namespace CastorNominalCoderTemplate
28 
29 void CastorNominalCoder::fC2adc(const CaloSamples& clf, CastorDataFrame& df, int fCapIdOffset) const {
30  CastorNominalCoderTemplate::process(clf, df, fCapIdOffset);
31 }
mps_fire.i
i
Definition: mps_fire.py:428
CastorNominalCoder::adc2fC
void adc2fC(const CastorDataFrame &df, CaloSamples &lf) const override
Definition: CastorNominalCoder.cc:3
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
CastorNominalCoderTemplate::process
void process(const CaloSamples &clf, Digi &df, int fCapIdOffset)
Definition: CastorNominalCoder.cc:12
CaloSamples::setPresamples
void setPresamples(int pre)
set presample information
Definition: CaloSamples.cc:33
CastorDataFrame
Definition: CastorDataFrame.h:15
CaloSamples::id
DetId id() const
get the (generic) id
Definition: CaloSamples.h:21
CastorNominalCoder.h
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
CastorNominalCoder::fC2adc
void fC2adc(const CaloSamples &clf, CastorDataFrame &df, int fCapIdOffset) const override
Definition: CastorNominalCoder.cc:29
CastorNominalCoderTemplate
Definition: CastorNominalCoder.cc:10