ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
InDet::SCT_SpacePoint Class Referencefinal

#include <SCT_SpacePoint.h>

Inheritance diagram for InDet::SCT_SpacePoint:
Collaboration diagram for InDet::SCT_SpacePoint:

Public Member Functions

 SCT_SpacePoint ()=default
 Default constructor. More...
 
const std::pair< IdentifierHash, IdentifierHash > & elementIdList () const
 return the pair of Ids of the element by reference More...
 
const std::pair< const PrepRawData *, const PrepRawData * > & clusterList () const
 return the pair of cluster pointers by reference More...
 
const AmgSymMatrix (3) &globCovariance() const
 return the error matrix by reference The Matrix is calculated from the local Covariance Matrix when demanded and the cached More...
 
double eta (double z0=0) const
 calculate eta (not cached), needs z0 info More...
 
double r () const
 returns the r value of the SpacePoint's position (in cylindrical coordinates). More...
 
double phi () const
 returns the phi value of the SpacePoint's position (in cylindrical coordinates). More...
 
virtual const SurfaceassociatedSurface () const override final
 Interface method to get the associated Surface. More...
 
virtual const Amg::Vector3DglobalPosition () const override final
 Interface method to get the global Position. More...
 
std::unique_ptr< SpacePointuniqueClone () const
 Clone. More...
 
virtual bool type (MeasurementBaseType::Type type) const override final
 Extended method checking the type. More...
 
const LocalParameters & localParameters () const
 Interface method to get the LocalParameters. More...
 
const Amg::MatrixXlocalCovariance () const
 Interface method to get the localError. More...
 

Protected Member Functions

 AmgSymMatrix (3) m_globalCovariance
 
void setupGlobalFromLocalCovariance ()
 set up the global covariance matrix by rotating the local one More...
 

Protected Attributes

std::pair< const PrepRawData *, const PrepRawData * > m_clusList
 
std::pair< IdentifierHash, IdentifierHashm_elemIdList
 
Amg::Vector3D m_position
 
LocalParameters m_localParams
 
Amg::MatrixX m_localCovariance
 

Parametrised constructors

In order to ensure initialisation, the global Position has to be on the surface associated to the FIRST member of the PRD-pair clusList.

 SCT_SpacePoint (const std::pair< IdentifierHash, IdentifierHash > &elementIdList, const Amg::Vector3D &position, const std::pair< const Trk::PrepRawData *, const Trk::PrepRawData * > &clusList)
 
 SCT_SpacePoint (const SCT_SpacePoint &)=default
 default move,copy,dtor More...
 
SCT_SpacePointoperator= (const SCT_SpacePoint &)=default
 
 SCT_SpacePoint (SCT_SpacePoint &&) noexcept=default
 
SCT_SpacePointoperator= (SCT_SpacePoint &&) noexcept=default
 
virtual ~SCT_SpacePoint ()=default
 
virtual Trk::SpacePointclone () const override final
 Clones. More...
 
virtual MsgStream & dump (MsgStream &out) const override final
 Interface method for output, to be overloaded by child classes*. More...
 
virtual std::ostream & dump (std::ostream &out) const override final
 Interface method for output, to be overloaded by child classes*. More...
 
void setupLocalCovarianceSCT ()
 method to set up the local Covariance Matrix. More...
 
void setup (const std::pair< IdentifierHash, IdentifierHash > &elementIdList, const Amg::Vector3D &position, const std::pair< const Trk::PrepRawData *, const Trk::PrepRawData * > &clusList)
 common method used in constructors. More...
 

Detailed Description

An SCT_SpacePoint is created from two SCT_Cluster's from two different wafers.

Definition at line 31 of file SCT_SpacePoint.h.

Constructor & Destructor Documentation

◆ SCT_SpacePoint() [1/4]

InDet::SCT_SpacePoint::SCT_SpacePoint ( )
default

Default constructor.

◆ SCT_SpacePoint() [2/4]

InDet::SCT_SpacePoint::SCT_SpacePoint ( const std::pair< IdentifierHash, IdentifierHash > &  elementIdList,
const Amg::Vector3D position,
const std::pair< const Trk::PrepRawData *, const Trk::PrepRawData * > &  clusList 
)

Definition at line 20 of file SCT_SpacePoint.cxx.

