ATLAS Offline Software
PixelSpacePointFormationTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "TrkSurfaces/Surface.h"
9 
11 
12 namespace 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 
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.*covTerm*static_cast<float>(Tp(0, 2)*Tp(0, 2)+Tp(1, 2)*Tp(1, 2));
44  float cov_r = 6.*covTerm*static_cast<float>(Tp(2, 2)*Tp(2, 2));
45 
46  std::vector< const xAOD::UncalibratedMeasurement* > measLinks({&cluster});
47  sp.setSpacePoint(cluster.identifierHash(),
48  cluster.globalPosition(),
49  cov_r,
50  cov_z,
51  measLinks);
52 
53  return StatusCode::SUCCESS;
54  }
55 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
xAOD::UncalibratedMeasurement_v1::identifierHash
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash)
ActsTrk::PixelSpacePointFormationTool::s_oneOverTwelve
static constexpr double s_oneOverTwelve
Definition: PixelSpacePointFormationTool.h:54
ActsTrk::PixelSpacePointFormationTool::m_pixelId
const PixelID * m_pixelId
Definition: PixelSpacePointFormationTool.h:49
xAOD::PixelCluster_v1::widthInEta
float widthInEta() const
Returns the width of the cluster in phi (x) and eta (y) directions, respectively.
ActsTrk::PixelSpacePointFormationTool::initialize
virtual StatusCode initialize() override
Definition: PixelSpacePointFormationTool.cxx:20
Surface.h
InDetDD::SolidStateDetectorElementBase::surface
Trk::Surface & surface()
Element Surface.
xAOD::SpacePoint_v1
Definition: SpacePoint_v1.h:29
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::PixelSpacePointFormationTool
PixelSpacePointFormationTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PixelSpacePointFormationTool.cxx:14
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
UncalibratedMeasurementContainer.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::UncalibratedMeasurement_v1::localCovariance
ConstMatrixMap< N > localCovariance() const
Returns the local covariance of the measurement.
xAOD::SpacePoint_v1::setSpacePoint
void setSpacePoint(DetectorIDHashType idHash, const Eigen::Matrix< float, 3, 1 > &globPos, float cov_r, float cov_z, const std::vector< const xAOD::UncalibratedMeasurement * > &measurementIndexes)
Definition: SpacePoint_v1.cxx:103
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
xAOD::PixelCluster_v1::globalPosition
ConstVectorMap< 3 > globalPosition() const
Returns the global position of the pixel cluster.
Definition: PixelCluster_v1.cxx:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
xAOD::PixelCluster_v1
Definition: PixelCluster_v1.h:17
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
PixelModuleDesign.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PixelSpacePointFormationTool.h
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:54
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.