ATLAS Offline Software
Enumerations | Functions
LVL1::gFEX Namespace Reference

Enumerations

enum  FPGA { FPGA::A, FPGA::B, FPGA::C, FPGA::N_FPGAS }
 

Functions

FPGA getFPGA (float eta)
 Get the FPGA code from the tower eta. More...
 
std::string FPGAToString (FPGA fpga)
 Get the name of an FPGA. More...
 
FPGA FPGAFromString (std::string name)
 Get the enum from the name of an FPGA. Returning N_FPGA means that the string wasn't correct. More...
 
float towerArea (float eta)
 Get the GCaloTower areas from their eta bins. More...
 

Enumeration Type Documentation

◆ FPGA

enum LVL1::gFEX::FPGA
strong
Enumerator
N_FPGAS 

Definition at line 16 of file GTowerHelpers.h.

17  {
18  A,
19  B,
20  C,
21  N_FPGAS
22  };

Function Documentation

◆ FPGAFromString()

FPGA LVL1::gFEX::FPGAFromString ( std::string  name)

Get the enum from the name of an FPGA. Returning N_FPGA means that the string wasn't correct.

Definition at line 45 of file GTowerHelpers.cxx.

46  {
47  // Convert the string to uppercase
48  std::transform(name.begin(), name.end(), name.begin(), toupper);
49  if (name == "A")
50  return FPGA::A;
51  else if (name == "B")
52  return FPGA::B;
53  else if (name == "C")
54  return FPGA::C;
55  else
56  return FPGA::N_FPGAS;
57  }

◆ FPGAToString()

std::string LVL1::gFEX::FPGAToString ( FPGA  fpga)

Get the name of an FPGA.

Definition at line 29 of file GTowerHelpers.cxx.

30  {
31  switch (fpga)
32  {
33  case FPGA::A:
34  return "A";
35  case FPGA::B:
36  return "B";
37  case FPGA::C:
38  return "C";
39  default:
40  return "NOTANFPGA";
41  }
42  }

◆ getFPGA()

FPGA LVL1::gFEX::getFPGA ( float  eta)

Get the FPGA code from the tower eta.

Definition at line 15 of file GTowerHelpers.cxx.

16  {
17  if (eta > -2.5 && eta <= 0)
18  return FPGA::A;
19  else if (eta > 0 && eta <= 2.5)
20  return FPGA::B;
21  else if (std::abs(eta) > 2.5)
22  return FPGA::C;
23  else
24  // Given the conditions above this should never trigger...
25  return FPGA::N_FPGAS;
26  }

◆ towerArea()

float LVL1::gFEX::towerArea ( float  eta)

Get the GCaloTower areas from their eta bins.

Definition at line 59 of file GTowerHelpers.cxx.

60  {
61  eta = std::abs(eta);
62  if (eta < 2.4)
63  return 1;
64  else if (eta < 2.5)
65  return 0.5;
66  else if (eta < 3.1)
67  return 1;
68  else
69  return 4;
70  }
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
DMTest::C
C_v1 C
Definition: C.h:26
dqt_zlumi_alleff_HIST.A
A
Definition: dqt_zlumi_alleff_HIST.py:110
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
dqt_zlumi_alleff_HIST.B
B
Definition: dqt_zlumi_alleff_HIST.py:110
LVL1::gFEX::FPGA::N_FPGAS
@ N_FPGAS