24  : Trk::SpacePoint() {
25  setup(elementIdList, position, clusList);
28 }

◆ SCT_SpacePoint() [3/4]

InDet::SCT_SpacePoint::SCT_SpacePoint ( const SCT_SpacePoint )
default

default move,copy,dtor

◆ SCT_SpacePoint() [4/4]

InDet::SCT_SpacePoint::SCT_SpacePoint ( SCT_SpacePoint &&  )
defaultnoexcept

◆ ~SCT_SpacePoint()

virtual InDet::SCT_SpacePoint::~SCT_SpacePoint ( )
virtualdefault

Member Function Documentation

◆ AmgSymMatrix() [1/2]

const Trk::SpacePoint::AmgSymMatrix ( ) const &
inherited

return the error matrix by reference The Matrix is calculated from the local Covariance Matrix when demanded and the cached

◆ AmgSymMatrix() [2/2]

Trk::SpacePoint::AmgSymMatrix ( )
protectedinherited

◆ associatedSurface()

const Surface & SpacePoint::associatedSurface ( ) const
finaloverridevirtualinherited

Interface method to get the associated Surface.

Implements Trk::MeasurementBase.

Definition at line 71 of file Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx.

71  {
72  assert(m_clusList.first->detectorElement());
73  return m_clusList.first->detectorElement()->surface();
74  }

◆ clone()

Trk::SpacePoint * InDet::SCT_SpacePoint::clone ( ) const
inlinefinaloverridevirtual

Clones.

Implements Trk::SpacePoint.

Definition at line 84 of file SCT_SpacePoint.h.

84  {
85  return new SCT_SpacePoint(*this);
86 }

◆ clusterList()

const std::pair< const PrepRawData *, const PrepRawData * > & SpacePoint::clusterList ( ) const
inlineinherited

return the pair of cluster pointers by reference

Definition at line 127 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

127  {
128  return m_clusList;
129 }

◆ dump() [1/2]

MsgStream & InDet::SCT_SpacePoint::dump ( MsgStream &  out) const
finaloverridevirtual

Interface method for output, to be overloaded by child classes*.

Implements Trk::SpacePoint.

Definition at line 70 of file SCT_SpacePoint.cxx.

70  {
71  std::ostringstream os;
72  dump(os);
73  out << os.str();
74  return out;
75 }

◆ dump() [2/2]

std::ostream & InDet::SCT_SpacePoint::dump ( std::ostream &  out) const
finaloverridevirtual

Interface method for output, to be overloaded by child classes*.

Implements Trk::SpacePoint.

Definition at line 79 of file SCT_SpacePoint.cxx.

79  {
80  const std::string lf{"\n"}; // linefeed
81  out << "SCT_SpacePoint contains: " << lf;
82  out << "Identifier Hashes ( " << int(this->elementIdList().first) << " , ";
83  out << int(this->elementIdList().second) << " ) " << lf;
84  out << "Global Position: " << Amg::toString(this->globalPosition(), 3) << lf;
85  out << "Global Covariance Matrix " << Amg::toString(this->globCovariance(), 3)
86  << lf;
87  out << "Local Parameters " << this->localParameters() << lf;
88  out << "Local Covariance " << Amg::toString(this->localCovariance()) << lf;
89  out << "Cluster 1 :" << lf << (*this->clusterList().first) << lf;
90  out << "Cluster 2 :" << lf << (*this->clusterList().second) << std::endl;
91 
92  return out;
93 }

◆ elementIdList()

const std::pair< IdentifierHash, IdentifierHash > & SpacePoint::elementIdList ( ) const
inlineinherited

return the pair of Ids of the element by reference

Definition at line 122 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

122  {
123  return m_elemIdList;
124 }

◆ eta()

double SpacePoint::eta ( double  z0 = 0) const
inlineinherited

calculate eta (not cached), needs z0 info

Definition at line 131 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

131  {
132  // double zr = (m_z-z0)/m_r;
133  double zr = (m_position.z() - z0) / m_position.perp();
134  return std::log(zr + std::sqrt(1. + zr * zr));
135 }

◆ globalPosition()

const Amg::Vector3D & SpacePoint::globalPosition ( ) const
inlinefinaloverridevirtualinherited

