ATLAS Offline Software
JetTOB.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 #ifndef TopoCore_JetTOB
4 #define TopoCore_JetTOB
5 
6 #include <iostream>
7 
8 #include "L1TopoEvent/BaseTOB.h"
9 #include "L1TopoEvent/Heap.h"
10 
11 
12 // TODO implement sizecheck lile in ClusterTOB
13 
14 namespace TCS {
15 
16  class GenericTOB;
17 
18  class JetTOB : public BaseTOB {
19  public:
20 
21  enum JetSize { JS1, JS2 };
22 
23  // default constructor
24  JetTOB(uint32_t roiWord = 0, const std::string& tobName = "JetTOB");
25 
26  // copy constructor
27  JetTOB(const JetTOB & jet);
28 
29  // constructor with initial values
30  JetTOB(unsigned int Et1, unsigned int Et2, int eta, int phi, uint32_t roiWord = 0, const std::string& tobName = "JetTOB" );
31 
32  // destructor
33  virtual ~JetTOB();
34 
35  // accessors
36  int energy(JetSize js ) const { return static_cast<int>(js==JS1?m_Et1:m_Et2); }
37  int Et(JetSize js ) const { return static_cast<int>(js==JS1?m_Et1:m_Et2); }
38 
39  // accessors
40  unsigned int Et1() const { return m_Et1; }
41  unsigned int EtWide() const { return m_Et1; }
42  unsigned int Et2() const { return m_Et2; }
43  unsigned int EtNarrow() const { return m_Et2; }
44  int eta() const { return m_eta; }
45  int phi() const { return m_phi; }
46 
47  double EtDouble(JetSize js ) const { return js==JS1?m_Et1Double:m_Et2Double; }
48  double Et1Double() const { return m_Et1Double; }
49  double Et2Double() const { return m_Et2Double; }
50  double etaDouble() const { return m_etaDouble; }
51  double phiDouble() const { return m_phiDouble; }
52 
53  // setters
54  void setEt1(int energy) { m_Et1 = energy; }
55  void setEtWide(int energy) { m_Et1 = energy; }
56  void setEt2(int energy) { m_Et2 = energy; }
57  void setEtNarrow(int energy) { m_Et2 = energy; }
58  void setEta(int eta) { m_eta = eta; }
59  void setPhi(int phi) { m_phi = phi; }
60 
61  void setEtWideDouble(double et) { m_Et1Double = et; }
62  void setEtNarrowDouble(double et) { m_Et2Double = et; }
63  void setEtaDouble(double eta) { m_etaDouble = eta; }
64  void setPhiDouble(double phi) { m_phiDouble = phi; }
65 
66  inputTOBType_t tobType() const { return JET; }
67 
68  static JetTOB* createOnHeap(const JetTOB& jet);
69  static void clearHeap();
70 
71  static const Heap<TCS::JetTOB>& heap() { return fg_heap; }
72 
73  private:
74 
75  static const unsigned int g_nBitsEt;
76  static const unsigned int g_nBitsIsolation;
77  static const unsigned int g_nBitsEta;
78  static const unsigned int g_nBitsPhi;
79 
80  unsigned int m_Et1 { 0 };
81  unsigned int m_Et2 { 0 };
82  int m_eta { 0 };
83  int m_phi { 0 };
84 
85  double m_Et1Double { 0 };
86  double m_Et2Double { 0 };
87  double m_etaDouble { 0 };
88  double m_phiDouble { 0 };
89 
90  virtual void print(std::ostream &o) const;
91 
92  static thread_local Heap<TCS::JetTOB> fg_heap;
93  };
94 
95 }
96 
97 #endif
TCS::JetTOB::phi
int phi() const
Definition: JetTOB.h:45
TCS::JetTOB::heap
static const Heap< TCS::JetTOB > & heap()
Definition: JetTOB.h:71
TCS::BaseTOB::tobName
const std::string & tobName() const
Definition: BaseTOB.h:23
TCS::JetTOB::eta
int eta() const
Definition: JetTOB.h:44
et
Extra patterns decribing particle interation process.
TCS::JetTOB::JetSize
JetSize
Definition: JetTOB.h:21
TCS::JetTOB::setEtaDouble
void setEtaDouble(double eta)
Definition: JetTOB.h:63
Heap.h
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
TCS::JetTOB::EtNarrow
unsigned int EtNarrow() const
Definition: JetTOB.h:43
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TCS::JetTOB::g_nBitsEt
static const unsigned int g_nBitsEt
Definition: JetTOB.h:75
BaseTOB.h
TCS::JetTOB::JS2
@ JS2
Definition: JetTOB.h:21
TCS::JetTOB::JetTOB
JetTOB(const JetTOB &jet)
TCS::JetTOB::g_nBitsIsolation
static const unsigned int g_nBitsIsolation
Definition: JetTOB.h:76
TCS::JetTOB::setEt2
void setEt2(int energy)
Definition: JetTOB.h:56
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::Heap< TCS::JetTOB >
TCS::JetTOB::m_eta
int m_eta
Definition: JetTOB.h:82
TCS::JetTOB::JetTOB
JetTOB(uint32_t roiWord=0, const std::string &tobName="JetTOB")
Definition: JetTOB.cxx:9
TCS::JetTOB::setEtWide
void setEtWide(int energy)
Definition: JetTOB.h:55
TCS::JetTOB::setEtNarrow
void setEtNarrow(int energy)
Definition: JetTOB.h:57
TCS::JetTOB::setPhiDouble
void setPhiDouble(double phi)
Definition: JetTOB.h:64
TCS::JET
@ JET
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:12
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
TCS::JetTOB::EtDouble
double EtDouble(JetSize js) const
Definition: JetTOB.h:47
TCS::JetTOB::m_Et2Double
double m_Et2Double
Definition: JetTOB.h:86
TCS::JetTOB::m_etaDouble
double m_etaDouble
Definition: JetTOB.h:87
TCS::BaseTOB
Definition: BaseTOB.h:12
TCS::JetTOB::m_Et1
unsigned int m_Et1
Definition: JetTOB.h:80
TCS::JetTOB::createOnHeap
static JetTOB * createOnHeap(const JetTOB &jet)
Definition: JetTOB.cxx:32
TCS::JetTOB::g_nBitsEta
static const unsigned int g_nBitsEta
Definition: JetTOB.h:77
TCS::JetTOB::m_Et2
unsigned int m_Et2
Definition: JetTOB.h:81
TCS::JetTOB::phiDouble
double phiDouble() const
Definition: JetTOB.h:51
TCS::JetTOB::g_nBitsPhi
static const unsigned int g_nBitsPhi
Definition: JetTOB.h:78
TCS::JetTOB::setEt1
void setEt1(int energy)
Definition: JetTOB.h:54
TCS::JetTOB::setEta
void setEta(int eta)
Definition: JetTOB.h:58
TCS::JetTOB::setPhi
void setPhi(int phi)
Definition: JetTOB.h:59
TCS::JetTOB::setEtNarrowDouble
void setEtNarrowDouble(double et)
Definition: JetTOB.h:62
TCS::JetTOB::tobType
inputTOBType_t tobType() const
Definition: JetTOB.h:66
TCS::JetTOB::fg_heap
static thread_local Heap< TCS::JetTOB > fg_heap
Definition: JetTOB.h:92
TCS::JetTOB::clearHeap
static void clearHeap()
Definition: JetTOB.cxx:37
TCS::JetTOB::Et2Double
double Et2Double() const
Definition: JetTOB.h:49
TCS::JetTOB::m_Et1Double
double m_Et1Double
Definition: JetTOB.h:85
TCS::inputTOBType_t
inputTOBType_t
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:10
TCS::JetTOB::etaDouble
double etaDouble() const
Definition: JetTOB.h:50
TCS::JetTOB::print
virtual void print(std::ostream &o) const
Definition: JetTOB.cxx:42
TCS::JetTOB::Et1Double
double Et1Double() const
Definition: JetTOB.h:48
TCS::JetTOB
Definition: JetTOB.h:18
TCS
Definition: Global/GlobalSimulation/src/IO/Decision.h:18
TCS::JetTOB::setEtWideDouble
void setEtWideDouble(double et)
Definition: JetTOB.h:61
TCS::JetTOB::m_phi
int m_phi
Definition: JetTOB.h:83
TCS::JetTOB::Et1
unsigned int Et1() const
Definition: JetTOB.h:40
TCS::JetTOB::~JetTOB
virtual ~JetTOB()
TCS::JetTOB::Et
int Et(JetSize js) const
Definition: JetTOB.h:37
TCS::JetTOB::energy
int energy(JetSize js) const
Definition: JetTOB.h:36
TCS::JetTOB::EtWide
unsigned int EtWide() const
Definition: JetTOB.h:41