CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
HBHEChannelInfo Class Reference

#include <HBHEChannelInfo.h>

Public Types

typedef HcalDetId key_type
 

Public Member Functions

const uint8_t * adc () const
 
int capid () const
 
double chargeInWindow (const unsigned begin, const unsigned end) const
 
void clear ()
 
double darkCurrent () const
 
const float * dFcPerADC () const
 
double energyInWindow (const unsigned begin, const unsigned end) const
 
double fcByPE () const
 
const double * gain () const
 
const double * gainWidth () const
 
bool hasCapidError () const
 
bool hasEffectivePedestals () const
 
bool hasLinkError () const
 
bool hasTimeInfo () const
 
 HBHEChannelInfo ()
 
 HBHEChannelInfo (const bool hasTimeFromTDC, const bool hasEffectivePed)
 
HcalDetId id () const
 
bool isDropped () const
 
double lambda () const
 
unsigned nSamples () const
 
uint8_t peakAdcValue (const unsigned begin, const unsigned end) const
 
unsigned peakChargeTS (const unsigned begin, const unsigned end) const
 
unsigned peakEnergyTS (const unsigned begin, const unsigned end) const
 
const double * pedestal () const
 
const double * pedestalWidth () const
 
const double * rawCharge () const
 
int recoShape () const
 
const float * riseTime () const
 
void setChannelInfo (const HcalDetId &detId, const int recoShape, const unsigned nSamp, const unsigned iSoi, const int iCapid, const double darkCurrent, const double fcByPE, const double lambda, const bool linkError, const bool capidError, const bool dropThisChannel)
 
void setSample (const unsigned ts, const uint8_t rawADC, const float differentialChargeGain, const double q, const double ped, const double pedWidth, const double g, const double gainWidth, const float t)
 
unsigned soi () const
 
float soiRiseTime () const
 
void tagAsDropped ()
 
uint8_t tsAdc (const unsigned ts) const
 
double tsCharge (const unsigned ts) const
 
float tsDFcPerADC (const unsigned ts) const
 
double tsEnergy (const unsigned ts) const
 
double tsGain (const unsigned ts) const
 
double tsGainWidth (const unsigned ts) const
 
double tsPedestal (const unsigned ts) const
 
double tsPedestalWidth (const unsigned ts) const
 
double tsRawCharge (const unsigned ts) const
 
float tsRiseTime (const unsigned ts) const
 

Static Public Attributes

static const unsigned MAXSAMPLES = 10
 

Private Attributes

uint8_t adc_ [MAXSAMPLES]
 
int32_t capid_
 
double darkCurrent_
 
float dFcPerADC_ [MAXSAMPLES]
 
bool dropped_
 
double fcByPE_
 
double gain_ [MAXSAMPLES]
 
double gainWidth_ [MAXSAMPLES]
 
bool hasCapidError_
 
bool hasEffectivePedestals_
 
bool hasLinkError_
 
bool hasTimeInfo_
 
HcalDetId id_
 
double lambda_
 
uint32_t nSamples_
 
double pedestal_ [MAXSAMPLES]
 
double pedestalWidth_ [MAXSAMPLES]
 
double rawCharge_ [MAXSAMPLES]
 
int32_t recoShape_
 
float riseTime_ [MAXSAMPLES]
 
uint32_t soi_
 

Detailed Description

Unpacked charge and TDC information in a format which works for both QIE8 and QIE11

Definition at line 14 of file HBHEChannelInfo.h.

Member Typedef Documentation

Definition at line 17 of file HBHEChannelInfo.h.

Constructor & Destructor Documentation

HBHEChannelInfo::HBHEChannelInfo ( )
inline

Definition at line 21 of file HBHEChannelInfo.h.

22  : rawCharge_{0.}, pedestal_{0.}, pedestalWidth_{0.},
23  gain_{0.}, gainWidth_{0.}, riseTime_{0.f}, adc_{0},
24  dFcPerADC_{0.f}, hasTimeInfo_(false), hasEffectivePedestals_(false) {clear();}
double gainWidth_[MAXSAMPLES]
float dFcPerADC_[MAXSAMPLES]
double pedestalWidth_[MAXSAMPLES]
uint8_t adc_[MAXSAMPLES]
double gain_[MAXSAMPLES]
double pedestal_[MAXSAMPLES]
double rawCharge_[MAXSAMPLES]
float riseTime_[MAXSAMPLES]
HBHEChannelInfo::HBHEChannelInfo ( const bool  hasTimeFromTDC,
const bool  hasEffectivePed 
)
inlineexplicit

Definition at line 26 of file HBHEChannelInfo.h.

27  : rawCharge_{0.}, pedestal_{0.}, pedestalWidth_{0.},
28  gain_{0.}, gainWidth_{0.}, riseTime_{0.f}, adc_{0},
29  dFcPerADC_{0.f}, hasTimeInfo_(hasTimeFromTDC),
30  hasEffectivePedestals_(hasEffectivePed) {clear();}
double gainWidth_[MAXSAMPLES]
float dFcPerADC_[MAXSAMPLES]
double pedestalWidth_[MAXSAMPLES]
uint8_t adc_[MAXSAMPLES]
double gain_[MAXSAMPLES]
double pedestal_[MAXSAMPLES]
double rawCharge_[MAXSAMPLES]
float riseTime_[MAXSAMPLES]

Member Function Documentation

const uint8_t* HBHEChannelInfo::adc ( ) const
inline

Definition at line 110 of file HBHEChannelInfo.h.

References adc_.

110 {return adc_;}
uint8_t adc_[MAXSAMPLES]
int HBHEChannelInfo::capid ( ) const
inline

Definition at line 94 of file HBHEChannelInfo.h.

References capid_.

Referenced by HBHERecHitAuxSetter::setAux().

94 {return capid_;}
double HBHEChannelInfo::chargeInWindow ( const unsigned  begin,
const unsigned  end 
) const
inline

Definition at line 138 of file HBHEChannelInfo.h.

References mps_fire::i, nSamples_, pedestal_, and rawCharge_.

Referenced by SimpleHBHEPhase1Algo::reconstruct().

139  {
140  double sum = 0.0;
141  const unsigned imax = end < nSamples_ ? end : nSamples_;
142  for (unsigned i=begin; i<imax; ++i)
143  sum += (rawCharge_[i] - pedestal_[i]);
144  return sum;
145  }
#define end
Definition: vmac.h:39
double pedestal_[MAXSAMPLES]
double rawCharge_[MAXSAMPLES]
#define begin
Definition: vmac.h:32
void HBHEChannelInfo::clear ( void  )
inline

Definition at line 32 of file HBHEChannelInfo.h.

References capid_, darkCurrent_, dropped_, fcByPE_, hasCapidError_, hasLinkError_, id_, lambda_, nSamples_, recoShape_, soi_, and mitigatedMETSequence_cff::U.

Referenced by Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), Vispa.Views.WidgetView.WidgetView::setDataObjects(), BeautifulSoup.Tag::setString(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), and Vispa.Views.PropertyView.PropertyView::updateContent().

33  {
34  id_ = HcalDetId(0U);
35  recoShape_ = 0;
36  nSamples_ = 0;
37  soi_ = 0;
38  capid_ = 0;
39  darkCurrent_ = 0;
40  fcByPE_ = 0;
41  lambda_ = 0,
42  dropped_ = true;
43  hasLinkError_ = false;
44  hasCapidError_ = false;
45  }
double HBHEChannelInfo::darkCurrent ( ) const
inline

Definition at line 97 of file HBHEChannelInfo.h.

References darkCurrent_.

Referenced by setChannelInfo().

97 {return darkCurrent_;}
const float* HBHEChannelInfo::dFcPerADC ( ) const
inline

Definition at line 111 of file HBHEChannelInfo.h.

References dFcPerADC_.

111 {return dFcPerADC_;}
float dFcPerADC_[MAXSAMPLES]
double HBHEChannelInfo::energyInWindow ( const unsigned  begin,
const unsigned  end 
) const
inline

Definition at line 147 of file HBHEChannelInfo.h.

