CMS 3D CMS Logo

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

#include <HBHENegativeFlag.h>

Public Member Functions

void configFilter (const HBHENegativeEFilter *f)
 
 HBHENegativeFlagSetter ()
 
void setPulseShapeFlags (HBHERecHit &hbhe, const HBHEDataFrame &digi, const HcalCoder &coder, const HcalCalibrations &calib)
 

Private Attributes

const HBHENegativeEFilterfilter_
 

Detailed Description

Definition at line 14 of file HBHENegativeFlag.h.

Constructor & Destructor Documentation

◆ HBHENegativeFlagSetter()

HBHENegativeFlagSetter::HBHENegativeFlagSetter ( )
inline

Definition at line 16 of file HBHENegativeFlag.h.

16 : filter_(nullptr) {}
const HBHENegativeEFilter * filter_

Member Function Documentation

◆ configFilter()

void HBHENegativeFlagSetter::configFilter ( const HBHENegativeEFilter f)
inline

Definition at line 18 of file HBHENegativeFlag.h.

References f, and filter_.

18 { filter_ = f; }
const HBHENegativeEFilter * filter_
double f[11][100]

◆ setPulseShapeFlags()

void HBHENegativeFlagSetter::setPulseShapeFlags ( HBHERecHit hbhe,
const HBHEDataFrame digi,
const HcalCoder coder,
const HcalCalibrations calib 
)

Definition at line 5 of file HBHENegativeFlag.cc.

References HcalCoder::adc2fC(), HBHENegativeEFilter::checkPassFilter(), callgraph::cs, filter_, photonIsolationHIProducer_cfi::hbhe, HcalCaloFlagLabels::HBHENegativeNoise, mps_fire::i, and CaloSamples::MAXSAMPLES.

8  {
9  if (filter_) {
11  coder.adc2fC(digi, cs);
12  const int nRead = cs.size();
13 
14  double ts[CaloSamples::MAXSAMPLES];
15  for (int i = 0; i < nRead; i++) {
16  const int capid = digi[i].capid();
17  ts[i] = cs[i] - calib.pedestal(capid);
18  }
19 
20  const bool passes = filter_->checkPassFilter(hbhe.id(), &ts[0], nRead);
21  if (!passes)
23  }
24 }
static const int MAXSAMPLES
Definition: CaloSamples.h:86
const HBHENegativeEFilter * filter_
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const =0
bool checkPassFilter(const HcalDetId &id, const double *ts, unsigned lenTS) const

Member Data Documentation

◆ filter_

const HBHENegativeEFilter* HBHENegativeFlagSetter::filter_
private

Definition at line 26 of file HBHENegativeFlag.h.

Referenced by configFilter(), and setPulseShapeFlags().