CMS 3D CMS Logo

Functions | Variables
HcalSpecialTimes Namespace Reference

Functions

constexpr float getTDCTime (const int tdc)
 
constexpr bool isSpecial (const float t)
 

Variables

constexpr float UNKNOWN_T_50TO57 = -130.f
 
constexpr float UNKNOWN_T_DLL_FAILURE = -115.f
 
constexpr float UNKNOWN_T_INVALID_CODE = -105.f
 
constexpr float UNKNOWN_T_INVALID_RANGE = -125.f
 
constexpr float UNKNOWN_T_NOTDC = -120.f
 
constexpr float UNKNOWN_T_OVERSHOOT = -110.f
 
constexpr float UNKNOWN_T_UNDERSHOOT = -100.f
 

Function Documentation

constexpr float HcalSpecialTimes::getTDCTime ( const int  tdc)
inline

Definition at line 59 of file HcalSpecialTimes.h.

References constexpr, lumiQTWidget::t, UNKNOWN_T_50TO57, UNKNOWN_T_DLL_FAILURE, UNKNOWN_T_INVALID_CODE, UNKNOWN_T_INVALID_RANGE, UNKNOWN_T_OVERSHOOT, and UNKNOWN_T_UNDERSHOOT.

Referenced by HFPreRecAlgo::reconstruct().

60  {
61  constexpr float tdc_to_ns = 0.5f;
62 
63  constexpr int six_bits_mask = 0x3f;
64  constexpr int tdc_code_largestnormal = 49;
65  constexpr int tdc_code_invalid = 58;
66  constexpr int tdc_code_overshoot = 62;
67  constexpr int tdc_code_undershoot = 63;
68 
69  float t = tdc_to_ns*tdc;
70  if (tdc > six_bits_mask || tdc < 0)
72  else if (tdc > tdc_code_largestnormal)
73  {
74  // The undershoot code happens by far more often
75  // than any other special code. So check for it first.
76  if (tdc == tdc_code_undershoot)
78  else if (tdc == tdc_code_overshoot)
80  else if (tdc == tdc_code_invalid)
82  else if (tdc < tdc_code_invalid)
83  t = UNKNOWN_T_50TO57;
84  else
86  }
87 
88  return t;
89  }
constexpr float UNKNOWN_T_DLL_FAILURE
#define constexpr
constexpr float UNKNOWN_T_UNDERSHOOT
constexpr float UNKNOWN_T_INVALID_RANGE
constexpr float UNKNOWN_T_OVERSHOOT
constexpr float UNKNOWN_T_INVALID_CODE
constexpr float UNKNOWN_T_50TO57
constexpr bool HcalSpecialTimes::isSpecial ( const float  t)
inline

Variable Documentation

constexpr float HcalSpecialTimes::UNKNOWN_T_50TO57 = -130.f

Definition at line 51 of file HcalSpecialTimes.h.

Referenced by getTDCTime().

constexpr float HcalSpecialTimes::UNKNOWN_T_DLL_FAILURE = -115.f

Definition at line 39 of file HcalSpecialTimes.h.

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

constexpr float HcalSpecialTimes::UNKNOWN_T_INVALID_CODE = -105.f

Definition at line 32 of file HcalSpecialTimes.h.

Referenced by getTDCTime().

constexpr float HcalSpecialTimes::UNKNOWN_T_INVALID_RANGE = -125.f

Definition at line 46 of file HcalSpecialTimes.h.

Referenced by getTDCTime().

constexpr float HcalSpecialTimes::UNKNOWN_T_NOTDC = -120.f
constexpr float HcalSpecialTimes::UNKNOWN_T_OVERSHOOT = -110.f

Definition at line 36 of file HcalSpecialTimes.h.

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

constexpr float HcalSpecialTimes::UNKNOWN_T_UNDERSHOOT = -100.f