CMS 3D CMS Logo

HBHENegativeFlag.cc
Go to the documentation of this file.
4 
7  const HBHEDataFrame &digi,
8  const HcalCoder &coder,
9  const HcalCalibrations &calib)
10 {
11  if (filter_)
12  {
14  coder.adc2fC(digi,cs);
15  const int nRead = cs.size();
16 
17  double ts[CaloSamples::MAXSAMPLES];
18  for (int i=0; i < nRead; i++)
19  {
20  const int capid = digi[i].capid();
21  ts[i] = cs[i] - calib.pedestal(capid);
22  }
23 
24  const bool passes = filter_->checkPassFilter(hbhe.id(), &ts[0], nRead);
25  if (!passes)
27  }
28 }
auto_ptr< ClusterSequence > cs
static const int MAXSAMPLES
Definition: CaloSamples.h:76
HcalDetId id() const
get the id
Definition: HBHERecHit.h:42
constexpr void setFlagField(uint32_t value, int base, int width=1)
Definition: CaloRecHit.h:38
bool checkPassFilter(const HcalDetId &id, const double *ts, unsigned lenTS) const
const HBHENegativeEFilter * filter_
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const =0
constexpr double pedestal(int fCapId) const
get pedestal for capid=0..3
int size() const
get the size
Definition: CaloSamples.h:24
void setPulseShapeFlags(HBHERecHit &hbhe, const HBHEDataFrame &digi, const HcalCoder &coder, const HcalCalibrations &calib)