ATLAS Offline Software
Loading...
Searching...
No Matches
L1Topo/L1TopoEvent/L1TopoEvent/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"
8
9#include <iostream>
10
11namespace 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
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
const std::string & tobName() const
Definition BaseTOB.h:23
int sizeCheck(int value, unsigned int size) const
Definition BaseTOB.cxx:32
uint32_t roiWord() const
Definition BaseTOB.h:21
BaseTOB(uint32_t roiWord, const std::string &tobType)
Definition BaseTOB.cxx:11
static const unsigned int g_nBitsEta
static const unsigned int g_nBitsEt
eEmTOB(const eEmTOB &eem)
static thread_local Heap< TCS::eEmTOB > fg_heap
virtual ~eEmTOB()
eEmTOB(uint32_t roiWord=0, const std::string &tobName="eEmTOB")
static eEmTOB * createOnHeap(const eEmTOB &eem)
static const unsigned int g_nBitsPhi
static const Heap< TCS::eEmTOB > & heap()
void setTobType(inputTOBType_t tobType)
virtual void print(std::ostream &o) const
Extra patterns decribing particle interation process.