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