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,
11  double LongMinE,
12  double ShortLongCutSlope,
13  double ShortLongCutOffset,
14  const HcalDbService& conditions);
15  ~HcalFeatureHFEMBit() override;
16 
17  // Provides FG bit based on energy cuts in long & short fibers.
18  bool fineGrainbit(const QIE10DataFrame& short1,
19  const QIE10DataFrame& short2,
20  const QIE10DataFrame& long1,
21  const QIE10DataFrame& long2,
22  bool validShort1,
23  bool validShort2,
24  bool validLong1,
25  bool validLong2,
26  int idx) const override;
27  bool fineGrainbit(const HFDataFrame& shortDigi, const HFDataFrame& longDigi, int idx) const override;
28 
29 private:
30  template <typename T>
31  float getE(const T& f, int idx) const;
32 
35 };
36 
37 template <typename T>
38 float HcalFeatureHFEMBit::getE(const T& f, int idx) const {
39  const HcalDetId id(f.id());
41  const auto* coder = conditions_.getHcalCoder(id);
42  const auto* shape = conditions_.getHcalShape(coder);
43 
44  HcalCoderDb db(*coder, *shape);
46  db.adc2fC(f, samples);
47 
48  auto ped = calibrations.effpedestal(f[idx].capid());
49  auto corr = calibrations.respcorrgain(f[idx].capid());
50 
51  return (samples[idx] - ped) * corr;
52 }
53 
54 #endif
~HcalFeatureHFEMBit() override
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
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
dictionary corr
const HcalDbService & conditions_
double f[11][100]
float getE(const T &f, int idx) const
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
long double T
HcalFeatureHFEMBit(double ShortMinE, double LongMinE, double ShortLongCutSlope, double ShortLongCutOffset, const HcalDbService &conditions)