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

float charge () const
 
float energy () const
 
raw_type getRaw (const unsigned which) const
 
 HFQIE10Info ()
 
 HFQIE10Info (const HcalDetId &id, float charge, float energy, float timeRising, float timeFalling, const raw_type *rawData, unsigned nData, unsigned soi)
 
HcalDetId id () const
 
bool isDataframeOK (bool checkAllTimeSlices=false) const
 
unsigned nRaw () const
 
unsigned soi () const
 
float timeFalling () const
 
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

Definition at line 18 of file HFQIE10Info.h.

Definition at line 19 of file HFQIE10Info.h.

Constructor & Destructor Documentation

HFQIE10Info::HFQIE10Info ( )

Definition at line 8 of file HFQIE10Info.cc.

References INVALID_RAW, nRaw_, and soi_.

9  : charge_(0.f),
10  energy_(0.f),
11  timeRising_(0.f),
12  timeFalling_(-1.f),
14  nRaw_(0),
15  soi_(0)
16 {
17 }
float timeFalling_
Definition: HFQIE10Info.h:58
double f[11][100]
float timeRising_
Definition: HFQIE10Info.h:57
raw_type raw_[N_RAW_MAX]
Definition: HFQIE10Info.h:59
uint8_t soi_
Definition: HFQIE10Info.h:61
float charge_
Definition: HFQIE10Info.h:55
static const raw_type INVALID_RAW
Definition: HFQIE10Info.h:22
uint8_t nRaw_
Definition: HFQIE10Info.h:60
float energy_
Definition: HFQIE10Info.h:56
HFQIE10Info::HFQIE10Info ( const HcalDetId id,
float  charge,
float  energy,
float  timeRising,
float  timeFalling,
const raw_type rawData,
unsigned  nData,
unsigned  soi 
)

Definition at line 19 of file HFQIE10Info.cc.

References mps_fire::i, INVALID_RAW, min(), N_RAW_MAX, nRaw_, raw_, soi_, and mitigatedMETSequence_cff::U.

24  : id_(id),
25  charge_(i_charge),
26  energy_(i_energy),
27  timeRising_(i_timeRising),
28  timeFalling_(i_timeFalling),
30  nRaw_(std::min(nData, N_RAW_MAX)),
31  soi_(0)
32 {
33  if (nData)
34  {
35  unsigned tbegin = 0;
36  if (i_soi >= nData)
37  {
38  // No SOI in the data. This situation is not normal
39  // but can not be addressed in this code.
40  if (nData > nRaw_)
41  tbegin = nData - nRaw_;
42  soi_ = nRaw_;
43  }
44  else
45  {
46  if (nData > nRaw_)
47  {
48  // Want to keep at least 2 presamples
49  if (i_soi > 2U)
50  {
51  tbegin = i_soi - 2U;
52  if (tbegin + nRaw_ > nData)
53  tbegin = nData - nRaw_;
54  }
55  }
56  soi_ = i_soi - tbegin;
57  }
58 
59  raw_type* to = &raw_[0];
60  const raw_type* from = rawData + tbegin;
61  for (unsigned i=0; i<nRaw_; ++i)
62  *to++ = *from++;
63  }
64 }
float timeFalling_
Definition: HFQIE10Info.h:58
HcalDetId id_
Definition: HFQIE10Info.h:53
T min(T a, T b)
Definition: MathUtil.h:58
QIE10DataFrame::Sample::wide_type raw_type
Definition: HFQIE10Info.h:19
float timeRising_
Definition: HFQIE10Info.h:57
raw_type raw_[N_RAW_MAX]
Definition: HFQIE10Info.h:59
uint8_t soi_
Definition: HFQIE10Info.h:61
static const unsigned N_RAW_MAX
Definition: HFQIE10Info.h:21
float charge_
Definition: HFQIE10Info.h:55
static const raw_type INVALID_RAW
Definition: HFQIE10Info.h:22
uint8_t nRaw_
Definition: HFQIE10Info.h:60
float energy_
Definition: HFQIE10Info.h:56

Member Function Documentation

float HFQIE10Info::charge ( ) const
inline

Definition at line 34 of file HFQIE10Info.h.

References charge_.

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

