CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 55 of file HcalSpecialTimes.h.

References submitPVValidationJobs::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().

55  {
56  constexpr float tdc_to_ns = 0.5f;
57 
58  constexpr int six_bits_mask = 0x3f;
59  constexpr int tdc_code_largestnormal = 49;
60  constexpr int tdc_code_invalid = 58;
61  constexpr int tdc_code_overshoot = 62;
62  constexpr int tdc_code_undershoot = 63;
63 
64  float t = tdc_to_ns * tdc;
65  if (tdc > six_bits_mask || tdc < 0)
67  else if (tdc > tdc_code_largestnormal) {
68  // The undershoot code happens by far more often
69  // than any other special code. So check for it first.
70  if (tdc == tdc_code_undershoot)
72  else if (tdc == tdc_code_overshoot)
74  else if (tdc == tdc_code_invalid)
76  else if (tdc < tdc_code_invalid)
77  t = UNKNOWN_T_50TO57;
78  else
80  }
81 
82  return t;
83  }
constexpr float UNKNOWN_T_DLL_FAILURE
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 50 of file HcalSpecialTimes.h.

Referenced by getTDCTime().

constexpr float HcalSpecialTimes::UNKNOWN_T_DLL_FAILURE = -115.f

Definition at line 38 of file HcalSpecialTimes.h.

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

constexpr float HcalSpecialTimes::UNKNOWN_T_INVALID_CODE = -105.f

Definition at line 31 of file HcalSpecialTimes.h.

Referenced by getTDCTime().

constexpr float HcalSpecialTimes::UNKNOWN_T_INVALID_RANGE = -125.f

Definition at line 45 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 35 of file HcalSpecialTimes.h.

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

constexpr float HcalSpecialTimes::UNKNOWN_T_UNDERSHOOT = -100.f