ATLAS Offline Software
PixelSpacePoint.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <memory>
8 #include <ostream>
9 #include <sstream>
10 
16 #include "TrkSurfaces/Surface.h"
17 
18 namespace InDet {
19 
20 //-------------------------------------------------------------
24  const Trk::PrepRawData* clus)
25  : SpacePoint() {
26  assert(clus != nullptr);
30  m_position =
32 
33  m_clusList = {clus, nullptr};
34  m_elemIdList.first = elementId;
35  m_elemIdList.second = 0;
37 }
38 
39 //------------ -------------------------------------------------
40 
43  const Trk::PrepRawData* clus,
44  const Amg::Vector3D& globpos,
45  const AmgSymMatrix(3)& globcov)
46  : SpacePoint() {
47  assert(clus != nullptr);
48  m_position = globpos;
49  m_globalCovariance = globcov;
50  m_clusList = {clus, nullptr};
51  m_elemIdList.first = elementId;
52  m_elemIdList.second = 0;
53 }
54 
55 //-------------------------------------------------------------
56 
57 MsgStream& PixelSpacePoint::dump(MsgStream& out) const {
58  std::ostringstream os;
59  dump(os);
60  out << os.str();
61  return out;
62 }
63 
64 //-------------------------------------------------------------
65 
66 std::ostream& PixelSpacePoint::dump(std::ostream& out) const {
67  const std::string lf{"\n"}; // linefeed
68  out << "PixelSpacePoint contains: " << lf;
69  out << "Identifier Hash " << int(this->elementIdList().first) << lf;
70  out << "Global Position: " << Amg::toString(this->globalPosition(), 3) << lf;
71  out << "Global Covariance Matrix " << Amg::toString(this->globCovariance(), 3)
72  << lf;
73  out << "Local Parameters " << this->localParameters() << lf;
74  out << "Local Covariance " << Amg::toString(this->localCovariance()) << lf;
75  out << "Cluster 1 :" << lf << (*this->clusterList().first) << std::endl;
76 
77  return out;
78 }
79 
80 // ------------------------------------------------------------------
81 
82 
83 } // namespace InDet
84 
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
Surface.h
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
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
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
InDet::PixelSpacePoint::dump
virtual MsgStream & dump(MsgStream &out) const override final
Interface method for output, to be overloaded by child classes.
Definition: PixelSpacePoint.cxx:57
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
PrepRawData.h
Trk::SpacePoint::setupGlobalFromLocalCovariance
void setupGlobalFromLocalCovariance()
set up the global covariance matrix by rotating the local one
Definition: Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx:57
SpacePoint
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SpacePoint.h:7
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
EventPrimitivesToStringConverter.h
PixelSpacePoint.h
Trk::TrkDetElementBase::surface
virtual const Surface & surface() const =0
Return surface associated with this detector element.
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::PrepRawData
Definition: PrepRawData.h:62
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
IdentifierHash.h
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
LocalParameters.h
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
DeMoScan.first
bool first
Definition: DeMoScan.py:536
GeoPrimitivesToStringConverter.h
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
Trk::SpacePoint::m_elemIdList
std::pair< IdentifierHash, IdentifierHash > m_elemIdList
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:98
Trk::Surface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
InDet::PixelSpacePoint::PixelSpacePoint
PixelSpacePoint()=default
Default constructor.
Trk::PrepRawData::detectorElement
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...