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 17 of file HBHENegativeFlag.h.

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

Member Function Documentation

void HBHENegativeFlagSetter::configFilter ( const HBHENegativeEFilter f)
inline

Definition at line 19 of file HBHENegativeFlag.h.

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

Referenced by HcalHitReconstructor::produce().

19 {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(), and HcalHitReconstructor::produce().

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:74
HcalDetId id() const
get the id
Definition: HBHERecHit.h:25
void setFlagField(uint32_t value, int base, int width=1)
Definition: CaloRecHit.cc:20
double pedestal(int fCapId) const
get pedestal for capid=0..3
bool checkPassFilter(const HcalDetId &id, const double *ts, unsigned lenTS) const
const HBHENegativeEFilter * filter_
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const =0
int size() const
get the size
Definition: CaloSamples.h:24

Member Data Documentation

const HBHENegativeEFilter* HBHENegativeFlagSetter::filter_
private

Definition at line 24 of file HBHENegativeFlag.h.

Referenced by configFilter(), and setPulseShapeFlags().