ATLAS Offline Software
Loading...
Searching...
No Matches
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
9
11
12namespace ActsTrk {
13
15 const std::string& name,
16 const IInterface* parent)
17 : base_class(type, name, parent)
18 {}
19
21
22 ATH_CHECK(detStore()->retrieve(m_pixelId,"PixelID"));
23
24 return StatusCode::SUCCESS;
25 }
26
27 StatusCode
29 const Acts::GeometryContext& /*gctx*/,
30 const xAOD::PixelCluster& cluster,
32 const InDetDD::SiDetectorElement& element) const
33 {
34 // this is the width expressed in mm
35 float width = cluster.widthInEta();
36
37 // using width to scale the cluster covariance for space points
38 float covTerm = width*width*s_oneOverTwelve;
39 auto localCov = cluster.localCovariance<2>();
40 if( covTerm < localCov(1, 1) )
41 covTerm = localCov(1, 1);
42
43 // use xz, yz, zz terms of rotation matrix to scale the covariance term
44 const Amg::Transform3D &Tp = element.surface().transform();
45 float cov_z = 6.f*covTerm*static_cast<float>(Tp(0, 2)*Tp(0, 2)+Tp(1, 2)*Tp(1, 2));
46 float cov_r = 6.f*covTerm*static_cast<float>(Tp(2, 2)*Tp(2, 2));
47
48 if (m_useMaxVariance) {
49 cov_z = std::min(cov_z, m_maxVarianceZ.value());
50 cov_r = std::min(cov_r, m_maxVarianceR.value());
51 }
52
53 sp.setSpacePoint(cluster.identifierHash(),
54 cluster.globalPosition(),
55 cov_r,
56 cov_z,
57 std::vector< const xAOD::UncalibratedMeasurement* >({&cluster}));
58
59 return StatusCode::SUCCESS;
60 }
61}
#define ATH_CHECK
Evaluate an expression and check for errors.
static Double_t sp
static Double_t Tp(Double_t *t, Double_t *par)
This is an Identifier helper class for the Pixel subdetector.
const double width
Gaudi::Property< float > m_maxVarianceR
Maximum variance for the r component of the space point covariance.
Gaudi::Property< float > m_maxVarianceZ
Maximum variance for the z component of the space point covariance.
Gaudi::Property< bool > m_useMaxVariance
Whether to use maximum variance for space point covariance If true, the covariance terms will be capp...
PixelSpacePointFormationTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode producePixelSpacePoint(const EventContext &ctx, const Acts::GeometryContext &gctx, const xAOD::PixelCluster &cluster, xAOD::SpacePoint &sp, const InDetDD::SiDetectorElement &element) const override
Class to hold geometrical description of a silicon detector element.
Trk::Surface & surface()
Element Surface.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
ConstVectorMap< 3 > globalPosition() const
Returns the global position of the pixel cluster.
float widthInEta() const
Returns the width of the cluster in phi (x) and eta (y) directions, respectively.
ConstMatrixMap< N > localCovariance() const
Returns the local covariance of the measurement.
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash).
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Eigen::Affine3d Transform3D
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.