ATLAS Offline Software
Loading...
Searching...
No Matches
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.
 HedgehogBoard (const Mapping &map, const uint8_t nTubeLay, const uint16_t boardId)
 Standard constructor.
bool operator< (const HedgehogBoard &other) const
 Ordering of hedgehog boards, performed by Identifier.
uint16_t boardId () const
 Returns the identifier of the hedgehog board.
uint8_t numTubeLayers () const
 Returns the number of tube layers 3 or 4.
uint8_t numTubesPerLayer () const
 Returns the number of tubes per layer.
uint8_t pinNumber (const TubeLayer &tubeLay) const
 Returns the pinNumber of the tubeLayer.
uint8_t pinNumber (uint8_t layer, uint8_t tube) const
 Returns the pin number of the layer - tube pair.
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.
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.
TubeLayer twinPair (const TubeLayer &tubeLay) const
 Returns the tube & layer short circuited with the given tubeLayer.
TubeLayer twinPair (uint8_t layer, uint8_t tube) const
 Returns the tube & layer short circuited with the given tubeLayer.
void setHVDelayTime (const double hvTime)
 Define a HV delay in the time of arrival between the primary & twin electronics signal.
bool hasHVDelayTime () const
 Returns whether the HedgehogBoard has a specifc delay time.
double hvDelayTime () const
 Returns the HV delay time.
const Mappingdata () const
 Returns the underlying map.

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

using Muon::HedgehogBoard::HedgehogBoardPtr = std::shared_ptr<const HedgehogBoard>

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 }
uint16_t boardId() const
Returns the identifier of the hedgehog board.

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 }
std::optional< double > m_hvDelay

◆ 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 }
uint8_t pinNumber(const TubeLayer &tubeLay) const
Returns the pinNumber of the tubeLayer.

◆ 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 }
@ layer
Definition HitInfo.h:79

◆ 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 }
TubeLayer twinPair(const TubeLayer &tubeLay) const
Returns the tube & layer short circuited with the given tubeLayer.

◆ 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];
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 }
Helper struct to return a tube & tube layer pair.

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.

constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
Definition ArrayHelper.h:10

◆ m_hvDelay

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

Definition at line 116 of file HedgehogBoard.h.

116{std::nullopt};

◆ m_id

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

Definition at line 115 of file HedgehogBoard.h.

115{0};

◆ m_nTubeLay

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

Definition at line 113 of file HedgehogBoard.h.

113{0};

◆ m_nTubePerLay

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

Definition at line 114 of file HedgehogBoard.h.

114{0};

◆ nChPerBoard

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: