ATLAS Offline Software
eEmTOB.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 #ifndef L1TopoEvent_eEmTOB
4 #define L1TopoEvent_eEmTOB
5 
6 #include "L1TopoEvent/Heap.h"
7 #include "L1TopoEvent/BaseTOB.h"
8 
9 #include <iostream>
10 
11 namespace TCS {
12 
13  class eEmTOB : public BaseTOB {
14  public:
15 
16  static unsigned int nBitsEt() { return g_nBitsEt; }
17  static unsigned int nBitsEta() { return g_nBitsEta; }
18  static unsigned int nBitsPhi() { return g_nBitsPhi; }
19 
20  // default constructor
21  eEmTOB(uint32_t roiWord = 0, const std::string& tobName = "eEmTOB");
22 
23  // constructor with individual values
24  eEmTOB(unsigned int et, int eta, unsigned int phi, inputTOBType_t tobType = NONE, uint32_t roiWord = 0, const std::string& tobName = "eEmTOB");
25 
26  // constructor with initial values
27  eEmTOB(const eEmTOB & eem);
28 
29  // destructor
30  virtual ~eEmTOB();
31 
32  // accessors
33  unsigned int Et() const { return m_Et; } // Et in units of 100 MeV
34  int eta() const { return m_eta; } // eta in units of 0.025
35  unsigned int phi() const { return m_phi; } // phi in units of 0.05
36 
37  double EtDouble() const { return m_EtDouble; } // float Et in units of GeV
38  double etaDouble() const { return m_etaDouble; } // float eta with granularity 0.025
39  double phiDouble() const { return m_phiDouble; } // float phi with granularity 0.05
40 
41  unsigned int Reta() const { return m_reta; }
42  unsigned int Rhad() const { return m_rhad; }
43  unsigned int Wstot() const { return m_wstot; }
44 
45  // setters
46  void setEt(unsigned int et) { m_Et = sizeCheck(et, nBitsEt()); }
47  void setEta(int eta) { m_eta = sizeCheck(eta, nBitsEta()); }
48  void setPhi(unsigned int phi) { m_phi = sizeCheck(phi, nBitsPhi()); }
49 
50  void setEtDouble(double et) { m_EtDouble = et; }
51  void setEtaDouble(double eta) { m_etaDouble = eta; }
52  void setPhiDouble(double phi) { m_phiDouble = phi; }
53 
54  void setReta(unsigned int th) { m_reta = th; }
55  void setRhad(unsigned int th) { m_rhad = th; }
56  void setWstot(unsigned int th) { m_wstot = th; }
57 
58  // memory management
59  static eEmTOB* createOnHeap(const eEmTOB& eem);
60  static void clearHeap();
61  static const Heap<TCS::eEmTOB>& heap() { return fg_heap; }
62 
63  virtual void print(std::ostream &o) const;
64 
66 
67  inputTOBType_t tobType() const { return m_tobType; }
68 
69  private:
70  static const unsigned int g_nBitsEt;
71  static const unsigned int g_nBitsEta;
72  static const unsigned int g_nBitsPhi;
73 
74  unsigned int m_Et {0};
75  int m_eta {0};
76  unsigned int m_phi {0};
77 
78  double m_EtDouble {0};
79  double m_etaDouble {0};
80  double m_phiDouble {0};
81 
82  unsigned int m_reta {0};
83  unsigned int m_rhad {0};
84  unsigned int m_wstot {0};
85 
87 
88  static thread_local Heap<TCS::eEmTOB> fg_heap;
89  };
90 }
91 
92 #endif
TCS::BaseTOB::tobName
const std::string & tobName() const
Definition: BaseTOB.h:23
TCS::eEmTOB::eEmTOB
eEmTOB(const eEmTOB &eem)
et
Extra patterns decribing particle interation process.
TCS::eEmTOB::m_EtDouble
double m_EtDouble
Definition: eEmTOB.h:78
Heap.h
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TCS::eEmTOB::setTobType
void setTobType(inputTOBType_t tobType)
Definition: eEmTOB.h:65
TCS::eEmTOB::setRhad
void setRhad(unsigned int th)
Definition: eEmTOB.h:55
TCS::eEmTOB::g_nBitsPhi
static const unsigned int g_nBitsPhi
Definition: eEmTOB.h:72
TCS::eEmTOB::setEta
void setEta(int eta)
Definition: eEmTOB.h:47
BaseTOB.h
TCS::eEmTOB::createOnHeap
static eEmTOB * createOnHeap(const eEmTOB &eem)
Definition: eEmTOB.cxx:33
TCS::BaseTOB::roiWord
uint32_t roiWord() const
Definition: BaseTOB.h:21
TCS::eEmTOB::nBitsPhi
static unsigned int nBitsPhi()
Definition: eEmTOB.h:18
TCS::eEmTOB::heap
static const Heap< TCS::eEmTOB > & heap()
Definition: eEmTOB.h:61
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::setWstot
void setWstot(unsigned int th)
Definition: eEmTOB.h:56
TCS::eEmTOB::clearHeap
static void clearHeap()
Definition: eEmTOB.cxx:38
TCS::eEmTOB::m_phiDouble
double m_phiDouble
Definition: eEmTOB.h:80
TCS::Heap< TCS::eEmTOB >
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
TCS::eEmTOB::phiDouble
double phiDouble() const
Definition: eEmTOB.h:39
TCS::eEmTOB::setEtDouble
void setEtDouble(double et)
Definition: eEmTOB.h:50
python.TriggerHandler.th
th
Definition: TriggerHandler.py:296
TCS::eEmTOB::print
virtual void print(std::ostream &o) const
Definition: eEmTOB.cxx:42
TCS::BaseTOB
Definition: BaseTOB.h:12
TCS::eEmTOB
Definition: eEmTOB.h:13
TCS::eEmTOB::Rhad
unsigned int Rhad() const
Definition: eEmTOB.h:42
TCS::eEmTOB::eEmTOB
eEmTOB(uint32_t roiWord=0, const std::string &tobName="eEmTOB")
Definition: eEmTOB.cxx:12
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::eEmTOB::Wstot
unsigned int Wstot() const
Definition: eEmTOB.h:43
TCS::eEmTOB::Et
unsigned int Et() const
Definition: eEmTOB.h:33
TCS::eEmTOB::setReta
void setReta(unsigned int th)
Definition: eEmTOB.h:54
TCS::eEmTOB::setPhi
void setPhi(unsigned int phi)
Definition: eEmTOB.h:48
TCS::eEmTOB::phi
unsigned int phi() const
Definition: eEmTOB.h:35
TCS::eEmTOB::setEt
void setEt(unsigned int et)
Definition: eEmTOB.h:46
TCS::eEmTOB::eta
int eta() const
Definition: eEmTOB.h:34
TCS::eEmTOB::EtDouble
double EtDouble() const
Definition: eEmTOB.h:37
TCS::eEmTOB::setPhiDouble
void setPhiDouble(double phi)
Definition: eEmTOB.h:52
TCS::inputTOBType_t
inputTOBType_t
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:10
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::setEtaDouble
void setEtaDouble(double eta)
Definition: eEmTOB.h:51
TCS
Definition: Global/GlobalSimulation/src/IO/Decision.h:18
TCS::NONE
@ NONE
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:10
TCS::eEmTOB::nBitsEt
static unsigned int nBitsEt()
Definition: eEmTOB.h:16
TCS::eEmTOB::tobType
inputTOBType_t tobType() const
Definition: eEmTOB.h:67
TCS::eEmTOB::etaDouble
double etaDouble() const
Definition: eEmTOB.h:38
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::Reta
unsigned int Reta() const
Definition: eEmTOB.h:41
TCS::eEmTOB::m_wstot
unsigned int m_wstot
Definition: eEmTOB.h:84
TCS::eEmTOB::~eEmTOB
virtual ~eEmTOB()