ATLAS Offline Software
Loading...
Searching...
No Matches
L0Muon::TGCCandData Class Reference

#include <TGCCandData.h>

Inheritance diagram for L0Muon::TGCCandData:
Collaboration diagram for L0Muon::TGCCandData:

Public Types

enum class  BC_ID {
  BC_UNDEFINED = 0 , BC_PREVIOUS , BC_CURRENT , BC_NEXT ,
  BC_NEXTNEXT
}

Public Member Functions

 TGCCandData ()=default
 ~TGCCandData ()=default
 TGCCandData (uint16_t subdetectorId, uint16_t sectorId, uint16_t bcTag)
uint8_t coinType () const
float deltaPhi () const
float deltaTheta () const
uint32_t nswSegment () const
void setCoinType (uint8_t cointype)
void setDeltaPhi (float dphi)
void setDeltaTheta (float dtheta)
void setNswSegment (uint32_t nswout)
uint16_t subdetectorId () const
uint16_t sectorId () const
uint16_t bcTag () const
uint8_t threshold () const
uint8_t charge () const
uint8_t mdtFlag () const
float eta () const
 get the kinematic parameters
float phi () const
float pt () const
void setEta (float eta)
 Set functions of the modifiable parameters.
void setPhi (float phi)
void setPt (float pt)
void setThreshold (float threshold)
void setCharge (uint8_t charge)
void setMdtFlag (uint8_t mdtFlag)

Static Public Attributes

static constexpr float s_dthetaRange = 0.160
 range of the RPC hits z positions
static constexpr float s_dphiRange = 0.032
static constexpr uint8_t COINTYPE_BIT_MASK = 0x7
 Bit mask for Coincidence Types.
static constexpr uint8_t DPHI_BIT_MASK = 0x7
 Bit mask for deltaPhi : 1 bit for sign and 3 bits.
static constexpr uint8_t DTHETA_BIT_MASK = 0x3f
 Bit mask for deltaTheta : 1 bit for sign and 6 bits.
static constexpr uint32_t NSW_BIT_MASK = 0xfffffff
 Bit mask for NSW-TP output.

Private Attributes

uint8_t m_coinType {0}
 Coincidence Type (3 bits) [rsv.][GoodMF][InnerCoin].
uint8_t m_deltaPhi {0}
 Segment azimuthal angle w.r.t. the vector from IP to the segment position (4 bits).
uint8_t m_deltaTheta {0}
 Segment polar angle w.r.t. the vector from IP to the segment position (7 bits).
uint32_t m_nswSegment {0}
 Copy of the NSW-TP output (To be defined).
uint16_t m_subdetectorId {0}
uint16_t m_sectorId {0}
 sector number
uint16_t m_bcTag {0}
 BC tag.
uint16_t m_eta {0}
 theta coordinate of the candidate
uint16_t m_phi {0}
 phi coordinate of the candidate
uint16_t m_pt {0}
 pt of the candidate
uint8_t m_threshold {0}
 threshold
uint8_t m_charge {0}
 charge ( 0=negative, 1=positive)
uint8_t m_mdtFlag {0}
 MDT flag.

Static Private Attributes

static constexpr float s_etaRange = 2.7
 variables range
static constexpr float s_phiRange = 2.0 * M_PI
static constexpr float s_ptRange = 1000.0
static constexpr uint16_t s_etaBitRange = 0x3fff
 variables bit size 14 bits for eta, 9 bits for phi, 8 bits for pt
static constexpr uint16_t s_phiBitRange = 0x1ff
static constexpr uint16_t s_ptBitRange = 0xff

Detailed Description

Member Enumeration Documentation

◆ BC_ID

enum class L0Muon::ICandData::BC_ID
stronginherited
Enumerator
BC_UNDEFINED 
BC_PREVIOUS 
BC_CURRENT 
BC_NEXT 
BC_NEXTNEXT 

Definition at line 42 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h.

43 {
44 BC_UNDEFINED = 0,
45 BC_PREVIOUS,
46 BC_CURRENT,
47 BC_NEXT,
48 BC_NEXTNEXT
49 };