References gain_, mps_fire::i, nSamples_, pedestal_, and rawCharge_.

Referenced by SimpleHBHEPhase1Algo::m0Energy().

148  {
149  double sum = 0.0;
150  const unsigned imax = end < nSamples_ ? end : nSamples_;
151  for (unsigned i=begin; i<imax; ++i)
152  sum += (rawCharge_[i] - pedestal_[i])*gain_[i];
153  return sum;
154  }
#define end
Definition: vmac.h:39
double gain_[MAXSAMPLES]
double pedestal_[MAXSAMPLES]
double rawCharge_[MAXSAMPLES]
#define begin
Definition: vmac.h:32
double HBHEChannelInfo::fcByPE ( ) const
inline
const double* HBHEChannelInfo::gain ( ) const
inline

Definition at line 108 of file HBHEChannelInfo.h.

References gain_.

108 {return gain_;}
double gain_[MAXSAMPLES]
const double* HBHEChannelInfo::gainWidth ( ) const
inline

Definition at line 109 of file HBHEChannelInfo.h.

References gainWidth_.

Referenced by setSample().

109 {return gainWidth_;}
double gainWidth_[MAXSAMPLES]
bool HBHEChannelInfo::hasCapidError ( ) const
inline

Definition at line 102 of file HBHEChannelInfo.h.

References hasCapidError_.

Referenced by HBHERecHitAuxSetter::setAux().

102 {return hasCapidError_;}
bool HBHEChannelInfo::hasEffectivePedestals ( ) const
inline

Definition at line 96 of file HBHEChannelInfo.h.

References hasEffectivePedestals_.

96 {return hasEffectivePedestals_;}
bool HBHEChannelInfo::hasLinkError ( ) const
inline

Definition at line 101 of file HBHEChannelInfo.h.

References hasLinkError_.

Referenced by HBHERecHitAuxSetter::setAux().

101 {return hasLinkError_;}
bool HBHEChannelInfo::hasTimeInfo ( ) const
inline
HcalDetId HBHEChannelInfo::id ( ) const
inline
bool HBHEChannelInfo::isDropped ( ) const
inline

Definition at line 100 of file HBHEChannelInfo.h.

References dropped_.

Referenced by HBHEPhase1Reconstructor::processData(), and HBHERecHitAuxSetter::setAux().

100 {return dropped_;}
double HBHEChannelInfo::lambda ( ) const
inline

Definition at line 99 of file HBHEChannelInfo.h.

References lambda_.

Referenced by setChannelInfo().

99 {return lambda_;}
unsigned HBHEChannelInfo::nSamples ( ) const
inline
uint8_t HBHEChannelInfo::peakAdcValue ( const unsigned  begin,
const unsigned  end 
) const
inline

Definition at line 194 of file HBHEChannelInfo.h.

References adc_, mps_fire::i, and nSamples_.

195  {
196  uint8_t peak = 0;
197  const unsigned imax = end < nSamples_ ? end : nSamples_;
198  for (unsigned i=begin; i<imax; ++i)
199  if (adc_[i] > peak)
200  peak = adc_[i];
201  return peak;
202  }
#define end
Definition: vmac.h:39
uint8_t adc_[MAXSAMPLES]
#define begin
Definition: vmac.h:32
unsigned HBHEChannelInfo::peakChargeTS ( const unsigned  begin,
const unsigned  end 
) const
inline

Definition at line 158 of file HBHEChannelInfo.h.

References mps_fire::i, MAXSAMPLES, nSamples_, pedestal_, lumiQueryAPI::q, and rawCharge_.

159  {
160  unsigned iPeak = MAXSAMPLES;
161  double dmax = -DBL_MAX;
162  const unsigned imax = end < nSamples_ ? end : nSamples_;
163  for (unsigned i=begin; i<imax; ++i)
164  {
165  const double q = rawCharge_[i] - pedestal_[i];
166  if (q > dmax)
167  {
168  dmax = q;
169  iPeak = i;
170  }
171  }
172  return iPeak;
173  }
static const unsigned MAXSAMPLES
#define end
Definition: vmac.h:39
double pedestal_[MAXSAMPLES]
double rawCharge_[MAXSAMPLES]
#define begin
Definition: vmac.h:32
unsigned HBHEChannelInfo::peakEnergyTS ( const unsigned  begin,
const unsigned  end 
) const
inline

