ATLAS Offline Software
Loading...
Searching...
No Matches
TCS::eEmTOB Class Reference

#include <eEmTOB.h>

Inheritance diagram for TCS::eEmTOB:
Collaboration diagram for TCS::eEmTOB:

Public Member Functions

 eEmTOB (uint32_t roiWord=0, const std::string &tobName="eEmTOB")
 eEmTOB (unsigned int et, int eta, unsigned int phi, inputTOBType_t tobType=NONE, uint32_t roiWord=0, const std::string &tobName="eEmTOB")
 eEmTOB (const eEmTOB &eem)
virtual ~eEmTOB ()
unsigned int Et () const
int eta () const
unsigned int phi () const
double EtDouble () const
double etaDouble () const
double phiDouble () const
unsigned int Reta () const
unsigned int Rhad () const
unsigned int Wstot () const
void setEt (unsigned int et)
void setEta (int eta)
void setPhi (unsigned int phi)
void setEtDouble (double et)
void setEtaDouble (double eta)
void setPhiDouble (double phi)
void setReta (unsigned int th)
void setRhad (unsigned int th)
void setWstot (unsigned int th)
virtual void print (std::ostream &o) const
void setTobType (inputTOBType_t tobType)
inputTOBType_t tobType () const
uint32_t roiWord () const
const std::string & tobName () const

Static Public Member Functions

static unsigned int nBitsEt ()
static unsigned int nBitsEta ()
static unsigned int nBitsPhi ()
static eEmTOBcreateOnHeap (const eEmTOB &eem)
static void clearHeap ()
static const Heap< TCS::eEmTOB > & heap ()
static size_t instances ()

Protected Member Functions

int sizeCheck (int value, unsigned int size) const
unsigned int sizeCheck (unsigned int value, unsigned int size) const
int sizeCheckM (int value, unsigned int size) const

Private Attributes

unsigned int m_Et {0}
int m_eta {0}
unsigned int m_phi {0}
double m_EtDouble {0}
double m_etaDouble {0}
double m_phiDouble {0}
unsigned int m_reta {0}
unsigned int m_rhad {0}
unsigned int m_wstot {0}
inputTOBType_t m_tobType { NONE }
uint32_t m_roiWord
std::string m_tobName

Static Private Attributes

static const unsigned int g_nBitsEt = 13
static const unsigned int g_nBitsEta = 9
static const unsigned int g_nBitsPhi = 7
static thread_local Heap< TCS::eEmTOBfg_heap

Detailed Description

Definition at line 13 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

Constructor & Destructor Documentation

◆ eEmTOB() [1/3]

TCS::eEmTOB::eEmTOB ( uint32_t roiWord = 0,
const std::string & tobName = "eEmTOB" )

Definition at line 12 of file L1Topo/L1TopoEvent/Root/eEmTOB.cxx.

12 :
14{}
const std::string & tobName() const
Definition BaseTOB.h:23
uint32_t roiWord() const
Definition BaseTOB.h:21
BaseTOB(uint32_t roiWord, const std::string &tobType)
Definition BaseTOB.cxx:11

◆ eEmTOB() [2/3]

TCS::eEmTOB::eEmTOB ( unsigned int et,
int eta,
unsigned int phi,
inputTOBType_t tobType = NONE,
uint32_t roiWord = 0,
const std::string & tobName = "eEmTOB" )

Definition at line 17 of file L1Topo/L1TopoEvent/Root/eEmTOB.cxx.

17 :
19 , m_Et( sizeCheck(et, nBitsEt()) )
23{}
float et(const xAOD::jFexSRJetRoI *j)
int sizeCheck(int value, unsigned int size) const
Definition BaseTOB.cxx:32

◆ eEmTOB() [3/3]

TCS::eEmTOB::eEmTOB ( const eEmTOB & eem)
default

◆ ~eEmTOB()

TCS::eEmTOB::~eEmTOB ( )
virtualdefault

Member Function Documentation

◆ clearHeap()

void TCS::eEmTOB::clearHeap ( )
static

Definition at line 38 of file L1Topo/L1TopoEvent/Root/eEmTOB.cxx.

38 {
39 return fg_heap.clear();
40}
static thread_local Heap< TCS::eEmTOB > fg_heap

◆ createOnHeap()

TCS::eEmTOB * TCS::eEmTOB::createOnHeap ( const eEmTOB & eem)
static

Definition at line 33 of file L1Topo/L1TopoEvent/Root/eEmTOB.cxx.

