CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
HcalFeatureHFEMBit Class Reference

#include <HcalFeatureHFEMBit.h>

Inheritance diagram for HcalFeatureHFEMBit:
HcalFeatureBit

Public Member Functions

bool fineGrainbit (const HFDataFrame &shortDigi, const HFDataFrame &longDigi, int idx) const override
 
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
 
 HcalFeatureHFEMBit (double ShortMinE, double LongMinE, double ShortLongCutSlope, double ShortLongCutOffset, const HcalDbService &conditions)
 
 ~HcalFeatureHFEMBit () override
 
- Public Member Functions inherited from HcalFeatureBit
 HcalFeatureBit ()
 
virtual ~HcalFeatureBit ()
 

Private Member Functions

template<typename T >
float getE (const T &f, int idx) const
 

Private Attributes

const HcalDbServiceconditions_
 
double LongMinE_
 
double ShortLongCutOffset_
 
double ShortLongCutSlope_
 
double ShortMinE_
 

Detailed Description

Definition at line 8 of file HcalFeatureHFEMBit.h.

Constructor & Destructor Documentation

◆ HcalFeatureHFEMBit()

HcalFeatureHFEMBit::HcalFeatureHFEMBit ( double  ShortMinE,
double  LongMinE,
double  ShortLongCutSlope,
double  ShortLongCutOffset,
const HcalDbService conditions 
)

Definition at line 8 of file HcalFeatureHFEMBit.cc.

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 }

References LongMinE_, ShortLongCutOffset_, ShortLongCutSlope_, and ShortMinE_.

◆ ~HcalFeatureHFEMBit()

HcalFeatureHFEMBit::~HcalFeatureHFEMBit ( )
override

Definition at line 21 of file HcalFeatureHFEMBit.cc.

21 {}

Member Function Documentation

◆ fineGrainbit() [1/2]

bool HcalFeatureHFEMBit::fineGrainbit ( const HFDataFrame shortDigi,
const HFDataFrame longDigi,
int  idx 
) const
overridevirtual

Implements HcalFeatureBit.

Definition at line 23 of file HcalFeatureHFEMBit.cc.

23  {
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 }

References getE(), heavyIonCSV_trainingSettings::idx, LongMinE_, ShortLongCutOffset_, ShortLongCutSlope_, and ShortMinE_.

◆ fineGrainbit() [2/2]

bool HcalFeatureHFEMBit::fineGrainbit ( const QIE10DataFrame short1,
const QIE10DataFrame short2,
const QIE10DataFrame long1,
const QIE10DataFrame long2,
bool  validShort1,
bool  validShort2,
bool  validLong1,
bool  validLong2,
int  idx 
) const
overridevirtual

Implements HcalFeatureBit.

Definition at line 35 of file HcalFeatureHFEMBit.cc.

43  {
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 }

References getE(), heavyIonCSV_trainingSettings::idx, LongMinE_, ShortLongCutOffset_, ShortLongCutSlope_, and ShortMinE_.

◆ getE()

template<typename T >
float HcalFeatureHFEMBit::getE ( const T f,
int  idx 
) const
private

Definition at line 38 of file HcalFeatureHFEMBit.h.

38  {
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 }

References AlignmentProducer_cff::calibrations, conditions_, alignCSCRings::corr, dqmiodatasetharvest::db, f, HcalDbService::getHcalCalibrations(), HcalDbService::getHcalCoder(), HcalDbService::getHcalShape(), triggerObjects_cff::id, heavyIonCSV_trainingSettings::idx, and EgammaValidation_cff::samples.

Referenced by fineGrainbit().

Member Data Documentation

◆ conditions_

const HcalDbService& HcalFeatureHFEMBit::conditions_
private

Definition at line 34 of file HcalFeatureHFEMBit.h.

Referenced by getE().

◆ LongMinE_

double HcalFeatureHFEMBit::LongMinE_
private

Definition at line 33 of file HcalFeatureHFEMBit.h.

Referenced by fineGrainbit(), and HcalFeatureHFEMBit().

◆ ShortLongCutOffset_

double HcalFeatureHFEMBit::ShortLongCutOffset_
private

Definition at line 33 of file HcalFeatureHFEMBit.h.

Referenced by fineGrainbit(), and HcalFeatureHFEMBit().

◆ ShortLongCutSlope_

double HcalFeatureHFEMBit::ShortLongCutSlope_
private

Definition at line 33 of file HcalFeatureHFEMBit.h.

Referenced by fineGrainbit(), and HcalFeatureHFEMBit().

◆ ShortMinE_

double HcalFeatureHFEMBit::ShortMinE_
private

Definition at line 33 of file HcalFeatureHFEMBit.h.

Referenced by fineGrainbit(), and HcalFeatureHFEMBit().

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
HcalDbService::getHcalCalibrations
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:65
EgammaValidation_cff.samples
samples
Definition: EgammaValidation_cff.py:18
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::LongMinE_
double LongMinE_
Definition: HcalFeatureHFEMBit.h:33
HcalDetId
Definition: HcalDetId.h:12
CaloSamples
Definition: CaloSamples.h:14
HcalFeatureHFEMBit::ShortLongCutSlope_
double ShortLongCutSlope_
Definition: HcalFeatureHFEMBit.h:33
HcalFeatureHFEMBit::ShortLongCutOffset_
double ShortLongCutOffset_
Definition: HcalFeatureHFEMBit.h:33
submitPVValidationJobs.conditions
list conditions
Definition: submitPVValidationJobs.py:674
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
HcalCoderDb
Definition: HcalCoderDb.h:15
HcalFeatureHFEMBit::getE
float getE(const T &f, int idx) const
Definition: HcalFeatureHFEMBit.h:38