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

Definition at line 11 of file TGCCandData.h.

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 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

Definition at line 16 of file TGCCandData.h.

uint16_t bcTag() const
Definition ICandData.h:25
ICandData()=default
uint16_t subdetectorId() const
Definition ICandData.h:23
uint16_t sectorId() const
Definition ICandData.h:24

Member Function Documentation

◆ bcTag()

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

Definition at line 25 of file ICandData.h.

25{ return m_bcTag; };
uint16_t m_bcTag
BC tag.
Definition ICandData.h:68

◆ charge()

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

Definition at line 27 of file ICandData.h.

27{ return m_charge; };
uint8_t m_charge
charge ( 0=negative, 1=positive)
Definition ICandData.h:78

◆ 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].
Definition TGCCandData.h:44

◆ 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)
Definition TGCCandData.h:47
static constexpr uint8_t DPHI_BIT_MASK
Bit mask for deltaPhi : 1 bit for sign and 3 bits.
Definition TGCCandData.h:36
static constexpr float s_dphiRange
Definition TGCCandData.h:31

◆ 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)
Definition TGCCandData.h:50
static constexpr float s_dthetaRange
range of the RPC hits z positions
Definition TGCCandData.h:30
static constexpr uint8_t DTHETA_BIT_MASK
Bit mask for deltaTheta : 1 bit for sign and 6 bits.
Definition TGCCandData.h:38

◆ eta()

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

get the kinematic parameters

Definition at line 27 of file ICandData.cxx.

28 {
29 return (float)m_eta / (float)s_etaBitRange * s_etaRange;
30 }
uint16_t m_eta
theta coordinate of the candidate
Definition ICandData.h:70
static constexpr float s_etaRange
variables range
Definition ICandData.h:53
static constexpr uint16_t s_etaBitRange
variables bit size 14 bits for eta, 9 bits for phi, 8 bits for pt
Definition ICandData.h:59

◆ mdtFlag()

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

Definition at line 28 of file ICandData.h.

28{ return m_mdtFlag; };
uint8_t m_mdtFlag
MDT flag.
Definition ICandData.h:80

◆ 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)
Definition TGCCandData.h:53

◆ phi()

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

Definition at line 31 of file ICandData.cxx.

32 {
33 return (float)m_phi / (float)s_phiBitRange * s_phiRange;
34 }
static constexpr float s_phiRange
Definition ICandData.h:54
static constexpr uint16_t s_phiBitRange
Definition ICandData.h:60
uint16_t m_phi
phi coordinate of the candidate
Definition ICandData.h:72

◆ pt()

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

Definition at line 35 of file ICandData.cxx.

36 {
37 return (float)m_pt / (float)s_ptBitRange * s_ptRange;
38 }
static constexpr float s_ptRange
Definition ICandData.h:55
uint16_t m_pt
pt of the candidate
Definition ICandData.h:74
static constexpr uint16_t s_ptBitRange
Definition ICandData.h:61

◆ sectorId()

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

Definition at line 24 of file ICandData.h.

24{ return m_sectorId; };
uint16_t m_sectorId
sector number
Definition ICandData.h:66

◆ setCharge()

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

Definition at line 39 of file ICandData.h.

39{ m_charge = charge; }
uint8_t charge() const
Definition ICandData.h:27

◆ 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.
Definition TGCCandData.h:34

◆ 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

Definition at line 12 of file ICandData.cxx.

13 {
16 }
float eta() const
get the kinematic parameters
Definition ICandData.cxx:27
setWord1 uint16_t

◆ setMdtFlag()

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

Definition at line 40 of file ICandData.h.

40{ m_mdtFlag = mdtFlag; }
uint8_t mdtFlag() const
Definition ICandData.h:28

◆ 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 17 of file ICandData.cxx.

18 {
20 }
float phi() const
Definition ICandData.cxx:31

◆ setPt()

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

Definition at line 21 of file ICandData.cxx.

22 {
23 m_pt = (uint16_t)(pt / s_ptRange * (float)s_ptBitRange);
24 }
float pt() const
Definition ICandData.cxx:35

◆ setThreshold()

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

Definition at line 38 of file ICandData.h.

uint8_t threshold() const
Definition ICandData.h:26
uint8_t m_threshold
threshold
Definition ICandData.h:76

◆ subdetectorId()

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

Definition at line 23 of file ICandData.h.

23{ return m_subdetectorId; };
uint16_t m_subdetectorId
Definition ICandData.h:64

◆ threshold()

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

Definition at line 26 of file ICandData.h.

26{ return m_threshold; };

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 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 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 TGCCandData.h.

◆ m_bcTag

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

BC tag.

Definition at line 68 of file 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 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 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 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 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 ICandData.h.

70{0};

◆ m_mdtFlag

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

MDT flag.

Definition at line 80 of file 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 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 ICandData.h.

72{0};

◆ m_pt

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

pt of the candidate

Definition at line 74 of file ICandData.h.

74{0};

◆ m_sectorId

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

sector number

Definition at line 66 of file ICandData.h.

66{0};

◆ m_subdetectorId

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

Definition at line 64 of file ICandData.h.

64{0};

◆ m_threshold

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

threshold

Definition at line 76 of file 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 TGCCandData.h.

◆ s_dphiRange

float L0Muon::TGCCandData::s_dphiRange = 0.032
staticconstexpr

Definition at line 31 of file TGCCandData.h.

◆ s_dthetaRange

float L0Muon::TGCCandData::s_dthetaRange = 0.160
staticconstexpr

range of the RPC hits z positions

Definition at line 30 of file 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 ICandData.h.

◆ s_etaRange

float L0Muon::ICandData::s_etaRange = 2.7
staticconstexprprivateinherited

variables range

Definition at line 53 of file ICandData.h.

◆ s_phiBitRange

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

Definition at line 60 of file ICandData.h.

◆ s_phiRange

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

Definition at line 54 of file ICandData.h.

◆ s_ptBitRange

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

Definition at line 61 of file ICandData.h.

◆ s_ptRange

float L0Muon::ICandData::s_ptRange = 1000.0
staticconstexprprivateinherited

Definition at line 55 of file ICandData.h.


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