Interface method to get the global Position.

Implements Trk::MeasurementBase.

Definition at line 146 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

146  {
147  return m_position;
148 }

◆ localCovariance()

const Amg::MatrixX & Trk::MeasurementBase::localCovariance ( ) const
inlineinherited

Interface method to get the localError.

Definition at line 138 of file MeasurementBase.h.

139 {
140  return m_localCovariance;
141 }

◆ localParameters()

const Trk::LocalParameters & Trk::MeasurementBase::localParameters ( ) const
inlineinherited

Interface method to get the LocalParameters.

Definition at line 132 of file MeasurementBase.h.

133 {
134  return m_localParams;
135 }

◆ operator=() [1/2]

SCT_SpacePoint& InDet::SCT_SpacePoint::operator= ( const SCT_SpacePoint )
default

◆ operator=() [2/2]

SCT_SpacePoint& InDet::SCT_SpacePoint::operator= ( SCT_SpacePoint &&  )
defaultnoexcept

◆ phi()

double SpacePoint::phi ( ) const
inlineinherited

returns the phi value of the SpacePoint's position (in cylindrical coordinates).

This is calculated once in the ctor and then cached

Definition at line 141 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

141  {
142  return m_position.phi();
143 }

◆ r()

double SpacePoint::r ( ) const
inlineinherited

returns the r value of the SpacePoint's position (in cylindrical coordinates).

This is calculated once in the ctor and then cached

Definition at line 137 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

137  {
138  return m_position.perp();
139 }

◆ setup()

void InDet::SCT_SpacePoint::setup ( const std::pair< IdentifierHash, IdentifierHash > &  elementIdList,
const Amg::Vector3D position,
const std::pair< const Trk::PrepRawData *, const Trk::PrepRawData * > &  clusList 
)
private

common method used in constructors.

Definition at line 32 of file SCT_SpacePoint.cxx.

36  {
37  m_clusList = clusList;
38  m_position = position;
39  m_elemIdList.first = elementIdList.first;
40  m_elemIdList.second = elementIdList.second;
41  assert((clusList.first != 0) && (clusList.second != 0));
42  assert(clusList.first->detectorElement());
43  std::optional<Amg::Vector2D> locpos{
44  clusList.first->detectorElement()->surface().globalToLocal(position)};
45  assert(locpos);
47 }

◆ setupGlobalFromLocalCovariance()

void SpacePoint::setupGlobalFromLocalCovariance ( )
protectedinherited

set up the global covariance matrix by rotating the local one

Definition at line 57 of file Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx.

57  {
58  const Amg::MatrixX& lc = this->localCovariance();
59 
60  Eigen::Matrix3d cov;
61 
62  cov << lc(0, 0), lc(0, 1), 0.,
63  lc(1, 0), lc(1, 1), 0.,
64  // cppcheck-suppress constStatement
65  0., 0., 0.;
66 
67  const Amg::RotationMatrix3D& R = associatedSurface().transform().rotation();
68  m_globalCovariance = R * cov * R.transpose();
69  }

◆ setupLocalCovarianceSCT()

void InDet::SCT_SpacePoint::setupLocalCovarianceSCT ( )
private

method to set up the local Covariance Matrix.

Definition at line 51 of file SCT_SpacePoint.cxx.

51  {
52 
53  /* For performance reason only, the error is assumed constant.
54  numbers are taken from
55  Trigger/TrigTools/TrigOfflineSpacePointTool/OfflineSpacePointProviderTool
56  */
57  constexpr double deltaY = 0.0004; // roughly pitch of SCT (80 mu) / sqrt(12)
58  constexpr double offdiag = 25. * deltaY;
59  constexpr double elem11 = 1600. * deltaY;
60  Amg::MatrixX cov(2, 2);
61  cov << deltaY, offdiag,
62  // cppcheck-suppress constStatement; false positive
63  offdiag, elem11;
64 
66 }

◆ type()

virtual bool Trk::SpacePoint::type ( MeasurementBaseType::Type  type) const
inlinefinaloverridevirtualinherited

Extended method checking the type.

Implements Trk::MeasurementBase.

Definition at line 87 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

87  {
89  }

◆ uniqueClone()

std::unique_ptr<SpacePoint> Trk::SpacePoint::uniqueClone ( ) const
inlineinherited