33 {
34 return fg_heap.create(eem);
35}

◆ Et()

unsigned int TCS::eEmTOB::Et ( ) const
inline

Definition at line 33 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

33{ return m_Et; } // Et in units of 100 MeV

◆ eta()

int TCS::eEmTOB::eta ( ) const
inline

Definition at line 34 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

34{ return m_eta; } // eta in units of 0.025

◆ etaDouble()

double TCS::eEmTOB::etaDouble ( ) const
inline

Definition at line 38 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

38{ return m_etaDouble; } // float eta with granularity 0.025

◆ EtDouble()

double TCS::eEmTOB::EtDouble ( ) const
inline

Definition at line 37 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

37{ return m_EtDouble; } // float Et in units of GeV

◆ heap()

const Heap< TCS::eEmTOB > & TCS::eEmTOB::heap ( )
inlinestatic

Definition at line 61 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

61{ return fg_heap; }

◆ instances()

size_t TCS::BaseTOB::instances ( )
inlinestaticinherited

Definition at line 25 of file BaseTOB.h.

25{ return 0; }

◆ nBitsEt()

unsigned int TCS::eEmTOB::nBitsEt ( )
inlinestatic

Definition at line 16 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

16{ return g_nBitsEt; }
static const unsigned int g_nBitsEt

◆ nBitsEta()

unsigned int TCS::eEmTOB::nBitsEta ( )
inlinestatic

Definition at line 17 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

17{ return g_nBitsEta; }
static const unsigned int g_nBitsEta

◆ nBitsPhi()

unsigned int TCS::eEmTOB::nBitsPhi ( )
inlinestatic

Definition at line 18 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

18{ return g_nBitsPhi; }
static const unsigned int g_nBitsPhi

◆ phi()

unsigned int TCS::eEmTOB::phi ( ) const
inline

Definition at line 35 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

35{ return m_phi; } // phi in units of 0.05

◆ phiDouble()

double TCS::eEmTOB::phiDouble ( ) const
inline

Definition at line 39 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

39{ return m_phiDouble; } // float phi with granularity 0.05

◆ print()

void TCS::eEmTOB::print ( std::ostream & o) const
virtual

Implements TCS::BaseTOB.

Definition at line 42 of file L1Topo/L1TopoEvent/Root/eEmTOB.cxx.

42 {
43 o << "eEm energy: " << Et() << ", eta: " << eta() << ", phi: " << phi();
44}

◆ Reta()

unsigned int TCS::eEmTOB::Reta ( ) const
inline

Definition at line 41 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

41{ return m_reta; }

◆ Rhad()

unsigned int TCS::eEmTOB::Rhad ( ) const
inline

Definition at line 42 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

42{ return m_rhad; }

◆ roiWord()

uint32_t TCS::BaseTOB::roiWord ( ) const
inlineinherited

Definition at line 21 of file BaseTOB.h.

21{ return m_roiWord; }
uint32_t m_roiWord
Definition BaseTOB.h:36

◆ setEt()

void TCS::eEmTOB::setEt ( unsigned int et)
inline

Definition at line 46 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

46{ m_Et = sizeCheck(et, nBitsEt()); }

◆ setEta()

void TCS::eEmTOB::setEta ( int eta)
inline

Definition at line 47 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

47{ m_eta = sizeCheck(eta, nBitsEta()); }

◆ setEtaDouble()

void TCS::eEmTOB::setEtaDouble ( double eta)
inline

Definition at line 51 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

51{ m_etaDouble = eta; }

◆ setEtDouble()

void TCS::eEmTOB::setEtDouble ( double et)
inline

Definition at line 50 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

50{ m_EtDouble = et; }

◆ setPhi()

void TCS::eEmTOB::setPhi ( unsigned int phi)
inline

Definition at line 48 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

48{ m_phi = sizeCheck(phi, nBitsPhi()); }

◆ setPhiDouble()

void TCS::eEmTOB::setPhiDouble ( double phi)
inline

Definition at line 52 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

52{ m_phiDouble = phi; }

◆ setReta()

void TCS::eEmTOB::setReta ( unsigned int th)
inline

◆ setRhad()

void TCS::eEmTOB::setRhad ( unsigned int th)
inline

Definition at line 55 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

55{ m_rhad = th; }

◆ setTobType()

void TCS::eEmTOB::setTobType ( inputTOBType_t tobType)
inline

Definition at line 65 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

65{ m_tobType = tobType; }

◆ setWstot()

void TCS::eEmTOB::setWstot ( unsigned int th)
inline

