ATLAS Offline Software
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
GlobalSim::IOBitwise::CommonTOB Class Reference

Class to hold common (eta/eta/phi) TOB bits. More...

#include <CommonTOB.h>

Inheritance diagram for GlobalSim::IOBitwise::CommonTOB:
Collaboration diagram for GlobalSim::IOBitwise::CommonTOB:

Public Member Functions

 CommonTOB (const xAOD::eFexEMRoI &eFexTOB)
 Constructor taking an eFexROITOB to initialise common bits. More...
 
 CommonTOB (const GlobalSim::IOBitwise::ICommonTOB &CommonTOB)
 Constructor taking an existing CommonTOB to initialise common bits. More...
 
 CommonTOB (const std::bitset< CommonTOB::s_et_width > &et_bits, const std::bitset< CommonTOB::s_eta_width > &eta_bits, const std::bitset< CommonTOB::s_phi_width > &phi_bits)
 Constructor taking raw bitsets to initialise common bits. More...
 
virtual ~CommonTOB ()
 Destructor. More...
 
virtual std::bitset< s_et_widthet_bits () const override
 Returns the eT bits of this TOB. More...
 
virtual std::bitset< s_eta_widtheta_bits () const override
 Returns the eta bits of this TOB. More...
 
virtual std::bitset< s_phi_widthphi_bits () const override
 Returns the phi bits of this TOB. More...
 
virtual std::string to_string () const override
 print out contents to string More...
 

Static Public Attributes

static constexpr std::size_t s_et_width {13}
 Size of the eT bitset. More...
 
static constexpr std::size_t s_eta_width {10}
 Size of the eta bitset. More...
 
static constexpr std::size_t s_phi_width {9}
 Size of the phi bitset. More...
 
static constexpr std::size_t s_eFex_granularity {100}
 
static constexpr ulong max_et {(1UL << s_et_width)-1}
 

Private Attributes

std::bitset< ICommonTOB::s_et_widthm_et_bits
 Property: eT bitset within the common TOB word. More...
 
std::bitset< ICommonTOB::s_eta_widthm_eta_bits
 Property: eta bitset within the common TOB word. More...
 
std::bitset< ICommonTOB::s_phi_widthm_phi_bits
 Property: phi bitset within the common TOB word. More...
 

Detailed Description

Class to hold common (eta/eta/phi) TOB bits.

This base class defines the bitsets to hold the common et, eta, phi bits in GlobalTOBs, and their retrieval functions.

Definition at line 23 of file CommonTOB.h.

Constructor & Destructor Documentation

◆ CommonTOB() [1/3]

GlobalSim::IOBitwise::CommonTOB::CommonTOB ( const xAOD::eFexEMRoI eFexTOB)

Constructor taking an eFexROITOB to initialise common bits.

Parameters
[in]eFexTOBThe input eFexRoI TOB defining the common/eFex bits.

To be used to create, and initilise a CommonTOB from an existing eFexTOB

Definition at line 10 of file CommonTOB.cxx.

10  : m_et_bits(static_cast<ulong>(eFexTOB.et())/s_eFex_granularity),
11  m_eta_bits(eFexTOB.iEtaTopo()),
12  m_phi_bits(eFexTOB.iPhiTopo()){
13  }

◆ CommonTOB() [2/3]

GlobalSim::IOBitwise::CommonTOB::CommonTOB ( const GlobalSim::IOBitwise::ICommonTOB CommonTOB)

Constructor taking an existing CommonTOB to initialise common bits.

Parameters
[in]CommonTOBThe input Global CommonTOB defining the common bits.

To be used to create and initilaise a CommonTOB from an existing CommonTOB

Definition at line 15 of file CommonTOB.cxx.

15  : m_et_bits(CommonTOB.et_bits()),
16  m_eta_bits(CommonTOB.eta_bits()),
17  m_phi_bits(CommonTOB.phi_bits()){}

◆ CommonTOB() [3/3]

GlobalSim::IOBitwise::CommonTOB::CommonTOB ( const std::bitset< CommonTOB::s_et_width > &  et_bits,
const std::bitset< CommonTOB::s_eta_width > &  eta_bits,
const std::bitset< CommonTOB::s_phi_width > &  phi_bits 
)

Constructor taking raw bitsets to initialise common bits.

Parameters
[in]et_bitsthe transverse energy bits
[in]eta_bitsthe eta bits
[in]phi_bitsthe phi bits

To be used to create and initialise a CommonTOB from individual 4-vector bitsets.

Definition at line 19 of file CommonTOB.cxx.

◆ ~CommonTOB()

virtual GlobalSim::IOBitwise::CommonTOB::~CommonTOB ( )
inlinevirtual

Destructor.

Definition at line 54 of file CommonTOB.h.

54 {};

Member Function Documentation

◆ et_bits()

std::bitset< CommonTOB::s_et_width > GlobalSim::IOBitwise::CommonTOB::et_bits ( ) const
overridevirtual

Returns the eT bits of this TOB.

Implements GlobalSim::IOBitwise::ICommonTOB.

Definition at line 25 of file CommonTOB.cxx.

25  {
26  return m_et_bits;
27  }

◆ eta_bits()