Definition at line 175 of file HBHEChannelInfo.h.

References MillePedeFileConverter_cfg::e, gain_, mps_fire::i, MAXSAMPLES, nSamples_, pedestal_, and rawCharge_.

Referenced by SimpleHBHEPhase1Algo::m0Time().

176  {
177  unsigned iPeak = MAXSAMPLES;
178  double dmax = -DBL_MAX;
179  const unsigned imax = end < nSamples_ ? end : nSamples_;
180  for (unsigned i=begin; i<imax; ++i)
181  {
182  const double e = (rawCharge_[i] - pedestal_[i])*gain_[i];
183  if (e > dmax)
184  {
185  dmax = e;
186  iPeak = i;
187  }
188  }
189  return iPeak;
190  }
static const unsigned MAXSAMPLES
#define end
Definition: vmac.h:39
double gain_[MAXSAMPLES]
double pedestal_[MAXSAMPLES]
double rawCharge_[MAXSAMPLES]
#define begin
Definition: vmac.h:32
const double* HBHEChannelInfo::pedestal ( ) const
inline

Definition at line 106 of file HBHEChannelInfo.h.

References pedestal_.

106 {return pedestal_;}
double pedestal_[MAXSAMPLES]
const double* HBHEChannelInfo::pedestalWidth ( ) const
inline

Definition at line 107 of file HBHEChannelInfo.h.

References pedestalWidth_.

107 {return pedestalWidth_;}
double pedestalWidth_[MAXSAMPLES]
const double* HBHEChannelInfo::rawCharge ( ) const
inline

Definition at line 105 of file HBHEChannelInfo.h.

References rawCharge_.

105 {return rawCharge_;}
double rawCharge_[MAXSAMPLES]
int HBHEChannelInfo::recoShape ( ) const
inline
const float* HBHEChannelInfo::riseTime ( ) const
inline

Definition at line 112 of file HBHEChannelInfo.h.

References hasTimeInfo_, and riseTime_.

113  {if (hasTimeInfo_) return riseTime_; else return nullptr;}
float riseTime_[MAXSAMPLES]
void HBHEChannelInfo::setChannelInfo ( const HcalDetId detId,
const int  recoShape,
const unsigned  nSamp,
const unsigned  iSoi,
const int  iCapid,
const double  darkCurrent,
const double  fcByPE,
const double  lambda,
const bool  linkError,
const bool  capidError,
const bool  dropThisChannel 
)
inline

Definition at line 47 of file HBHEChannelInfo.h.

References capid_, darkCurrent(), darkCurrent_, dropped_, fcByPE(), fcByPE_, hasCapidError_, hasLinkError_, id_, lambda(), lambda_, MAXSAMPLES, nSamples_, recoShape(), recoShape_, and soi_.

Referenced by HBHEPhase1Reconstructor::processData().

52  {
54  id_ = detId;
55  nSamples_ = nSamp < MAXSAMPLES ? nSamp : MAXSAMPLES;
56  soi_ = iSoi;
57  capid_ = iCapid;
59  fcByPE_ = fcByPE;
60  lambda_ = lambda,
61  dropped_ = dropThisChannel;
62  hasLinkError_ = linkError;
63  hasCapidError_ = capidError;
64  }
double lambda() const
static const unsigned MAXSAMPLES
double fcByPE() const
int recoShape() const
double darkCurrent() const
void HBHEChannelInfo::setSample ( const unsigned  ts,
const uint8_t  rawADC,
const float  differentialChargeGain,
const double  q,
const double  ped,
const double  pedWidth,
const double  g,
const double  gainWidth,
const float  t 
)
inline

Definition at line 70 of file HBHEChannelInfo.h.

References adc_, dFcPerADC_, g, gain_, gainWidth(), gainWidth_, pedestal_, pedestalWidth_, lumiQueryAPI::q, rawCharge_, riseTime_, and lumiQTWidget::t.

Referenced by HBHEPhase1Reconstructor::processData().

75  {
76  rawCharge_[ts] = q;
77  riseTime_[ts] = t;
78  adc_[ts] = rawADC;
79  dFcPerADC_[ts] = differentialChargeGain;
80  pedestal_[ts] = ped;
81  gain_[ts] = g;
82  pedestalWidth_[ts] = pedWidth;
83  gainWidth_[ts] = gainWidth;
84  }
double gainWidth_[MAXSAMPLES]
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
const double * gainWidth() const
float dFcPerADC_[MAXSAMPLES]
double pedestalWidth_[MAXSAMPLES]
uint8_t adc_[MAXSAMPLES]
double gain_[MAXSAMPLES]
double pedestal_[MAXSAMPLES]
double rawCharge_[MAXSAMPLES]
float riseTime_[MAXSAMPLES]
unsigned HBHEChannelInfo::soi ( ) const
inline
float HBHEChannelInfo::soiRiseTime ( ) const
inline

Definition at line 131 of file HBHEChannelInfo.h.

References hasTimeInfo_, nSamples_, riseTime_, soi_, and HcalSpecialTimes::UNKNOWN_T_NOTDC.

Referenced by SimpleHBHEPhase1Algo::reconstruct().

132  {
133  return (hasTimeInfo_ && soi_ < nSamples_) ?
135  }
constexpr float UNKNOWN_T_NOTDC
float riseTime_[MAXSAMPLES]
void HBHEChannelInfo::tagAsDropped ( )
inline

Definition at line 66 of file HBHEChannelInfo.h.

References dropped_.

67  {dropped_ = true;}
uint8_t HBHEChannelInfo::tsAdc ( const unsigned  ts) const
inline

Definition at line 125 of file HBHEChannelInfo.h.

References adc_.

Referenced by HBHERecHitAuxSetter::setAux().

125 {return adc_[ts];}
uint8_t adc_[MAXSAMPLES]
double HBHEChannelInfo::tsCharge ( const unsigned  ts) const
inline

Definition at line 121 of file HBHEChannelInfo.h.

References pedestal_, and rawCharge_.

Referenced by HBHEPhase1Reconstructor::runHBHENegativeEFilter().

122  {return rawCharge_[ts] - pedestal_[ts];}
double pedestal_[MAXSAMPLES]
double rawCharge_[MAXSAMPLES]
float HBHEChannelInfo::tsDFcPerADC ( const unsigned  ts) const
inline

Definition at line 126 of file HBHEChannelInfo.h.

References dFcPerADC_.

Referenced by PulseShapeFitOOTPileupCorrection::phase1Apply(), MahiFit::phase1Apply(), and MahiFit::phase1Debug().

126 {return dFcPerADC_[ts];}
float dFcPerADC_[MAXSAMPLES]
double HBHEChannelInfo::tsEnergy ( const unsigned  ts) const
inline

Definition at line 123 of file HBHEChannelInfo.h.

References gain_, pedestal_, and rawCharge_.

Referenced by SimpleHBHEPhase1Algo::m0Time().

124  {return (rawCharge_[ts] - pedestal_[ts])*gain_[ts];}
double gain_[MAXSAMPLES]
double pedestal_[MAXSAMPLES]
double rawCharge_[MAXSAMPLES]
double HBHEChannelInfo::tsGain ( const unsigned  ts) const
inline
double HBHEChannelInfo::tsGainWidth ( const unsigned  ts) const
inline

Definition at line 120 of file HBHEChannelInfo.h.

References gainWidth_.

120 {return gainWidth_[ts];}
double gainWidth_[MAXSAMPLES]
double HBHEChannelInfo::tsPedestal ( const unsigned  ts) const
inline
double HBHEChannelInfo::tsPedestalWidth ( const unsigned  ts) const
inline
double HBHEChannelInfo::tsRawCharge ( const unsigned  ts) const
inline
float HBHEChannelInfo::tsRiseTime ( const unsigned  ts) const
inline

Definition at line 127 of file HBHEChannelInfo.h.

