ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetRecTools
SiDetElementsRoadTool_xk
SiDetElementsRoadTool_xk
SiDetElementsComparison.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef SiDetElementsComparison_h
6
#define SiDetElementsComparison_h
7
#include "
SiDetElementsRoadTool_xk/SiDetElementLink_xk.h
"
8
9
namespace
InDet
{
10
12
// Object function for ordering barrel pixels and silicons wafers
13
// in azimuthal angle order
15
16
class
compDetElements_A
{
17
18
public
:
19
20
bool
operator ()
(
const
InDetDD::SiDetectorElement
* e1,
21
const
InDetDD::SiDetectorElement
* e2)
const
22
{
23
24
Amg::Vector3D
p1 = e1->center();
25
Amg::Vector3D
p2 = e2->center();
26
double
f1 = atan2(p1.y(),p1.x());
27
double
f2 = atan2(p2.y(),p2.x());
28
return
(f1<f2);
29
}
30
};
31
33
// Object function for ordering barrel pixels and silicons wafers
34
// in radius, azimuthal angle and Z order
36
37
class
compDetElements_RAZ
{
38
39
public
:
40
41
bool
operator ()
(
const
InDetDD::SiDetectorElement
* e1,
42
const
InDetDD::SiDetectorElement
* e2)
const
43
{
44
45
Amg::Vector3D
p1 = e1->center();
46
Amg::Vector3D
p2 = e2->center();
47
double
r1 = sqrt(p1.x()*p1.x()+p1.y()*p1.y());
48
double
r2 = sqrt(p2.x()*p2.x()+p2.y()*p2.y());
49
if
(fabs(r1-r2)>.1)
return
(r1<r2);
50
double
f1 = atan2(p1.y(),p1.x());
51
double
f2 = atan2(p2.y(),p2.x());
52
if
(fabs(f1-f2)>.04)
return
(f1<f2);
53
return
(p1.z()<p2.z());
54
}
55
};
56
58
// Object function for ordering endcap pixels and silicons wafers
59
// in Z, rings and azimuthal angle order
61
62
class
compDetElements_ZRA
{
63
64
public
:
65
66
bool
operator ()
(
const
InDetDD::SiDetectorElement
* e1,
67
const
InDetDD::SiDetectorElement
* e2)
const
68
{
69
70
Amg::Vector3D
p1 = e1->center();
71
Amg::Vector3D
p2 = e2->center();
72
double
z1 = p1.z();
73
double
z2 = p2.z();
74
if
(fabs(z1-z2)>.1)
return
(fabs(z1)<fabs(z2));
75
76
if
(e1->isPixel() && e2->isSCT ())
return
true ;
77
if
(e1->isSCT () && e2->isPixel())
return
false
;
78
79
double
r1 = sqrt(p1.x()*p1.x()+p1.y()*p1.y());
80
double
r2 = sqrt(p2.x()*p2.x()+p2.y()*p2.y());
81
if
(r2-r1> 10.)
return
true
;
82
if
(r1-r2> 10.)
return
false
;
83
84
double
f1 = atan2(p1.y(),p1.x());
85
double
f2 = atan2(p2.y(),p2.x());
86
return
(f1<f2);
87
}
88
};
89
90
class
compDetElementWays
{
91
public
:
92
bool
operator()
(
const
SiDetElementLink_xk::ElementWay
& l1,
const
SiDetElementLink_xk::ElementWay
& l2)
const
{
94
if
(l1.way() == l2.way()){
95
return
l1.distance() < l2.distance();
96
}
98
else
return
l1.way() < l2.way();
99
}
100
};
101
103
// Object function for ordering InDet::SiDetElementLink_xk
104
// in azimuthal angle order
106
107
class
compDetElements_Azimuthal
{
108
109
public
:
110
111
bool
operator ()
(
const
InDet::SiDetElementLink_xk
& l1,
112
const
InDet::SiDetElementLink_xk
& l2)
const
113
{
114
return
(l1.phi() < l2.phi());
115
}
116
};
117
118
}
119
#endif
// SiDetElementsComparison_h
SiDetElementLink_xk.h
InDetDD::SiDetectorElement
Class to hold geometrical description of a silicon detector element.
Definition
SiDetectorElement.h:109
InDet::SiDetElementLink_xk::ElementWay
Definition
SiDetElementLink_xk.h:30
InDet::SiDetElementLink_xk
Definition
SiDetElementLink_xk.h:24
InDet::compDetElementWays
Definition
SiDetElementsComparison.h:90
InDet::compDetElementWays::operator()
bool operator()(const SiDetElementLink_xk::ElementWay &l1, const SiDetElementLink_xk::ElementWay &l2) const
Definition
SiDetElementsComparison.h:92
InDet::compDetElements_A
Definition
SiDetElementsComparison.h:16
InDet::compDetElements_A::operator()
bool operator()(const InDetDD::SiDetectorElement *e1, const InDetDD::SiDetectorElement *e2) const
Definition
SiDetElementsComparison.h:20
InDet::compDetElements_Azimuthal
Definition
SiDetElementsComparison.h:107
InDet::compDetElements_Azimuthal::operator()
bool operator()(const InDet::SiDetElementLink_xk &l1, const InDet::SiDetElementLink_xk &l2) const
Definition
SiDetElementsComparison.h:111
InDet::compDetElements_RAZ
Definition
SiDetElementsComparison.h:37
InDet::compDetElements_RAZ::operator()
bool operator()(const InDetDD::SiDetectorElement *e1, const InDetDD::SiDetectorElement *e2) const
Definition
SiDetElementsComparison.h:41
InDet::compDetElements_ZRA
Definition
SiDetElementsComparison.h:62
InDet::compDetElements_ZRA::operator()
bool operator()(const InDetDD::SiDetectorElement *e1, const InDetDD::SiDetectorElement *e2) const
Definition
SiDetElementsComparison.h:66
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
InDet
Primary Vertex Finder.
Definition
VP1ErrorUtils.h:36
Generated on
for ATLAS Offline Software by
1.17.0