CMS 3D CMS Logo

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

#include <HFQIE10Info.h>

Public Types

typedef HcalDetId key_type
 
typedef QIE10DataFrame::Sample::wide_type raw_type
 

Public Member Functions

constexpr float charge () const
 
constexpr float energy () const
 
constexpr raw_type getRaw (const unsigned which) const
 
constexpr HFQIE10Info ()
 
constexpr HFQIE10Info (const HcalDetId &id, float charge, float energy, float timeRising, float timeFalling, const raw_type *rawData, unsigned nData, unsigned soi)
 
constexpr HcalDetId id () const
 
bool isDataframeOK (bool checkAllTimeSlices=false) const
 
constexpr unsigned nRaw () const
 
constexpr unsigned soi () const
 
constexpr float timeFalling () const
 
constexpr float timeRising () const
 

Static Public Attributes

static const raw_type INVALID_RAW = std::numeric_limits<raw_type>::max()
 
static const unsigned N_RAW_MAX = 5
 

Private Attributes

float charge_
 
float energy_
 
HcalDetId id_
 
uint8_t nRaw_
 
raw_type raw_ [N_RAW_MAX]
 
uint8_t soi_
 
float timeFalling_
 
float timeRising_
 

Detailed Description

Class to contain the info needed to perform HF reconstruction using QIE10 chips and dual-anode readout. Intended for use inside HFPreRecHit.

Definition at line 15 of file HFQIE10Info.h.

Member Typedef Documentation

◆ key_type

Definition at line 17 of file HFQIE10Info.h.

◆ raw_type

Definition at line 18 of file HFQIE10Info.h.

Constructor & Destructor Documentation

◆ HFQIE10Info() [1/2]

constexpr HFQIE10Info::HFQIE10Info ( )
inlineconstexpr

Definition at line 23 of file HFQIE10Info.h.

24  : charge_(0.f),
25  energy_(0.f),
26  timeRising_(0.f),
27  timeFalling_(-1.f),
29  nRaw_(0),
30  soi_(0) {}

References INVALID_RAW.

◆ HFQIE10Info() [2/2]

constexpr HFQIE10Info::HFQIE10Info ( const HcalDetId id,
float  charge,
float  energy,
float  timeRising,
float  timeFalling,
const raw_type rawData,
unsigned  nData,
unsigned  soi 
)
inlineconstexpr

Definition at line 34 of file HFQIE10Info.h.

42  : id_(id),
43  charge_(charge),
44  energy_(energy),
48  nRaw_(std::min(nData, N_RAW_MAX)),
49  soi_(0) {
50  if (nData) {
51  unsigned tbegin = 0;
52  if (soi >= nData) {
53  // No SOI in the data. This situation is not normal
54  // but can not be addressed in this code.
55  if (nData > nRaw_)
56  tbegin = nData - nRaw_;
57  soi_ = nRaw_;
58  } else {
59  if (nData > nRaw_) {
60  // Want to keep at least 2 presamples
61  if (soi > 2U) {
62  tbegin = soi - 2U;
63  if (tbegin + nRaw_ > nData)
64  tbegin = nData - nRaw_;
65  }
66  }
67  soi_ = soi - tbegin;
68  }
69 
70  raw_type* to = &raw_[0];
71  const raw_type* from = rawData + tbegin;
72  for (unsigned i = 0; i < nRaw_; ++i)
73  *to++ = *from++;
74  }
75  }

References INVALID_RAW.

Member Function Documentation

◆ charge()

constexpr float HFQIE10Info::charge ( ) const
inlineconstexpr

Definition at line 79 of file HFQIE10Info.h.

79 { return charge_; }

References charge_.

Referenced by HFPreRecHit::charge(), HFPreRecHit::chargeAsymmetry(), and HFFlexibleTimeCheck::determineAnodeStatus().

◆ energy()

constexpr float HFQIE10Info::energy ( ) const
inlineconstexpr

◆ getRaw()

constexpr raw_type HFQIE10Info::getRaw ( const unsigned  which) const
inlineconstexpr

Definition at line 85 of file HFQIE10Info.h.

85 { return which >= nRaw_ ? INVALID_RAW : raw_[which]; }

References INVALID_RAW, nRaw_, raw_, and eostools::which().

Referenced by HFRecHitAuxSetter::setAux().

◆ id()

constexpr HcalDetId HFQIE10Info::id ( ) const
inlineconstexpr

Definition at line 77 of file HFQIE10Info.h.

77 { return id_; }

References id_.

◆ isDataframeOK()

bool HFQIE10Info::isDataframeOK ( bool  checkAllTimeSlices = false) const
inline

Definition at line 94 of file HFQIE10Info.h.

94  {
95  bool hardwareOK = true;
96  if (soi_ >= nRaw_ || checkAllTimeSlices)
97  for (unsigned i = 0; i < nRaw_ && hardwareOK; ++i) {
99  hardwareOK = s.ok();
100  }
101  else {
103  hardwareOK = s.ok();
104  }
105  return hardwareOK;
106  }

