ATLAS Offline Software
Loading...
Searching...
No Matches
L1Muon::ICandData Class Reference

#include <ICandData.h>

Inheritance diagram for L1Muon::ICandData:
Collaboration diagram for L1Muon::ICandData:

Public Types

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

Public Member Functions

 ICandData (uint16_t subdetectorId, uint16_t sectorId, uint16_t bcTag)
 ICandData ()=default
virtual ~ICandData ()=default
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)

Private Attributes

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 13 of file ICandData.h.

Member Enumeration Documentation

◆ BC_ID

enum class L1Muon::ICandData::BC_ID
strong
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

◆ ICandData() [1/2]

L1Muon::ICandData::ICandData ( uint16_t subdetectorId,
uint16_t sectorId,
uint16_t bcTag )
inline

Definition at line 17 of file ICandData.h.

uint16_t m_sectorId
sector number
Definition ICandData.h:66
uint16_t sectorId() const
Definition ICandData.h:24
uint16_t subdetectorId() const
Definition ICandData.h:23
uint16_t m_bcTag
BC tag.
Definition ICandData.h:68
uint16_t bcTag() const
Definition ICandData.h:25
uint16_t m_subdetectorId
Definition ICandData.h:64

◆ ICandData() [2/2]

L1Muon::ICandData::ICandData ( )
default

◆ ~ICandData()

virtual L1Muon::ICandData::~ICandData ( )
virtualdefault

Member Function Documentation

◆ bcTag()

uint16_t L1Muon::ICandData::bcTag ( ) const
inline

Definition at line 25 of file ICandData.h.

25{ return m_bcTag; };

◆ charge()

uint8_t L1Muon::ICandData::charge ( ) const
inline

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

◆ eta()

float L1Muon::ICandData::eta ( ) const

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 }
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 L1Muon::ICandData::mdtFlag ( ) const
inline

Definition at line 28 of file ICandData.h.

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

◆ phi()

float L1Muon::ICandData::phi ( ) const

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
uint16_t m_phi
phi coordinate of the candidate
Definition ICandData.h:72
static constexpr uint16_t s_phiBitRange
Definition ICandData.h:60
static constexpr float s_phiRange
Definition ICandData.h:54

◆ pt()

float L1Muon::ICandData::pt ( ) const

Definition at line 38 of file ICandData.cxx.

39 {
40 return static_cast<float>(m_pt)/static_cast<float>(s_ptBitRange)*s_ptRange;
41 }
static constexpr uint16_t s_ptBitRange
Definition ICandData.h:61
static constexpr float s_ptRange
Definition ICandData.h:55
uint16_t m_pt
pt of the candidate
Definition ICandData.h:74

◆ sectorId()

uint16_t L1Muon::ICandData::sectorId ( ) const
inline

Definition at line 24 of file ICandData.h.

24{ return m_sectorId; };

◆ setCharge()

void L1Muon::ICandData::setCharge ( uint8_t charge)
inline

Definition at line 39 of file ICandData.h.

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

◆ setEta()

void L1Muon::ICandData::setEta ( float eta)

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 L1Muon::ICandData::setMdtFlag ( uint8_t mdtFlag)
inline

Definition at line 40 of file ICandData.h.

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

◆ setPhi()

void L1Muon::ICandData::setPhi ( float phi)

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 L1Muon::ICandData::setPt ( float pt)

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 L1Muon::ICandData::setThreshold ( float threshold)
inline

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 L1Muon::ICandData::subdetectorId ( ) const
inline

Definition at line 23 of file ICandData.h.

23{ return m_subdetectorId; };

◆ threshold()

uint8_t L1Muon::ICandData::threshold ( ) const
inline

Definition at line 26 of file ICandData.h.

26{ return m_threshold; };

Member Data Documentation

◆ m_bcTag

uint16_t L1Muon::ICandData::m_bcTag {0}
private

BC tag.

Definition at line 68 of file ICandData.h.

68{0};

◆ m_charge

uint8_t L1Muon::ICandData::m_charge {0}
private

charge ( 0=negative, 1=positive)

Definition at line 78 of file ICandData.h.

78{0};

◆ m_eta

uint16_t L1Muon::ICandData::m_eta {0}
private

theta coordinate of the candidate

Definition at line 70 of file ICandData.h.

70{0};

◆ m_mdtFlag

uint8_t L1Muon::ICandData::m_mdtFlag {0}
private

MDT flag.

Definition at line 80 of file ICandData.h.

80{0};

◆ m_phi

uint16_t L1Muon::ICandData::m_phi {0}
private

phi coordinate of the candidate

Definition at line 72 of file ICandData.h.

72{0};

◆ m_pt

uint16_t L1Muon::ICandData::m_pt {0}
private

pt of the candidate

Definition at line 74 of file ICandData.h.

74{0};

◆ m_sectorId

uint16_t L1Muon::ICandData::m_sectorId {0}
private

sector number

Definition at line 66 of file ICandData.h.

66{0};

◆ m_subdetectorId

uint16_t L1Muon::ICandData::m_subdetectorId {0}
private

Definition at line 64 of file ICandData.h.

64{0};

◆ m_threshold

uint8_t L1Muon::ICandData::m_threshold {0}
private

threshold

Definition at line 76 of file ICandData.h.

76{0};

◆ s_etaBitRange

uint16_t L1Muon::ICandData::s_etaBitRange = 0x3fff
staticconstexprprivate

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 L1Muon::ICandData::s_etaRange = 2.7
staticconstexprprivate

variables range

Definition at line 53 of file ICandData.h.

◆ s_phiBitRange

uint16_t L1Muon::ICandData::s_phiBitRange = 0x1ff
staticconstexprprivate

Definition at line 60 of file ICandData.h.

◆ s_phiRange

float L1Muon::ICandData::s_phiRange = 2.0 * M_PI
staticconstexprprivate

Definition at line 54 of file ICandData.h.

◆ s_ptBitRange

uint16_t L1Muon::ICandData::s_ptBitRange = 0xff
staticconstexprprivate

Definition at line 61 of file ICandData.h.

◆ s_ptRange

float L1Muon::ICandData::s_ptRange = 1000.0
staticconstexprprivate

Definition at line 55 of file ICandData.h.


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