Clone.

Definition at line 82 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

82  {
83  return std::unique_ptr<SpacePoint>(clone());
84  }

Member Data Documentation

◆ m_clusList

std::pair<const PrepRawData*, const PrepRawData*> Trk::SpacePoint::m_clusList
protectedinherited

◆ m_elemIdList

std::pair<IdentifierHash, IdentifierHash> Trk::SpacePoint::m_elemIdList
protectedinherited

◆ m_localCovariance

Amg::MatrixX Trk::MeasurementBase::m_localCovariance
protectedinherited

Definition at line 112 of file MeasurementBase.h.

◆ m_localParams

LocalParameters Trk::MeasurementBase::m_localParams
protectedinherited

Definition at line 111 of file MeasurementBase.h.

◆ m_position

Amg::Vector3D Trk::SpacePoint::m_position
protectedinherited

The documentation for this class was generated from the following files:
Trk::SpacePoint::clusterList
const std::pair< const PrepRawData *, const PrepRawData * > & clusterList() const
return the pair of cluster pointers by reference
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:127
Trk::LocalParameters
Definition: LocalParameters.h:98
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
Trk::SpacePoint::globalPosition
virtual const Amg::Vector3D & globalPosition() const override final
Interface method to get the global Position.
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:146
makeComparison.deltaY
int deltaY
Definition: makeComparison.py:44
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
Trk::z0
@ z0
Definition: ParamDefs.h:64
Trk::SpacePoint::m_clusList
std::pair< const PrepRawData *, const PrepRawData * > m_clusList
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:97
python.TriggerAPI.TriggerAPISession.lf
lf
Definition: TriggerAPISession.py:390
xAOD::SpacePoint
SpacePoint_v1 SpacePoint
Definition: Event/xAOD/xAODInDetMeasurement/xAODInDetMeasurement/SpacePoint.h:12
python.LumiCalcHtml.lc
lc
Definition: LumiCalcHtml.py:579
Trk::SpacePoint::type
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:87
Trk::SpacePoint::setupGlobalFromLocalCovariance
void setupGlobalFromLocalCovariance()
set up the global covariance matrix by rotating the local one
Definition: Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx:57
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
Trk::SpacePoint::associatedSurface
virtual const Surface & associatedSurface() const override final
Interface method to get the associated Surface.
Definition: Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx:71
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
InDet::SCT_SpacePoint::setup
void setup(const std::pair< IdentifierHash, IdentifierHash > &elementIdList, const Amg::Vector3D &position, const std::pair< const Trk::PrepRawData *, const Trk::PrepRawData * > &clusList)
common method used in constructors.
Definition: SCT_SpacePoint.cxx:32
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
Trk::MeasurementBase::m_localParams
LocalParameters m_localParams
Definition: MeasurementBase.h:111
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
Trk::SpacePoint::m_position
Amg::Vector3D m_position
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:99
Trk::SpacePoint::elementIdList
const std::pair< IdentifierHash, IdentifierHash > & elementIdList() const
return the pair of Ids of the element by reference
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:122
InDet::SCT_SpacePoint::dump
virtual MsgStream & dump(MsgStream &out) const override final
Interface method for output, to be overloaded by child classes*.
Definition: SCT_SpacePoint.cxx:70
Trk::SpacePoint::clone
virtual SpacePoint * clone() const override=0
Clone.
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
Trk::MeasurementBase::m_localCovariance
Amg::MatrixX m_localCovariance
Definition: MeasurementBase.h:112
InDet::SCT_SpacePoint::SCT_SpacePoint
SCT_SpacePoint()=default
Default constructor.
Amg::RotationMatrix3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Definition: GeoPrimitives.h:49
DeMoScan.first
bool first
Definition: DeMoScan.py:536
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
InDet::SCT_SpacePoint::setupLocalCovarianceSCT
void setupLocalCovarianceSCT()
method to set up the local Covariance Matrix.
Definition: SCT_SpacePoint.cxx:51
Trk::SpacePoint::m_elemIdList
std::pair< IdentifierHash, IdentifierHash > m_elemIdList
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:98
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Trk::MeasurementBaseType::SpacePoint
@ SpacePoint
Definition: MeasurementBase.h:48