ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::PixelSpacePointFormationTool Class Reference

Tool to produce pixel space points. More...

#include <PixelSpacePointFormationTool.h>

Inheritance diagram for ActsTrk::PixelSpacePointFormationTool:
Collaboration diagram for ActsTrk::PixelSpacePointFormationTool:

Public Member Functions

AthAlgTool methods
 PixelSpacePointFormationTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~PixelSpacePointFormationTool ()=default
virtual StatusCode initialize () override
Production of space points
virtual StatusCode producePixelSpacePoint (const xAOD::PixelCluster &cluster, xAOD::SpacePoint &sp, const InDetDD::SiDetectorElement &element) const override

Private Attributes

Id helpers
const PixelIDm_pixelId {}
Gaudi::Property< bool > m_useMaxVariance {this, "UseMaxVariance", false}
 Whether to use maximum variance for space point covariance If true, the covariance terms will be capped at the values specified by MaxVarianceZ and MaxVarianceR.
Gaudi::Property< float > m_maxVarianceZ {this, "MaxVarianceZ", 0.0014f}
 Maximum variance for the z component of the space point covariance.
Gaudi::Property< float > m_maxVarianceR {this, "MaxVarianceR", 0.015f}
 Maximum variance for the r component of the space point covariance.

Static Private Attributes

Static constant expression

Values used in calculating covariance terms

static constexpr double s_oneOverTwelve {0.08333}

Detailed Description

Tool to produce pixel space points.

Pixel space points are obtained directly from the clusters, with needed evaluation of the space point covariance terms Space points are then recorded to storegate as ActsTrk::SpacePoint into an ActsTrk::SpacePointContainer in the PixelSpacePointFormationAlgorithm

Definition at line 28 of file PixelSpacePointFormationTool.h.

Constructor & Destructor Documentation

◆ PixelSpacePointFormationTool()

ActsTrk::PixelSpacePointFormationTool::PixelSpacePointFormationTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 14 of file PixelSpacePointFormationTool.cxx.

17 : base_class(type, name, parent)
18 {}

◆ ~PixelSpacePointFormationTool()

virtual ActsTrk::PixelSpacePointFormationTool::~PixelSpacePointFormationTool ( )
virtualdefault

Member Function Documentation

◆ initialize()

StatusCode ActsTrk::PixelSpacePointFormationTool::initialize ( )
overridevirtual

Definition at line 20 of file PixelSpacePointFormationTool.cxx.

20 {
21
22 ATH_CHECK(detStore()->retrieve(m_pixelId,"PixelID"));
23
24 return StatusCode::SUCCESS;
25 }
#define ATH_CHECK
Evaluate an expression and check for errors.
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ producePixelSpacePoint()

StatusCode ActsTrk::PixelSpacePointFormationTool::producePixelSpacePoint ( const xAOD::PixelCluster & cluster,
xAOD::SpacePoint & sp,
const InDetDD::SiDetectorElement & element ) const
overridevirtual

Definition at line 28 of file PixelSpacePointFormationTool.cxx.

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 }
static Double_t sp
static Double_t Tp(Double_t *t, Double_t *par)
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...
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)
Eigen::Affine3d Transform3D

Member Data Documentation

◆ m_maxVarianceR

Gaudi::Property<float> ActsTrk::PixelSpacePointFormationTool::m_maxVarianceR {this, "MaxVarianceR", 0.015f}
private

Maximum variance for the r component of the space point covariance.

Default value was around the minimum observed value in the pixel barrel.

Definition at line 61 of file PixelSpacePointFormationTool.h.

61{this, "MaxVarianceR", 0.015f};

◆ m_maxVarianceZ

Gaudi::Property<float> ActsTrk::PixelSpacePointFormationTool::m_maxVarianceZ {this, "MaxVarianceZ", 0.0014f}
private

Maximum variance for the z component of the space point covariance.

Default value was around the minimum observed value in the pixel barrel.

Definition at line 58 of file PixelSpacePointFormationTool.h.

58{this, "MaxVarianceZ", 0.0014f};

◆ m_pixelId

const PixelID* ActsTrk::PixelSpacePointFormationTool::m_pixelId {}
private

Definition at line 49 of file PixelSpacePointFormationTool.h.

49{};

◆ m_useMaxVariance

Gaudi::Property<bool> ActsTrk::PixelSpacePointFormationTool::m_useMaxVariance {this, "UseMaxVariance", false}
private

Whether to use maximum variance for space point covariance If true, the covariance terms will be capped at the values specified by MaxVarianceZ and MaxVarianceR.

If false, the covariance terms will be calculated based on the cluster width and the rotation of the detector element.

Definition at line 55 of file PixelSpacePointFormationTool.h.

55{this, "UseMaxVariance", false};

◆ s_oneOverTwelve

double ActsTrk::PixelSpacePointFormationTool::s_oneOverTwelve {0.08333}
staticconstexprprivate

Definition at line 65 of file PixelSpacePointFormationTool.h.

65{0.08333};

The documentation for this class was generated from the following files: