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

#include <cTauTOB.h>

Inheritance diagram for TCS::cTauTOB:
Collaboration diagram for TCS::cTauTOB:

Public Member Functions

 cTauTOB (uint32_t roiWord=0, const std::string &tobName="cTauTOB")
 cTauTOB (unsigned int et, int eta, unsigned int phi, inputTOBType_t tobType=NONE, uint32_t roiWord=0, const std::string &tobName="cTauTOB")
 cTauTOB (const cTauTOB &ctau)
virtual ~cTauTOB ()
unsigned int Et () const
int eta () const
unsigned int phi () const
double EtDouble () const
double etaDouble () const
double phiDouble () const
unsigned int RCore () const
unsigned int RHad () const
unsigned int EtIso () 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 setRCore (unsigned int rCore)
void setRHad (unsigned int rHad)
void setEtIso (unsigned int etIso)
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 cTauTOBcreateOnHeap (const cTauTOB &ctau)
static void clearHeap ()
static const Heap< TCS::cTauTOB > & 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_rCore {0}
unsigned int m_rHad {0}
unsigned int m_EtIso {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_nBitsIsolation
static const unsigned int g_nBitsEta = 9
static const unsigned int g_nBitsPhi = 7
static thread_local Heap< TCS::cTauTOBfg_heap

Detailed Description

Definition at line 13 of file cTauTOB.h.

Constructor & Destructor Documentation

◆ cTauTOB() [1/3]

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

Definition at line 12 of file cTauTOB.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

◆ cTauTOB() [2/3]

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

Definition at line 17 of file cTauTOB.cxx.

17 :
19 , m_Et( et ) //sizeCheck(et, nBitsEt()) )
20 , m_eta( eta ) //sizeCheck(eta, nBitsEta()) )
21 , m_phi( phi ) //sizeCheck(phi, nBitsPhi()) )
23{}
float et(const xAOD::jFexSRJetRoI *j)
int eta() const
Definition cTauTOB.h:34
inputTOBType_t tobType() const
Definition cTauTOB.h:69
unsigned int phi() const
Definition cTauTOB.h:35
unsigned int m_Et
Definition cTauTOB.h:77
unsigned int m_phi
Definition cTauTOB.h:79
inputTOBType_t m_tobType
Definition cTauTOB.h:90

◆ cTauTOB() [3/3]

TCS::cTauTOB::cTauTOB ( const cTauTOB & ctau)
default

◆ ~cTauTOB()

TCS::cTauTOB::~cTauTOB ( )
virtualdefault

Member Function Documentation

◆ clearHeap()

void TCS::cTauTOB::clearHeap ( )
static

Definition at line 38 of file cTauTOB.cxx.

38 {
39 return fg_heap.clear();
40}
static thread_local Heap< TCS::cTauTOB > fg_heap
Definition cTauTOB.h:92

◆ createOnHeap()

TCS::cTauTOB * TCS::cTauTOB::createOnHeap ( const cTauTOB & ctau)
static

Definition at line 33 of file cTauTOB.cxx.

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

◆ Et()

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

Definition at line 33 of file cTauTOB.h.

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

◆ eta()

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

Definition at line 34 of file cTauTOB.h.

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

◆ etaDouble()

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

Definition at line 38 of file cTauTOB.h.

38{ return m_etaDouble; } // float eta with granularity 0.025
double m_etaDouble
Definition cTauTOB.h:82

◆ EtDouble()

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

Definition at line 37 of file cTauTOB.h.

37{ return m_EtDouble; } // float Et in units of GeV
double m_EtDouble
Definition cTauTOB.h:81

◆ EtIso()

unsigned int TCS::cTauTOB::EtIso ( ) const
inline

Definition at line 44 of file cTauTOB.h.

44{ return m_EtIso; } // jTau isolation energy
unsigned int m_EtIso
Definition cTauTOB.h:88

◆ heap()

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

Definition at line 63 of file cTauTOB.h.

63{ 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::cTauTOB::nBitsEt ( )
inlinestatic

Definition at line 16 of file cTauTOB.h.

16{ return g_nBitsEt; }
static const unsigned int g_nBitsEt
Definition cTauTOB.h:72

◆ nBitsEta()

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

Definition at line 17 of file cTauTOB.h.

17{ return g_nBitsEta; }
static const unsigned int g_nBitsEta
Definition cTauTOB.h:74

◆ nBitsPhi()

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

Definition at line 18 of file cTauTOB.h.

18{ return g_nBitsPhi; }
static const unsigned int g_nBitsPhi
Definition cTauTOB.h:75

◆ phi()

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

Definition at line 35 of file cTauTOB.h.

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

◆ phiDouble()

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

Definition at line 39 of file cTauTOB.h.

39{ return m_phiDouble; } // float phi with granularity 0.05
double m_phiDouble
Definition cTauTOB.h:83

◆ print()

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

Implements TCS::BaseTOB.

Definition at line 42 of file cTauTOB.cxx.

42 {
43 o << "cTau energy: " << Et() << ", eta: " << eta() << ", phi: " << phi();
44}
unsigned int Et() const
Definition cTauTOB.h:33

◆ RCore()

unsigned int TCS::cTauTOB::RCore ( ) const
inline

Definition at line 41 of file cTauTOB.h.

41{ return m_rCore; } // eTau isolation
unsigned int m_rCore
Definition cTauTOB.h:85

◆ RHad()

unsigned int TCS::cTauTOB::RHad ( ) const
inline

Definition at line 42 of file cTauTOB.h.

42{ return m_rHad; } // eTau isolation
unsigned int m_rHad
Definition cTauTOB.h:86

◆ 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::cTauTOB::setEt ( unsigned int et)
inline

Definition at line 47 of file cTauTOB.h.

47{ m_Et = sizeCheck(et, nBitsEt()); }
int sizeCheck(int value, unsigned int size) const
Definition BaseTOB.cxx:32
static unsigned int nBitsEt()
Definition cTauTOB.h:16

◆ setEta()

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

Definition at line 48 of file cTauTOB.h.

48{ m_eta = sizeCheck(eta, nBitsEta()); }
static unsigned int nBitsEta()
Definition cTauTOB.h:17

◆ setEtaDouble()

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

Definition at line 52 of file cTauTOB.h.

52{ m_etaDouble = eta; }

◆ setEtDouble()

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

Definition at line 51 of file cTauTOB.h.

51{ m_EtDouble = et; }

◆ setEtIso()

void TCS::cTauTOB::setEtIso ( unsigned int etIso)
inline

Definition at line 58 of file cTauTOB.h.

58{ m_EtIso = etIso; }

◆ setPhi()

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

Definition at line 49 of file cTauTOB.h.

49{ m_phi = sizeCheck(phi, nBitsPhi()); }
static unsigned int nBitsPhi()
Definition cTauTOB.h:18

◆ setPhiDouble()

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

Definition at line 53 of file cTauTOB.h.

53{ m_phiDouble = phi; }

◆ setRCore()

void TCS::cTauTOB::setRCore ( unsigned int rCore)
inline

Definition at line 55 of file cTauTOB.h.

55{ m_rCore = rCore; }

◆ setRHad()

void TCS::cTauTOB::setRHad ( unsigned int rHad)
inline

Definition at line 56 of file cTauTOB.h.

56{ m_rHad = rHad; }

◆ setTobType()

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

Definition at line 67 of file cTauTOB.h.

67{ m_tobType = tobType; }

◆ 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::cTauTOB::tobType ( ) const
inlinevirtual

Implements TCS::BaseTOB.

Definition at line 69 of file cTauTOB.h.

69{ return m_tobType; }

Member Data Documentation

◆ fg_heap

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

Definition at line 92 of file cTauTOB.h.

◆ g_nBitsEt

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

Definition at line 72 of file cTauTOB.h.

◆ g_nBitsEta

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

Definition at line 74 of file cTauTOB.h.

◆ g_nBitsIsolation

const unsigned int TCS::cTauTOB::g_nBitsIsolation
staticprivate

Definition at line 73 of file cTauTOB.h.

◆ g_nBitsPhi

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

Definition at line 75 of file cTauTOB.h.

◆ m_Et

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

Definition at line 77 of file cTauTOB.h.

77{0};

◆ m_eta

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

Definition at line 78 of file cTauTOB.h.

78{0};

◆ m_etaDouble

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

Definition at line 82 of file cTauTOB.h.

82{0};

◆ m_EtDouble

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

Definition at line 81 of file cTauTOB.h.

81{0};

◆ m_EtIso

unsigned int TCS::cTauTOB::m_EtIso {0}
private

Definition at line 88 of file cTauTOB.h.

88{0};

◆ m_phi

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

Definition at line 79 of file cTauTOB.h.

79{0};

◆ m_phiDouble

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

Definition at line 83 of file cTauTOB.h.

83{0};

◆ m_rCore

unsigned int TCS::cTauTOB::m_rCore {0}
private

Definition at line 85 of file cTauTOB.h.

85{0};

◆ m_rHad

unsigned int TCS::cTauTOB::m_rHad {0}
private

Definition at line 86 of file cTauTOB.h.

86{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::cTauTOB::m_tobType { NONE }
private

Definition at line 90 of file cTauTOB.h.


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