Constructor & Destructor Documentation

◆ TGCCandData() [1/2]

L0Muon::TGCCandData::TGCCandData ( )
default

◆ ~TGCCandData()

L0Muon::TGCCandData::~TGCCandData ( )
default

◆ TGCCandData() [2/2]

L0Muon::TGCCandData::TGCCandData ( uint16_t subdetectorId,
uint16_t sectorId,
uint16_t bcTag )
inline

Member Function Documentation

◆ bcTag()

uint16_t L0Muon::ICandData::bcTag ( ) const
inlineinherited

◆ charge()

uint8_t L0Muon::ICandData::charge ( ) const
inlineinherited

◆ coinType()

uint8_t L0Muon::TGCCandData::coinType ( ) const

Definition at line 8 of file TGCCandData.cxx.

8 {
9 return m_coinType;
10}
uint8_t m_coinType
Coincidence Type (3 bits) [rsv.][GoodMF][InnerCoin].

◆ deltaPhi()

float L0Muon::TGCCandData::deltaPhi ( ) const

Definition at line 12 of file TGCCandData.cxx.

12 {
13 float dphi = static_cast<float>(m_deltaPhi & DPHI_BIT_MASK) / static_cast<float>(DPHI_BIT_MASK+1) * s_dphiRange;
14 return (m_deltaPhi & (DPHI_BIT_MASK + 1)) ? dphi : -1. * dphi;
15}
uint8_t m_deltaPhi
Segment azimuthal angle w.r.t. the vector from IP to the segment position (4 bits).
static constexpr uint8_t DPHI_BIT_MASK
Bit mask for deltaPhi : 1 bit for sign and 3 bits.

◆ deltaTheta()

float L0Muon::TGCCandData::deltaTheta ( ) const

Definition at line 17 of file TGCCandData.cxx.

17 {
18 float dtheta = static_cast<float>(m_deltaTheta & DTHETA_BIT_MASK) / static_cast<float>(DTHETA_BIT_MASK+1) * s_dthetaRange;
19 return (m_deltaTheta & (DTHETA_BIT_MASK + 1)) ? dtheta : -1. * dtheta;
20}
uint8_t m_deltaTheta
Segment polar angle w.r.t. the vector from IP to the segment position (7 bits).
static constexpr float s_dthetaRange
range of the RPC hits z positions
static constexpr uint8_t DTHETA_BIT_MASK
Bit mask for deltaTheta : 1 bit for sign and 6 bits.

◆ eta()

float L0Muon::ICandData::eta ( ) const
inherited

get the kinematic parameters

Definition at line 28 of file ICandData.cxx.

29 {
30 return (static_cast<float>(m_eta) / static_cast<float>(s_etaBitRange)) * (2.0f * s_etaRange) - s_etaRange;
31
32 }
static constexpr uint16_t s_etaBitRange
variables bit size 14 bits for eta, 9 bits for phi, 8 bits for pt

◆ mdtFlag()

uint8_t L0Muon::ICandData::mdtFlag ( ) const
inlineinherited

◆ nswSegment()

uint32_t L0Muon::TGCCandData::nswSegment ( ) const

Definition at line 22 of file TGCCandData.cxx.

22 {
23 return m_nswSegment;
24}
uint32_t m_nswSegment
Copy of the NSW-TP output (To be defined).

◆ phi()

float L0Muon::ICandData::phi ( ) const
inherited

Definition at line 33 of file ICandData.cxx.

34 {
35 return static_cast<float> (m_phi) / static_cast<float>(s_phiBitRange) * s_phiRange-M_PI;
36
37 }
#define M_PI

◆ pt()

float L0Muon::ICandData::pt ( ) const
inherited

Definition at line 38 of file ICandData.cxx.

◆ sectorId()

uint16_t L0Muon::ICandData::sectorId ( ) const
inlineinherited

◆ setCharge()

void L0Muon::ICandData::setCharge ( uint8_t charge)
inlineinherited

◆ setCoinType()

void L0Muon::TGCCandData::setCoinType ( uint8_t cointype)

