ATLAS Offline Software
Static Public Member Functions | Static Protected Attributes | Private Types | List of all members
CaloRecGPU::GainConversion Class Reference

#include <EventInfoDefinitions.h>

Collaboration diagram for CaloRecGPU::GainConversion:

Static Public Member Functions

static constexpr GainType invalid_gain ()
 
static constexpr GainType max_gain_value ()
 
static constexpr GainType min_gain_value ()
 
static constexpr GainType num_gain_values ()
 
template<class T >
static constexpr bool is_valid (const T &gain)
 
static constexpr GainType from_standard_gain (const int gain)
 

Static Protected Attributes

constexpr static GainType s_TileLowLow = 0
 
constexpr static GainType s_TileLowHigh = 1
 
constexpr static GainType s_TileHighLow = 2
 
constexpr static GainType s_TileHighHigh = 3
 
constexpr static GainType s_TileOneLow = 0
 
constexpr static GainType s_TileOneHigh = 3
 
constexpr static GainType s_LArHigh = 0
 
constexpr static GainType s_LArMedium = 1
 
constexpr static GainType s_LArLow = 2
 
constexpr static GainType s_InvalidCell = 4
 
constexpr static GainType s_gain_values_minimum = 0
 
constexpr static GainType s_gain_values_maximum = 4
 

Private Types

using GainType = unsigned int
 

Detailed Description

Provides utility functions to handle the gain conversion.

Definition at line 27 of file EventInfoDefinitions.h.

Member Typedef Documentation

◆ GainType

using CaloRecGPU::GainConversion::GainType = unsigned int
private

Definition at line 29 of file EventInfoDefinitions.h.

Member Function Documentation

◆ from_standard_gain()

static constexpr GainType CaloRecGPU::GainConversion::from_standard_gain ( const int  gain)
inlinestaticconstexpr

Definition at line 77 of file EventInfoDefinitions.h.

79  {
80  switch (gain)
81  {
82  case -16: //Tile LOWLOW
83  return s_TileLowLow;
84  case -15: //Tile LOWHIGH
85  return s_TileLowHigh;
86  case -12: //Tile HIGHLOW
87  return s_TileHighLow;
88  case -11: //Tile HIGHHIGH
89  return s_TileHighHigh;
90  case -4 : //Tile ONELOW
91  return s_TileOneLow;
92  case -3 : //Tile ONEHIGH
93  return s_TileOneHigh;
94  case 0 : //LAr High
95  return s_LArHigh;
96  case 1 : //LAr Medium
97  return s_LArMedium;
98  case 2 : //Lar Low
99  return s_LArLow;
100  default:
101  return s_InvalidCell;
102  }
103  }

◆ invalid_gain()

static constexpr GainType CaloRecGPU::GainConversion::invalid_gain ( )
inlinestaticconstexpr

Definition at line 51 of file EventInfoDefinitions.h.

52  {
53  return s_InvalidCell;
54  }

◆ is_valid()

template<class T >
static constexpr bool CaloRecGPU::GainConversion::is_valid ( const T &  gain)
inlinestaticconstexpr

Definition at line 72 of file EventInfoDefinitions.h.

73  {
74  return gain != s_InvalidCell;
75  }

◆ max_gain_value()

static constexpr GainType CaloRecGPU::GainConversion::max_gain_value ( )
inlinestaticconstexpr

Definition at line 56 of file EventInfoDefinitions.h.

57  {
58  return s_gain_values_maximum;
59  }

◆ min_gain_value()

static constexpr GainType CaloRecGPU::GainConversion::min_gain_value ( )
inlinestaticconstexpr

Definition at line 61 of file EventInfoDefinitions.h.

62  {
63  return s_gain_values_minimum;
64  }

◆ num_gain_values()

static constexpr GainType CaloRecGPU::GainConversion::num_gain_values ( )
inlinestaticconstexpr

Definition at line 66 of file EventInfoDefinitions.h.

67  {
68  return max_gain_value() - min_gain_value() + 1;
69  }

Member Data Documentation

◆ s_gain_values_maximum

constexpr static GainType CaloRecGPU::GainConversion::s_gain_values_maximum = 4
staticconstexprprotected

Definition at line 48 of file EventInfoDefinitions.h.

◆ s_gain_values_minimum

constexpr static GainType CaloRecGPU::GainConversion::s_gain_values_minimum = 0
staticconstexprprotected

Definition at line 47 of file EventInfoDefinitions.h.

◆ s_InvalidCell

constexpr static GainType CaloRecGPU::GainConversion::s_InvalidCell = 4
staticconstexprprotected

Definition at line 45 of file EventInfoDefinitions.h.

◆ s_LArHigh

constexpr static GainType CaloRecGPU::GainConversion::s_LArHigh = 0
staticconstexprprotected

Definition at line 41 of file EventInfoDefinitions.h.

◆ s_LArLow

constexpr static GainType CaloRecGPU::GainConversion::s_LArLow = 2
staticprotected

Definition at line 43 of file EventInfoDefinitions.h.

◆ s_LArMedium

constexpr static GainType CaloRecGPU::GainConversion::s_LArMedium = 1
staticprotected

Definition at line 42 of file EventInfoDefinitions.h.

◆ s_TileHighHigh

constexpr static GainType CaloRecGPU::GainConversion::s_TileHighHigh = 3
staticprotected

Definition at line 35 of file EventInfoDefinitions.h.

◆ s_TileHighLow

constexpr static GainType CaloRecGPU::GainConversion::s_TileHighLow = 2
staticprotected

Definition at line 34 of file EventInfoDefinitions.h.

◆ s_TileLowHigh

constexpr static GainType CaloRecGPU::GainConversion::s_TileLowHigh = 1
staticprotected

Definition at line 33 of file EventInfoDefinitions.h.

◆ s_TileLowLow

constexpr static GainType CaloRecGPU::GainConversion::s_TileLowLow = 0
staticconstexprprotected

Definition at line 32 of file EventInfoDefinitions.h.

◆ s_TileOneHigh

constexpr static GainType CaloRecGPU::GainConversion::s_TileOneHigh = 3
staticprotected

Definition at line 38 of file EventInfoDefinitions.h.

◆ s_TileOneLow

constexpr static GainType CaloRecGPU::GainConversion::s_TileOneLow = 0
staticconstexprprotected

Definition at line 37 of file EventInfoDefinitions.h.


The documentation for this class was generated from the following file:
CaloRecGPU::GainConversion::s_LArLow
constexpr static GainType s_LArLow
Definition: EventInfoDefinitions.h:43
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
CaloRecGPU::GainConversion::s_TileLowHigh
constexpr static GainType s_TileLowHigh
Definition: EventInfoDefinitions.h:33
CaloRecGPU::GainConversion::s_gain_values_maximum
constexpr static GainType s_gain_values_maximum
Definition: EventInfoDefinitions.h:48
CaloRecGPU::GainConversion::s_TileLowLow
constexpr static GainType s_TileLowLow
Definition: EventInfoDefinitions.h:32
CaloRecGPU::GainConversion::s_TileOneLow
constexpr static GainType s_TileOneLow
Definition: EventInfoDefinitions.h:37
CaloRecGPU::GainConversion::s_gain_values_minimum
constexpr static GainType s_gain_values_minimum
Definition: EventInfoDefinitions.h:47
CaloRecGPU::GainConversion::s_LArHigh
constexpr static GainType s_LArHigh
Definition: EventInfoDefinitions.h:41
CaloRecGPU::GainConversion::s_TileHighLow
constexpr static GainType s_TileHighLow
Definition: EventInfoDefinitions.h:34
CaloRecGPU::GainConversion::s_TileOneHigh
constexpr static GainType s_TileOneHigh
Definition: EventInfoDefinitions.h:38
CaloRecGPU::GainConversion::s_TileHighHigh
constexpr static GainType s_TileHighHigh
Definition: EventInfoDefinitions.h:35
CaloRecGPU::GainConversion::min_gain_value
static constexpr GainType min_gain_value()
Definition: EventInfoDefinitions.h:61
CaloRecGPU::GainConversion::s_InvalidCell
constexpr static GainType s_InvalidCell
Definition: EventInfoDefinitions.h:45
CaloRecGPU::GainConversion::max_gain_value
static constexpr GainType max_gain_value()
Definition: EventInfoDefinitions.h:56
CaloRecGPU::GainConversion::s_LArMedium
constexpr static GainType s_LArMedium
Definition: EventInfoDefinitions.h:42