Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Sherwood
athena
Commits
80852879
Commit
80852879
authored
4 years ago
by
Christos Anastopoulos
Browse files
Options
Downloads
Patches
Plain Diff
PixelClusterOnTrackTool : Remove un-needed dynamic_casts '
parent
3fc68229
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx
+30
-30
30 additions, 30 deletions
...ools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx
with
30 additions
and
30 deletions
InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx
+
30
−
30
View file @
80852879
...
...
@@ -139,10 +139,10 @@ InDet::PixelClusterOnTrackTool::initialize() {
m_applyNNcorrection
&=
!
m_splitClusterMapKey
.
key
().
empty
();
ATH_CHECK
(
m_splitClusterMapKey
.
initialize
(
m_applyNNcorrection
));
ATH_CHECK
(
m_NnClusterizationFactory
.
retrieve
(
DisableTool
{
!
m_applyNNcorrection
}
));
// Include IBL calibration constants
//Moved to initialize to remove statics and prevent repitition
constexpr
double
phimin
=-
0.27
,
phimax
=
0.27
;
for
(
int
i
=
0
;
i
<=
s_nbinphi
;
i
++
)
m_phix
[
i
]
=
phimin
+
i
*
(
phimax
-
phimin
)
/
s_nbinphi
;
constexpr
double
etacen
[
s_nbineta
]
=
{
-
0.
,
1.
,
1.55
,
1.9
,
2.15
,
2.35
};
...
...
@@ -151,7 +151,7 @@ InDet::PixelClusterOnTrackTool::initialize() {
///UGLY!
#include
"IBL_calibration.h"
///
///
ATH_CHECK
(
m_lorentzAngleTool
.
retrieve
());
...
...
@@ -663,10 +663,10 @@ InDet::PixelClusterOnTrackTool::correctNN
}
}
ATH_MSG_DEBUG
(
" Old position x: "
<<
pixelPrepCluster
->
localPosition
()[
0
]
ATH_MSG_DEBUG
(
" Old position x: "
<<
pixelPrepCluster
->
localPosition
()[
0
]
<<
" +/- "
<<
std
::
sqrt
(
pixelPrepCluster
->
localCovariance
()(
0
,
0
))
<<
" y: "
<<
pixelPrepCluster
->
localPosition
()[
1
]
<<
" +/- "
<<
std
::
sqrt
(
pixelPrepCluster
->
localCovariance
()(
1
,
1
))
<<
"
\n
"
<<
" +/- "
<<
std
::
sqrt
(
pixelPrepCluster
->
localCovariance
()(
1
,
1
))
<<
"
\n
"
<<
" Final position x: "
<<
finalposition
[
0
]
<<
" +/- "
<<
std
::
sqrt
(
finalerrormatrix
(
0
,
0
))
<<
" y: "
<<
finalposition
[
1
]
<<
" +/- "
...
...
@@ -720,7 +720,7 @@ InDet::PixelClusterOnTrackTool::getErrorsDefaultAmbi(const InDet::PixelCluster *
if
(
m_applyNNcorrection
){
SG
::
ReadHandle
<
InDet
::
PixelGangedClusterAmbiguities
>
splitClusterMap
(
m_splitClusterMapKey
);
InDet
::
PixelGangedClusterAmbiguities
::
const_iterator
mapBegin
=
splitClusterMap
->
begin
();
InDet
::
PixelGangedClusterAmbiguities
::
const_iterator
mapEnd
=
splitClusterMap
->
end
();
InDet
::
PixelGangedClusterAmbiguities
::
const_iterator
mapEnd
=
splitClusterMap
->
end
();
for
(
InDet
::
PixelGangedClusterAmbiguities
::
const_iterator
mapIter
=
mapBegin
;
mapIter
!=
mapEnd
;
++
mapIter
)
{
const
SiCluster
*
first
=
(
*
mapIter
).
first
;
const
SiCluster
*
second
=
(
*
mapIter
).
second
;
...
...
@@ -734,7 +734,7 @@ InDet::PixelClusterOnTrackTool::getErrorsDefaultAmbi(const InDet::PixelCluster *
continue
;
}
vectorOfPositions
.
push_back
(
pixelAddCluster
->
localPosition
());
ATH_MSG_DEBUG
(
"Found one more pixel cluster. Position x: "
<<
pixelAddCluster
->
localPosition
()[
0
]
<<
"y: "
<<
pixelAddCluster
->
localPosition
()[
1
]);
}
// find relevant element of map
...
...
@@ -743,25 +743,25 @@ InDet::PixelClusterOnTrackTool::getErrorsDefaultAmbi(const InDet::PixelCluster *
// now you have numberOfSubclusters and the vectorOfPositions (Amg::Vector2D)
const
Trk
::
AtaPlane
*
parameters
=
dynamic_cast
<
const
Trk
::
AtaPlane
*>
(
&
trackPar
);
if
(
not
parameters
)
{
ATH_MSG_WARNING
(
"Parameters are not at a plane ! Aborting cluster correction... "
);
if
(
trackPar
.
surfaceType
()
!=
Trk
::
Surface
::
Plane
||
trackPar
.
type
()
!=
Trk
::
AtaSurface
)
{
ATH_MSG_WARNING
(
"Parameters are not at a plane ! Aborting cluster correction... "
);
return
false
;
}
std
::
vector
<
Amg
::
Vector2D
>
allLocalPositions
;
std
::
vector
<
Amg
::
MatrixX
>
allErrorMatrix
;
std
::
vector
<
Amg
::
Vector2D
>
allLocalPositions
;
std
::
vector
<
Amg
::
MatrixX
>
allErrorMatrix
;
allLocalPositions
=
m_NnClusterizationFactory
->
estimatePositions
(
*
pixelPrepCluster
,
parameters
->
associatedSurface
(),
*
parameters
,
trackPar
.
associatedSurface
(),
trackPar
,
allErrorMatrix
,
numberOfSubclusters
);
if
(
allLocalPositions
.
empty
())
{
ATH_MSG_DEBUG
(
" Cluster cannot be treated by NN. Giving back to default clusterization "
);
return
false
;
}
...
...
@@ -801,7 +801,7 @@ InDet::PixelClusterOnTrackTool::getErrorsDefaultAmbi(const InDet::PixelCluster *
<<
" Pix (2) x: "
<<
allLocalPositions
[
1
][
0
]
<<
" +/- "
<<
std
::
sqrt
(
allErrorMatrix
[
1
](
0
,
0
))
<<
" y: "
<<
allLocalPositions
[
1
][
1
]
<<
" +/- "
<<
std
::
sqrt
(
allErrorMatrix
[
1
](
1
,
1
))
<<
"
\n
"
<<
" Old (1) new (1) dist: "
<<
std
::
sqrt
(
distancesq1
)
<<
" Old (1) new (2) "
<<
std
::
sqrt
(
distancesq2
)
);
if
(
distancesq1
<
distancesq2
)
{
finalposition
=
allLocalPositions
[
0
];
...
...
@@ -864,7 +864,7 @@ InDet::PixelClusterOnTrackTool::getErrorsTIDE_Ambi(const InDet::PixelCluster *pi
if
(
m_applyNNcorrection
){
SG
::
ReadHandle
<
InDet
::
PixelGangedClusterAmbiguities
>
splitClusterMap
(
m_splitClusterMapKey
);
numberOfSubclusters
=
1
+
splitClusterMap
->
count
(
pixelPrepCluster
);
if
(
splitClusterMap
->
count
(
pixelPrepCluster
)
==
0
&&
splitProb
.
isSplit
())
{
numberOfSubclusters
=
2
;
}
...
...
@@ -874,21 +874,21 @@ InDet::PixelClusterOnTrackTool::getErrorsTIDE_Ambi(const InDet::PixelCluster *pi
}
// now you have numberOfSubclusters and the vectorOfPositions (Amg::Vector2D)
const
Trk
::
AtaPlane
*
parameters
=
dynamic_cast
<
const
Trk
::
AtaPlane
*>
(
&
trackPar
);
if
(
parameters
==
0
)
{
ATH_MSG_WARNING
(
"Parameters are not at a plane ! Aborting cluster
correction... "
);
if
(
trackPar
.
surfaceType
()
!=
Trk
::
Surface
::
Plane
||
trackPar
.
type
()
!=
Trk
::
AtaSurface
)
{
ATH_MSG_WARNING
(
"Parameters are not at a plane surface ! Aborting cluster "
"
correction... "
);
return
false
;
}
std
::
vector
<
Amg
::
Vector2D
>
allLocalPositions
;
std
::
vector
<
Amg
::
MatrixX
>
allErrorMatrix
;
allLocalPositions
=
m_NnClusterizationFactory
->
estimatePositions
(
*
pixelPrepCluster
,
parameters
->
associatedSurface
(),
*
parameters
,
allErrorMatrix
,
numberOfSubclusters
);
std
::
vector
<
Amg
::
Vector2D
>
allLocalPositions
;
std
::
vector
<
Amg
::
MatrixX
>
allErrorMatrix
;
allLocalPositions
=
m_NnClusterizationFactory
->
estimatePositions
(
*
pixelPrepCluster
,
trackPar
.
associatedSurface
(),
trackPar
,
allErrorMatrix
,
numberOfSubclusters
);
if
(
allLocalPositions
.
empty
())
{
ATH_MSG_DEBUG
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment