ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsDataPreparation
src
PixelSpacePointFormationTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrkSurfaces/Surface.h
"
6
#include "
InDetIdentifier/PixelID.h
"
7
#include "
PixelReadoutGeometry/PixelModuleDesign.h
"
8
#include "
xAODMeasurementBase/UncalibratedMeasurementContainer.h
"
9
10
#include "
PixelSpacePointFormationTool.h
"
11
12
namespace
ActsTrk
{
13
14
PixelSpacePointFormationTool::PixelSpacePointFormationTool
(
const
std::string&
type
,
15
const
std::string& name,
16
const
IInterface* parent)
17
: base_class(
type
, name, parent)
18
{}
19
20
StatusCode
PixelSpacePointFormationTool::initialize
() {
21
22
ATH_CHECK
(detStore()->retrieve(
m_pixelId
,
"PixelID"
));
23
24
return
StatusCode::SUCCESS;
25
}
26
27
StatusCode
28
PixelSpacePointFormationTool::producePixelSpacePoint
(
const
xAOD::PixelCluster
& cluster,
29
xAOD::SpacePoint
&
sp
,
30
const
InDetDD::SiDetectorElement
& element)
const
31
{
32
// this is the width expressed in mm
33
float
width
= cluster.
widthInEta
();
34
35
// using width to scale the cluster covariance for space points
36
float
covTerm =
width
*
width
*
s_oneOverTwelve
;
37
auto
localCov = cluster.
localCovariance
<2>();
38
if
( covTerm < localCov(1, 1) )
39
covTerm = localCov(1, 1);
40
41
// use xz, yz, zz terms of rotation matrix to scale the covariance term
42
const
Amg::Transform3D
&
Tp
= element.
surface
().
transform
();
43
float
cov_z = 6.f*covTerm*
static_cast<
float
>
(
Tp
(0, 2)*
Tp
(0, 2)+
Tp
(1, 2)*
Tp
(1, 2));
44
float
cov_r = 6.f*covTerm*
static_cast<
float
>
(
Tp
(2, 2)*
Tp
(2, 2));
45
46
if
(
m_useMaxVariance
) {
47
cov_z = std::min(cov_z,
m_maxVarianceZ
.value());
48
cov_r = std::min(cov_r,
m_maxVarianceR
.value());
49
}
50
51
sp
.setSpacePoint(cluster.
identifierHash
(),
52
cluster.
globalPosition
(),
53
cov_r,
54
cov_z,
55
std::vector< const xAOD::UncalibratedMeasurement* >({&cluster}));
56
57
return
StatusCode::SUCCESS;
58
}
59
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
sp
static Double_t sp
Definition
LArPhysWaveHECTool.cxx:37
Tp
static Double_t Tp(Double_t *t, Double_t *par)
Definition
LArPhysWaveHECTool.cxx:354
PixelID.h
This is an Identifier helper class for the Pixel subdetector.
PixelModuleDesign.h
PixelSpacePointFormationTool.h
Surface.h
width
const double width
Definition
TTileTripReader.cxx:24
UncalibratedMeasurementContainer.h
ActsTrk::PixelSpacePointFormationTool::m_maxVarianceR
Gaudi::Property< float > m_maxVarianceR
Maximum variance for the r component of the space point covariance.
Definition
PixelSpacePointFormationTool.h:61
ActsTrk::PixelSpacePointFormationTool::initialize
virtual StatusCode initialize() override
Definition
PixelSpacePointFormationTool.cxx:20
ActsTrk::PixelSpacePointFormationTool::s_oneOverTwelve
static constexpr double s_oneOverTwelve
Definition
PixelSpacePointFormationTool.h:65
ActsTrk::PixelSpacePointFormationTool::m_pixelId
const PixelID * m_pixelId
Definition
PixelSpacePointFormationTool.h:49
ActsTrk::PixelSpacePointFormationTool::producePixelSpacePoint
virtual StatusCode producePixelSpacePoint(const xAOD::PixelCluster &cluster, xAOD::SpacePoint &sp, const InDetDD::SiDetectorElement &element) const override
Definition
PixelSpacePointFormationTool.cxx:28
ActsTrk::PixelSpacePointFormationTool::m_maxVarianceZ
Gaudi::Property< float > m_maxVarianceZ
Maximum variance for the z component of the space point covariance.
Definition
PixelSpacePointFormationTool.h:58
ActsTrk::PixelSpacePointFormationTool::m_useMaxVariance
Gaudi::Property< bool > m_useMaxVariance
Whether to use maximum variance for space point covariance If true, the covariance terms will be capp...
Definition
PixelSpacePointFormationTool.h:55
ActsTrk::PixelSpacePointFormationTool::PixelSpacePointFormationTool
PixelSpacePointFormationTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
PixelSpacePointFormationTool.cxx:14
InDetDD::SiDetectorElement
Class to hold geometrical description of a silicon detector element.
Definition
SiDetectorElement.h:109
InDetDD::SolidStateDetectorElementBase::surface
Trk::Surface & surface()
Element Surface.
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
xAOD::PixelCluster_v1::globalPosition
ConstVectorMap< 3 > globalPosition() const
Returns the global position of the pixel cluster.
Definition
PixelCluster_v1.cxx:16
xAOD::PixelCluster_v1::widthInEta
float widthInEta() const
Returns the width of the cluster in phi (x) and eta (y) directions, respectively.
xAOD::UncalibratedMeasurement_v1::localCovariance
ConstMatrixMap< N > localCovariance() const
Returns the local covariance of the measurement.
xAOD::UncalibratedMeasurement_v1::identifierHash
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash).
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition
GeoPrimitives.h:46
xAOD::SpacePoint
SpacePoint_v1 SpacePoint
Definition
Event/xAOD/xAODInDetMeasurement/xAODInDetMeasurement/SpacePoint.h:12
xAOD::PixelCluster
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.
Definition
Event/xAOD/xAODInDetMeasurement/xAODInDetMeasurement/PixelCluster.h:13
type
Generated on
for ATLAS Offline Software by
1.17.0