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 DEFAULT_ccTIME = -999.f
 
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

◆ getTDCTime()

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

Definition at line 57 of file HcalSpecialTimes.h.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), 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().

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

◆ isSpecial()

constexpr bool HcalSpecialTimes::isSpecial ( const float  t)
inline

Variable Documentation

◆ DEFAULT_ccTIME

constexpr float HcalSpecialTimes::DEFAULT_ccTIME = -999.f

Definition at line 55 of file HcalSpecialTimes.h.

Referenced by MahiFit::ccTime().

◆ UNKNOWN_T_50TO57

constexpr float HcalSpecialTimes::UNKNOWN_T_50TO57 = -130.f

Definition at line 50 of file HcalSpecialTimes.h.

Referenced by getTDCTime().

◆ UNKNOWN_T_DLL_FAILURE

constexpr float HcalSpecialTimes::UNKNOWN_T_DLL_FAILURE = -115.f

Definition at line 38 of file HcalSpecialTimes.h.

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

◆ UNKNOWN_T_INVALID_CODE

constexpr float HcalSpecialTimes::UNKNOWN_T_INVALID_CODE = -105.f

Definition at line 31 of file HcalSpecialTimes.h.

Referenced by getTDCTime().

◆ UNKNOWN_T_INVALID_RANGE

constexpr float HcalSpecialTimes::UNKNOWN_T_INVALID_RANGE = -125.f

Definition at line 45 of file HcalSpecialTimes.h.

Referenced by getTDCTime().

◆ UNKNOWN_T_NOTDC

constexpr float HcalSpecialTimes::UNKNOWN_T_NOTDC = -120.f

◆ UNKNOWN_T_OVERSHOOT

constexpr float HcalSpecialTimes::UNKNOWN_T_OVERSHOOT = -110.f

Definition at line 35 of file HcalSpecialTimes.h.

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

◆ UNKNOWN_T_UNDERSHOOT

constexpr float HcalSpecialTimes::UNKNOWN_T_UNDERSHOOT = -100.f