CMS 3D CMS Logo

Functions
HcalSaturation Namespace Reference

Functions

template<class T , class V >
void checkADCSaturation (T &rechit, const V &digi, int level)
 

Function Documentation

template<class T , class V >
void HcalSaturation::checkADCSaturation ( T rechit,
const V &  digi,
int  level 
)

Definition at line 12 of file HcalADCSaturationFlag.cc.

References HcalCaloFlagLabels::ADCSaturationBit, mps_fire::i, and hcalDigis_cfi::level.

13  {
14  // Loop over digi
15  for (int i=0;i<digi.size();++i)
16  {
17  if (digi.sample(i).adc()>=level)
18  {
19  rechit.setFlagField(1,HcalCaloFlagLabels::ADCSaturationBit);
20  break;
21  }
22  }
23  return;
24  }