ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Muon::nsw::VMMChannel Class Reference

#include <VMMChannel.h>

Collaboration diagram for Muon::nsw::VMMChannel:

Public Member Functions

 VMMChannel (uint32_t vmm_word, Muon::nsw::NSWElink *elink)
 
virtual ~VMMChannel ()
 
bool calculate_parity ()
 
uint32_t vmm_word ()
 
bool neighbor ()
 
bool parity ()
 
uint16_t pdo ()
 
uint16_t tdo ()
 
uint16_t rel_bcid ()
 
uint16_t vmm_channel ()
 
uint16_t roc_vmm ()
 
uint16_t vmm ()
 
const Muon::nsw::NSWElinkelink () const
 
bool is_large_station ()
 
int8_t station_eta ()
 
uint8_t station_phi ()
 
uint8_t multi_layer ()
 
uint8_t gas_gap ()
 
uint8_t channel_type ()
 
uint16_t channel_number ()
 

Private Member Functions

uint8_t calculate_word_parity (uint32_t w, uint8_t p=0)
 

Private Attributes

uint32_t m_vmm_word
 
uint16_t m_roc_vmm
 
uint16_t m_chan
 
uint16_t m_pdo
 
uint16_t m_tdo
 
uint16_t m_rel
 
bool m_neighbor
 
bool m_parity
 
Muon::nsw::NSWElinkm_elink
 
std::unique_ptr< Muon::nsw::helper::NSWOfflineHelperm_offlineHelper
 

Detailed Description

Definition at line 15 of file VMMChannel.h.

Constructor & Destructor Documentation

◆ VMMChannel()

Muon::nsw::VMMChannel::VMMChannel ( uint32_t  vmm_word,
Muon::nsw::NSWElink elink 
)
inline

Definition at line 102 of file VMMChannel.h.

104 {
112 
113  // For sTGCs: convert the vmm capture on the ROC (vmm in the fragment) to the nominal vmm number on the FEB
115  constexpr uint16_t vmmRemap[8] = { 2, 3, 0, 1, 5, 4, 6, 7 };
116  if (elink->elinkId()->detId() == eformat::MUON_STGC_ENDCAP_A_SIDE || elink->elinkId()->detId() == eformat::MUON_STGC_ENDCAP_C_SIDE)
117  vmm = vmmRemap [m_roc_vmm];
118 
119  m_offlineHelper = std::make_unique <Muon::nsw::helper::NSWOfflineHelper> (elink->elinkId (), vmm, m_chan);
120 }

◆ ~VMMChannel()

virtual Muon::nsw::VMMChannel::~VMMChannel ( )
inlinevirtual

Definition at line 39 of file VMMChannel.h.

39 {};

Member Function Documentation

◆ calculate_parity()

bool Muon::nsw::VMMChannel::calculate_parity ( )
inline

Definition at line 90 of file VMMChannel.h.

91 {
92  uint8_t p = 0 ^ (m_neighbor ? 1 : 0);
93  uint16_t bcid = m_elink->bcId () + m_rel;
94 
95  p = this->calculate_word_parity (bcid, p);
96  p = this->calculate_word_parity (m_pdo, p);
97  p = this->calculate_word_parity (m_tdo, p);
98 
99  return (p > 0);
100 }

◆ calculate_word_parity()

uint8_t Muon::nsw::VMMChannel::calculate_word_parity ( uint32_t  w,
uint8_t  p = 0 
)
inlineprivate

Definition at line 79 of file VMMChannel.h.

80 {
81  while (w > 0)
82  {
83  p ^= w & 0x1;
84  w = w >> 1;
85  }
86 
87  return p;
88 }

◆ channel_number()

uint16_t Muon::nsw::VMMChannel::channel_number ( )
inline

Definition at line 74 of file VMMChannel.h.

74 {return m_offlineHelper->channel_number ();};

◆ channel_type()

uint8_t Muon::nsw::VMMChannel::channel_type ( )
inline

Definition at line 73 of file VMMChannel.h.

73 {return m_offlineHelper->channel_type ();};

◆ elink()

const Muon::nsw::NSWElink* Muon::nsw::VMMChannel::elink ( ) const
inline

Definition at line 60 of file VMMChannel.h.

60 {return m_elink;};

◆ gas_gap()

uint8_t Muon::nsw::VMMChannel::gas_gap ( )
inline

Definition at line 69 of file VMMChannel.h.

69 {return m_elink->elinkId ()->gas_gap ();};

