ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigTools
TrigInDetTrackFitter
src
TrigInDetRoadPredictorTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TRIGINDETTRACKFITTER_TRIGINDETROADPREDICTORTOOL_H
6
#define TRIGINDETTRACKFITTER_TRIGINDETROADPREDICTORTOOL_H
7
8
#include "
AthenaBaseComps/AthAlgTool.h
"
9
#include "GaudiKernel/ToolHandle.h"
10
#include "GaudiKernel/ServiceHandle.h"
11
12
#include "
TrigInDetToolInterfaces/ITrigInDetRoadPredictorTool.h
"
13
#include "
TrigInDetToolInterfaces/ITrigL2LayerNumberTool.h
"
14
15
// MagField cache
16
#include "
MagFieldConditions/AtlasFieldCacheCondObj.h
"
17
18
19
#include <vector>
20
#include <map>
21
#include <algorithm>
//std::accumulate etc
22
23
namespace
InDetDD
{
24
class
PixelDetectorManager
;
25
class
SCT_DetectorManager
;
26
}
27
28
namespace
Trk
{
29
class
SpacePoint
;
30
}
31
32
class
PixelID
;
33
class
SCT_ID
;
34
35
class
TrigInDetRoadPredictorTool
:
public
AthAlgTool
,
virtual
public
ITrigInDetRoadPredictorTool
36
{
37
public
:
38
TrigInDetRoadPredictorTool
(
const
std::string&,
const
std::string&,
const
IInterface* );
39
40
virtual
StatusCode
initialize
()
override
;
41
42
virtual
int
getRoad
(
const
std::vector<const Trk::SpacePoint*>&, std::vector<const InDetDD::SiDetectorElement*>&,
43
const
EventContext&)
const override
;
44
45
private
:
46
47
struct
DetectorElementDescription
{
48
DetectorElementDescription
(
unsigned
int
h
) :
m_hash
(
h
) {};
49
unsigned
int
m_hash
{};
50
short
m_index
{};
51
float
m_ref
{};
//z or Phi
52
float
m_c
[4][3]={};
53
float
m_minBound
{},
m_maxBound
{};
54
};
55
56
struct
DetectorElementsCollection
{
57
DetectorElementsCollection
(
short
idx,
float
min
,
float
max
) :
m_index
(idx),
m_minCoord
(
min
),
m_maxCoord
(
max
) {};
58
short
m_index
{};
59
float
m_minCoord
{},
m_maxCoord
{};
//phi or R
60
std::vector<DetectorElementDescription>
m_vDE
;
61
};
62
63
struct
LayerDescription
{
64
LayerDescription
(
unsigned
int
id
,
int
nSL,
unsigned
int
mType) :
m_id
(id),
m_nSubLayers
(nSL),
m_mappingType
(mType) {};
65
unsigned
int
m_id
{};
66
int
m_nSubLayers
{};
67
unsigned
int
m_mappingType
{};
68
std::map<short, DetectorElementsCollection>
m_colls
[2];
69
};
70
71
72
struct
SearchInterval
{
73
SearchInterval
(
float
z
,
float
r
) :
m_r
(0.0),
m_z
(0.0),
m_phi
(0.0) {
74
m_vZx
.push_back(
z
);
75
m_vRx
.push_back(
r
);
76
}
77
78
void
addPoint
(
float
z
,
float
r
) {
79
m_vZx
.push_back(
z
);
80
m_vRx
.push_back(
r
);
81
}
82
83
float
getAverageRadius
() {
84
return
std::accumulate(
m_vRx
.begin(),
m_vRx
.end(), 0)/
m_vRx
.size();
85
}
86
87
float
getAverageZ
() {
88
return
std::accumulate(
m_vZx
.begin(),
m_vZx
.end(), 0)/
m_vZx
.size();
89
}
90
91
float
getMinZ
()
const
{
92
return
*std::min_element(
m_vZx
.begin(),
m_vZx
.end());
93
}
94
95
float
getMaxZ
()
const
{
96
return
*std::max_element(
m_vZx
.begin(),
m_vZx
.end());
97
}
98
99
float
getMinR
()
const
{
100
return
*std::min_element(
m_vRx
.begin(),
m_vRx
.end());
101
}
102
103
float
getMaxR
()
const
{
104
return
*std::max_element(
m_vRx
.begin(),
m_vRx
.end());
105
}
106
107
std::vector<float>
m_vZx
;
108
std::vector<float>
m_vRx
;
109
float
m_r
{};
110
float
m_z
{};
111
float
m_phi
{};
112
};
113
114
struct
VolumeBoundary
{
115
int
m_index
{};
116
float
m_zr
[4]={};
117
int
m_vol_id
{};
118
std::vector<int>
m_layers
;
119
};
120
121
struct
LayerBoundary
{
122
int
m_index
{},
m_lay_id
{},
m_nVertices
{};
123
std::vector<float>
m_z
;
124
std::vector<float>
m_r
;
125
};
126
127
void
buildDetectorDescription
();
128
void
createHitBoxes
();
129
130
void
addNewElement
(
unsigned
int
,
short
,
short
,
const
InDetDD::SiDetectorElement
*);
131
void
findDetectorElements
(
unsigned
int
,
const
SearchInterval
&, std::vector<unsigned int>&,
bool
)
const
;
132
133
ToolHandle<ITrigL2LayerNumberTool>
m_layerNumberTool
{
this
,
"LayerNumberTool"
,
"TrigL2LayerNumberToolITk"
};
134
135
Gaudi::Property<float>
m_min_rz_rw
{
this
,
"MinRzRoadWidth"
, 3.0,
"Minimum rz road width"
};
136
Gaudi::Property<float>
m_max_rz_rw
{
this
,
"MaxRzRoadWidth"
, 15.0,
"Maximum rz road width"
};
137
Gaudi::Property<float>
m_min_rphi_rw
{
this
,
"MinRPhiRoadWidth"
, 3.0,
"Minimum rphi road width"
};
138
Gaudi::Property<float>
m_max_rphi_rw
{
this
,
"MaxRPhiRoadWidth"
, 15.0,
"Maximum rphi road width"
};
139
Gaudi::Property<float>
m_min_phi_rw
{
this
,
"MinPhiRoadWidth"
, 0.05,
"Minimum phi road width"
};
140
Gaudi::Property<float>
m_max_phi_rw
{
this
,
"MaxPhiRoadWidth"
, 0.1,
"Maximum phi road width"
};
141
142
SG::ReadCondHandleKey<AtlasFieldCacheCondObj>
m_fieldCondObjInputKey
{
143
this
,
"AtlasFieldCacheCondObj"
,
"fieldCondObj"
,
144
"Name of the Magnetic Field conditions object key"
};
145
146
std::vector<VolumeBoundary>
m_vBoundaries
;
147
std::vector<LayerBoundary>
m_lBoundaries
;
148
std::map<unsigned int, LayerDescription>
m_layerMap
;
149
150
const
InDetDD::PixelDetectorManager
*
m_pixelManager
{
nullptr
};
151
const
InDetDD::SCT_DetectorManager
*
m_stripManager
{
nullptr
};
152
const
PixelID
*
m_pixelId
{
nullptr
};
153
const
SCT_ID
*
m_stripId
{
nullptr
};
154
};
155
156
#endif
AthAlgTool.h
AtlasFieldCacheCondObj.h
ITrigInDetRoadPredictorTool.h
ITrigL2LayerNumberTool.h
z
#define z
min
#define min(a, b)
Definition
cfImp.cxx:40
max
#define max(a, b)
Definition
cfImp.cxx:41
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
h
Header file for AthHistogramAlgorithm.
ITrigInDetRoadPredictorTool
Definition
ITrigInDetRoadPredictorTool.h:22
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:50
InDetDD::SiDetectorElement
Class to hold geometrical description of a silicon detector element.
Definition
SiDetectorElement.h:109
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
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
TrigInDetRoadPredictorTool::addNewElement
void addNewElement(unsigned int, short, short, const InDetDD::SiDetectorElement *)
Definition
TrigInDetRoadPredictorTool.cxx:59
TrigInDetRoadPredictorTool::m_vBoundaries
std::vector< VolumeBoundary > m_vBoundaries
Definition
TrigInDetRoadPredictorTool.h:146
TrigInDetRoadPredictorTool::m_lBoundaries
std::vector< LayerBoundary > m_lBoundaries
Definition
TrigInDetRoadPredictorTool.h:147
TrigInDetRoadPredictorTool::m_layerMap
std::map< unsigned int, LayerDescription > m_layerMap
Definition
TrigInDetRoadPredictorTool.h:148
TrigInDetRoadPredictorTool::m_max_rphi_rw
Gaudi::Property< float > m_max_rphi_rw
Definition
TrigInDetRoadPredictorTool.h:138
TrigInDetRoadPredictorTool::findDetectorElements
void findDetectorElements(unsigned int, const SearchInterval &, std::vector< unsigned int > &, bool) const
Definition
TrigInDetRoadPredictorTool.cxx:329
TrigInDetRoadPredictorTool::m_stripId
const SCT_ID * m_stripId
Definition
TrigInDetRoadPredictorTool.h:153
TrigInDetRoadPredictorTool::initialize
virtual StatusCode initialize() override
Definition
TrigInDetRoadPredictorTool.cxx:36
TrigInDetRoadPredictorTool::buildDetectorDescription
void buildDetectorDescription()
Definition
TrigInDetRoadPredictorTool.cxx:154
TrigInDetRoadPredictorTool::m_min_phi_rw
Gaudi::Property< float > m_min_phi_rw
Definition
TrigInDetRoadPredictorTool.h:139
TrigInDetRoadPredictorTool::m_stripManager
const InDetDD::SCT_DetectorManager * m_stripManager
Definition
TrigInDetRoadPredictorTool.h:151
TrigInDetRoadPredictorTool::m_max_phi_rw
Gaudi::Property< float > m_max_phi_rw
Definition
TrigInDetRoadPredictorTool.h:140
TrigInDetRoadPredictorTool::m_pixelId
const PixelID * m_pixelId
Definition
TrigInDetRoadPredictorTool.h:152
TrigInDetRoadPredictorTool::TrigInDetRoadPredictorTool
TrigInDetRoadPredictorTool(const std::string &, const std::string &, const IInterface *)
Definition
TrigInDetRoadPredictorTool.cxx:29
TrigInDetRoadPredictorTool::m_fieldCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Definition
TrigInDetRoadPredictorTool.h:142
TrigInDetRoadPredictorTool::m_min_rz_rw
Gaudi::Property< float > m_min_rz_rw
Definition
TrigInDetRoadPredictorTool.h:135
TrigInDetRoadPredictorTool::m_min_rphi_rw
Gaudi::Property< float > m_min_rphi_rw
Definition
TrigInDetRoadPredictorTool.h:137
TrigInDetRoadPredictorTool::m_max_rz_rw
Gaudi::Property< float > m_max_rz_rw
Definition
TrigInDetRoadPredictorTool.h:136
TrigInDetRoadPredictorTool::createHitBoxes
void createHitBoxes()
Definition
TrigInDetRoadPredictorTool.cxx:220
TrigInDetRoadPredictorTool::m_pixelManager
const InDetDD::PixelDetectorManager * m_pixelManager
Definition
TrigInDetRoadPredictorTool.h:150
TrigInDetRoadPredictorTool::m_layerNumberTool
ToolHandle< ITrigL2LayerNumberTool > m_layerNumberTool
Definition
TrigInDetRoadPredictorTool.h:133
TrigInDetRoadPredictorTool::getRoad
virtual int getRoad(const std::vector< const Trk::SpacePoint * > &, std::vector< const InDetDD::SiDetectorElement * > &, const EventContext &) const override
Definition
TrigInDetRoadPredictorTool.cxx:435
Trk::SpacePoint
Definition
Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:35
r
int r
Definition
globals.cxx:22
InDetDD
Message Stream Member.
Definition
FakeTrackBuilder.h:8
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
TrigInDetRoadPredictorTool::DetectorElementDescription::m_hash
unsigned int m_hash
Definition
TrigInDetRoadPredictorTool.h:49
TrigInDetRoadPredictorTool::DetectorElementDescription::m_minBound
float m_minBound
Definition
TrigInDetRoadPredictorTool.h:53
TrigInDetRoadPredictorTool::DetectorElementDescription::m_c
float m_c[4][3]
Definition
TrigInDetRoadPredictorTool.h:52
TrigInDetRoadPredictorTool::DetectorElementDescription::m_ref
float m_ref
Definition
TrigInDetRoadPredictorTool.h:51
TrigInDetRoadPredictorTool::DetectorElementDescription::m_index
short m_index
Definition
TrigInDetRoadPredictorTool.h:50
TrigInDetRoadPredictorTool::DetectorElementDescription::m_maxBound
float m_maxBound
Definition
TrigInDetRoadPredictorTool.h:53
TrigInDetRoadPredictorTool::DetectorElementDescription::DetectorElementDescription
DetectorElementDescription(unsigned int h)
Definition
TrigInDetRoadPredictorTool.h:48
TrigInDetRoadPredictorTool::DetectorElementsCollection::m_index
short m_index
Definition
TrigInDetRoadPredictorTool.h:58
TrigInDetRoadPredictorTool::DetectorElementsCollection::m_minCoord
float m_minCoord
Definition
TrigInDetRoadPredictorTool.h:59
TrigInDetRoadPredictorTool::DetectorElementsCollection::m_maxCoord
float m_maxCoord
Definition
TrigInDetRoadPredictorTool.h:59
TrigInDetRoadPredictorTool::DetectorElementsCollection::DetectorElementsCollection
DetectorElementsCollection(short idx, float min, float max)
Definition
TrigInDetRoadPredictorTool.h:57
TrigInDetRoadPredictorTool::DetectorElementsCollection::m_vDE
std::vector< DetectorElementDescription > m_vDE
Definition
TrigInDetRoadPredictorTool.h:60
TrigInDetRoadPredictorTool::LayerBoundary
Definition
TrigInDetRoadPredictorTool.h:121
TrigInDetRoadPredictorTool::LayerBoundary::m_r
std::vector< float > m_r
Definition
TrigInDetRoadPredictorTool.h:124
TrigInDetRoadPredictorTool::LayerBoundary::m_nVertices
int m_nVertices
Definition
TrigInDetRoadPredictorTool.h:122
TrigInDetRoadPredictorTool::LayerBoundary::m_lay_id
int m_lay_id
Definition
TrigInDetRoadPredictorTool.h:122
TrigInDetRoadPredictorTool::LayerBoundary::m_index
int m_index
Definition
TrigInDetRoadPredictorTool.h:122
TrigInDetRoadPredictorTool::LayerBoundary::m_z
std::vector< float > m_z
Definition
TrigInDetRoadPredictorTool.h:123
TrigInDetRoadPredictorTool::LayerDescription::m_colls
std::map< short, DetectorElementsCollection > m_colls[2]
Definition
TrigInDetRoadPredictorTool.h:68
TrigInDetRoadPredictorTool::LayerDescription::m_id
unsigned int m_id
Definition
TrigInDetRoadPredictorTool.h:65
TrigInDetRoadPredictorTool::LayerDescription::LayerDescription
LayerDescription(unsigned int id, int nSL, unsigned int mType)
Definition
TrigInDetRoadPredictorTool.h:64
TrigInDetRoadPredictorTool::LayerDescription::m_nSubLayers
int m_nSubLayers
Definition
TrigInDetRoadPredictorTool.h:66
TrigInDetRoadPredictorTool::LayerDescription::m_mappingType
unsigned int m_mappingType
Definition
TrigInDetRoadPredictorTool.h:67
TrigInDetRoadPredictorTool::SearchInterval
Definition
TrigInDetRoadPredictorTool.h:72
TrigInDetRoadPredictorTool::SearchInterval::m_r
float m_r
Definition
TrigInDetRoadPredictorTool.h:109
TrigInDetRoadPredictorTool::SearchInterval::addPoint
void addPoint(float z, float r)
Definition
TrigInDetRoadPredictorTool.h:78
TrigInDetRoadPredictorTool::SearchInterval::getAverageZ
float getAverageZ()
Definition
TrigInDetRoadPredictorTool.h:87
TrigInDetRoadPredictorTool::SearchInterval::m_vRx
std::vector< float > m_vRx
Definition
TrigInDetRoadPredictorTool.h:108
TrigInDetRoadPredictorTool::SearchInterval::SearchInterval
SearchInterval(float z, float r)
Definition
TrigInDetRoadPredictorTool.h:73
TrigInDetRoadPredictorTool::SearchInterval::m_phi
float m_phi
Definition
TrigInDetRoadPredictorTool.h:111
TrigInDetRoadPredictorTool::SearchInterval::getMaxZ
float getMaxZ() const
Definition
TrigInDetRoadPredictorTool.h:95
TrigInDetRoadPredictorTool::SearchInterval::m_z
float m_z
Definition
TrigInDetRoadPredictorTool.h:110
TrigInDetRoadPredictorTool::SearchInterval::getAverageRadius
float getAverageRadius()
Definition
TrigInDetRoadPredictorTool.h:83
TrigInDetRoadPredictorTool::SearchInterval::m_vZx
std::vector< float > m_vZx
Definition
TrigInDetRoadPredictorTool.h:107
TrigInDetRoadPredictorTool::SearchInterval::getMinR
float getMinR() const
Definition
TrigInDetRoadPredictorTool.h:99
TrigInDetRoadPredictorTool::SearchInterval::getMaxR
float getMaxR() const
Definition
TrigInDetRoadPredictorTool.h:103
TrigInDetRoadPredictorTool::SearchInterval::getMinZ
float getMinZ() const
Definition
TrigInDetRoadPredictorTool.h:91
TrigInDetRoadPredictorTool::VolumeBoundary
Definition
TrigInDetRoadPredictorTool.h:114
TrigInDetRoadPredictorTool::VolumeBoundary::m_layers
std::vector< int > m_layers
Definition
TrigInDetRoadPredictorTool.h:118
TrigInDetRoadPredictorTool::VolumeBoundary::m_zr
float m_zr[4]
Definition
TrigInDetRoadPredictorTool.h:116
TrigInDetRoadPredictorTool::VolumeBoundary::m_vol_id
int m_vol_id
Definition
TrigInDetRoadPredictorTool.h:117
TrigInDetRoadPredictorTool::VolumeBoundary::m_index
int m_index
Definition
TrigInDetRoadPredictorTool.h:115
Generated on
for ATLAS Offline Software by
1.17.0