◆ sizeCheck() [1/2]

int TCS::BaseTOB::sizeCheck ( int value,
unsigned int size ) const
protectedinherited

Definition at line 32 of file BaseTOB.cxx.

33{
34 int max(0x1 << (size-1));
35 int min(~max + 1);
36 --max;
37 if(value>max || value<min) {
38 TCS_EXCEPTION("Integer value " << value << " outside firmware specifications. Maximum number of bits is " << size << " -> range ["<<min<<" - "<<max<<"]" << ", for " << m_tobName);
39 }
40 return value;
41}
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
std::string m_tobName
Definition BaseTOB.h:37

◆ sizeCheck() [2/2]

unsigned int TCS::BaseTOB::sizeCheck ( unsigned int value,
unsigned int size ) const
protectedinherited

Definition at line 44 of file BaseTOB.cxx.

45{
46 unsigned int max( (0x1 << size)-1 );
47 if(value>max) {
48 TCS_EXCEPTION("Unsigned integer value " << value << " outside firmware specifications. Maximum number of bits is " << size << " -> range [0"<<" - "<<max<<"]" << ", for " << m_tobName);
49 }
50 return value;
51}

◆ sizeCheckM()

int TCS::BaseTOB::sizeCheckM ( int value,
unsigned int size ) const
protectedinherited

Definition at line 19 of file BaseTOB.cxx.

20{
21 int max(0x1 << (size-1));
22 int min(~max + 1);
23 --max;
24 if( (-value)>max || (-value)<min) {
25 TCS_EXCEPTION("Integer value " << -value << " outside firmware specifications. Maximum number of bits is " << size << " -> range ["<<min<<" - "<<max<<"]" << ", for " << m_tobName);
26 }
27 return value;
28}

◆ tobName()

const std::string & TCS::BaseTOB::tobName ( ) const
inlineinherited

Definition at line 23 of file BaseTOB.h.

23{ return m_tobName; }

◆ tobType()

inputTOBType_t TCS::eEmTOB::tobType ( ) const
inlinevirtual

Implements TCS::BaseTOB.

Definition at line 67 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

67{ return m_tobType; }

◆ Wstot()

unsigned int TCS::eEmTOB::Wstot ( ) const
inline

Definition at line 43 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

43{ return m_wstot; }

Member Data Documentation

◆ fg_heap

thread_local TCS::Heap< TCS::eEmTOB > TCS::eEmTOB::fg_heap
staticprivate

Definition at line 88 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

◆ g_nBitsEt

const unsigned int TCS::eEmTOB::g_nBitsEt = 13
staticprivate

Definition at line 70 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

◆ g_nBitsEta

const unsigned int TCS::eEmTOB::g_nBitsEta = 9
staticprivate

Definition at line 71 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

◆ g_nBitsPhi

const unsigned int TCS::eEmTOB::g_nBitsPhi = 7
staticprivate

Definition at line 72 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

◆ m_Et

unsigned int TCS::eEmTOB::m_Et {0}
private

Definition at line 74 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

74{0};

◆ m_eta

int TCS::eEmTOB::m_eta {0}
private

Definition at line 75 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

75{0};

◆ m_etaDouble

double TCS::eEmTOB::m_etaDouble {0}
private

Definition at line 79 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

79{0};

◆ m_EtDouble

double TCS::eEmTOB::m_EtDouble {0}
private

Definition at line 78 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

78{0};

◆ m_phi

unsigned int TCS::eEmTOB::m_phi {0}
private

Definition at line 76 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

76{0};

◆ m_phiDouble

double TCS::eEmTOB::m_phiDouble {0}
private

Definition at line 80 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

80{0};

◆ m_reta

unsigned int TCS::eEmTOB::m_reta {0}
private

Definition at line 82 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

82{0};

◆ m_rhad

unsigned int TCS::eEmTOB::m_rhad {0}
private

Definition at line 83 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

83{0};

◆ m_roiWord

uint32_t TCS::BaseTOB::m_roiWord
privateinherited

Definition at line 36 of file BaseTOB.h.

◆ m_tobName

std::string TCS::BaseTOB::m_tobName
privateinherited

Definition at line 37 of file BaseTOB.h.

◆ m_tobType

inputTOBType_t TCS::eEmTOB::m_tobType { NONE }
private

◆ m_wstot

unsigned int TCS::eEmTOB::m_wstot {0}
private

Definition at line 84 of file L1Topo/L1TopoEvent/L1TopoEvent/eEmTOB.h.

84{0};

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