Definition at line 27 of file TGCCandData.cxx.

27 {
28 m_coinType = cointype & COINTYPE_BIT_MASK;
29}
static constexpr uint8_t COINTYPE_BIT_MASK
Bit mask for Coincidence Types.

◆ setDeltaPhi()

void L0Muon::TGCCandData::setDeltaPhi ( float dphi)

Definition at line 31 of file TGCCandData.cxx.

31 {
32 m_deltaPhi = std::min(static_cast<uint8_t>(std::abs(dphi) / s_dphiRange * static_cast<float>(DPHI_BIT_MASK+1)),
33 static_cast<uint8_t>(DPHI_BIT_MASK));
34 if (dphi > 0.) m_deltaPhi += DPHI_BIT_MASK + 1;
35}

◆ setDeltaTheta()

void L0Muon::TGCCandData::setDeltaTheta ( float dtheta)

Definition at line 37 of file TGCCandData.cxx.

37 {
38 m_deltaTheta = std::min(static_cast<uint8_t>(std::abs(dtheta) / s_dthetaRange * static_cast<float>(DTHETA_BIT_MASK+1)),
39 static_cast<uint8_t>(DTHETA_BIT_MASK));
40 if (dtheta > 0.) m_deltaTheta += DTHETA_BIT_MASK + 1;
41}

◆ setEta()

void L0Muon::ICandData::setEta ( float eta)
inherited

Set functions of the modifiable parameters.

set the kinematic parameters using the granularity of the binary representation

convert eta to binary, taking into account the range from -s_etaRange to +s_etaRange)

Definition at line 12 of file ICandData.cxx.

13 {
15 const float etaClamped = std::max(-s_etaRange, std::min(eta, s_etaRange));
16 m_eta = static_cast<uint16_t>(std::lround((etaClamped + s_etaRange) / (2.0f * s_etaRange) *static_cast<float>(s_etaBitRange)));
17 }
float eta() const
get the kinematic parameters
Definition ICandData.cxx:28
setWord1 uint16_t

◆ setMdtFlag()

void L0Muon::ICandData::setMdtFlag ( uint8_t mdtFlag)
inlineinherited

◆ setNswSegment()

void L0Muon::TGCCandData::setNswSegment ( uint32_t nswout)

Definition at line 43 of file TGCCandData.cxx.

43 {
44 m_nswSegment = nswout;
45}

◆ setPhi()

void L0Muon::ICandData::setPhi ( float phi)
inherited

Definition at line 18 of file ICandData.cxx.

19 {
20 m_phi = static_cast<uint16_t>(((phi+M_PI)/s_phiRange)*static_cast<float>(s_phiBitRange));
21 }
float phi() const
Definition ICandData.cxx:33

◆ setPt()

void L0Muon::ICandData::setPt ( float pt)
inherited

Definition at line 22 of file ICandData.cxx.

23 {
24 m_pt = static_cast<uint16_t>(std::round(pt/s_ptRange)*static_cast<float>(s_ptBitRange));
25 }
float pt() const
Definition ICandData.cxx:38

◆ setThreshold()

void L0Muon::ICandData::setThreshold ( float threshold)
inlineinherited

◆ subdetectorId()

uint16_t L0Muon::ICandData::subdetectorId ( ) const
inlineinherited

◆ threshold()

uint8_t L0Muon::ICandData::threshold ( ) const
inlineinherited

Member Data Documentation

◆ COINTYPE_BIT_MASK

uint8_t L0Muon::TGCCandData::COINTYPE_BIT_MASK = 0x7
staticconstexpr

Bit mask for Coincidence Types.

Definition at line 34 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/TGCCandData.h.

◆ DPHI_BIT_MASK

uint8_t L0Muon::TGCCandData::DPHI_BIT_MASK = 0x7
staticconstexpr

Bit mask for deltaPhi : 1 bit for sign and 3 bits.

Definition at line 36 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/TGCCandData.h.

◆ DTHETA_BIT_MASK

uint8_t L0Muon::TGCCandData::DTHETA_BIT_MASK = 0x3f
staticconstexpr