◆ is_large_station()

bool Muon::nsw::VMMChannel::is_large_station ( )
inline

Definition at line 64 of file VMMChannel.h.

64 {return m_elink->elinkId ()->is_large_station ();};

◆ multi_layer()

uint8_t Muon::nsw::VMMChannel::multi_layer ( )
inline

Definition at line 68 of file VMMChannel.h.

68 {return m_elink->elinkId ()->multi_layer ();};

◆ neighbor()

bool Muon::nsw::VMMChannel::neighbor ( )
inline

Definition at line 49 of file VMMChannel.h.

49 {return m_neighbor;};

◆ parity()

bool Muon::nsw::VMMChannel::parity ( )
inline

Definition at line 50 of file VMMChannel.h.

50 {return m_parity;};

◆ pdo()

uint16_t Muon::nsw::VMMChannel::pdo ( )
inline

Definition at line 51 of file VMMChannel.h.

51 {return m_pdo;};

◆ rel_bcid()

uint16_t Muon::nsw::VMMChannel::rel_bcid ( )
inline

Definition at line 53 of file VMMChannel.h.

53 {return m_rel;};

◆ roc_vmm()

uint16_t Muon::nsw::VMMChannel::roc_vmm ( )
inline

Definition at line 55 of file VMMChannel.h.

55 {return m_roc_vmm;};

◆ station_eta()

int8_t Muon::nsw::VMMChannel::station_eta ( )
inline

Definition at line 66 of file VMMChannel.h.

66 {return m_elink->elinkId ()->station_eta ();};

◆ station_phi()

uint8_t Muon::nsw::VMMChannel::station_phi ( )
inline

Definition at line 67 of file VMMChannel.h.

67 {return m_elink->elinkId ()->station_phi ();};

◆ tdo()

uint16_t Muon::nsw::VMMChannel::tdo ( )
inline

Definition at line 52 of file VMMChannel.h.

52 {return m_tdo;};

◆ vmm()

uint16_t Muon::nsw::VMMChannel::vmm ( )
inline

Definition at line 56 of file VMMChannel.h.

56 {return m_offlineHelper->vmm();};

◆ vmm_channel()

uint16_t Muon::nsw::VMMChannel::vmm_channel ( )
inline

Definition at line 54 of file VMMChannel.h.

54 {return m_chan;};

◆ vmm_word()

uint32_t Muon::nsw::VMMChannel::vmm_word ( )
inline

Definition at line 45 of file VMMChannel.h.

45 {return m_vmm_word;};

Member Data Documentation

◆ m_chan

uint16_t Muon::nsw::VMMChannel::m_chan
private

Definition at line 21 of file VMMChannel.h.

◆ m_elink

Muon::nsw::NSWElink* Muon::nsw::VMMChannel::m_elink
private

Definition at line 28 of file VMMChannel.h.

◆ m_neighbor

bool Muon::nsw::VMMChannel::m_neighbor
private

Definition at line 25 of file VMMChannel.h.

◆ m_offlineHelper

std::unique_ptr<Muon::nsw::helper::NSWOfflineHelper> Muon::nsw::VMMChannel::m_offlineHelper
private

Definition at line 32 of file VMMChannel.h.

◆ m_parity

bool Muon::nsw::VMMChannel::m_parity
private

Definition at line 26 of file VMMChannel.h.

◆ m_pdo

uint16_t Muon::nsw::VMMChannel::m_pdo
private

Definition at line 22 of file VMMChannel.h.

◆ m_rel

uint16_t Muon::nsw::VMMChannel::m_rel
private

Definition at line 24 of file VMMChannel.h.

◆ m_roc_vmm

uint16_t Muon::nsw::VMMChannel::m_roc_vmm
private

Definition at line 20 of file VMMChannel.h.

◆ m_tdo

uint16_t Muon::nsw::VMMChannel::m_tdo
private

Definition at line 23 of file VMMChannel.h.

◆ m_vmm_word

uint32_t Muon::nsw::VMMChannel::m_vmm_word
private

Definition at line 18 of file VMMChannel.h.


