CMS 3D CMS Logo

Functions
zdchelper Namespace Reference

Functions

double getNoiseOOTPURatio (const float energy0, const float energy1, const float ootpuRatio, const float ootpuFrac)
 
void setZDCSaturation (ZDCRecHit &rh, QIE10DataFrame &digi, int maxValue)
 
double subPedestal (const float charge, const float ped, const float width)
 

Function Documentation

◆ getNoiseOOTPURatio()

double zdchelper::getNoiseOOTPURatio ( const float  energy0,
const float  energy1,
const float  ootpuRatio,
const float  ootpuFrac 
)
inline

Definition at line 72 of file ZdcSimpleRecAlgo_Run3.cc.

Referenced by ZdcSimpleRecAlgo_Run3::reco0().

75  {
76  if (energy0 >= ootpuRatio * energy1 || ootpuRatio < 0)
77  return (ootpuFrac * energy1);
78  else
79  return (energy1);
80  }

◆ setZDCSaturation()

void zdchelper::setZDCSaturation ( ZDCRecHit rh,
QIE10DataFrame digi,
int  maxValue 
)

Definition at line 21 of file ZdcHitReconstructor_Run3.cc.

References gpuClustering::adc, HcalCaloFlagLabels::ADCSaturationBit, mps_fire::i, seedmultiplicitymonitor_newtracking_cfi::maxValue, QIE10DataFrame::samples(), and CaloRecHit::setFlagField().

Referenced by ZdcHitReconstructor_Run3::produce().

21  {
22  for (int i = 0; i < digi.samples(); i++) {
23  if (digi[i].adc() >= maxValue) {
25  break;
26  }
27  }
28  }
constexpr void setFlagField(uint32_t value, int base, int width=1)
Definition: CaloRecHit.h:36
constexpr int samples() const
total number of samples in the digi
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ subPedestal()

double zdchelper::subPedestal ( const float  charge,
const float  ped,
const float  width 
)
inline

Definition at line 63 of file ZdcSimpleRecAlgo_Run3.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, QIE10Task_cfi::ped, and ApeEstimator_cff::width.

Referenced by ZdcSimpleRecAlgo_Run3::reco0().

63  {
64  if (charge - ped > width)
65  return (charge - ped);
66  else
67  return (0);
68  }