34 {return charge_;}
float charge_
Definition: HFQIE10Info.h:55
float HFQIE10Info::energy ( ) const
inline
raw_type HFQIE10Info::getRaw ( const unsigned  which) const
inline

Definition at line 40 of file HFQIE10Info.h.

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

Referenced by HFRecHitAuxSetter::setAux().

41  {return which >= nRaw_ ? INVALID_RAW : raw_[which];}
raw_type raw_[N_RAW_MAX]
Definition: HFQIE10Info.h:59
def which(cmd)
Definition: eostools.py:335
static const raw_type INVALID_RAW
Definition: HFQIE10Info.h:22
uint8_t nRaw_
Definition: HFQIE10Info.h:60
HcalDetId HFQIE10Info::id ( ) const
inline

Definition at line 32 of file HFQIE10Info.h.

References id_.

Referenced by HFPreReconstructor::fillInfos().

32 {return id_;}
HcalDetId id_
Definition: HFQIE10Info.h:53
bool HFQIE10Info::isDataframeOK ( bool  checkAllTimeSlices = false) const

Definition at line 66 of file HFQIE10Info.cc.

References mps_fire::i, nRaw_, QIE10DataFrame::Sample::ok(), raw_, alignCSCRings::s, and soi_.

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

67 {
68  bool hardwareOK = true;
69  if (soi_ >= nRaw_ || checkAllTimeSlices)
70  for (unsigned i=0; i<nRaw_ && hardwareOK; ++i)
71  {
73  hardwareOK = s.ok();
74  }
75  else
76  {
78  hardwareOK = s.ok();
79  }
80  return hardwareOK;
81 }
raw_type raw_[N_RAW_MAX]
Definition: HFQIE10Info.h:59
uint8_t soi_
Definition: HFQIE10Info.h:61
uint8_t nRaw_
Definition: HFQIE10Info.h:60
unsigned HFQIE10Info::nRaw ( ) const
inline

Definition at line 38 of file HFQIE10Info.h.

References nRaw_.

Referenced by HFRecHitAuxSetter::setAux().

38 {return nRaw_;}
uint8_t nRaw_
Definition: HFQIE10Info.h:60
unsigned HFQIE10Info::soi ( ) const
inline

Definition at line 39 of file HFQIE10Info.h.

References soi_.

Referenced by HFRecHitAuxSetter::setAux().

39 {return soi_;}
uint8_t soi_
Definition: HFQIE10Info.h:61
float HFQIE10Info::timeFalling ( ) const
inline

Definition at line 37 of file HFQIE10Info.h.

References timeFalling_.

Referenced by HFSimpleTimeCheck::reconstruct().

37 {return timeFalling_;}
float timeFalling_
Definition: HFQIE10Info.h:58
float HFQIE10Info::timeRising ( ) const
inline

Member Data Documentation

float HFQIE10Info::charge_
private

Definition at line 55 of file HFQIE10Info.h.

Referenced by charge().

float HFQIE10Info::energy_
private

Definition at line 56 of file HFQIE10Info.h.

Referenced by energy().

HcalDetId HFQIE10Info::id_
private

Definition at line 53 of file HFQIE10Info.h.

Referenced by id().

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

Definition at line 22 of file HFQIE10Info.h.

Referenced by HFQIE10Info().

const unsigned HFQIE10Info::N_RAW_MAX = 5
static

Definition at line 21 of file HFQIE10Info.h.

Referenced by HFQIE10Info(), and HFPreRecAlgo::reconstruct().

uint8_t HFQIE10Info::nRaw_
private

Definition at line 60 of file HFQIE10Info.h.

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

raw_type HFQIE10Info::raw_[N_RAW_MAX]
private

Definition at line 59 of file HFQIE10Info.h.

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

uint8_t HFQIE10Info::soi_
private

Definition at line 61 of file HFQIE10Info.h.

Referenced by HFQIE10Info(), isDataframeOK(), and soi().

float HFQIE10Info::timeFalling_
private

Definition at line 58 of file HFQIE10Info.h.

Referenced by timeFalling().

float HFQIE10Info::timeRising_
private

Definition at line 57 of file HFQIE10Info.h.

Referenced by timeRising().