Bit mask for deltaTheta : 1 bit for sign and 6 bits.

Definition at line 38 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/TGCCandData.h.

◆ m_bcTag

uint16_t L0Muon::ICandData::m_bcTag {0}
privateinherited

BC tag.

Definition at line 68 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h.

68{0};

◆ m_charge

uint8_t L0Muon::ICandData::m_charge {0}
privateinherited

charge ( 0=negative, 1=positive)

Definition at line 78 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h.

78{0};

◆ m_coinType

uint8_t L0Muon::TGCCandData::m_coinType {0}
private

Coincidence Type (3 bits) [rsv.][GoodMF][InnerCoin].

Definition at line 44 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/TGCCandData.h.

44{0};

◆ m_deltaPhi

uint8_t L0Muon::TGCCandData::m_deltaPhi {0}
private

Segment azimuthal angle w.r.t. the vector from IP to the segment position (4 bits).

Definition at line 47 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/TGCCandData.h.

47{0};

◆ m_deltaTheta

uint8_t L0Muon::TGCCandData::m_deltaTheta {0}
private

Segment polar angle w.r.t. the vector from IP to the segment position (7 bits).

Definition at line 50 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/TGCCandData.h.

50{0};

◆ m_eta

uint16_t L0Muon::ICandData::m_eta {0}
privateinherited

theta coordinate of the candidate

Definition at line 70 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h.

70{0};

◆ m_mdtFlag

uint8_t L0Muon::ICandData::m_mdtFlag {0}
privateinherited

MDT flag.

Definition at line 80 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h.

80{0};

◆ m_nswSegment

uint32_t L0Muon::TGCCandData::m_nswSegment {0}
private

Copy of the NSW-TP output (To be defined).

Definition at line 53 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/TGCCandData.h.

53{0};

◆ m_phi

uint16_t L0Muon::ICandData::m_phi {0}
privateinherited

phi coordinate of the candidate

Definition at line 72 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h.

72{0};

◆ m_pt

uint16_t L0Muon::ICandData::m_pt {0}
privateinherited

pt of the candidate

Definition at line 74 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h.

74{0};

◆ m_sectorId

uint16_t L0Muon::ICandData::m_sectorId {0}
privateinherited

sector number

Definition at line 66 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h.

66{0};

◆ m_subdetectorId

uint16_t L0Muon::ICandData::m_subdetectorId {0}
privateinherited

◆ m_threshold

uint8_t L0Muon::ICandData::m_threshold {0}
privateinherited

threshold

Definition at line 76 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h.

76{0};

◆ NSW_BIT_MASK

uint32_t L0Muon::TGCCandData::NSW_BIT_MASK = 0xfffffff
staticconstexpr

Bit mask for NSW-TP output.

Definition at line 40 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/TGCCandData.h.

◆ s_dphiRange

float L0Muon::TGCCandData::s_dphiRange = 0.032
staticconstexpr

◆ s_dthetaRange

float L0Muon::TGCCandData::s_dthetaRange = 0.160
staticconstexpr

range of the RPC hits z positions

Definition at line 30 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/TGCCandData.h.

◆ s_etaBitRange

uint16_t L0Muon::ICandData::s_etaBitRange = 0x3fff
staticconstexprprivateinherited

variables bit size 14 bits for eta, 9 bits for phi, 8 bits for pt

Definition at line 59 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h.

◆ s_etaRange

float L0Muon::ICandData::s_etaRange = 2.7
staticconstexprprivateinherited

variables range

Definition at line 53 of file Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h.

◆ s_phiBitRange

uint16_t L0Muon::ICandData::s_phiBitRange = 0x1ff
staticconstexprprivateinherited

◆ s_phiRange

float L0Muon::ICandData::s_phiRange = 2.0 * M_PI
staticconstexprprivateinherited

◆ s_ptBitRange

uint16_t L0Muon::ICandData::s_ptBitRange = 0xff
staticconstexprprivateinherited

◆ s_ptRange

float L0Muon::ICandData::s_ptRange = 1000.0
staticconstexprprivateinherited

The documentation for this class was generated from the following files: