ATLAS Offline Software
Classes | Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
Muon::HedgehogBoard Class Reference

Helper struct to represent the High-voltage pins and a possible connection between them. More...

#include <HedgehogBoard.h>

Collaboration diagram for Muon::HedgehogBoard:

Classes

struct  TubeLayer
 Helper struct to return a tube & tube layer pair. More...
 

Public Types

using HedgehogBoardPtr = std::shared_ptr< const HedgehogBoard >
 
using Mapping = std::array< uint8_t, nChPerBoard >
 

Public Member Functions

 HedgehogBoard ()=default
 Default constructor. More...
 
 HedgehogBoard (const Mapping &map, const uint8_t nTubeLay, const uint16_t boardId)
 Standard constructor. More...
 
bool operator< (const HedgehogBoard &other) const
 Ordering of hedgehog boards, performed by Identifier. More...
 
uint16_t boardId () const
 Returns the identifier of the hedgehog board. More...
 
uint8_t numTubeLayers () const
 Returns the number of tube layers 3 or 4. More...
 
uint8_t numTubesPerLayer () const
 Returns the number of tubes per layer. More...
 
uint8_t pinNumber (const TubeLayer &tubeLay) const
 Returns the pinNumber of the tubeLayer. More...
 
uint8_t pinNumber (uint8_t layer, uint8_t tube) const
 Returns the pin number of the layer - tube pair. More...
 
uint8_t pairPin (const TubeLayer &tubeLay) const
 Returns the number of the pin that's twin to the tubeLayer If the pin is not short circuited, then the actual tube, layer pair is returned. More...
 
uint8_t pairPin (uint8_t layer, uint8_t tube) const
 Returns the number of the pin that's twin to the tubeLayer If the pin is not short circuited, then the actual tube, layer pair is returned. More...
 
TubeLayer twinPair (const TubeLayer &tubeLay) const
 Returns the tube & layer short circuited with the given tubeLayer. More...
 
TubeLayer twinPair (uint8_t layer, uint8_t tube) const
 Returns the tube & layer short circuited with the given tubeLayer. More...
 
void setHVDelayTime (const double hvTime)
 Define a HV delay in the time of arrival between the primary & twin electronics signal. More...
 
bool hasHVDelayTime () const
 Returns whether the HedgehogBoard has a specifc delay time. More...
 
double hvDelayTime () const
 Returns the HV delay time. More...
 
const Mappingdata () const
 Returns the underlying map. More...
 

Static Public Attributes

static constexpr unsigned nChPerBoard = 24
 

Private Attributes

Mapping m_hedgePins {make_array<uint8_t, nChPerBoard>(-1)}
 
uint8_t m_nTubeLay {0}
 
uint8_t m_nTubePerLay {0}
 
uint16_t m_id {0}
 
std::optional< double > m_hvDelay {std::nullopt}
 

Detailed Description

Helper struct to represent the High-voltage pins and a possible connection between them.

Likewise the MdtMezzanine Card, the HedgehogBoard covers exactly 24 tubes and the tube numbering layout may differ depending on whether the Mdt chamber has 3 or 4 multilayers

                (16) (17) (18) (19) (20) (21) (22) (23)
                  (08) (09) (10) (11) (12) (13) (14) (15)
               (00) (01) (02) (03) (04) (05) (06) (07)

                  (18) (19) (20) (21) (22) (23)
                (12) (13) (14) (15) (16) (17)
                  (06) (07) (08) (09) (10) (11)
               (00) (01) (02) (03) (04) (05)

If the Hedgehogboard is moounted onto a twin chamber, i.e. two HV pins are connected with a time impedance between, the n-th entry of the array indicates to which k-th tube, the n-th tube is actually connected and the k-th tube contains an n in order to close the connection.

Definition at line 32 of file HedgehogBoard.h.

Member Typedef Documentation

◆ HedgehogBoardPtr

Definition at line 34 of file HedgehogBoard.h.

◆ Mapping

using Muon::HedgehogBoard::Mapping = std::array<uint8_t, nChPerBoard>

Definition at line 37 of file HedgehogBoard.h.

Constructor & Destructor Documentation

◆ HedgehogBoard() [1/2]

Muon::HedgehogBoard::HedgehogBoard ( )
default

Default constructor.

◆ HedgehogBoard() [2/2]

Muon::HedgehogBoard::HedgehogBoard ( const Mapping map,
const uint8_t  nTubeLay,
const uint16_t  boardId 
)

Standard constructor.

Parameters
mapEncoding of the hedgehog pins
nTubeLayNumber of tube layers 3 or 4
boardIdIdentifier number of the Hedgehog board

Definition at line 28 of file HedgehogBoard.cxx.

30  :
31  m_hedgePins{map},
32  m_nTubeLay{nTubeLay},
33  m_id{boardId} {
34  assert(nTubeLay == 3 || nTubeLay == 4);
35  m_nTubePerLay = m_hedgePins.size() / nTubeLay;
36  }

Member Function Documentation

◆ boardId()

uint16_t Muon::HedgehogBoard::boardId ( ) const

Returns the identifier of the hedgehog board.

Definition at line 40 of file HedgehogBoard.cxx.

40 { return m_id; }

◆ data()

const HedgehogBoard::Mapping & Muon::HedgehogBoard::data ( ) const

Returns the underlying map.

Definition at line 43 of file HedgehogBoard.cxx.

43 { return m_hedgePins; }

◆ hasHVDelayTime()

bool Muon::HedgehogBoard::hasHVDelayTime ( ) const

Returns whether the HedgehogBoard has a specifc delay time.

Definition at line 78 of file HedgehogBoard.cxx.

78  {
79  return m_hvDelay.has_value();
80  }

◆ hvDelayTime()

double Muon::HedgehogBoard::hvDelayTime ( ) const

Returns the HV delay time.

If not set 0 is returned

Definition at line 81 of file HedgehogBoard.cxx.

81  {
82  return m_hvDelay.value_or(0.);
83  }

◆ numTubeLayers()

uint8_t Muon::HedgehogBoard::numTubeLayers ( ) const

Returns the number of tube layers 3 or 4.

Definition at line 41 of file HedgehogBoard.cxx.

41 { return m_nTubeLay; }

◆ numTubesPerLayer()

uint8_t Muon::HedgehogBoard::numTubesPerLayer ( ) const

Returns the number of tubes per layer.

Definition at line 42 of file HedgehogBoard.cxx.

42 { return m_nTubePerLay; }

◆ operator<()

bool Muon::HedgehogBoard::operator< ( const HedgehogBoard other) const

Ordering of hedgehog boards, performed by Identifier.

Definition at line 37 of file HedgehogBoard.cxx.

37  {
38  return boardId() < other.boardId();
39  }

◆ pairPin() [1/2]

uint8_t Muon::HedgehogBoard::pairPin ( const TubeLayer tubeLay) const

Returns the number of the pin that's twin to the tubeLayer If the pin is not short circuited, then the actual tube, layer pair is returned.

Parameters
tubeLayHelper struct encoding the tube & layer number

Definition at line 52 of file HedgehogBoard.cxx.

52  {
53  return m_hedgePins[pinNumber(tubeLay)];
54  }

◆ pairPin() [2/2]

uint8_t Muon::HedgehogBoard::pairPin ( uint8_t  layer,
uint8_t  tube 
) const

Returns the number of the pin that's twin to the tubeLayer If the pin is not short circuited, then the actual tube, layer pair is returned.

Parameters
layerTube layer number [1-numTubeLayers()]
tubeTube number [1-nTubes()]

Definition at line 55 of file HedgehogBoard.cxx.

55  {
56  return m_hedgePins[pinNumber(layer, tube)];
57  }

◆ pinNumber() [1/2]

uint8_t Muon::HedgehogBoard::pinNumber ( const TubeLayer tubeLay) const

Returns the pinNumber of the tubeLayer.

Parameters
tubeLayHelper struct encoding the tube & layer number

Definition at line 44 of file HedgehogBoard.cxx.

44  {
45  return pinNumber(tubeLay.layer, tubeLay.tube);
46  }

◆ pinNumber() [2/2]

uint8_t Muon::HedgehogBoard::pinNumber ( uint8_t  layer,
uint8_t  tube 
) const

Returns the pin number of the layer - tube pair.

Parameters
layerTube layer number [1-numTubeLayers()]
tubeTube number [1-nTubes()]

Definition at line 47 of file HedgehogBoard.cxx.

47  {
48  uint8_t pin = (layer-1) * m_nTubePerLay + (tube -1) % m_nTubePerLay;
49  assert(pin < m_hedgePins.size());
50  return pin;
51  }

◆ setHVDelayTime()

void Muon::HedgehogBoard::setHVDelayTime ( const double  hvTime)

Define a HV delay in the time of arrival between the primary & twin electronics signal.

Parameters
hvTimeDelay time in ns

Definition at line 75 of file HedgehogBoard.cxx.

75  {
76  m_hvDelay = std::make_optional<double>(hvTime);
77  }

◆ twinPair() [1/2]

TubeLayer Muon::HedgehogBoard::twinPair ( const TubeLayer tubeLay) const

Returns the tube & layer short circuited with the given tubeLayer.

Parameters
tubeLayHelper struct encoding the tube & layer number

Definition at line 59 of file HedgehogBoard.cxx.

59  {
60  return twinPair(tubeLay.layer, tubeLay.tube);
61  }

◆ twinPair() [2/2]

TubeLayer Muon::HedgehogBoard::twinPair ( uint8_t  layer,
uint8_t  tube 
) const

Returns the tube & layer short circuited with the given tubeLayer.

Parameters
layerTube layer number [1-numTubeLayers()]
tubeTube number [1-nTubes()]

Definition at line 62 of file HedgehogBoard.cxx.

62  {
63  const uint8_t pin = pinNumber(layer, tube);
64  const uint8_t twin = m_hedgePins[pin];
65  TubeLayer result{};
66  if (pin != twin) {
67  result.layer = (twin - twin%m_nTubePerLay) / m_nTubePerLay + 1;
68  result.tube = (twin % m_nTubePerLay) + 1;
69  } else {
70  result.tube = tube;
71  result.layer = layer;
72  }
73  return result;
74  }

Member Data Documentation

◆ m_hedgePins

Mapping Muon::HedgehogBoard::m_hedgePins {make_array<uint8_t, nChPerBoard>(-1)}
private

Definition at line 112 of file HedgehogBoard.h.

◆ m_hvDelay

std::optional<double> Muon::HedgehogBoard::m_hvDelay {std::nullopt}
private

Definition at line 116 of file HedgehogBoard.h.

◆ m_id

uint16_t Muon::HedgehogBoard::m_id {0}
private

Definition at line 115 of file HedgehogBoard.h.

◆ m_nTubeLay

uint8_t Muon::HedgehogBoard::m_nTubeLay {0}
private

Definition at line 113 of file HedgehogBoard.h.

◆ m_nTubePerLay

uint8_t Muon::HedgehogBoard::m_nTubePerLay {0}
private

Definition at line 114 of file HedgehogBoard.h.

◆ nChPerBoard

constexpr unsigned Muon::HedgehogBoard::nChPerBoard = 24
staticconstexpr

Definition at line 36 of file HedgehogBoard.h.


The documentation for this class was generated from the following files:
Muon::HedgehogBoard::twinPair
TubeLayer twinPair(const TubeLayer &tubeLay) const
Returns the tube & layer short circuited with the given tubeLayer.
Definition: HedgehogBoard.cxx:59
get_generator_info.result
result
Definition: get_generator_info.py:21
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
Muon::HedgehogBoard::m_id
uint16_t m_id
Definition: HedgehogBoard.h:115
Muon::HedgehogBoard::m_hvDelay
std::optional< double > m_hvDelay
Definition: HedgehogBoard.h:116
Muon::HedgehogBoard::pinNumber
uint8_t pinNumber(const TubeLayer &tubeLay) const
Returns the pinNumber of the tubeLayer.
Definition: HedgehogBoard.cxx:44
Muon::TubeLayer
HedgehogBoard::TubeLayer TubeLayer
Definition: HedgehogBoard.cxx:27
Muon::HedgehogBoard::m_nTubeLay
uint8_t m_nTubeLay
Definition: HedgehogBoard.h:113
Muon::HedgehogBoard::boardId
uint16_t boardId() const
Returns the identifier of the hedgehog board.
Definition: HedgehogBoard.cxx:40
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Muon::HedgehogBoard::m_hedgePins
Mapping m_hedgePins
Definition: HedgehogBoard.h:112
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
Muon::HedgehogBoard::m_nTubePerLay
uint8_t m_nTubePerLay
Definition: HedgehogBoard.h:114
calibdata.tube
tube
Definition: calibdata.py:31