std::bitset< CommonTOB::s_eta_width > GlobalSim::IOBitwise::CommonTOB::eta_bits ( ) const
overridevirtual

Returns the eta bits of this TOB.

Implements GlobalSim::IOBitwise::ICommonTOB.

Definition at line 29 of file CommonTOB.cxx.

29  {
30  return m_eta_bits;
31  }

◆ phi_bits()

std::bitset< CommonTOB::s_phi_width > GlobalSim::IOBitwise::CommonTOB::phi_bits ( ) const
overridevirtual

Returns the phi bits of this TOB.

Implements GlobalSim::IOBitwise::ICommonTOB.

Definition at line 33 of file CommonTOB.cxx.

33  {
34  return m_phi_bits;
35  }

◆ to_string()

std::string GlobalSim::IOBitwise::CommonTOB::to_string ( ) const
overridevirtual

Member Data Documentation

◆ m_et_bits

std::bitset<ICommonTOB::s_et_width> GlobalSim::IOBitwise::CommonTOB::m_et_bits
private

Property: eT bitset within the common TOB word.

Definition at line 66 of file CommonTOB.h.

◆ m_eta_bits

std::bitset<ICommonTOB::s_eta_width> GlobalSim::IOBitwise::CommonTOB::m_eta_bits
private

Property: eta bitset within the common TOB word.

Definition at line 68 of file CommonTOB.h.

◆ m_phi_bits

std::bitset<ICommonTOB::s_phi_width> GlobalSim::IOBitwise::CommonTOB::m_phi_bits
private

Property: phi bitset within the common TOB word.

Definition at line 70 of file CommonTOB.h.

◆ max_et

constexpr ulong GlobalSim::IOBitwise::ICommonTOB::max_et {(1UL << s_et_width)-1}
staticconstexprinherited

Definition at line 43 of file ICommonTOB.h.

◆ s_eFex_granularity

constexpr std::size_t GlobalSim::IOBitwise::ICommonTOB::s_eFex_granularity {100}
staticconstexprinherited

Definition at line 41 of file ICommonTOB.h.

◆ s_et_width

constexpr std::size_t GlobalSim::IOBitwise::ICommonTOB::s_et_width {13}
staticconstexprinherited

Size of the eT bitset.

Definition at line 35 of file ICommonTOB.h.

◆ s_eta_width

constexpr std::size_t GlobalSim::IOBitwise::ICommonTOB::s_eta_width {10}
staticconstexprinherited

Size of the eta bitset.

Definition at line 37 of file ICommonTOB.h.

◆ s_phi_width

constexpr std::size_t GlobalSim::IOBitwise::ICommonTOB::s_phi_width {9}
staticconstexprinherited

Size of the phi bitset.

Definition at line 39 of file ICommonTOB.h.


The documentation for this class was generated from the following files:
GlobalSim::IOBitwise::ICommonTOB::s_eFex_granularity
static constexpr std::size_t s_eFex_granularity
Definition: ICommonTOB.h:41
GlobalSim::IOBitwise::ICommonTOB::to_string
virtual std::string to_string() const =0
print out contents to string
Definition: ICommonTOB.cxx:11
xAOD::eFexEMRoI_v1::iEtaTopo
int iEtaTopo() const
Getter for integer phi index (0-63)
Definition: eFexEMRoI_v1.cxx:269
GlobalSim::IOBitwise::CommonTOB::et_bits
virtual std::bitset< s_et_width > et_bits() const override
Returns the eT bits of this TOB.
Definition: CommonTOB.cxx:25
GlobalSim::IOBitwise::CommonTOB::phi_bits
virtual std::bitset< s_phi_width > phi_bits() const override
Returns the phi bits of this TOB.
Definition: CommonTOB.cxx:33
GlobalSim::IOBitwise::CommonTOB::m_et_bits
std::bitset< ICommonTOB::s_et_width > m_et_bits
Property: eT bitset within the common TOB word.
Definition: CommonTOB.h:66
GlobalSim::IOBitwise::CommonTOB::m_phi_bits
std::bitset< ICommonTOB::s_phi_width > m_phi_bits
Property: phi bitset within the common TOB word.
Definition: CommonTOB.h:70
GlobalSim::IOBitwise::CommonTOB::eta_bits
virtual std::bitset< s_eta_width > eta_bits() const override
Returns the eta bits of this TOB.
Definition: CommonTOB.cxx:29
xAOD::eFexEMRoI_v1::iPhiTopo
int iPhiTopo() const
Return phi index in the range used by L1Topo (0->127)
Definition: eFexEMRoI_v1.cxx:261
xAOD::eFexEMRoI_v1::et
float et() const
TOB ET (decoded from TOB, stored for convenience)
GlobalSim::IOBitwise::CommonTOB::m_eta_bits
std::bitset< ICommonTOB::s_eta_width > m_eta_bits
Property: eta bitset within the common TOB word.
Definition: CommonTOB.h:68
GlobalSim::IOBitwise::CommonTOB::CommonTOB
CommonTOB(const xAOD::eFexEMRoI &eFexTOB)
Constructor taking an eFexROITOB to initialise common bits.
Definition: CommonTOB.cxx:10