ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloRdoFexTob.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
5
6#include <iostream>
7#include <sstream>
8
14
15
16L1CaloRdoFexTob::L1CaloRdoFexTob( int crate, int module, int eta, int phi, int numSlices,
18 int id, int fibre, int tobSeq )
19: L1CaloRdo( crate, module, eta, phi, 0, numSlices )
20, m_tobType( tobType )
21, m_source( source )
22, m_id( id )
23, m_fibre( fibre )
24, m_tobSeq( tobSeq )
25{
26}
27
28std::string
30{
31 return getTobTypeString() + std::string( "Tob:" ) + getTobSourceString();
32}
33
34bool
36{
37 if ( m_tobType != rhs.m_tobType )
38 return false;
39 if ( m_source != rhs.m_source )
40 return false;
41 if ( m_id != rhs.m_id )
42 return false;
43 return L1CaloRdo::sameDatum( rhs );
44}
45
48{
49 return m_tobType;
50}
51
52std::string
54{
55 if ( getIsEM() ) { return "EM"; }
56 else if ( getIsTau() ) { return "Tau"; }
57 else if ( getIsLargeJet() ) { return "LJet"; }
58 else if ( getIsSmallJet() ) { return "SJet"; }
59 else if ( getIsEnergy() ) { return "Energy"; }
60 else if ( getIsMuon() ) { return "Muon"; }
61 else { return ""; }
62}
63
64int
66{
67 return m_id;
68}
69
70bool
72{
73 return ( getTobType() == TobType::EM );
74}
75
76bool
78{
79 return ( getTobType() == TobType::Tau );
80}
81
82bool
88
89bool
91{
92 return ( getTobType() == TobType::LargeJet );
93}
94
95bool
97{
98 return ( getTobType() == TobType::SmallJet );
99}
100
101bool
103{
104 return ( getTobType() == TobType::Energy );
105}
106
107bool
109{
110 return ( getTobType() == TobType::Muon );
111}
112
115{
116 return m_source;
117}
118
119std::string
121{
122 if ( getIsTob() ) { return "Tob"; }
123 else if ( getIsXtob() ) { return "Xtob"; }
124 else if ( getIsTopo() ) { std::ostringstream s; s << "Topo" << m_id; return s.str(); }
125 else { return ""; }
126}
127
128bool
136
137bool
144
145bool
151
152bool
158
159bool
165
166bool
168{
169 return ( getTobSource() == TobSource::Ph1Topo );
170}
171
172int
174{
175 return m_fibre;
176}
177
178int
180{
181 return m_tobSeq;
182}
183
184bool
185operator<( const L1CaloRdoFexTob& lhs, const L1CaloRdoFexTob& rhs )
186{
187 if ( lhs.getCrate() < rhs.getCrate() )
188 return true;
189 if ( lhs.getCrate() > rhs.getCrate() )
190 return false;
191 if ( lhs.getModule() < rhs.getModule() )
192 return true;
193 if ( lhs.getModule() > rhs.getModule() )
194 return false;
195 if ( lhs.getEta() < rhs.getEta() )
196 return true;
197 if ( lhs.getEta() > rhs.getEta() )
198 return false;
199 if ( lhs.getPhi() < rhs.getPhi() )
200 return true;
201 if ( lhs.getPhi() > rhs.getPhi() )
202 return false;
203 if ( lhs.getLayer() < rhs.getLayer() )
204 return true;
205 if ( lhs.getTobType() < rhs.getTobType() )
206 return true;
207 if ( lhs.getTobType() > rhs.getTobType() )
208 return false;
209 if ( lhs.getTobSource( ) < rhs.getTobSource( ) )
210 return true;
211 if ( lhs.getTobSource( ) > rhs.getTobSource( ) )
212 return false;
213 if ( lhs.getTobID( ) < rhs.getTobID( ) )
214 return true;
215 return false;
216}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
bool operator<(const L1CaloRdoFexTob &lhs, const L1CaloRdoFexTob &rhs)
L1CaloRdo subclass for FEX Trigger Objects (TOBs and XTOBs).
bool getIsEfex() const
bool getIsXtob() const
bool getIsJet() const
bool sameDatum(const L1CaloRdoFexTob &rhs) const
std::string getTobTypeString() const
bool getIsMuon() const
bool getIsGfex() const
L1CaloRdoFexTob(int crate, int module, int eta, int phi, int numSlices, TobType tobType, TobSource source, int id=0, int fibre=0, int tobSeq=0)
bool getIsTopo() const
virtual std::string getType() const override
TobType getTobType() const
bool getIsEnergy() const
bool getIsTob() const
bool getIsEM() const
bool getIsTau() const
TobSource getTobSource() const
bool getIsJfex() const
bool getIsSmallJet() const
std::string getTobSourceString() const
bool getIsLargeJet() const
int getEta() const
Definition L1CaloRdo.cxx:85
L1CaloRdo(int crate, int module, int eta, int phi, int layer, int numSlices)
Definition L1CaloRdo.cxx:26
int getModule() const
Definition L1CaloRdo.cxx:79
int getPhi() const
Definition L1CaloRdo.cxx:91
size_t numSlices() const
int getLayer() const
Definition L1CaloRdo.cxx:97
int getCrate() const
Definition L1CaloRdo.cxx:73
bool sameDatum(const L1CaloRdo &rhs) const