References mps_fire::i, nRaw_, raw_, alignCSCRings::s, and soi_.

Referenced by HFFlexibleTimeCheck::determineAnodeStatus(), and HFSimpleTimeCheck::determineAnodeStatus().

◆ nRaw()

constexpr unsigned HFQIE10Info::nRaw ( ) const
inlineconstexpr

Definition at line 83 of file HFQIE10Info.h.

83 { return nRaw_; }

References nRaw_.

Referenced by HFRecHitAuxSetter::setAux().

◆ soi()

constexpr unsigned HFQIE10Info::soi ( ) const
inlineconstexpr

Definition at line 84 of file HFQIE10Info.h.

84 { return soi_; }

References soi_.

Referenced by HFRecHitAuxSetter::setAux().

◆ timeFalling()

constexpr float HFQIE10Info::timeFalling ( ) const
inlineconstexpr

Definition at line 82 of file HFQIE10Info.h.

82 { return timeFalling_; }

References timeFalling_.

Referenced by HFSimpleTimeCheck::reconstruct().

◆ timeRising()

constexpr float HFQIE10Info::timeRising ( ) const
inlineconstexpr

Member Data Documentation

◆ charge_

float HFQIE10Info::charge_
private

Definition at line 111 of file HFQIE10Info.h.

Referenced by charge().

◆ energy_

float HFQIE10Info::energy_
private

Definition at line 112 of file HFQIE10Info.h.

Referenced by energy().

◆ id_

HcalDetId HFQIE10Info::id_
private

Definition at line 109 of file HFQIE10Info.h.

Referenced by id().

◆ INVALID_RAW

const raw_type HFQIE10Info::INVALID_RAW = std::numeric_limits<raw_type>::max()
static

Definition at line 21 of file HFQIE10Info.h.

Referenced by getRaw(), and HFQIE10Info().

◆ N_RAW_MAX

const unsigned HFQIE10Info::N_RAW_MAX = 5
static

Definition at line 20 of file HFQIE10Info.h.

Referenced by HFPreRecAlgo::reconstruct().

◆ nRaw_

uint8_t HFQIE10Info::nRaw_
private

Definition at line 116 of file HFQIE10Info.h.

Referenced by getRaw(), isDataframeOK(), and nRaw().

◆ raw_

raw_type HFQIE10Info::raw_[N_RAW_MAX]
private

Definition at line 115 of file HFQIE10Info.h.

Referenced by getRaw(), and isDataframeOK().

◆ soi_

uint8_t HFQIE10Info::soi_
private

Definition at line 117 of file HFQIE10Info.h.

Referenced by isDataframeOK(), and soi().

◆ timeFalling_

float HFQIE10Info::timeFalling_
private

Definition at line 114 of file HFQIE10Info.h.

Referenced by timeFalling().

◆ timeRising_

float HFQIE10Info::timeRising_
private

Definition at line 113 of file HFQIE10Info.h.

Referenced by timeRising().

HFQIE10Info::charge_
float charge_
Definition: HFQIE10Info.h:111
HFQIE10Info::energy_
float energy_
Definition: HFQIE10Info.h:112
mps_fire.i
i
Definition: mps_fire.py:428
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
HFQIE10Info::INVALID_RAW
static const raw_type INVALID_RAW
Definition: HFQIE10Info.h:21
min
T min(T a, T b)
Definition: MathUtil.h:58
HFQIE10Info::energy
constexpr float energy() const
Definition: HFQIE10Info.h:80
l1tstage2_dqm_sourceclient-live_cfg.rawData
rawData
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:163
to
HFQIE10Info::charge
constexpr float charge() const
Definition: HFQIE10Info.h:79
HFQIE10Info::id_
HcalDetId id_
Definition: HFQIE10Info.h:109
HFQIE10Info::timeFalling_
float timeFalling_
Definition: HFQIE10Info.h:114
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HFQIE10Info::timeRising
constexpr float timeRising() const
Definition: HFQIE10Info.h:81
HFQIE10Info::timeRising_
float timeRising_
Definition: HFQIE10Info.h:113
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
HFQIE10Info::soi_
uint8_t soi_
Definition: HFQIE10Info.h:117
HFQIE10Info::timeFalling
constexpr float timeFalling() const
Definition: HFQIE10Info.h:82
HFQIE10Info::N_RAW_MAX
static const unsigned N_RAW_MAX
Definition: HFQIE10Info.h:20
HFQIE10Info::raw_type
QIE10DataFrame::Sample::wide_type raw_type
Definition: HFQIE10Info.h:18
HFQIE10Info::raw_
raw_type raw_[N_RAW_MAX]
Definition: HFQIE10Info.h:115
HFQIE10Info::nRaw_
uint8_t nRaw_
Definition: HFQIE10Info.h:116
QIE10DataFrame::Sample
Definition: QIE10DataFrame.h:20
eostools.which
def which(cmd)
Definition: eostools.py:336
HFQIE10Info::soi
constexpr unsigned soi() const
Definition: HFQIE10Info.h:84