ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TCS::JetTOB Class Reference

#include <JetTOB.h>

Inheritance diagram for TCS::JetTOB:
Collaboration diagram for TCS::JetTOB:

Public Types

enum  JetSize { JS1, JS2 }
 

Public Member Functions

 JetTOB (uint32_t roiWord=0, const std::string &tobName="JetTOB")
 
 JetTOB (const JetTOB &jet)
 
 JetTOB (unsigned int Et1, unsigned int Et2, int eta, int phi, uint32_t roiWord=0, const std::string &tobName="JetTOB")
 
virtual ~JetTOB ()
 
int energy (JetSize js) const
 
int Et (JetSize js) const
 
unsigned int Et1 () const
 
unsigned int EtWide () const
 
unsigned int Et2 () const
 
unsigned int EtNarrow () const
 
int eta () const
 
int phi () const
 
double EtDouble (JetSize js) const
 
double Et1Double () const
 
double Et2Double () const
 
double etaDouble () const
 
double phiDouble () const
 
void setEt1 (int energy)
 
void setEtWide (int energy)
 
void setEt2 (int energy)
 
void setEtNarrow (int energy)
 
void setEta (int eta)
 
void setPhi (int phi)
 
void setEtWideDouble (double et)
 
void setEtNarrowDouble (double et)
 
void setEtaDouble (double eta)
 
void setPhiDouble (double phi)
 
inputTOBType_t tobType () const
 
uint32_t roiWord () const
 
const std::string & tobName () const
 

Static Public Member Functions

static JetTOBcreateOnHeap (const JetTOB &jet)
 
static void clearHeap ()
 
static const Heap< TCS::JetTOB > & 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 Member Functions

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

Private Attributes

unsigned int m_Et1 { 0 }
 
unsigned int m_Et2 { 0 }
 
int m_eta { 0 }
 
int m_phi { 0 }
 
double m_Et1Double { 0 }
 
double m_Et2Double { 0 }
 
double m_etaDouble { 0 }
 
double m_phiDouble { 0 }
 
uint32_t m_roiWord
 
std::string m_tobName
 

Static Private Attributes

static const unsigned int g_nBitsEt
 
static const unsigned int g_nBitsIsolation
 
static const unsigned int g_nBitsEta
 
static const unsigned int g_nBitsPhi
 
static thread_local Heap< TCS::JetTOBfg_heap
 

Detailed Description

Definition at line 18 of file JetTOB.h.

Member Enumeration Documentation

◆ JetSize

Enumerator
JS1 
JS2 

Definition at line 21 of file JetTOB.h.

21 { JS1, JS2 };

Constructor & Destructor Documentation

◆ JetTOB() [1/3]

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

Definition at line 9 of file JetTOB.cxx.

9  :
11 {}

◆ JetTOB() [2/3]

TCS::JetTOB::JetTOB ( const JetTOB jet)
default

◆ JetTOB() [3/3]

TCS::JetTOB::JetTOB ( unsigned int  Et1,
unsigned int  Et2,
int  eta,
int  phi,
uint32_t  roiWord = 0,
const std::string &  tobName = "JetTOB" 
)

Definition at line 14 of file JetTOB.cxx.

14  :
16  , m_Et1(Et1)
17  , m_Et2(Et2)
18  , m_eta(eta)
19  , m_phi(phi)
20  , m_Et1Double(Et1)
21  , m_Et2Double(Et2)
22  , m_etaDouble(eta/10.)
23  , m_phiDouble(phi/10.)
24 {}

◆ ~JetTOB()

TCS::JetTOB::~JetTOB ( )
virtualdefault

Member Function Documentation

◆ clearHeap()

void TCS::JetTOB::clearHeap ( )
static

Definition at line 37 of file JetTOB.cxx.

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

◆ createOnHeap()

TCS::JetTOB * TCS::JetTOB::createOnHeap ( const JetTOB jet)
static

Definition at line 32 of file JetTOB.cxx.

32  {
33  return fg_heap.create(jet);
34 }

◆ energy()

int TCS::JetTOB::energy ( JetSize  js) const
inline

Definition at line 36 of file JetTOB.h.

36 { return static_cast<int>(js==JS1?m_Et1:m_Et2); }

◆ Et()

