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 ( )
inline

Definition at line 16 of file HBHENegativeFlag.h.

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

Member Function Documentation

void HBHENegativeFlagSetter::configFilter ( const HBHENegativeEFilter f)
inline

Definition at line 18 of file HBHENegativeFlag.h.

References f, filter_, photonIsolationHIProducer_cfi::hbhe, and setPulseShapeFlags().

18 { filter_ = f; }
const HBHENegativeEFilter * filter_
double f[11][100]
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(), fwrapper::cs, filter_, HcalCaloFlagLabels::HBHENegativeNoise, mps_fire::i, HBHERecHit::id(), CaloSamples::MAXSAMPLES, HcalCalibrations::pedestal(), CaloRecHit::setFlagField(), and CaloSamples::size().

Referenced by configFilter().

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
unique_ptr< ClusterSequence > cs
HcalDetId id() const
get the id
Definition: HBHERecHit.h:39
constexpr void setFlagField(uint32_t value, int base, int width=1)
Definition: CaloRecHit.h:36
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

Member Data Documentation

const HBHENegativeEFilter* HBHENegativeFlagSetter::filter_
private

Definition at line 26 of file HBHENegativeFlag.h.

Referenced by configFilter(), and setPulseShapeFlags().