References hasTimeInfo_, riseTime_, and HcalSpecialTimes::UNKNOWN_T_NOTDC.

Referenced by MahiFit::phase1Debug().

constexpr float UNKNOWN_T_NOTDC
float riseTime_[MAXSAMPLES]

Member Data Documentation

uint8_t HBHEChannelInfo::adc_[MAXSAMPLES]
private

Definition at line 231 of file HBHEChannelInfo.h.

Referenced by adc(), peakAdcValue(), setSample(), and tsAdc().

int32_t HBHEChannelInfo::capid_
private

Definition at line 247 of file HBHEChannelInfo.h.

Referenced by capid(), clear(), and setChannelInfo().

double HBHEChannelInfo::darkCurrent_
private

Definition at line 223 of file HBHEChannelInfo.h.

Referenced by clear(), darkCurrent(), and setChannelInfo().

float HBHEChannelInfo::dFcPerADC_[MAXSAMPLES]
private

Definition at line 235 of file HBHEChannelInfo.h.

Referenced by dFcPerADC(), setSample(), and tsDFcPerADC().

bool HBHEChannelInfo::dropped_
private

Definition at line 257 of file HBHEChannelInfo.h.

Referenced by clear(), isDropped(), setChannelInfo(), and tagAsDropped().

double HBHEChannelInfo::fcByPE_
private

Definition at line 224 of file HBHEChannelInfo.h.

Referenced by clear(), fcByPE(), and setChannelInfo().

double HBHEChannelInfo::gain_[MAXSAMPLES]
private

Definition at line 217 of file HBHEChannelInfo.h.

Referenced by energyInWindow(), gain(), peakEnergyTS(), setSample(), tsEnergy(), and tsGain().

double HBHEChannelInfo::gainWidth_[MAXSAMPLES]
private

Definition at line 220 of file HBHEChannelInfo.h.

Referenced by gainWidth(), setSample(), and tsGainWidth().

bool HBHEChannelInfo::hasCapidError_
private

Definition at line 261 of file HBHEChannelInfo.h.

Referenced by clear(), hasCapidError(), and setChannelInfo().

bool HBHEChannelInfo::hasEffectivePedestals_
private

Definition at line 253 of file HBHEChannelInfo.h.

Referenced by hasEffectivePedestals().

bool HBHEChannelInfo::hasLinkError_
private

Definition at line 260 of file HBHEChannelInfo.h.

Referenced by clear(), hasLinkError(), and setChannelInfo().

bool HBHEChannelInfo::hasTimeInfo_
private

Definition at line 250 of file HBHEChannelInfo.h.

Referenced by hasTimeInfo(), riseTime(), soiRiseTime(), and tsRiseTime().

HcalDetId HBHEChannelInfo::id_
private

Definition at line 205 of file HBHEChannelInfo.h.

Referenced by clear(), id(), and setChannelInfo().

double HBHEChannelInfo::lambda_
private

Definition at line 225 of file HBHEChannelInfo.h.

Referenced by clear(), lambda(), and setChannelInfo().

const unsigned HBHEChannelInfo::MAXSAMPLES = 10
static
uint32_t HBHEChannelInfo::nSamples_
private
double HBHEChannelInfo::pedestal_[MAXSAMPLES]
private
double HBHEChannelInfo::pedestalWidth_[MAXSAMPLES]
private

Definition at line 214 of file HBHEChannelInfo.h.

Referenced by pedestalWidth(), setSample(), and tsPedestalWidth().

double HBHEChannelInfo::rawCharge_[MAXSAMPLES]
private
int32_t HBHEChannelInfo::recoShape_
private

Definition at line 238 of file HBHEChannelInfo.h.

Referenced by clear(), recoShape(), and setChannelInfo().

float HBHEChannelInfo::riseTime_[MAXSAMPLES]
private

Definition at line 228 of file HBHEChannelInfo.h.

Referenced by riseTime(), setSample(), soiRiseTime(), and tsRiseTime().

uint32_t HBHEChannelInfo::soi_
private

Definition at line 244 of file HBHEChannelInfo.h.

Referenced by clear(), setChannelInfo(), soi(), and soiRiseTime().