int TCS::JetTOB::Et ( JetSize  js) const
inline

Definition at line 37 of file JetTOB.h.

37 { return static_cast<int>(js==JS1?m_Et1:m_Et2); }

◆ Et1()

unsigned int TCS::JetTOB::Et1 ( ) const
inline

Definition at line 40 of file JetTOB.h.

40 { return m_Et1; }

◆ Et1Double()

double TCS::JetTOB::Et1Double ( ) const
inline

Definition at line 48 of file JetTOB.h.

48 { return m_Et1Double; }

◆ Et2()

unsigned int TCS::JetTOB::Et2 ( ) const
inline

Definition at line 42 of file JetTOB.h.

42 { return m_Et2; }

◆ Et2Double()

double TCS::JetTOB::Et2Double ( ) const
inline

Definition at line 49 of file JetTOB.h.

49 { return m_Et2Double; }

◆ eta()

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

Definition at line 44 of file JetTOB.h.

44 { return m_eta; }

◆ etaDouble()

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

Definition at line 50 of file JetTOB.h.

50 { return m_etaDouble; }

◆ EtDouble()

double TCS::JetTOB::EtDouble ( JetSize  js) const
inline

Definition at line 47 of file JetTOB.h.

47 { return js==JS1?m_Et1Double:m_Et2Double; }

◆ EtNarrow()

unsigned int TCS::JetTOB::EtNarrow ( ) const
inline

Definition at line 43 of file JetTOB.h.

43 { return m_Et2; }

◆ EtWide()

unsigned int TCS::JetTOB::EtWide ( ) const
inline

Definition at line 41 of file JetTOB.h.

41 { return m_Et1; }

◆ heap()

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

Definition at line 71 of file JetTOB.h.

71 { return fg_heap; }

◆ instances()

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

Definition at line 25 of file BaseTOB.h.

25 { return 0; }

◆ phi()

int TCS::JetTOB::phi ( ) const
inline

Definition at line 45 of file JetTOB.h.

45 { return m_phi; }

◆ phiDouble()

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

Definition at line 51 of file JetTOB.h.

51 { return m_phiDouble; }

◆ print()

void TCS::JetTOB::print ( std::ostream &  o) const
privatevirtual

Implements TCS::BaseTOB.

Definition at line 42 of file JetTOB.cxx.

42  {
43  o << "jet energy wide window: " << Et1() << ", narrow window: " << Et2() << ", eta: " << eta() << ", phi: " << phi();
44 }

◆ roiWord()

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

Definition at line 21 of file BaseTOB.h.

21 { return m_roiWord; }

◆ setEt1()

void TCS::JetTOB::setEt1 ( int  energy)
inline

Definition at line 54 of file JetTOB.h.

54 { m_Et1 = energy; }

◆ setEt2()

void TCS::JetTOB::setEt2 ( int  energy)
inline

Definition at line 56 of file JetTOB.h.

56 { m_Et2 = energy; }

◆ setEta()

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

Definition at line 58 of file JetTOB.h.

58 { m_eta = eta; }

◆ setEtaDouble()

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

Definition at line 63 of file JetTOB.h.

63 { m_etaDouble = eta; }

◆ setEtNarrow()

void TCS::JetTOB::setEtNarrow ( int  energy)
inline

Definition at line 57 of file JetTOB.h.

57 { m_Et2 = energy; }

◆ setEtNarrowDouble()

void TCS::JetTOB::setEtNarrowDouble ( double  et)
inline

Definition at line 62 of file JetTOB.h.

62 { m_Et2Double = et; }

◆ setEtWide()

void TCS::JetTOB::setEtWide ( int  energy)
inline

Definition at line 55 of file JetTOB.h.

55 { m_Et1 = energy; }

◆ setEtWideDouble()

void TCS::JetTOB::setEtWideDouble ( double  et)
inline

Definition at line 61 of file JetTOB.h.

61 { m_Et1Double = et; }

◆ setPhi()

void TCS::JetTOB::setPhi ( int  phi)
inline

Definition at line 59 of file JetTOB.h.

59 { m_phi = phi; }

◆ setPhiDouble()

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

Definition at line 64 of file JetTOB.h.

64 { m_phiDouble = phi; }

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

Implements TCS::BaseTOB.

Definition at line 66 of file JetTOB.h.

