ATLAS Offline Software
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
ITkStripCabling::OnlineIdGenerator Class Reference

#include <OnlineIdGenerator.h>

Collaboration diagram for ITkStripCabling::OnlineIdGenerator:

Public Types

enum  RodId : std::uint32_t {
  BARREL_A = 0x210000, BARREL_C = 0x220000, ENDCAP_A = 0x230000, ENDCAP_C = 0x240000,
  UNKNOWN = 0xFF0000
}
 

Public Member Functions

 OnlineIdGenerator (SCT_ID *pITkIdHelper)
 
ITkStripOnlineId operator() (const Identifier &offId)
 
std::uint32_t rod (const Identifier &offId) const
 
std::uint32_t rod32 (int bec, int layer_disk, int phi, int eta=0) const
 
std::uint32_t barrelLink16 (int eta) const
 
std::uint32_t endcapLink16 (int phi) const
 

Static Public Attributes

static constexpr std::uint32_t INVALID_LINK {0x0000FFFF}
 

Private Attributes

SCT_IDm_pITkId {}
 

Detailed Description

Definition at line 26 of file OnlineIdGenerator.h.

Member Enumeration Documentation

◆ RodId

Enumerator
BARREL_A 
BARREL_C 
ENDCAP_A 
ENDCAP_C 
UNKNOWN 

Definition at line 28 of file OnlineIdGenerator.h.

28  : std::uint32_t {
29  BARREL_A = 0x210000,
30  BARREL_C = 0x220000,
31  ENDCAP_A = 0x230000,
32  ENDCAP_C = 0x240000,
33  UNKNOWN = 0xFF0000
34  };

Constructor & Destructor Documentation

◆ OnlineIdGenerator()

ITkStripCabling::OnlineIdGenerator::OnlineIdGenerator ( SCT_ID pITkIdHelper)

Definition at line 16 of file OnlineIdGenerator.cxx.

16  :m_pITkId(sctId){
17  }

Member Function Documentation

◆ barrelLink16()

std::uint32_t ITkStripCabling::OnlineIdGenerator::barrelLink16 ( int  eta) const

Definition at line 43 of file OnlineIdGenerator.cxx.

43  {
44  return static_cast< std::uint32_t>(std::abs(eta));
45  }

◆ endcapLink16()

std::uint32_t ITkStripCabling::OnlineIdGenerator::endcapLink16 ( int  phi) const

Definition at line 47 of file OnlineIdGenerator.cxx.

47  {
48  return static_cast< std::uint32_t>(phi);
49  }

◆ operator()()

ITkStripOnlineId ITkStripCabling::OnlineIdGenerator::operator() ( const Identifier offId)

Definition at line 52 of file OnlineIdGenerator.cxx.

52  {
53  const int bec = m_pITkId->barrel_ec(offId);
54  const auto absBec = std::abs(bec);
55  const int eta = m_pITkId->eta_module(offId);
56  const int layer_disk = m_pITkId->layer_disk(offId);
57  const int phi = m_pITkId->phi_module(offId);
58  const std::uint32_t rod = rod32(bec, layer_disk, phi, eta);
59  const std::uint32_t fibre = (absBec == 0)? barrelLink16(eta) : endcapLink16(phi);
60  return ITkStripOnlineId(rod,fibre);
61  }

◆ rod()

std::uint32_t ITkStripCabling::OnlineIdGenerator::rod ( const Identifier offId) const

Definition at line 34 of file OnlineIdGenerator.cxx.

34  {
35  const int bec = m_pITkId->barrel_ec(offId);
36  const int eta = m_pITkId->eta_module(offId);
37  const int layer_disk = m_pITkId->layer_disk(offId);
38  const int phi = m_pITkId->phi_module(offId);
39  return rod32(bec, layer_disk, phi, eta);
40  }

◆ rod32()

std::uint32_t ITkStripCabling::OnlineIdGenerator::rod32 ( int  bec,
int  layer_disk,
int  phi,
int  eta = 0 
) const

Definition at line 20 of file OnlineIdGenerator.cxx.

20  {
22  const auto absBec = std::abs(bec);
23  if (bec == 0){
24  result = (eta>0) ? BARREL_A : BARREL_C;
25  result |= (static_cast<std::uint32_t>(phi)<<8);
26  } else if (absBec == 2){
27  result = (bec>0)? ENDCAP_A:ENDCAP_C;
28  result |= (static_cast<std::uint32_t>(std::abs(eta))<<8);
29  }
30  return result+layer_disk;
31  }

Member Data Documentation

◆ INVALID_LINK

constexpr std::uint32_t ITkStripCabling::OnlineIdGenerator::INVALID_LINK {0x0000FFFF}
staticconstexpr

Definition at line 35 of file OnlineIdGenerator.h.

◆ m_pITkId

SCT_ID* ITkStripCabling::OnlineIdGenerator::m_pITkId {}
private

Definition at line 47 of file OnlineIdGenerator.h.


The documentation for this class was generated from the following files:
python.StoreID.UNKNOWN
int UNKNOWN
Definition: StoreID.py:16
test_pyathena.eta
eta
Definition: test_pyathena.py:10
get_generator_info.result
result
Definition: get_generator_info.py:21
ParticleGun_SamplingFraction.bec
int bec
Definition: ParticleGun_SamplingFraction.py:89
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ITkStripCabling::OnlineIdGenerator::m_pITkId
SCT_ID * m_pITkId
Definition: OnlineIdGenerator.h:47
ITkStripCabling::OnlineIdGenerator::endcapLink16
std::uint32_t endcapLink16(int phi) const
Definition: OnlineIdGenerator.cxx:47
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
SCT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: SCT_ID.h:740
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
ITkStripCabling::OnlineIdGenerator::ENDCAP_C
@ ENDCAP_C
Definition: OnlineIdGenerator.h:32
ITkStripCabling::OnlineIdGenerator::rod32
std::uint32_t rod32(int bec, int layer_disk, int phi, int eta=0) const
Definition: OnlineIdGenerator.cxx:20
ITkStripCabling::OnlineIdGenerator::barrelLink16
std::uint32_t barrelLink16(int eta) const
Definition: OnlineIdGenerator.cxx:43
ITkStripCabling::OnlineIdGenerator::BARREL_A
@ BARREL_A
Definition: OnlineIdGenerator.h:29
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
ITkStripCabling::OnlineIdGenerator::BARREL_C
@ BARREL_C
Definition: OnlineIdGenerator.h:30
ITkStripCabling::OnlineIdGenerator::rod
std::uint32_t rod(const Identifier &offId) const
Definition: OnlineIdGenerator.cxx:34
ITkStripOnlineId
Definition: ITkStripOnlineId.h:16
SCT_ID::eta_module
int eta_module(const Identifier &id) const
Definition: SCT_ID.h:746
ITkStripCabling::OnlineIdGenerator::UNKNOWN
@ UNKNOWN
Definition: OnlineIdGenerator.h:33
ITkStripCabling::OnlineIdGenerator::ENDCAP_A
@ ENDCAP_A
Definition: OnlineIdGenerator.h:31