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
HcalFeatureBit.h
HcalFeatureHFEMBit
Definition: HcalFeatureHFEMBit.h:8
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
AlignmentProducer_cff.calibrations
calibrations
Definition: AlignmentProducer_cff.py:59
HcalDbService::getHcalShape
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:326
HcalCoderDb.h
HcalDbService::getHcalCalibrations
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:65
EgammaValidation_cff.samples
samples
Definition: EgammaValidation_cff.py:19
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
dqmiodatasetharvest.db
db
Definition: dqmiodatasetharvest.py:119
HcalDbService::getHcalCoder
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:319
HcalFeatureHFEMBit::conditions_
const HcalDbService & conditions_
Definition: HcalFeatureHFEMBit.h:34
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
HcalFeatureHFEMBit::ShortMinE_
double ShortMinE_
Definition: HcalFeatureHFEMBit.h:33
HcalCalibrations
Definition: HcalCalibrations.h:9
HcalFeatureHFEMBit::fineGrainbit
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
Definition: HcalFeatureHFEMBit.cc:35
HcalFeatureHFEMBit::LongMinE_
double LongMinE_
Definition: HcalFeatureHFEMBit.h:33
HcalDetId
Definition: HcalDetId.h:12
HFDataFrame
Definition: HFDataFrame.h:14
HcalFeatureBit
Definition: HcalFeatureBit.h:8
CaloSamples
Definition: CaloSamples.h:14
HcalFeatureHFEMBit::ShortLongCutSlope_
double ShortLongCutSlope_
Definition: HcalFeatureHFEMBit.h:33
HcalFeatureHFEMBit::ShortLongCutOffset_
double ShortLongCutOffset_
Definition: HcalFeatureHFEMBit.h:33
HcalDbService
Definition: HcalDbService.h:26
submitPVValidationJobs.conditions
list conditions
Definition: submitPVValidationJobs.py:674
QIE10DataFrame
Definition: QIE10DataFrame.h:11
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
T
long double T
Definition: Basic3DVectorLD.h:48
HcalCoderDb
Definition: HcalCoderDb.h:15
HcalDbService.h
HcalFeatureHFEMBit::HcalFeatureHFEMBit
HcalFeatureHFEMBit(double ShortMinE, double LongMinE, double ShortLongCutSlope, double ShortLongCutOffset, const HcalDbService &conditions)
Definition: HcalFeatureHFEMBit.cc:8
HcalFeatureHFEMBit::~HcalFeatureHFEMBit
~HcalFeatureHFEMBit() override
Definition: HcalFeatureHFEMBit.cc:21
HcalFeatureHFEMBit::getE
float getE(const T &f, int idx) const
Definition: HcalFeatureHFEMBit.h:38