ATLAS Offline Software
CompetingMuonClustersOnTrack.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 // CompetingRpcClustersOnTrack.h, (c) ATLAS Detector software
8 
9 #ifndef COMPETINGRPCCLUSTERSONTRACK_H
10 #define COMPETINGRPCCLUSTERSONTRACK_H
11 
12 // Trk
16 // Identifier
17 #include "Identifier/Identifier.h"
19 // Muon
21 
23 
24 #include <ostream>
25 #include <utility>
26 
27 class MsgStream;
28 
29 namespace Trk {
30 class PrepRawData;
31 class TrkDetElementBase;
32 }
33 
34 namespace Muon {
35 
54 {
55 
56 public:
60 
67  const CompetingMuonClustersOnTrack& compROT);
69  CompetingMuonClustersOnTrack&& compROT) noexcept;
70 
81  std::vector<const MuonClusterOnTrack*>&& childrots,
82  std::vector<AssignmentProb>&& assgnProb);
83 
97  Trk::LocalParameters&& locPars,
99  const Trk::Surface* assSurf,
100  std::vector<const MuonClusterOnTrack*>&& childrots,
101  std::vector<AssignmentProb>&& assgnProb);
102 
105 
108 
111  const Trk::Surface& associatedSurface() const;
112  const Trk::Surface* associatedSurfaceRaw() const;
113 
116  const Amg::Vector3D& globalPosition() const;
117 
119  unsigned int numberOfContainedROTs() const;
120 
123  const std::vector<const MuonClusterOnTrack*>& containedROTs() const;
124 
127  const MuonClusterOnTrack& rioOnTrack(unsigned int) const;
128 
131  MsgStream& dump(MsgStream& out) const;
134  std::ostream& dump(std::ostream& out) const;
135 
136 private:
138  void clearChildRotVector();
139 
142 
144  std::vector<const MuonClusterOnTrack*> m_containedChildRots;
145 
152  const bool withNonVanishingAssignProb = true) const;
153 };
154 
157 {
158  return new CompetingMuonClustersOnTrack(*this);
159 }
160 
161 inline const Trk::Surface&
163 {
164  if (m_associatedSurface) {
165  return *m_associatedSurface;
166  }
167  return (
168  (*(std::as_const(m_containedChildRots).begin()))->associatedSurface());
169 }
170 
171 inline const Trk::Surface*
173 {
174  return m_associatedSurface;
175 }
176 
177 inline unsigned int
179 {
180  return m_containedChildRots.size();
181 }
182 
183 inline const std::vector<const MuonClusterOnTrack*>&
185 {
186  return m_containedChildRots;
187 }
188 
189 inline const MuonClusterOnTrack&
191 {
192  return *std::as_const(m_containedChildRots)[indx];
193 }
194 
195 inline const Amg::Vector3D&
197 {
198  if (not m_globalPosition) {
199  m_globalPosition.set(std::make_unique<const Amg::Vector3D>(
200  associatedSurface().localToGlobal(localParameters())));
201  }
202  return (*m_globalPosition);
203 }
204 }
205 
206 #endif // COMPETINGRPCCLUSTERSONTRACK_H
207 
Trk::LocalParameters
Definition: LocalParameters.h:98
SurfaceHolders.h
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
CompetingRIOsOnTrack.h
Muon::CompetingMuonClustersOnTrack::m_containedChildRots
std::vector< const MuonClusterOnTrack * > m_containedChildRots
The vector of contained Muon::MuonClusterOnTrack objects.
Definition: CompetingMuonClustersOnTrack.h:144
Muon::CompetingMuonClustersOnTrack::ROTsHaveCommonSurface
bool ROTsHaveCommonSurface(const bool withNonVanishingAssignProb=true) const
Have all the contained ROTs a common associated surface? If withNonVanishingAssignProb==true just the...
Definition: CompetingMuonClustersOnTrack.cxx:157
Muon::CompetingMuonClustersOnTrack::clone
CompetingMuonClustersOnTrack * clone() const
needed to avoid excessive RTTI
Definition: CompetingMuonClustersOnTrack.h:156
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
Muon::CompetingMuonClustersOnTrack::clearChildRotVector
void clearChildRotVector()
private method to clear the Trk::RIO_OnTrack vector
Definition: CompetingMuonClustersOnTrack.cxx:122
Muon::CompetingMuonClustersOnTrack
Definition: CompetingMuonClustersOnTrack.h:54
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
Trk::SurfacePtrHolderImplDetEl::m_associatedSurface
const S * m_associatedSurface
Definition: SurfaceHolderImpl.h:244
Muon::CompetingMuonClustersOnTrack::associatedSurfaceRaw
const Trk::Surface * associatedSurfaceRaw() const
Definition: CompetingMuonClustersOnTrack.h:172
Muon::CompetingMuonClustersOnTrack::~CompetingMuonClustersOnTrack
virtual ~CompetingMuonClustersOnTrack()
Destructor.
Definition: CompetingMuonClustersOnTrack.cxx:116
Muon::CompetingMuonClustersOnTrack::associatedSurface
const Trk::Surface & associatedSurface() const
returns the surface for the local to global transformation .
Definition: CompetingMuonClustersOnTrack.h:162
CachedUniquePtr.h
Cached unique_ptr with atomic update.
Trk::CompetingRIOsOnTrack
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
Definition: CompetingRIOsOnTrack.h:64
Muon::CompetingMuonClustersOnTrack::CompetingMuonClustersOnTrackTool
friend class CompetingMuonClustersOnTrackTool
Muon::CompetingMuonClustersOnTrackTool is a friend to allow for updates of the assignment probabiliti...
Definition: CompetingMuonClustersOnTrack.h:59
Muon::CompetingMuonClustersOnTrack::numberOfContainedROTs
unsigned int numberOfContainedROTs() const
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
Definition: CompetingMuonClustersOnTrack.h:178
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
RIO_OnTrack.h
IdentifierHash.h
Muon::CompetingMuonClustersOnTrack::containedROTs
const std::vector< const MuonClusterOnTrack * > & containedROTs() const
returns the vector of SCT_ClusterOnTrack objects .
Definition: CompetingMuonClustersOnTrack.h:184
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
Muon::CompetingMuonClustersOnTrack::rioOnTrack
const MuonClusterOnTrack & rioOnTrack(unsigned int) const
returns the RIO_OnTrack (also known as ROT) objects depending on the integer
Definition: CompetingMuonClustersOnTrack.h:190
Muon::CompetingMuonClustersOnTrack::CompetingMuonClustersOnTrack
CompetingMuonClustersOnTrack()
Default Constructor for POOL.
Definition: CompetingMuonClustersOnTrack.cxx:18
Trk::SurfacePtrHolderImplDetEl
Definition: SurfaceHolderImpl.h:165
Muon::CompetingMuonClustersOnTrack::dump
MsgStream & dump(MsgStream &out) const
returns some information about this MeasurementBase/CompetingMuonClustersOnTrack.
Definition: CompetingMuonClustersOnTrack.cxx:130
Muon::CompetingMuonClustersOnTrack::operator=
CompetingMuonClustersOnTrack & operator=(const CompetingMuonClustersOnTrack &compROT)
Assignment operator.
Definition: CompetingMuonClustersOnTrack.cxx:75
MuonClusterOnTrack.h
Muon::CompetingMuonClustersOnTrack::m_globalPosition
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
The global Position.
Definition: CompetingMuonClustersOnTrack.h:141
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
error
Definition: IImpactPoint3dEstimator.h:70
Muon::CompetingMuonClustersOnTrack::globalPosition
const Amg::Vector3D & globalPosition() const
Interface method to get the global Position.
Definition: CompetingMuonClustersOnTrack.h:196
Muon::MuonClusterOnTrack
Base class for Muon cluster RIO_OnTracks.
Definition: MuonClusterOnTrack.h:34