ATLAS Offline Software
ClusterTOB.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_ClusterTOB
4 #define L1TopoEvent_ClusterTOB
5 
6 #include "L1TopoEvent/Heap.h"
7 #include "L1TopoEvent/BaseTOB.h"
8 
9 #include <iostream>
10 
11 namespace TCS {
12 
13  class ClusterTOB : public BaseTOB {
14  public:
15 
16  static unsigned int nBitsEt() { return g_nBitsEt; }
17  static unsigned int nBitsIsolation() { return g_nBitsIsolation; }
18  static unsigned int nBitsEta() { return g_nBitsEta; }
19  static unsigned int nBitsPhi() { return g_nBitsPhi; }
20 
21  // default constructor
22  ClusterTOB(uint32_t roiWord = 0, const std::string& tobName = "ClusterTOB");
23 
24  // constructor with individual values
25  ClusterTOB(unsigned int et, unsigned int isolation, int eta, int phi, inputTOBType_t tobType = NONE, uint32_t roiWord = 0, const std::string& tobName = "ClusterTOB");
26 
27  // constructor with initial values
28  ClusterTOB(const ClusterTOB & cluster);
29 
30  // destructor
31  virtual ~ClusterTOB();
32 
33  // accessors
34  unsigned int Et() const { return m_Et; }
35  unsigned int isolation() const { return m_isolation; }
36  int eta() const { return m_eta; }
37  int phi() const { return m_phi; }
38 
39  double EtDouble() const { return m_EtDouble; }
40  double etaDouble() const { return m_etaDouble; }
41  double phiDouble() const { return m_phiDouble; }
42 
43  // setters
44  void setEt(unsigned int et) { m_Et = sizeCheck(et, nBitsEt()); }
45  void setIsolation(unsigned int et) { m_isolation = sizeCheck(et, nBitsIsolation()); }
46  void setEta(int eta) { m_eta = sizeCheck(eta, nBitsEta()); }
47  void setPhi(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  // memory management
54  static ClusterTOB* createOnHeap(const ClusterTOB& cl);
55  static void clearHeap();
56  static const Heap<TCS::ClusterTOB>& heap() { return fg_heap; }
57 
58  virtual void print(std::ostream &o) const;
59 
61 
62  inputTOBType_t tobType() const { return m_tobType; }
63 
64  private:
65  static const unsigned int g_nBitsEt;
66  static const unsigned int g_nBitsIsolation;
67  static const unsigned int g_nBitsEta;
68  static const unsigned int g_nBitsPhi;
69 
70  unsigned int m_Et {0};
71  unsigned int m_isolation {0};
72  int m_eta {0};
73  int m_phi {0};
74 
75  double m_EtDouble {0};
76  double m_etaDouble {0};
77  double m_phiDouble {0};
78 
80 
81  static thread_local Heap<TCS::ClusterTOB> fg_heap;
82  };
83 }
84 
85 #endif
TCS::BaseTOB::tobName
const std::string & tobName() const
Definition: BaseTOB.h:23
TCS::ClusterTOB::setIsolation
void setIsolation(unsigned int et)
Definition: ClusterTOB.h:45
TCS::ClusterTOB::print
virtual void print(std::ostream &o) const
Definition: ClusterTOB.cxx:44
TCS::ClusterTOB::clearHeap
static void clearHeap()
Definition: ClusterTOB.cxx:40
et
Extra patterns decribing particle interation process.
TCS::ClusterTOB::setTobType
void setTobType(inputTOBType_t tobType)
Definition: ClusterTOB.h:60
Heap.h
TCS::ClusterTOB::Et
unsigned int Et() const
Definition: ClusterTOB.h:34
TCS::ClusterTOB::tobType
inputTOBType_t tobType() const
Definition: ClusterTOB.h:62
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
TCS::ClusterTOB::~ClusterTOB
virtual ~ClusterTOB()
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TCS::ClusterTOB::etaDouble
double etaDouble() const
Definition: ClusterTOB.h:40
TCS::ClusterTOB::EtDouble
double EtDouble() const
Definition: ClusterTOB.h:39
BaseTOB.h
TCS::ClusterTOB::setPhi
void setPhi(int phi)
Definition: ClusterTOB.h:47
TCS::ClusterTOB::m_phiDouble
double m_phiDouble
Definition: ClusterTOB.h:77
TCS::ClusterTOB::m_Et
unsigned int m_Et
Definition: ClusterTOB.h:70
TCS::BaseTOB::roiWord
uint32_t roiWord() const
Definition: BaseTOB.h:21
TCS::ClusterTOB::m_isolation
unsigned int m_isolation
Definition: ClusterTOB.h:71
TCS::ClusterTOB::g_nBitsPhi
static const unsigned int g_nBitsPhi
Definition: ClusterTOB.h:68
TCS::ClusterTOB::eta
int eta() const
Definition: ClusterTOB.h:36
TCS::ClusterTOB::setPhiDouble
void setPhiDouble(double phi)
Definition: ClusterTOB.h:51
TCS::Heap< TCS::ClusterTOB >
TCS::ClusterTOB::g_nBitsEta
static const unsigned int g_nBitsEta
Definition: ClusterTOB.h:67
TCS::BaseTOB::sizeCheck
int sizeCheck(int value, unsigned int size) const
Definition: BaseTOB.cxx:32
TCS::ClusterTOB::fg_heap
static thread_local Heap< TCS::ClusterTOB > fg_heap
Definition: ClusterTOB.h:81
TCS::ClusterTOB::m_phi
int m_phi
Definition: ClusterTOB.h:73
TCS::ClusterTOB::setEtaDouble
void setEtaDouble(double eta)
Definition: ClusterTOB.h:50
TCS::ClusterTOB::m_etaDouble
double m_etaDouble
Definition: ClusterTOB.h:76
TCS::ClusterTOB::nBitsPhi
static unsigned int nBitsPhi()
Definition: ClusterTOB.h:19
TCS::ClusterTOB::m_EtDouble
double m_EtDouble
Definition: ClusterTOB.h:75
TCS::BaseTOB
Definition: BaseTOB.h:12
TCS::ClusterTOB::m_eta
int m_eta
Definition: ClusterTOB.h:72
TCS::ClusterTOB::g_nBitsEt
static const unsigned int g_nBitsEt
Definition: ClusterTOB.h:65
TCS::ClusterTOB::heap
static const Heap< TCS::ClusterTOB > & heap()
Definition: ClusterTOB.h:56
TCS::ClusterTOB::nBitsEta
static unsigned int nBitsEta()
Definition: ClusterTOB.h:18
TCS::ClusterTOB::isolation
unsigned int isolation() const
Definition: ClusterTOB.h:35
TCS::ClusterTOB::ClusterTOB
ClusterTOB(const ClusterTOB &cluster)
TCS::ClusterTOB::phi
int phi() const
Definition: ClusterTOB.h:37
TCS::ClusterTOB::setEt
void setEt(unsigned int et)
Definition: ClusterTOB.h:44
TCS::inputTOBType_t
inputTOBType_t
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:10
TCS::ClusterTOB::phiDouble
double phiDouble() const
Definition: ClusterTOB.h:41
TCS
Definition: Global/GlobalSimulation/src/IO/Decision.h:18
TCS::ClusterTOB::setEtDouble
void setEtDouble(double et)
Definition: ClusterTOB.h:49
TCS::ClusterTOB::g_nBitsIsolation
static const unsigned int g_nBitsIsolation
Definition: ClusterTOB.h:66
TCS::NONE
@ NONE
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:10
TCS::ClusterTOB::m_tobType
inputTOBType_t m_tobType
Definition: ClusterTOB.h:79
TCS::ClusterTOB::createOnHeap
static ClusterTOB * createOnHeap(const ClusterTOB &cl)
Definition: ClusterTOB.cxx:35
TCS::ClusterTOB
Definition: ClusterTOB.h:13
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
TCS::ClusterTOB::nBitsEt
static unsigned int nBitsEt()
Definition: ClusterTOB.h:16
TCS::ClusterTOB::ClusterTOB
ClusterTOB(uint32_t roiWord=0, const std::string &tobName="ClusterTOB")
Definition: ClusterTOB.cxx:13
TCS::ClusterTOB::setEta
void setEta(int eta)
Definition: ClusterTOB.h:46
TCS::ClusterTOB::nBitsIsolation
static unsigned int nBitsIsolation()
Definition: ClusterTOB.h:17