ATLAS Offline Software
Loading...
Searching...
No Matches
CommonTOB.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "CommonTOB.h"
6#include <sstream>
7
8namespace GlobalSim::IOBitwise {
9
11 m_et_bits(static_cast<ulong>(eFexTOB.et())/CommonTOB::s_eFex_granularity),
12 m_eta_bits(eFexTOB.iEtaTopo()),
13 m_phi_bits(eFexTOB.iPhiTopo()){
14 }
15
20
21 CommonTOB::CommonTOB(const std::bitset<CommonTOB::s_et_width>& et_bits,
22 const std::bitset<CommonTOB::s_eta_width>& eta_bits,
23 const std::bitset<CommonTOB::s_phi_width>& phi_bits):
24 m_et_bits(et_bits),
25 m_eta_bits(eta_bits),
26 m_phi_bits(phi_bits){}
27
28 std::bitset<CommonTOB::s_et_width> CommonTOB::et_bits() const {
29 return m_et_bits;
30 }
31
32 std::bitset<CommonTOB::s_eta_width> CommonTOB::eta_bits() const {
33 return m_eta_bits;
34 }
35
36 std::bitset<CommonTOB::s_phi_width> CommonTOB::phi_bits() const {
37 return m_phi_bits;
38 }
39
40 std::string CommonTOB::to_string() const {
41 std::stringstream ss;
42
43 auto et = et_bits();
44 auto eta = eta_bits();
45 auto phi = phi_bits();
46
47 ss << "Et: " << et << " (" << et.to_ulong() << ") "
48 << "Eta: " << eta << " (" << eta.to_ulong() << ") "
49 << "Phi: " << phi << " (" << phi.to_ulong() << ") ";
50
51 return ss.str();
52 }
53}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
static Double_t ss
virtual std::bitset< s_et_width > et_bits() const
Definition CommonTOB.cxx:28
std::bitset< s_et_width > m_et_bits
Property: eT bitset within the common TOB word.
Definition CommonTOB.h:82
std::bitset< s_eta_width > m_eta_bits
Property: eta bitset within the common TOB word.
Definition CommonTOB.h:84
virtual std::bitset< s_eta_width > eta_bits() const
Definition CommonTOB.cxx:32
virtual std::bitset< s_phi_width > phi_bits() const
Definition CommonTOB.cxx:36
CommonTOB(const xAOD::eFexEMRoI &eFexTOB)
Constructor taking an eFexROITOB to initialise common bits.
Definition CommonTOB.cxx:10
static constexpr std::size_t s_eFex_granularity
Definition CommonTOB.h:34
virtual std::string to_string() const
Definition CommonTOB.cxx:40
std::bitset< s_phi_width > m_phi_bits
Property: phi bitset within the common TOB word.
Definition CommonTOB.h:86
eFexEMRoI_v1 eFexEMRoI
Define the latest version of the eFexEMRoI class.
Definition eFexEMRoI.h:17
Extra patterns decribing particle interation process.