ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
Global
GlobalSimulation
src
IO
CommonTOB.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
11
12
#ifndef GLOBALSIM_COMMONTOB_H
13
#define GLOBALSIM_COMMONTOB_H
14
15
#include "
xAODTrigger/eFexEMRoI.h
"
16
#include "
AthenaKernel/CLASS_DEF.h
"
17
18
#include <bitset>
19
20
namespace
GlobalSim::IOBitwise
{
22
class
CommonTOB
{
23
24
public
:
25
26
28
static
constexpr
std::size_t
s_et_width
{13};
30
static
constexpr
std::size_t
s_eta_width
{10};
32
static
constexpr
std::size_t
s_phi_width
{9};
33
34
static
constexpr
std::size_t
s_eFex_granularity
{100};
// MeV
35
36
static
constexpr
ulong
max_et
{(1UL <<
s_et_width
)-1};
37
// Errors if 0 or small
38
static_assert
(
max_et
!= 0 &&
max_et
<(1ULL << 63),
39
"Overflow or UB detected!"
);
40
41
48
CommonTOB
(
const
xAOD::eFexEMRoI
& eFexTOB);
55
CommonTOB
(
const
GlobalSim::IOBitwise::CommonTOB
&
CommonTOB
);
56
65
CommonTOB
(
const
std::bitset<s_et_width>&
et_bits
,
66
const
std::bitset<s_eta_width>&
eta_bits
,
67
const
std::bitset<s_phi_width>&
phi_bits
);
68
70
virtual
~CommonTOB
(){};
71
73
virtual
std::bitset<s_et_width>
et_bits
()
const
;
75
virtual
std::bitset<s_eta_width>
eta_bits
()
const
;
77
virtual
std::bitset<s_phi_width>
phi_bits
()
const
;
78
79
virtual
std::string
to_string
()
const
;
80
private
:
82
std::bitset<s_et_width>
m_et_bits
;
84
std::bitset<s_eta_width>
m_eta_bits
;
86
std::bitset<s_phi_width>
m_phi_bits
;
87
};
88
89
}
//End of namespace
90
91
CLASS_DEF
(
GlobalSim::IOBitwise::CommonTOB
, 186129504 , 1 )
92
93
#endif
//GLOBALSIM_COMMONTOB_H
CLASS_DEF.h
macros to associate a CLID to a type
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition
Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
GlobalSim::CommonTOB::CommonTOB
CommonTOB(const xAOD::eFexEMRoI &eFexTOB)
Constructor taking an eFexROITOB to initialise common bits.
Definition
CommonTOB.cxx:10
GlobalSim::IOBitwise::CommonTOB
Definition
CommonTOB.h:22
GlobalSim::IOBitwise::CommonTOB::s_eta_width
static constexpr std::size_t s_eta_width
Size of the eta bitset.
Definition
CommonTOB.h:30
GlobalSim::IOBitwise::CommonTOB::et_bits
virtual std::bitset< s_et_width > et_bits() const
Definition
CommonTOB.cxx:27
GlobalSim::IOBitwise::CommonTOB::m_et_bits
std::bitset< s_et_width > m_et_bits
Property: eT bitset within the common TOB word.
Definition
CommonTOB.h:82
GlobalSim::IOBitwise::CommonTOB::max_et
static constexpr ulong max_et
Definition
CommonTOB.h:36
GlobalSim::IOBitwise::CommonTOB::CommonTOB
CommonTOB(const std::bitset< s_et_width > &et_bits, const std::bitset< s_eta_width > &eta_bits, const std::bitset< s_phi_width > &phi_bits)
Constructor taking raw bitsets to initialise common bits.
GlobalSim::IOBitwise::CommonTOB::s_et_width
static constexpr std::size_t s_et_width
Size of the eT bitset.
Definition
CommonTOB.h:28
GlobalSim::IOBitwise::CommonTOB::m_eta_bits
std::bitset< s_eta_width > m_eta_bits
Property: eta bitset within the common TOB word.
Definition
CommonTOB.h:84
GlobalSim::IOBitwise::CommonTOB::eta_bits
virtual std::bitset< s_eta_width > eta_bits() const
Definition
CommonTOB.cxx:31
GlobalSim::IOBitwise::CommonTOB::phi_bits
virtual std::bitset< s_phi_width > phi_bits() const
Definition
CommonTOB.cxx:35
GlobalSim::IOBitwise::CommonTOB::CommonTOB
CommonTOB(const xAOD::eFexEMRoI &eFexTOB)
Constructor taking an eFexROITOB to initialise common bits.
Definition
CommonTOB.cxx:10
GlobalSim::IOBitwise::CommonTOB::~CommonTOB
virtual ~CommonTOB()
Definition
CommonTOB.h:70
GlobalSim::IOBitwise::CommonTOB::s_eFex_granularity
static constexpr std::size_t s_eFex_granularity
Definition
CommonTOB.h:34
GlobalSim::IOBitwise::CommonTOB::to_string
virtual std::string to_string() const
Definition
CommonTOB.cxx:39
GlobalSim::IOBitwise::CommonTOB::s_phi_width
static constexpr std::size_t s_phi_width
Size of the phi bitset.
Definition
CommonTOB.h:32
GlobalSim::IOBitwise::CommonTOB::m_phi_bits
std::bitset< s_phi_width > m_phi_bits
Property: phi bitset within the common TOB word.
Definition
CommonTOB.h:86
eFexEMRoI.h
GlobalSim::IOBitwise
Definition
CommonSortSelectAlgTool.h:19
xAOD::eFexEMRoI
eFexEMRoI_v1 eFexEMRoI
Define the latest version of the eFexEMRoI class.
Definition
eFexEMRoI.h:17
Generated on
for ATLAS Offline Software by
1.17.0