ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
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 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 eEmTOB.cxx.

12  :
14 {}

◆ 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 eEmTOB.cxx.

17  :
19  , m_Et( sizeCheck(et, nBitsEt()) )
20  , m_eta( sizeCheck(eta, nBitsEta()) )
21  , m_phi( sizeCheck(phi, nBitsPhi()) )
22  , m_tobType( tobType )
23 {}

◆ 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 eEmTOB.cxx.

38  {
39  return fg_heap.clear();
40 }

◆ createOnHeap()

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

Definition at line 33 of file eEmTOB.cxx.

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

◆ Et()

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

Definition at line 33 of file 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 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 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 eEmTOB.h.

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

◆ heap()

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

Definition at line 61 of file eEmTOB.h.

61 { return fg_heap; }

◆ instances()

static size_t TCS::BaseTOB::instances ( )
inlinestaticinherited

Definition at line 25 of file BaseTOB.h.

25 { return 0; }

◆ nBitsEt()

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

Definition at line 16 of file eEmTOB.h.

16 { return g_nBitsEt; }

◆ nBitsEta()

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

Definition at line 17 of file eEmTOB.h.

17 { return g_nBitsEta; }

◆ nBitsPhi()

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

Definition at line 18 of file eEmTOB.h.

18 { return g_nBitsPhi; }

◆ phi()

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

Definition at line 35 of file 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 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 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 eEmTOB.h.

41 { return m_reta; }

◆ Rhad()

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

Definition at line 42 of file 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; }

◆ setEt()

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

Definition at line 46 of file eEmTOB.h.

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

◆ setEta()

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

Definition at line 47 of file eEmTOB.h.

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

◆ setEtaDouble()

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

Definition at line 51 of file eEmTOB.h.

51 { m_etaDouble = eta; }

◆ setEtDouble()

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

Definition at line 50 of file eEmTOB.h.

50 { m_EtDouble = et; }

◆ setPhi()

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

Definition at line 48 of file eEmTOB.h.

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

◆ setPhiDouble()

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

Definition at line 52 of file eEmTOB.h.

52 { m_phiDouble = phi; }

◆ setReta()

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

Definition at line 54 of file eEmTOB.h.

54 { m_reta = th; }

◆ setRhad()

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

Definition at line 55 of file eEmTOB.h.

55 { m_rhad = th; }

◆ setTobType()

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

Definition at line 65 of file eEmTOB.h.

65 { m_tobType = tobType; }

◆ setWstot()

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

Definition at line 56 of file eEmTOB.h.

56 { m_wstot = th; }

◆ 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 }

◆ 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 eEmTOB.h.

67 { return m_tobType; }

◆ Wstot()

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

Definition at line 43 of file 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 eEmTOB.h.

◆ g_nBitsEt

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

Definition at line 70 of file eEmTOB.h.

◆ g_nBitsEta

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

Definition at line 71 of file eEmTOB.h.

◆ g_nBitsPhi

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

Definition at line 72 of file eEmTOB.h.

◆ m_Et

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

Definition at line 74 of file eEmTOB.h.

◆ m_eta

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

Definition at line 75 of file eEmTOB.h.

◆ m_etaDouble

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

Definition at line 79 of file eEmTOB.h.

◆ m_EtDouble

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

Definition at line 78 of file eEmTOB.h.

◆ m_phi

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

Definition at line 76 of file eEmTOB.h.

◆ m_phiDouble

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

Definition at line 80 of file eEmTOB.h.

◆ m_reta

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

Definition at line 82 of file eEmTOB.h.

◆ m_rhad

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

Definition at line 83 of file eEmTOB.h.

◆ 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

Definition at line 86 of file eEmTOB.h.

◆ m_wstot

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

Definition at line 84 of file eEmTOB.h.


The documentation for this class was generated from the following files:
TCS::BaseTOB::tobName
const std::string & tobName() const
Definition: BaseTOB.h:23
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
et
Extra patterns decribing particle interation process.
TCS::eEmTOB::m_EtDouble
double m_EtDouble
Definition: eEmTOB.h:78
TCS::Heap::clear
void clear()
Definition: Heap.h:32
max
#define max(a, b)
Definition: cfImp.cxx:41
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
TCS::eEmTOB::g_nBitsPhi
static const unsigned int g_nBitsPhi
Definition: eEmTOB.h:72
athena.value
value
Definition: athena.py:122
TCS::BaseTOB::roiWord
uint32_t roiWord() const
Definition: BaseTOB.h:21
TCS::eEmTOB::nBitsPhi
static unsigned int nBitsPhi()
Definition: eEmTOB.h:18
TCS::eEmTOB::fg_heap
static thread_local Heap< TCS::eEmTOB > fg_heap
Definition: eEmTOB.h:88
TCS::eEmTOB::m_phi
unsigned int m_phi
Definition: eEmTOB.h:76
TCS::eEmTOB::m_phiDouble
double m_phiDouble
Definition: eEmTOB.h:80
TCS::eEmTOB::m_tobType
inputTOBType_t m_tobType
Definition: eEmTOB.h:86
TCS::BaseTOB::sizeCheck
int sizeCheck(int value, unsigned int size) const
Definition: BaseTOB.cxx:32
TCS::eEmTOB::g_nBitsEta
static const unsigned int g_nBitsEta
Definition: eEmTOB.h:71
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
TCS::BaseTOB::BaseTOB
BaseTOB(uint32_t roiWord, const std::string &tobType)
Definition: BaseTOB.cxx:11
python.TriggerHandler.th
th
Definition: TriggerHandler.py:296
TCS::BaseTOB::m_roiWord
uint32_t m_roiWord
Definition: BaseTOB.h:36
TCS::eEmTOB::m_rhad
unsigned int m_rhad
Definition: eEmTOB.h:83
TCS::eEmTOB::m_etaDouble
double m_etaDouble
Definition: eEmTOB.h:79
TCS::eEmTOB::m_Et
unsigned int m_Et
Definition: eEmTOB.h:74
TCS_EXCEPTION
#define TCS_EXCEPTION(MSG)
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Exception.h:14
min
#define min(a, b)
Definition: cfImp.cxx:40
TCS::eEmTOB::Et
unsigned int Et() const
Definition: eEmTOB.h:33
TCS::eEmTOB::phi
unsigned int phi() const
Definition: eEmTOB.h:35
TCS::Heap::create
T * create(const T &obj)
create an object on the heap
Definition: Heap.h:50
TCS::eEmTOB::eta
int eta() const
Definition: eEmTOB.h:34
TCS::eEmTOB::m_eta
int m_eta
Definition: eEmTOB.h:75
TCS::eEmTOB::g_nBitsEt
static const unsigned int g_nBitsEt
Definition: eEmTOB.h:70
TCS::eEmTOB::nBitsEt
static unsigned int nBitsEt()
Definition: eEmTOB.h:16
TCS::eEmTOB::tobType
inputTOBType_t tobType() const
Definition: eEmTOB.h:67
TCS::eEmTOB::nBitsEta
static unsigned int nBitsEta()
Definition: eEmTOB.h:17
TCS::eEmTOB::m_reta
unsigned int m_reta
Definition: eEmTOB.h:82
TCS::eEmTOB::m_wstot
unsigned int m_wstot
Definition: eEmTOB.h:84
TCS::BaseTOB::m_tobName
std::string m_tobName
Definition: BaseTOB.h:37