ATLAS Offline Software
CompetingSCT_ClustersOnTrack.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // CompetingSCT_ClustersOnTrack.h, (c) ATLAS Detector software
8 
9 #ifndef COMPETINGSCTCLUSTERSONTRACK_H
10 #define COMPETINGSCTCLUSTERSONTRACK_H
11 
12 // Trk
14 #include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h" // cannot fwd-declare because of covariant method
16 
17 #include <iosfwd>
18 
19 class MsgStream;
20 
21 namespace Trk {
22 class Surface;
23 }
24 
25 namespace InDet {
26 
45 {
46 
47 public:
51 
60 
64  CompetingSCT_ClustersOnTrack(std::vector<const InDet::SCT_ClusterOnTrack*>&& childrots,
65  std::vector<AssignmentProb>&& assgnProb);
66 
69 
72 
75  const Trk::Surface& associatedSurface() const;
76 
79  const Amg::Vector3D& globalPosition() const;
80 
82  unsigned int numberOfContainedROTs() const;
83 
86  const std::vector<const InDet::SCT_ClusterOnTrack*>& containedROTs() const;
87 
89  const InDet::SCT_ClusterOnTrack& rioOnTrack(unsigned int) const;
90 
92  MsgStream& dump(MsgStream& out) const;
94  std::ostream& dump(std::ostream& out) const;
95 
99  virtual void setLocalParametersAndErrorMatrix();
100 
101 private:
103  void clearChildRotVector();
104 
107 
109  std::vector<const InDet::SCT_ClusterOnTrack*> m_containedChildRots;
110 
117  bool ROTsHaveCommonSurface(const bool withNonVanishingAssignProb = true) const;
118 };
119 
122 {
123  return new InDet::CompetingSCT_ClustersOnTrack(*this);
124 }
125 
126 inline const Trk::Surface&
128 {
129  return ((*(m_containedChildRots.begin()))->associatedSurface());
130 }
131 
132 inline const std::vector<const InDet::SCT_ClusterOnTrack*>&
134 {
135  return m_containedChildRots;
136 }
137 
138 inline const InDet::SCT_ClusterOnTrack&
140 {
141  return *(m_containedChildRots[indx]);
142 }
143 
144 inline const Amg::Vector3D&
146 {
147  if (not m_globalPosition) {
148  m_globalPosition.set(std::make_unique<const Amg::Vector3D>(
149  associatedSurface().localToGlobal(localParameters())));
150  }
151  return *m_globalPosition;
152 }
153 
154 inline unsigned int
156 {
157  return m_containedChildRots.size();
158 }
159 
160 }
161 
162 #endif // COMPETINGSCTCLUSTERSONTRACK_H
163 
InDet::CompetingSCT_ClustersOnTrack::globalPosition
const Amg::Vector3D & globalPosition() const
Interface method to get the global Position.
Definition: CompetingSCT_ClustersOnTrack.h:145
SCT_ClusterOnTrack.h
InDet::CompetingSCT_ClustersOnTrack::clone
CompetingSCT_ClustersOnTrack * clone() const
needed to avoid excessive RTTI
Definition: CompetingSCT_ClustersOnTrack.h:121
InDet::CompetingSCT_ClustersOnTrack::m_containedChildRots
std::vector< const InDet::SCT_ClusterOnTrack * > m_containedChildRots
The vector of contained InDet::SCT_ClusterOnTrack objects.
Definition: CompetingSCT_ClustersOnTrack.h:109
CompetingRIOsOnTrack.h
InDet::CompetingSCT_ClustersOnTrack::dump
MsgStream & dump(MsgStream &out) const
returns some information about this MeasurementBase/CompetingSCT_ClustersOnTrack.
Definition: CompetingSCT_ClustersOnTrack.cxx:106
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
CxxUtils::CachedUniquePtrT
Cached pointer with atomic update.
Definition: CachedUniquePtr.h:54
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:7
InDet::CompetingSCT_ClustersOnTrack::clearChildRotVector
void clearChildRotVector()
private method to clear the Trk::RIO_OnTrack vector
Definition: CompetingSCT_ClustersOnTrack.cxx:99
InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrack
CompetingSCT_ClustersOnTrack()
Default Constructor for POOL.
Definition: CompetingSCT_ClustersOnTrack.cxx:19
InDet::CompetingSCT_ClustersOnTrack::m_globalPosition
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
The global position.
Definition: CompetingSCT_ClustersOnTrack.h:106
InDet::CompetingSCT_ClustersOnTrack::operator=
CompetingSCT_ClustersOnTrack & operator=(const CompetingSCT_ClustersOnTrack &compROT)
Assignment operator.
Definition: CompetingSCT_ClustersOnTrack.cxx:55
InDet::CompetingSCT_ClustersOnTrack::setLocalParametersAndErrorMatrix
virtual void setLocalParametersAndErrorMatrix()
recalculate the LocalParameters and ErrorMatrix
Definition: CompetingSCT_ClustersOnTrack.cxx:149
CachedUniquePtr.h
Cached unique_ptr with atomic update.
Trk::CompetingRIOsOnTrack
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
Definition: CompetingRIOsOnTrack.h:64
InDet::CompetingSCT_ClustersOnTrack::ROTsHaveCommonSurface
bool ROTsHaveCommonSurface(const bool withNonVanishingAssignProb=true) const
Have all the contained ROTs a common associated surface? If withNonVanishingAssignProb==true just the...
Definition: CompetingSCT_ClustersOnTrack.cxx:143
InDet::CompetingSCT_ClustersOnTrack::associatedSurface
const Trk::Surface & associatedSurface() const
returns the surface for the local to global transformation .
Definition: CompetingSCT_ClustersOnTrack.h:127
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::CompetingSCT_ClustersOnTrack::numberOfContainedROTs
unsigned int numberOfContainedROTs() const
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
Definition: CompetingSCT_ClustersOnTrack.h:155
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::CompetingSCT_ClustersOnTrack
Definition: CompetingSCT_ClustersOnTrack.h:45
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
InDet::CompetingSCT_ClustersOnTrack::rioOnTrack
const InDet::SCT_ClusterOnTrack & rioOnTrack(unsigned int) const
returns the RIO_OnTrack (also known as ROT) objects depending on the integer
Definition: CompetingSCT_ClustersOnTrack.h:139
InDet::CompetingSCT_ClustersOnTrack::CompetingSCT_ClustersOnTrackTool
friend class CompetingSCT_ClustersOnTrackTool
InDet::CompetingSCT_ClustersOnTrackTool is a friend to allow for updates of the assignment probabilit...
Definition: CompetingSCT_ClustersOnTrack.h:50
InDet::CompetingSCT_ClustersOnTrack::~CompetingSCT_ClustersOnTrack
virtual ~CompetingSCT_ClustersOnTrack()
Destructor.
Definition: CompetingSCT_ClustersOnTrack.cxx:93
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
InDet::CompetingSCT_ClustersOnTrack::containedROTs
const std::vector< const InDet::SCT_ClusterOnTrack * > & containedROTs() const
returns the vector of SCT_ClusterOnTrack objects .
Definition: CompetingSCT_ClustersOnTrack.h:133
InDet::SCT_ClusterOnTrack
Definition: SCT_ClusterOnTrack.h:44