ATLAS Offline Software
CompetingPixelClustersOnTrack.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 // CompetingPixelClustersOnTrack.h, (c) ATLAS Detector software
8 
9 #ifndef COMPETINGPIXELCLUSTERSONTRACK_H
10 #define COMPETINGPIXELCLUSTERSONTRACK_H
11 
12 // Trk
14 #include "InDetRIO_OnTrack/PixelClusterOnTrack.h" // cannot forward declare
16 #include <iosfwd>
17 #include <memory>
18 #include <utility>
19 
20 class MsgStream;
21 
22 namespace Trk {
23 class PrepRawData;
24 class LocalParameters;
25 class Surface;
26 }
27 
28 namespace InDet {
29 
47 {
48 
49 public:
53 
61 
65  CompetingPixelClustersOnTrack(std::vector<const InDet::PixelClusterOnTrack*>&& childrots,
66  std::vector<AssignmentProb>&& assgnProb);
67 
70 
73 
75  std::unique_ptr<CompetingPixelClustersOnTrack> uniqueClone() const
76  {
77  return std::unique_ptr<CompetingPixelClustersOnTrack>(clone());
78  }
79 
82  const Trk::Surface& associatedSurface() const;
83 
86  const Amg::Vector3D& globalPosition() const;
87 
89  unsigned int numberOfContainedROTs() const;
90 
93  const std::vector<const InDet::PixelClusterOnTrack*>& containedROTs() const;
94 
96  const InDet::PixelClusterOnTrack& rioOnTrack(unsigned int) const;
97 
99  MsgStream& dump(MsgStream& out) const;
101  std::ostream& dump(std::ostream& out) const;
102 
103 private:
105  void clearChildRotVector();
106 
109 
111  std::vector<const InDet::PixelClusterOnTrack*> m_containedChildRots;
112 
119  bool ROTsHaveCommonSurface(const bool withNonVanishingAssignProb = true) const;
120 };
121 
124 {
125  return new InDet::CompetingPixelClustersOnTrack(*this);
126 }
127 
128 inline const Trk::Surface&
130 {
131  return ((*(std::as_const(m_containedChildRots).begin()))->associatedSurface());
132 }
133 
134 inline const std::vector<const InDet::PixelClusterOnTrack*>&
136 {
137  return (m_containedChildRots);
138 }
139 
140 inline const InDet::PixelClusterOnTrack&
142 {
143  return *std::as_const(m_containedChildRots)[indx];
144 }
145 
146 inline unsigned int
148 {
149  return m_containedChildRots.size();
150 }
151 
152 }
153 
154 #endif // COMPETINGPIXELCLUSTERSONTRACK_H
155 
InDet::CompetingPixelClustersOnTrack::CompetingPixelClustersOnTrackTool
friend class CompetingPixelClustersOnTrackTool
InDet::CompetingPixelClustersOnTrackTool is a friend to allow for updates of the assignment probabili...
Definition: CompetingPixelClustersOnTrack.h:52
CompetingRIOsOnTrack.h
InDet::CompetingPixelClustersOnTrack::operator=
CompetingPixelClustersOnTrack & operator=(const CompetingPixelClustersOnTrack &compROT)
Assignment operator.
Definition: CompetingPixelClustersOnTrack.cxx:53
InDet::CompetingPixelClustersOnTrack::dump
MsgStream & dump(MsgStream &out) const
returns some information about this MeasurementBase/CompetingPixelClustersOnTrack.
Definition: CompetingPixelClustersOnTrack.cxx:105
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
CxxUtils::CachedUniquePtrT
Cached pointer with atomic update.
Definition: CachedUniquePtr.h:54
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:7
InDet::CompetingPixelClustersOnTrack::clearChildRotVector
void clearChildRotVector()
private method to clear the Trk::RIO_OnTrack vector
Definition: CompetingPixelClustersOnTrack.cxx:96
InDet::CompetingPixelClustersOnTrack::associatedSurface
const Trk::Surface & associatedSurface() const
returns the surface for the local to global transformation .
Definition: CompetingPixelClustersOnTrack.h:129
InDet::CompetingPixelClustersOnTrack::ROTsHaveCommonSurface
bool ROTsHaveCommonSurface(const bool withNonVanishingAssignProb=true) const
Have all the contained ROTs a common associated surface? If withNonVanishingAssignProb==true just the...
Definition: CompetingPixelClustersOnTrack.cxx:136
InDet::CompetingPixelClustersOnTrack::containedROTs
const std::vector< const InDet::PixelClusterOnTrack * > & containedROTs() const
returns the vector of PixelClusterOnTrack objects .
Definition: CompetingPixelClustersOnTrack.h:135
InDet::CompetingPixelClustersOnTrack::m_containedChildRots
std::vector< const InDet::PixelClusterOnTrack * > m_containedChildRots
The vector of contained InDet::PixelClusterOnTrack objects.
Definition: CompetingPixelClustersOnTrack.h:111
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::CompetingPixelClustersOnTrack::CompetingPixelClustersOnTrack
CompetingPixelClustersOnTrack()
Default Constructor for POOL.
Definition: CompetingPixelClustersOnTrack.cxx:16
InDet::CompetingPixelClustersOnTrack::numberOfContainedROTs
unsigned int numberOfContainedROTs() const
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
Definition: CompetingPixelClustersOnTrack.h:147
InDet::CompetingPixelClustersOnTrack::globalPosition
const Amg::Vector3D & globalPosition() const
Interface method to get the global Position.
Definition: CompetingPixelClustersOnTrack.cxx:142
InDet::CompetingPixelClustersOnTrack
Definition: CompetingPixelClustersOnTrack.h:47
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::CompetingPixelClustersOnTrack::~CompetingPixelClustersOnTrack
virtual ~CompetingPixelClustersOnTrack()
Destructor.
Definition: CompetingPixelClustersOnTrack.cxx:90
InDet::CompetingPixelClustersOnTrack::m_globalPosition
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
The global Position.
Definition: CompetingPixelClustersOnTrack.h:108
InDet::PixelClusterOnTrack
Definition: PixelClusterOnTrack.h:51
InDet::CompetingPixelClustersOnTrack::rioOnTrack
const InDet::PixelClusterOnTrack & rioOnTrack(unsigned int) const
returns the RIO_OnTrack (also known as ROT) objects depending on the integer
Definition: CompetingPixelClustersOnTrack.h:141
InDet::CompetingPixelClustersOnTrack::clone
CompetingPixelClustersOnTrack * clone() const
needed to avoid excessive RTTI
Definition: CompetingPixelClustersOnTrack.h:123
PixelClusterOnTrack.h
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
InDet::CompetingPixelClustersOnTrack::uniqueClone
std::unique_ptr< CompetingPixelClustersOnTrack > uniqueClone() const
NVI method returning unique_ptr clone.
Definition: CompetingPixelClustersOnTrack.h:75