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