66 { return JET; }

Member Data Documentation

◆ fg_heap

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

Definition at line 92 of file JetTOB.h.

◆ g_nBitsEt

const unsigned int TCS::JetTOB::g_nBitsEt
staticprivate

Definition at line 75 of file JetTOB.h.

◆ g_nBitsEta

const unsigned int TCS::JetTOB::g_nBitsEta
staticprivate

Definition at line 77 of file JetTOB.h.

◆ g_nBitsIsolation

const unsigned int TCS::JetTOB::g_nBitsIsolation
staticprivate

Definition at line 76 of file JetTOB.h.

◆ g_nBitsPhi

const unsigned int TCS::JetTOB::g_nBitsPhi
staticprivate

Definition at line 78 of file JetTOB.h.

◆ m_Et1

unsigned int TCS::JetTOB::m_Et1 { 0 }
private

Definition at line 80 of file JetTOB.h.

◆ m_Et1Double

double TCS::JetTOB::m_Et1Double { 0 }
private

Definition at line 85 of file JetTOB.h.

◆ m_Et2

unsigned int TCS::JetTOB::m_Et2 { 0 }
private

Definition at line 81 of file JetTOB.h.

◆ m_Et2Double

double TCS::JetTOB::m_Et2Double { 0 }
private

Definition at line 86 of file JetTOB.h.

◆ m_eta

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

Definition at line 82 of file JetTOB.h.

◆ m_etaDouble

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

Definition at line 87 of file JetTOB.h.

◆ m_phi

int TCS::JetTOB::m_phi { 0 }
private

Definition at line 83 of file JetTOB.h.

◆ m_phiDouble

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

Definition at line 88 of file JetTOB.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.


The documentation for this class was generated from the following files:
TCS::JetTOB::phi
int phi() const
Definition: JetTOB.h:45
TCS::BaseTOB::tobName
const std::string & tobName() const
Definition: BaseTOB.h:23
TCS::JetTOB::eta
int eta() const
Definition: JetTOB.h:44
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
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::JetTOB::JS2
@ JS2
Definition: JetTOB.h:21
athena.value
value
Definition: athena.py:122
TCS::BaseTOB::roiWord
uint32_t roiWord() const
Definition: BaseTOB.h:21
TCS::JetTOB::Et2
unsigned int Et2() const
Definition: JetTOB.h:42
TCS::JetTOB::JS1
@ JS1
Definition: JetTOB.h:21
TCS::JetTOB::m_phiDouble
double m_phiDouble
Definition: JetTOB.h:88
TCS::JetTOB::m_eta
int m_eta
Definition: JetTOB.h:82
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
TCS::JET
@ JET
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:12
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
TCS::BaseTOB::BaseTOB
BaseTOB(uint32_t roiWord, const std::string &tobType)
Definition: BaseTOB.cxx:11
TCS::JetTOB::m_Et2Double
double m_Et2Double
Definition: JetTOB.h:86
TCS::JetTOB::m_etaDouble
double m_etaDouble
Definition: JetTOB.h:87
TCS::BaseTOB::m_roiWord
uint32_t m_roiWord
Definition: BaseTOB.h:36
TCS::JetTOB::m_Et1
unsigned int m_Et1
Definition: JetTOB.h:80
TCS_EXCEPTION
#define TCS_EXCEPTION(MSG)
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Exception.h:14
TCS::JetTOB::m_Et2
unsigned int m_Et2
Definition: JetTOB.h:81
min
#define min(a, b)
Definition: cfImp.cxx:40
TCS::Heap::create
T * create(const T &obj)
create an object on the heap
Definition: Heap.h:50
TCS::JetTOB::fg_heap
static thread_local Heap< TCS::JetTOB > fg_heap
Definition: JetTOB.h:92
TCS::JetTOB::m_Et1Double
double m_Et1Double
Definition: JetTOB.h:85
TCS::JetTOB::m_phi
int m_phi
Definition: JetTOB.h:83
TCS::JetTOB::Et1
unsigned int Et1() const
Definition: JetTOB.h:40
TCS::JetTOB::energy
int energy(JetSize js) const
Definition: JetTOB.h:36
TCS::BaseTOB::m_tobName
std::string m_tobName
Definition: BaseTOB.h:37