CMS 3D CMS Logo

HcalFeatureHFEMBit.cc
Go to the documentation of this file.
1 
2 //HcalFeatureHFEMBit
3 //version 2.0
4 
7 
9  double LongMinE,
10  double ShortLongCutSlope,
11  double ShortLongCutOffset,
13  : conditions_(conditions) {
14  ShortMinE_ = ShortMinE; //minimum energy deposited
15  LongMinE_ = LongMinE;
17  ShortLongCutSlope; // this is a the slope of the cut line related to energy deposited in short fibers vrs long fibers
18  ShortLongCutOffset_ = ShortLongCutOffset; // this is the offset of said line.
19 }
20 
22 
23 bool HcalFeatureHFEMBit::fineGrainbit(const HFDataFrame& shortDigi, const HFDataFrame& longDigi, int idx) const {
24  float shortE = getE(shortDigi, idx);
25  float longE = getE(longDigi, idx);
26 
27  if (shortE < ShortMinE_)
28  return false;
29  if (longE < LongMinE_)
30  return false;
31 
32  return (shortE < (longE - ShortLongCutOffset_) * ShortLongCutSlope_);
33 }
34 
36  const QIE10DataFrame& short2,
37  const QIE10DataFrame& long1,
38  const QIE10DataFrame& long2,
39  bool validShort1,
40  bool validShort2,
41  bool validLong1,
42  bool validLong2,
43  int idx) const {
44  float shortE = 0;
45  if (validShort1)
46  shortE += getE(short1, idx);
47  if (validShort2)
48  shortE += getE(short2, idx);
49  if (validShort1 and validShort2)
50  shortE *= .5;
51 
52  float longE = 0;
53  if (validLong1)
54  longE += getE(long1, idx);
55  if (validLong2)
56  longE += getE(long2, idx);
57  if (validLong1 and validLong2)
58  longE *= .5;
59 
60  if (shortE < ShortMinE_)
61  return false;
62  if (longE < LongMinE_)
63  return false;
64 
65  return (shortE < (longE - ShortLongCutOffset_) * ShortLongCutSlope_);
66 }
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
HcalQIECoder.h
HcalFeatureHFEMBit::ShortMinE_
double ShortMinE_
Definition: HcalFeatureHFEMBit.h:33
HcalFeatureHFEMBit.h
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
HFDataFrame
Definition: HFDataFrame.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
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