ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigTools
TrigOnlineSpacePointTool
src
TrigL2LayerNumberToolITk.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_TRIG_L2_LAYER_NUMBER_TOOL_ITK_H
6
#define TRIGONLINESPACEPOINTTOOL_TRIG_L2_LAYER_NUMBER_TOOL_ITK_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
PhiEtaHashITk
{
24
25
struct
compare
{
26
public
:
27
bool
operator()
(
const
struct
PhiEtaHashITk
& p1,
const
struct
PhiEtaHashITk
& 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
PhiEtaHashITk
(
short
phi
,
short
eta
,
int
hash) :
m_phiIndex
(
phi
),
m_etaIndex
(
eta
),
m_hash
(hash) {};
39
PhiEtaHashITk
(
const
PhiEtaHashITk
& 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
TrigL2LayerNumberToolITk
:
virtual
public
ITrigL2LayerNumberTool
,
public
AthAlgTool
{
46
public
:
47
48
// standard AlgTool methods
49
TrigL2LayerNumberToolITk
(
const
std::string&,
const
std::string&,
const
IInterface*);
50
virtual
~TrigL2LayerNumberToolITk
(){};
51
52
// standard Athena methods
53
virtual
StatusCode
initialize
()
override
;
54
55
//concrete implementations
56
57
virtual
int
maxSiliconLayerNum
()
const override
{
return
m_MaxSiliconLayerNum
;}
58
virtual
int
offsetEndcapPixels
()
const override
{
return
m_OffsetEndcapPixels
;}
59
virtual
int
offsetBarrelSCT
()
const override
{
return
m_OffsetBarrelSCT
;}
60
virtual
int
offsetEndcapSCT
()
const override
{
return
m_OffsetEndcapSCT
;}
61
virtual
void
report
()
const override
;
//prints out the above
62
63
virtual
int
maxNumberOfUniqueLayers
()
const override
{
64
return
static_cast<
int
>
(
m_hashMap
.size());
65
}
66
67
virtual
const
std::vector<short>*
pixelLayers
()
const override
{
68
return
&
m_pixelLayers
;
69
}
70
71
virtual
const
std::vector<short>*
sctLayers
()
const override
{
72
return
&
m_sctLayers
;
73
}
74
75
virtual
const
std::vector<TrigInDetSiLayer>*
layerGeometry
()
const override
{
76
return
&
m_layerGeometry
;
77
}
78
79
protected
:
80
81
Gaudi::Property<bool>
m_useNewScheme
{
this
,
"UseNewLayerScheme"
,
false
};
82
83
//cached values
84
int
m_MaxSiliconLayerNum
{-1};
85
int
m_OffsetEndcapPixels
{-1};
86
int
m_OffsetBarrelSCT
{-1};
87
int
m_OffsetEndcapSCT
{-1};
88
int
m_LastBarrelLayer
{0};
89
90
const
SCT_ID
*
m_sctId
{
nullptr
};
91
const
PixelID
*
m_pixelId
{
nullptr
};
92
const
InDetDD::PixelDetectorManager
*
m_pixelManager
{
nullptr
};
93
const
InDetDD::SCT_DetectorManager
*
m_sctManager
{
nullptr
};
94
95
void
createModuleHashMap
(std::map<std::tuple<int, int, short, short>,std::vector<PhiEtaHashITk> >&);
96
97
std::map<std::tuple<int, int, short, short>,std::vector<PhiEtaHashITk> >
m_hashMap
;
98
std::vector<short>
m_pixelLayers
,
m_sctLayers
;
//hashid addressable arrays of layer numbers
99
std::vector<TrigInDetSiLayer>
m_layerGeometry
;
100
};
101
#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
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
TrigL2LayerNumberToolITk::~TrigL2LayerNumberToolITk
virtual ~TrigL2LayerNumberToolITk()
Definition
TrigL2LayerNumberToolITk.h:50
TrigL2LayerNumberToolITk::m_LastBarrelLayer
int m_LastBarrelLayer
Definition
TrigL2LayerNumberToolITk.h:88
TrigL2LayerNumberToolITk::m_pixelManager
const InDetDD::PixelDetectorManager * m_pixelManager
Definition
TrigL2LayerNumberToolITk.h:92
TrigL2LayerNumberToolITk::m_useNewScheme
Gaudi::Property< bool > m_useNewScheme
Definition
TrigL2LayerNumberToolITk.h:81
TrigL2LayerNumberToolITk::m_OffsetBarrelSCT
int m_OffsetBarrelSCT
Definition
TrigL2LayerNumberToolITk.h:86
TrigL2LayerNumberToolITk::maxNumberOfUniqueLayers
virtual int maxNumberOfUniqueLayers() const override
Definition
TrigL2LayerNumberToolITk.h:63
TrigL2LayerNumberToolITk::m_MaxSiliconLayerNum
int m_MaxSiliconLayerNum
Definition
TrigL2LayerNumberToolITk.h:84
TrigL2LayerNumberToolITk::TrigL2LayerNumberToolITk
TrigL2LayerNumberToolITk(const std::string &, const std::string &, const IInterface *)
Definition
TrigL2LayerNumberToolITk.cxx:14
TrigL2LayerNumberToolITk::pixelLayers
virtual const std::vector< short > * pixelLayers() const override
Definition
TrigL2LayerNumberToolITk.h:67
TrigL2LayerNumberToolITk::offsetEndcapSCT
virtual int offsetEndcapSCT() const override
Definition
TrigL2LayerNumberToolITk.h:60
TrigL2LayerNumberToolITk::createModuleHashMap
void createModuleHashMap(std::map< std::tuple< int, int, short, short >, std::vector< PhiEtaHashITk > > &)
Definition
TrigL2LayerNumberToolITk.cxx:66
TrigL2LayerNumberToolITk::layerGeometry
virtual const std::vector< TrigInDetSiLayer > * layerGeometry() const override
Definition
TrigL2LayerNumberToolITk.h:75
TrigL2LayerNumberToolITk::sctLayers
virtual const std::vector< short > * sctLayers() const override
Definition
TrigL2LayerNumberToolITk.h:71
TrigL2LayerNumberToolITk::initialize
virtual StatusCode initialize() override
Definition
TrigL2LayerNumberToolITk.cxx:22
TrigL2LayerNumberToolITk::m_sctManager
const InDetDD::SCT_DetectorManager * m_sctManager
Definition
TrigL2LayerNumberToolITk.h:93
TrigL2LayerNumberToolITk::offsetBarrelSCT
virtual int offsetBarrelSCT() const override
Definition
TrigL2LayerNumberToolITk.h:59
TrigL2LayerNumberToolITk::m_layerGeometry
std::vector< TrigInDetSiLayer > m_layerGeometry
Definition
TrigL2LayerNumberToolITk.h:99
TrigL2LayerNumberToolITk::m_sctId
const SCT_ID * m_sctId
Definition
TrigL2LayerNumberToolITk.h:90
TrigL2LayerNumberToolITk::m_pixelLayers
std::vector< short > m_pixelLayers
Definition
TrigL2LayerNumberToolITk.h:98
TrigL2LayerNumberToolITk::m_OffsetEndcapPixels
int m_OffsetEndcapPixels
Definition
TrigL2LayerNumberToolITk.h:85
TrigL2LayerNumberToolITk::m_sctLayers
std::vector< short > m_sctLayers
Definition
TrigL2LayerNumberToolITk.h:98
TrigL2LayerNumberToolITk::report
virtual void report() const override
Definition
TrigL2LayerNumberToolITk.cxx:56
TrigL2LayerNumberToolITk::m_OffsetEndcapSCT
int m_OffsetEndcapSCT
Definition
TrigL2LayerNumberToolITk.h:87
TrigL2LayerNumberToolITk::offsetEndcapPixels
virtual int offsetEndcapPixels() const override
Definition
TrigL2LayerNumberToolITk.h:58
TrigL2LayerNumberToolITk::maxSiliconLayerNum
virtual int maxSiliconLayerNum() const override
Definition
TrigL2LayerNumberToolITk.h:57
TrigL2LayerNumberToolITk::m_pixelId
const PixelID * m_pixelId
Definition
TrigL2LayerNumberToolITk.h:91
TrigL2LayerNumberToolITk::m_hashMap
std::map< std::tuple< int, int, short, short >, std::vector< PhiEtaHashITk > > m_hashMap
Definition
TrigL2LayerNumberToolITk.h:97
InDetDD
Message Stream Member.
Definition
FakeTrackBuilder.h:8
PhiEtaHashITk::compare
Definition
TrigL2LayerNumberToolITk.h:25
PhiEtaHashITk::compare::operator()
bool operator()(const struct PhiEtaHashITk &p1, const struct PhiEtaHashITk &p2)
Definition
TrigL2LayerNumberToolITk.h:27
PhiEtaHashITk::m_hash
int m_hash
Definition
TrigL2LayerNumberToolITk.h:41
PhiEtaHashITk::PhiEtaHashITk
PhiEtaHashITk(const PhiEtaHashITk &p)
Definition
TrigL2LayerNumberToolITk.h:39
PhiEtaHashITk::PhiEtaHashITk
PhiEtaHashITk(short phi, short eta, int hash)
Definition
TrigL2LayerNumberToolITk.h:38
PhiEtaHashITk::m_phiIndex
short m_phiIndex
Definition
TrigL2LayerNumberToolITk.h:40
PhiEtaHashITk::m_etaIndex
short m_etaIndex
Definition
TrigL2LayerNumberToolITk.h:40
Generated on
for ATLAS Offline Software by
1.17.0