The documentation for this class was generated from the following file:
Muon::nsw::bitPosVmmHitCHANNEL
@ bitPosVmmHitCHANNEL
Definition: NSWDecodeBitmaps.h:98
Muon::nsw::NSWResourceId::multi_layer
uint8_t multi_layer() const
Definition: NSWResourceId.h:120
Muon::nsw::VMMChannel::m_roc_vmm
uint16_t m_roc_vmm
Definition: VMMChannel.h:20
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
Muon::nsw::VMMChannel::m_neighbor
bool m_neighbor
Definition: VMMChannel.h:25
Muon::nsw::bitPosVmmHitTDC
@ bitPosVmmHitTDC
Definition: NSWDecodeBitmaps.h:96
Muon::nsw::VMMChannel::m_offlineHelper
std::unique_ptr< Muon::nsw::helper::NSWOfflineHelper > m_offlineHelper
Definition: VMMChannel.h:32
Muon::nsw::VMMChannel::m_rel
uint16_t m_rel
Definition: VMMChannel.h:24
Muon::nsw::NSWResourceId::detId
uint8_t detId() const
Definition: NSWResourceId.h:71
Muon::nsw::NSWResourceId::station_eta
int8_t station_eta() const
Definition: NSWResourceId.h:99
Muon::nsw::bitPosVmmHitP
@ bitPosVmmHitP
Definition: NSWDecodeBitmaps.h:102
Muon::nsw::VMMChannel::m_tdo
uint16_t m_tdo
Definition: VMMChannel.h:23
Muon::nsw::VMMChannel::vmm_word
uint32_t vmm_word()
Definition: VMMChannel.h:45
Muon::nsw::helper::get_bits
uint32_t get_bits(uint32_t word, uint32_t mask, uint8_t position)
Definition: NSWDecodeHelper.h:168
Muon::nsw::bitPosVmmHitRELBCID
@ bitPosVmmHitRELBCID
Definition: NSWDecodeBitmaps.h:100
Muon::nsw::VMMChannel::calculate_word_parity
uint8_t calculate_word_parity(uint32_t w, uint8_t p=0)
Definition: VMMChannel.h:79
Muon::nsw::bitPosVmmHitVMMID
@ bitPosVmmHitVMMID
Definition: NSWDecodeBitmaps.h:99
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
Muon::nsw::VMMChannel::m_vmm_word
uint32_t m_vmm_word
Definition: VMMChannel.h:18
Muon::nsw::VMMChannel::vmm
uint16_t vmm()
Definition: VMMChannel.h:56
Muon::nsw::NSWResourceId::is_large_station
bool is_large_station() const
Definition: NSWResourceId.h:93
Muon::nsw::NSWResourceId::station_phi
uint8_t station_phi() const
Definition: NSWResourceId.h:114
Muon::nsw::bitMaskVmmHitVMMID
@ bitMaskVmmHitVMMID
Definition: NSWDecodeBitmaps.h:65
Muon::nsw::bitPosVmmHitADC
@ bitPosVmmHitADC
Definition: NSWDecodeBitmaps.h:97
Muon::nsw::bitMaskVmmHitP
@ bitMaskVmmHitP
Definition: NSWDecodeBitmaps.h:68
Muon::nsw::bitMaskVmmHitCHANNEL
@ bitMaskVmmHitCHANNEL
Definition: NSWDecodeBitmaps.h:64
Muon::nsw::VMMChannel::m_chan
uint16_t m_chan
Definition: VMMChannel.h:21
Muon::nsw::VMMChannel::elink
const Muon::nsw::NSWElink * elink() const
Definition: VMMChannel.h:60
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
Muon::nsw::VMMChannel::m_parity
bool m_parity
Definition: VMMChannel.h:26
Muon::nsw::bitMaskVmmHitRELBCID
@ bitMaskVmmHitRELBCID
Definition: NSWDecodeBitmaps.h:66
Muon::nsw::bitMaskVmmHitN
@ bitMaskVmmHitN
Definition: NSWDecodeBitmaps.h:67
Muon::nsw::VMMChannel::m_elink
Muon::nsw::NSWElink * m_elink
Definition: VMMChannel.h:28
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
Muon::nsw::bitPosVmmHitN
@ bitPosVmmHitN
Definition: NSWDecodeBitmaps.h:101
Muon::nsw::bitMaskVmmHitTDC
@ bitMaskVmmHitTDC
Definition: NSWDecodeBitmaps.h:62
Muon::nsw::bitMaskVmmHitADC
@ bitMaskVmmHitADC
Definition: NSWDecodeBitmaps.h:63
Muon::nsw::NSWResourceId::gas_gap
uint8_t gas_gap() const
Definition: NSWResourceId.h:126
Muon::nsw::VMMChannel::m_pdo
uint16_t m_pdo
Definition: VMMChannel.h:22