ATLAS Offline Software
GenericTOB.cxx
Go to the documentation of this file.
1 // Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
4 
5 thread_local TCS::Heap<TCS::GenericTOB> TCS::GenericTOB::fg_heap("Generic",100);
6 
7 // default constructor
9  BaseTOB( roiWord,"GenericTOB" ),
10  m_tobType (JET)
11 {
12 }
13 
14 // constructor from generic data
15 TCS::GenericTOB::GenericTOB(unsigned int Et, int eta, int phi, uint32_t roiWord) :
16  BaseTOB( roiWord,"GenericTOB" )
17  , m_Et(Et)
18  , m_eta(eta)
19  , m_phi(phi)
20  , m_EtDouble((double)Et)
21  , m_etaDouble(((double)eta)/10.)
22  , m_phiDouble(((double)phi)/10.)
23 {}
24 
25 // copy constructor
27 
28 // constructor from jet
30  BaseTOB(jet.roiWord(), jet.tobName())
31  , m_Et(jet.Et(jetSize))
32  , m_EtNarrow(jet.EtNarrow())
33  , m_EtWide(jet.EtWide())
34  , m_eta(jet.eta())
35  , m_phi(jet.phi())
36  , m_EtDouble(jet.EtDouble(jetSize))
37  , m_etaDouble(jet.etaDouble())
38  , m_phiDouble(jet.phiDouble())
39  , m_tobType(JET)
40 {}
41 
42 // constructor from jFEX Tau
44  BaseTOB(tau.roiWord(), tau.tobName())
45  , m_Et(tau.Et())
46  , m_eta(tau.eta())
47  , m_phi(static_cast<int>(tau.phi()))
48  , m_EtDouble(tau.EtDouble())
49  , m_etaDouble(tau.etaDouble())
50  , m_phiDouble(tau.phiDouble())
51  , m_tobType(JTAU)
52 {}
53 
54 // constructor from jFEX Em
56  BaseTOB(jem.roiWord(), jem.tobName())
57  , m_Et(jem.Et())
58  , m_eta(jem.eta())
59  , m_phi(static_cast<int>(jem.phi()))
60  , m_EtDouble(jem.EtDouble())
61  , m_etaDouble(jem.etaDouble())
62  , m_phiDouble(jem.phiDouble())
63  , m_tobType(JEM)
64 {}
65 
66 // constructor from jFEX LJet
68  BaseTOB(jet.roiWord(), jet.tobName())
69  , m_Et(jet.Et())
70  , m_eta(jet.eta())
71  , m_phi(static_cast<int>(jet.phi()))
72  , m_EtDouble(jet.EtDouble())
73  , m_etaDouble(jet.etaDouble())
74  , m_phiDouble(jet.phiDouble())
75  , m_tobType(JLJET)
76 {}
77 
78 // constructor from gFEX LJet
80  BaseTOB(jet.roiWord(), jet.tobName())
81  , m_Et(jet.Et())
82  , m_eta(jet.eta())
83  , m_phi(static_cast<int>(jet.phi()))
84  , m_EtDouble(jet.EtDouble())
85  , m_etaDouble(jet.etaDouble())
86  , m_phiDouble(jet.phiDouble())
87  , m_tobType(GLJET)
88 {}
89 
90 // constructor from jFEX Jet
92  BaseTOB(jet.roiWord(), jet.tobName())
93  , m_Et(jet.Et())
94  , m_eta(jet.eta())
95  , m_phi(static_cast<int>(jet.phi()))
96  , m_EtDouble(jet.EtDouble())
97  , m_etaDouble(jet.etaDouble())
98  , m_phiDouble(jet.phiDouble())
99  , m_tobType(JJET)
100 {}
101 
102 // constructor from gFEX Jet
104  BaseTOB(jet.roiWord(), jet.tobName())
105  , m_Et(jet.Et())
106  , m_eta(jet.eta())
107  , m_phi(static_cast<int>(jet.phi()))
108  , m_EtDouble(jet.EtDouble())
109  , m_etaDouble(jet.etaDouble())
110  , m_phiDouble(jet.phiDouble())
111  , m_tobType(GJET)
112 {}
113 
114 // constructor from cluster
116  BaseTOB(cluster.roiWord(), cluster.tobName())
117  , m_Et(cluster.Et())
118  , m_eta(cluster.eta())
119  , m_phi(cluster.phi())
120  , m_EtDouble(cluster.EtDouble())
121  , m_etaDouble(cluster.etaDouble())
122  , m_phiDouble(cluster.phiDouble())
123  , m_tobType(cluster.tobType())
124 {}
125 
126 // constructor from eFEX Em
128  BaseTOB(eem.roiWord(), eem.tobName())
129  , m_Et(eem.Et())
130  , m_eta(eem.eta())
131  , m_phi(static_cast<int>(eem.phi()))
132  , m_EtDouble(eem.EtDouble())
133  , m_etaDouble(eem.etaDouble())
134  , m_phiDouble(eem.phiDouble())
135  , m_tobType(EEM)
136 {}
137 
138 // constructor from eFEX Tau
140  BaseTOB(etau.roiWord(), etau.tobName())
141  , m_Et(etau.Et())
142  , m_eta(etau.eta())
143  , m_phi(static_cast<int>(etau.phi()))
144  , m_EtDouble(etau.EtDouble())
145  , m_etaDouble(etau.etaDouble())
146  , m_phiDouble(etau.phiDouble())
147  , m_tobType(ETAU)
148 {}
149 
150 // constructor from cTau
152  BaseTOB(ctau.roiWord(), ctau.tobName())
153  , m_Et(ctau.Et())
154  , m_eta(ctau.eta())
155  , m_phi(static_cast<int>(ctau.phi()))
156  , m_EtDouble(ctau.EtDouble())
157  , m_etaDouble(ctau.etaDouble())
158  , m_phiDouble(ctau.phiDouble())
159  , m_tobType(ctau.tobType())
160 {}
161 
162 // constructor from muon
164  BaseTOB(muon.roiWord(), muon.tobName())
165  , m_Et(muon.Et())
166  , m_eta(muon.eta())
167  , m_phi(static_cast<int>(muon.phi()))
168  , m_bw2or3(muon.bw2or3())
169  , m_innerCoin(muon.innerCoin())
170  , m_goodMF(muon.goodMF())
171  , m_charge(muon.charge())
172  , m_is2cand(muon.is2cand())
173  , m_EtDouble(muon.EtDouble())
174  , m_etaDouble(muon.EtaDouble())
175  , m_phiDouble(muon.PhiDouble())
176  , m_tobType(MUON)
177 {}
178 
179 // constructor from latemuon
181  BaseTOB(lateMuon.roiWord(), lateMuon.tobName())
182  , m_Et(lateMuon.Et())
183  , m_eta(lateMuon.eta())
184  , m_phi(static_cast<int>(lateMuon.phi()))
185  , m_bw2or3(lateMuon.bw2or3())
186  , m_innerCoin(lateMuon.innerCoin())
187  , m_goodMF(lateMuon.goodMF())
188  , m_charge(lateMuon.charge())
189  , m_is2cand(lateMuon.is2cand())
190  , m_EtDouble(lateMuon.EtDouble())
191  , m_etaDouble(lateMuon.EtaDouble())
192  , m_phiDouble(lateMuon.PhiDouble())
193  , m_tobType(LATEMUON)
194 {}
195 
196 // constructor from muonNextBC
198  BaseTOB(muonNextBC.roiWord(), muonNextBC.tobName())
199  , m_Et(muonNextBC.Et())
200  , m_eta(muonNextBC.eta())
201  , m_phi(muonNextBC.phi())
202  , m_EtDouble((double)muonNextBC.Et())
203  , m_etaDouble(((double)muonNextBC.eta())/10.)
204  , m_phiDouble(((double)muonNextBC.phi())/10.)
205  , m_tobType(MUONNEXTBC)
206 {}
207 
208 // constructor from met
210  BaseTOB(met.roiWord(), met.tobName())
211  , m_Et(met.Et())
212  , m_Ex(met.Ex())
213  , m_Ey(met.Ey())
214  , m_tobType(MET)
215 {}
216 
217 // constructor from jFEX XE
219  BaseTOB(jxe.roiWord(), jxe.tobName())
220  , m_Et(jxe.Et())
221  , m_Ex(jxe.Ex())
222  , m_Ey(jxe.Ey())
223  , m_Et2(jxe.Et2())
224  , m_EtDouble(jxe.EtDouble())
225  , m_ExDouble(jxe.ExDouble())
226  , m_EyDouble(jxe.EyDouble())
227  , m_tobType(jxe.tobType())
228 {}
229 
230 // constructor from jFEX TE
232  BaseTOB(jte.roiWord(), jte.tobName())
233  , m_sumEt(jte.sumEt())
234  , m_sumEtDouble(jte.sumEtDouble())
235  , m_tobType(jte.tobType())
236 {}
237 
238 // constructor from gFEX XE
240  BaseTOB(gxe.roiWord(), gxe.tobName())
241  , m_Et(gxe.Et())
242  , m_Ex(gxe.Ex())
243  , m_Ey(gxe.Ey())
244  , m_Et2(gxe.Et2())
245  , m_EtDouble(gxe.EtDouble())
246  , m_ExDouble(gxe.ExDouble())
247  , m_EyDouble(gxe.EyDouble())
248  , m_tobType(gxe.tobType())
249 {}
250 
251 // constructor from gFEX TE
253  BaseTOB(gte.roiWord(), gte.tobName())
254  , m_sumEt(gte.sumEt())
255  , m_sumEtDouble(gte.sumEtDouble())
256  , m_tobType(gte.tobType())
257 {}
258 
259 // destructor
260 TCS::GenericTOB::~GenericTOB() = default;
261 
262 
265  return fg_heap.create(tob);
266 }
267 
268 void
270  return fg_heap.clear();
271 }
272 
273 void TCS::GenericTOB::print(std::ostream &o) const {
274  o << "generic tob type: " << tobType() << ", energy: " << Et() << ", sumEt(): " << sumEt() << ", eta: " << eta() << ", phi: " << phi();
275 }
TCS::GLJET
@ GLJET
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:24
TCS::LateMuonTOB
Definition: LateMuonTOB.h:13
TCS::JJET
@ JJET
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:15
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
TCS::JEM
@ JEM
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:23
TCS::GenericTOB::clearHeap
static void clearHeap()
Definition: GenericTOB.cxx:269
TCS::JetTOB::JetSize
JetSize
Definition: JetTOB.h:21
TCS::MuonTOB
Definition: MuonTOB.h:14
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TCS::MUONNEXTBC
@ MUONNEXTBC
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:20
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TCS::MetTOB
Definition: MetTOB.h:13
TCS::gTETOB
Definition: gTETOB.h:13
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
TCS::Heap< TCS::GenericTOB >
TCS::GenericTOB::~GenericTOB
~GenericTOB()
TCS::GJET
@ GJET
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:25
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
TCS::JET
@ JET
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:12
TCS::GenericTOB::createOnHeap
static GenericTOB * createOnHeap(const GenericTOB &)
Definition: GenericTOB.cxx:264
TCS::jJetTOB
Definition: jJetTOB.h:16
met
Definition: IMETSignificance.h:24
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
TCS::eTauTOB
Definition: eTauTOB.h:13
TCS::jLJetTOB
Definition: jLJetTOB.h:16
TCS::BaseTOB
Definition: BaseTOB.h:12
TCS::eEmTOB
Definition: eEmTOB.h:13
TCS::jTauTOB
Definition: jTauTOB.h:16
TCS::MuonNextBCTOB
Definition: MuonNextBCTOB.h:13
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
PowhegPythia8EvtGen_H2a4X_ctauY.ctau
int ctau
Definition: PowhegPythia8EvtGen_H2a4X_ctauY.py:28
TCS::jTETOB
Definition: jTETOB.h:13
TCS::gXETOB
Definition: gXETOB.h:13
TCS::GenericTOB
Definition: GenericTOB.h:35
TCS::LATEMUON
@ LATEMUON
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:19
MET
Definition: MET.py:1
TCS::GenericTOB::GenericTOB
GenericTOB(uint32_t roiWord=0)
Definition: GenericTOB.cxx:8
charge
double charge(const T &p)
Definition: AtlasPID.h:756
TCS::gLJetTOB
Definition: gLJetTOB.h:18
GenericTOB.h
TCS::GenericTOB::fg_heap
static thread_local Heap< TCS::GenericTOB > fg_heap
Definition: GenericTOB.h:175
TCS::jEmTOB
Definition: jEmTOB.h:16
TCS::GenericTOB::print
virtual void print(std::ostream &o) const
Definition: GenericTOB.cxx:273
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
TCS::gJetTOB
Definition: gJetTOB.h:18
TCS::JetTOB
Definition: JetTOB.h:18
TCS::ETAU
@ ETAU
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:22
TCS::JTAU
@ JTAU
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:13
TCS::cTauTOB
Definition: cTauTOB.h:13
TCS::ClusterTOB
Definition: ClusterTOB.h:13
TCS::jXETOB
Definition: jXETOB.h:13
TCS::EEM
@ EEM
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:21
TCS::JLJET
@ JLJET
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:14