ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigTools
TrigOnlineSpacePointTool
src
GBTSTrigL2LayerNumberTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TRIGONLINESPACEPOINTTOOL_GBTS_TRIG_L2_LAYER_NUMBER_TOOL_H
6
#define TRIGONLINESPACEPOINTTOOL_GBTS_TRIG_L2_LAYER_NUMBER_TOOL_H
7
8
#include <vector>
9
#include <map>
10
#include <tuple>
11
12
#include "
AthenaBaseComps/AthAlgTool.h
"
13
#include "
TrigInDetToolInterfaces/ITrigL2LayerNumberTool.h
"
14
15
class
SCT_ID
;
16
class
PixelID
;
17
18
namespace
InDetDD
{
19
class
PixelDetectorManager
;
20
class
SCT_DetectorManager
;
21
}
22
23
struct
GBTSPhiEtaHash
{
24
25
struct
compare
{
26
public
:
27
bool
operator()
(
const
struct
GBTSPhiEtaHash
& p1,
const
struct
GBTSPhiEtaHash
& p2) {
28
if
(p1.m_phiIndex == p2.m_phiIndex) {
29
return
p1.m_etaIndex < p2.m_etaIndex;
30
}
31
else
{
32
return
p1.m_phiIndex < p2.m_phiIndex;
33
}
34
}
35
};
36
37
public
:
38
GBTSPhiEtaHash
(
short
phi
,
short
eta
,
int
hash) :
m_phiIndex
(
phi
),
m_etaIndex
(
eta
),
m_hash
(hash) {};
39
GBTSPhiEtaHash
(
const
GBTSPhiEtaHash
& p) :
m_phiIndex
(p.
m_phiIndex
),
m_etaIndex
(p.
m_etaIndex
),
m_hash
(p.
m_hash
) {};
40
short
m_phiIndex
,
m_etaIndex
;
41
int
m_hash
;
42
};
43
44
45
class
GBTSTrigL2LayerNumberTool
:
virtual
public
ITrigL2LayerNumberTool
,
public
AthAlgTool
{
46
public
:
47
48
// standard AlgTool methods
49
GBTSTrigL2LayerNumberTool
(
const
std::string&,
const
std::string&,
const
IInterface*);
50
virtual
~GBTSTrigL2LayerNumberTool
(){};
51
52
// standard Athena methods
53
StatusCode
initialize
();
54
StatusCode
finalize
();
55
56
//concrete implementations
57
58
virtual
int
maxSiliconLayerNum
()
const
{
return
m_MaxSiliconLayerNum
;}
59
virtual
int
offsetEndcapPixels
()
const
{
return
m_OffsetEndcapPixels
;}
60
virtual
int
offsetBarrelSCT
()
const
{
return
m_OffsetBarrelSCT
;}
61
virtual
int
offsetEndcapSCT
()
const
{
return
m_OffsetEndcapSCT
;}
62
virtual
void
report
()
const
;
//prints out the above
63
64
virtual
int
maxNumberOfUniqueLayers
()
const
{
65
return
(
int
)
m_hashMap
.size();
66
}
67
68
virtual
const
std::vector<short>*
pixelLayers
()
const
{
69
return
&
m_pixelLayers
;
70
}
71
72
virtual
const
std::vector<short>*
sctLayers
()
const
{
73
return
&
m_sctLayers
;
74
}
75
76
virtual
const
std::vector<TrigInDetSiLayer>*
layerGeometry
()
const
{
77
return
&
m_layerGeometry
;
78
}
79
80
protected
:
81
82
bool
m_useNewScheme
;
83
84
//cached values
85
int
m_MaxSiliconLayerNum
;
86
int
m_OffsetEndcapPixels
;
87
int
m_OffsetBarrelSCT
;
88
int
m_OffsetEndcapSCT
;
89
int
m_LastBarrelLayer
= 0;
90
91
const
SCT_ID
*
m_sctId
=
nullptr
;
92
const
PixelID
*
m_pixelId
=
nullptr
;
93
const
InDetDD::PixelDetectorManager
*
m_pixelManager
=
nullptr
;
94
const
InDetDD::SCT_DetectorManager
*
m_sctManager
=
nullptr
;
95
96
void
createModuleHashMap
(std::map<std::tuple<int, int, short, short>,std::vector<GBTSPhiEtaHash> >&);
97
98
std::map<std::tuple<int, int, short, short>,std::vector<GBTSPhiEtaHash> >
m_hashMap
;
99
std::vector<short>
m_pixelLayers
,
m_sctLayers
;
//hashid addressable arrays of layer numbers
100
std::vector<TrigInDetSiLayer>
m_layerGeometry
;
101
};
102
#endif
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
AthAlgTool.h
ITrigL2LayerNumberTool.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
GBTSTrigL2LayerNumberTool::offsetEndcapSCT
virtual int offsetEndcapSCT() const
Definition
GBTSTrigL2LayerNumberTool.h:61
GBTSTrigL2LayerNumberTool::report
virtual void report() const
Definition
GBTSTrigL2LayerNumberTool.cxx:93
GBTSTrigL2LayerNumberTool::~GBTSTrigL2LayerNumberTool
virtual ~GBTSTrigL2LayerNumberTool()
Definition
GBTSTrigL2LayerNumberTool.h:50
GBTSTrigL2LayerNumberTool::initialize
StatusCode initialize()
Definition
GBTSTrigL2LayerNumberTool.cxx:27
GBTSTrigL2LayerNumberTool::m_useNewScheme
bool m_useNewScheme
Definition
GBTSTrigL2LayerNumberTool.h:82
GBTSTrigL2LayerNumberTool::m_pixelManager
const InDetDD::PixelDetectorManager * m_pixelManager
Definition
GBTSTrigL2LayerNumberTool.h:93
GBTSTrigL2LayerNumberTool::offsetEndcapPixels
virtual int offsetEndcapPixels() const
Definition
GBTSTrigL2LayerNumberTool.h:59
GBTSTrigL2LayerNumberTool::m_OffsetEndcapSCT
int m_OffsetEndcapSCT
Definition
GBTSTrigL2LayerNumberTool.h:88
GBTSTrigL2LayerNumberTool::m_pixelLayers
std::vector< short > m_pixelLayers
Definition
GBTSTrigL2LayerNumberTool.h:99
GBTSTrigL2LayerNumberTool::m_sctId
const SCT_ID * m_sctId
Definition
GBTSTrigL2LayerNumberTool.h:91
GBTSTrigL2LayerNumberTool::sctLayers
virtual const std::vector< short > * sctLayers() const
Definition
GBTSTrigL2LayerNumberTool.h:72
GBTSTrigL2LayerNumberTool::finalize
StatusCode finalize()
Definition
GBTSTrigL2LayerNumberTool.cxx:87
GBTSTrigL2LayerNumberTool::maxSiliconLayerNum
virtual int maxSiliconLayerNum() const
Definition
GBTSTrigL2LayerNumberTool.h:58
GBTSTrigL2LayerNumberTool::m_LastBarrelLayer
int m_LastBarrelLayer
Definition
GBTSTrigL2LayerNumberTool.h:89
GBTSTrigL2LayerNumberTool::m_layerGeometry
std::vector< TrigInDetSiLayer > m_layerGeometry
Definition
GBTSTrigL2LayerNumberTool.h:100
GBTSTrigL2LayerNumberTool::pixelLayers
virtual const std::vector< short > * pixelLayers() const
Definition
GBTSTrigL2LayerNumberTool.h:68
GBTSTrigL2LayerNumberTool::m_OffsetEndcapPixels
int m_OffsetEndcapPixels
Definition
GBTSTrigL2LayerNumberTool.h:86
GBTSTrigL2LayerNumberTool::layerGeometry
virtual const std::vector< TrigInDetSiLayer > * layerGeometry() const
Definition
GBTSTrigL2LayerNumberTool.h:76
GBTSTrigL2LayerNumberTool::offsetBarrelSCT
virtual int offsetBarrelSCT() const
Definition
GBTSTrigL2LayerNumberTool.h:60
GBTSTrigL2LayerNumberTool::m_hashMap
std::map< std::tuple< int, int, short, short >, std::vector< GBTSPhiEtaHash > > m_hashMap
Definition
GBTSTrigL2LayerNumberTool.h:98
GBTSTrigL2LayerNumberTool::createModuleHashMap
void createModuleHashMap(std::map< std::tuple< int, int, short, short >, std::vector< GBTSPhiEtaHash > > &)
Definition
GBTSTrigL2LayerNumberTool.cxx:102
GBTSTrigL2LayerNumberTool::m_OffsetBarrelSCT
int m_OffsetBarrelSCT
Definition
GBTSTrigL2LayerNumberTool.h:87
GBTSTrigL2LayerNumberTool::m_pixelId
const PixelID * m_pixelId
Definition
GBTSTrigL2LayerNumberTool.h:92
GBTSTrigL2LayerNumberTool::GBTSTrigL2LayerNumberTool
GBTSTrigL2LayerNumberTool(const std::string &, const std::string &, const IInterface *)
Definition
GBTSTrigL2LayerNumberTool.cxx:14
GBTSTrigL2LayerNumberTool::m_MaxSiliconLayerNum
int m_MaxSiliconLayerNum
Definition
GBTSTrigL2LayerNumberTool.h:85
GBTSTrigL2LayerNumberTool::maxNumberOfUniqueLayers
virtual int maxNumberOfUniqueLayers() const
Definition
GBTSTrigL2LayerNumberTool.h:64
GBTSTrigL2LayerNumberTool::m_sctManager
const InDetDD::SCT_DetectorManager * m_sctManager
Definition
GBTSTrigL2LayerNumberTool.h:94
GBTSTrigL2LayerNumberTool::m_sctLayers
std::vector< short > m_sctLayers
Definition
GBTSTrigL2LayerNumberTool.h:99
ITrigL2LayerNumberTool
provides the abstract interface for the silicon layer number tool
Definition
ITrigL2LayerNumberTool.h:20
InDetDD::PixelDetectorManager
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel ...
Definition
PixelDetectorManager.h:47
InDetDD::SCT_DetectorManager
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT in...
Definition
SCT_DetectorManager.h:49
PixelID
This is an Identifier helper class for the Pixel subdetector.
Definition
PixelID.h:69
SCT_ID
This is an Identifier helper class for the SCT subdetector.
Definition
SCT_ID.h:68
InDetDD
Message Stream Member.
Definition
FakeTrackBuilder.h:8
GBTSPhiEtaHash::compare
Definition
GBTSTrigL2LayerNumberTool.h:25
GBTSPhiEtaHash::compare::operator()
bool operator()(const struct GBTSPhiEtaHash &p1, const struct GBTSPhiEtaHash &p2)
Definition
GBTSTrigL2LayerNumberTool.h:27
GBTSPhiEtaHash::m_hash
int m_hash
Definition
GBTSTrigL2LayerNumberTool.h:41
GBTSPhiEtaHash::GBTSPhiEtaHash
GBTSPhiEtaHash(short phi, short eta, int hash)
Definition
GBTSTrigL2LayerNumberTool.h:38
GBTSPhiEtaHash::m_phiIndex
short m_phiIndex
Definition
GBTSTrigL2LayerNumberTool.h:40
GBTSPhiEtaHash::GBTSPhiEtaHash
GBTSPhiEtaHash(const GBTSPhiEtaHash &p)
Definition
GBTSTrigL2LayerNumberTool.h:39
GBTSPhiEtaHash::m_etaIndex
short m_etaIndex
Definition
GBTSTrigL2LayerNumberTool.h:40
Generated on
for ATLAS Offline Software by
1.17.0