ATLAS Offline Software
Loading...
Searching...
No Matches
CompetingMuonClustersOnTrack.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6// CompetingMuonClustersOnTrack.cxx, (c) ATLAS Detector software
8
9// Trk
10#include "GaudiKernel/MsgStream.h"
11// Muon
13// std
14#include <cmath>
15
16namespace Muon {
17// default constructor
25
26// copy constructor
28 const CompetingMuonClustersOnTrack& compROT)
29 : Trk::CompetingRIOsOnTrack(compROT)
30 , Trk::SurfacePtrHolderDetEl(compROT)
33{
34 if (compROT.m_globalPosition) {
35 m_globalPosition.store(
36 std::make_unique<const Amg::Vector3D>(*compROT.m_globalPosition));
37 }
38
39 std::vector<const MuonClusterOnTrack*>::const_iterator rotIter =
40 compROT.m_containedChildRots.begin();
41
42 for (; rotIter != compROT.m_containedChildRots.end(); ++rotIter) {
43 m_containedChildRots.push_back((*rotIter)->clone());
44 }
45}
46
47// explicit constructor
49 std::vector<const MuonClusterOnTrack*>&& childrots,
50 std::vector<AssignmentProb>&& assgnProb)
51 : Trk::CompetingRIOsOnTrack(std::move(assgnProb))
52 , Trk::SurfacePtrHolderDetEl()
54 , m_containedChildRots(std::move(childrots))
55{
57}
58
60 Trk::LocalParameters&& locPars,
62 const Trk::Surface* assSurf,
63 std::vector<const MuonClusterOnTrack*>&& childrots,
64 std::vector<AssignmentProb>&& assgnProb)
65 : Trk::CompetingRIOsOnTrack(std::move(assgnProb))
66 , Trk::SurfacePtrHolderDetEl(assSurf)
68 , m_containedChildRots(std::move(childrots))
69{
70 Trk::MeasurementBase::m_localParams = std::move(locPars);
72}
73
76 const CompetingMuonClustersOnTrack& compROT)
77{
78 if (this != &compROT) {
79 // assingment operator of base class
82 // clear rots
85 std::vector<const MuonClusterOnTrack*>::const_iterator rotIter =
86 compROT.m_containedChildRots.begin();
87
88 for (; rotIter != compROT.m_containedChildRots.end(); ++rotIter) {
89 m_containedChildRots.push_back((*rotIter)->clone());
90 }
91 if (compROT.m_globalPosition) {
92 m_globalPosition.store(
93 std::make_unique<const Amg::Vector3D>(*compROT.m_globalPosition));
94 } else if (m_globalPosition) {
95 m_globalPosition.release().reset();
96 }
97 }
98 return (*this);
99}
100
103 CompetingMuonClustersOnTrack&& compROT) noexcept
104{
105 if (this != &compROT) {
109 m_containedChildRots.clear();
110 m_containedChildRots = std::move(compROT.m_containedChildRots);
111 m_globalPosition = std::move(compROT.m_globalPosition);
112 }
113 return (*this);
114}
115
120
121void
128
129MsgStream&
131{
132 out << "Muon::CompetingMuonClustersOnTrack (Muon competingROTs) "
133 << std::endl;
134 out << " - it contains : " << m_containedChildRots.size()
135 << " RIO_OnTrack objects" << std::endl;
136 out << " - parameters : " << std::endl;
137 out << " - parameter key : " << std::endl;
138 return out;
139}
140
141std::ostream&
143{
144 out << "Muon::CompetingMuonClustersOnTrack (Muon competingROTs) "
145 << std::endl;
146 out << " - it contains : " << m_containedChildRots.size()
147 << " RIO_OnTrack objects" << std::endl;
148 out << " - it contains : " << numberOfContainedROTs()
149 << " RIO_OnTrack objects" << std::endl;
150 out << " - parameters : " << std::endl;
151 out << " - parameter key : " << std::endl;
152 return out;
153}
154
155// Have all the contained ROTs a common associated surface?
156bool
158{
159 return true;
160}
161
162}
Class for competing MuonClusters, it extends the Trk::CompetingRIOsOnTrack base class.
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
The global Position.
CompetingMuonClustersOnTrack & operator=(const CompetingMuonClustersOnTrack &compROT)
Assignment operator.
unsigned int numberOfContainedROTs() const
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
MsgStream & dump(MsgStream &out) const
returns some information about this MeasurementBase/CompetingMuonClustersOnTrack.
bool ROTsHaveCommonSurface(const bool withNonVanishingAssignProb=true) const
Have all the contained ROTs a common associated surface?
std::vector< const MuonClusterOnTrack * > m_containedChildRots
The vector of contained Muon::MuonClusterOnTrack objects.
CompetingMuonClustersOnTrack()
Default Constructor for POOL.
void clearChildRotVector()
private method to clear the Trk::RIO_OnTrack vector
Base class for Muon cluster RIO_OnTracks.
virtual void setLocalParametersAndErrorMatrix()
recalculate the LocalParameters and ErrorMatrix
CompetingRIOsOnTrack & operator=(const CompetingRIOsOnTrack &compROT)=default
Assignment operator.
CompetingRIOsOnTrack()
Default Constructor for POOL.
LocalParameters m_localParams
Amg::MatrixX m_localCovariance
SurfacePtrHolderImplDetEl & operator=(const SurfacePtrHolderImplDetEl &other)
Abstract Base Class for tracking surfaces.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Ensure that the ATLAS eigen extensions are properly loaded.
STL namespace.