CMS 3D CMS Logo

HcalFeatureHFEMBit.h
Go to the documentation of this file.
1 #ifndef SimCalorimetry_HcalTPGAlgos_interface_HcalFeatureHFEMBit_h_included
2 #define SimCalorimetry_HcalTPGAlgos_interface_HcalFeatureHFEMBit_h_included 1
3 
7 
9  public:
10  HcalFeatureHFEMBit(double ShortMinE, double LongMinE, double ShortLongCutSlope, double ShortLongCutOffset, const HcalDbService& conditions);
11  ~HcalFeatureHFEMBit() override;
12 
13  // Provides FG bit based on energy cuts in long & short fibers.
14  bool fineGrainbit(
15  const QIE10DataFrame& short1,
16  const QIE10DataFrame& short2,
17  const QIE10DataFrame& long1,
18  const QIE10DataFrame& long2,
19  bool validShort1,
20  bool validShort2,
21  bool validLong1,
22  bool validLong2,
23  int idx) const override;
24  bool fineGrainbit(
25  const HFDataFrame& shortDigi,
26  const HFDataFrame& longDigi,
27  int idx) const override;
28  private:
29  template<typename T>
30  float getE(const T& f, int idx) const;
31 
34 };
35 
36 template<typename T>
37 float
38 HcalFeatureHFEMBit::getE(const T& f, int idx) const
39 {
40  const HcalDetId id(f.id());
42  const auto* coder = conditions_.getHcalCoder(id);
43  const auto* shape = conditions_.getHcalShape(coder);
44 
45  HcalCoderDb db(*coder, *shape);
47  db.adc2fC(f, samples);
48 
49  auto ped = calibrations.pedestal(f[idx].capid());
50  auto corr = calibrations.respcorrgain(f[idx].capid());
51 
52  return (samples[idx] - ped) * corr;
53 }
54 
55 #endif
~HcalFeatureHFEMBit() override
void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const override
Definition: HcalCoderDb.cc:68
float getE(const T &f, int idx) const
const HcalDbService & conditions_
double f[11][100]
JetCorrectorParameters corr
Definition: classes.h:5
bool fineGrainbit(const QIE10DataFrame &short1, const QIE10DataFrame &short2, const QIE10DataFrame &long1, const QIE10DataFrame &long2, bool validShort1, bool validShort2, bool validLong1, bool validLong2, int idx) const override
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
long double T
HcalFeatureHFEMBit(double ShortMinE, double LongMinE, double ShortLongCutSlope, double ShortLongCutOffset, const HcalDbService &conditions)