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#include <ranges>
16
17namespace Muon {
18
19// copy constructor
24
25// explicit constructor
27 std::vector<std::unique_ptr<const MuonClusterOnTrack>>&& childrots,
28 std::vector<AssignmentProb>&& assgnProb)
29 : Trk::CompetingRIOsOnTrack(std::move(assgnProb))
30 , m_containedChildRots(std::move(childrots))
31{
33}
34
36 Trk::LocalParameters&& locPars,
38 const Trk::Surface* assSurf,
39 std::vector<std::unique_ptr<const MuonClusterOnTrack>>&& childrots,
40 std::vector<AssignmentProb>&& assgnProb)
41 : Trk::CompetingRIOsOnTrack{std::move(assgnProb)}
42 , Trk::SurfacePtrHolderDetEl{assSurf}
43 , m_containedChildRots(std::move(childrots))
44{
45 Trk::MeasurementBase::m_localParams = std::move(locPars);
47}
48
51 const CompetingMuonClustersOnTrack& compROT) noexcept
52{
53 if (this != &compROT) {
54 // assingment operator of base class
57 m_globalPosition.release();
59 std::ranges::transform(compROT.m_containedChildRots,
60 std::back_inserter(m_containedChildRots),
61 [](const std::unique_ptr<const MuonClusterOnTrack>& cluster) {
62 return std::unique_ptr<const MuonClusterOnTrack>{cluster->clone()};
63 });
64
65 }
66 return (*this);
67}
68
69
70MsgStream&
72{
73 out << "Muon::CompetingMuonClustersOnTrack (Muon competingROTs) "
74 << std::endl;
75 out << " - it contains : " << m_containedChildRots.size()
76 << " RIO_OnTrack objects" << std::endl;
77 out << " - parameters : " << std::endl;
78 out << " - parameter key : " << std::endl;
79 return out;
80}
81
82std::ostream&
83CompetingMuonClustersOnTrack::dump(std::ostream& out) const
84{
85 out << "Muon::CompetingMuonClustersOnTrack (Muon competingROTs) "
86 << std::endl;
87 out << " - it contains : " << m_containedChildRots.size()
88 << " RIO_OnTrack objects" << std::endl;
89 out << " - it contains : " << numberOfContainedROTs()
90 << " RIO_OnTrack objects" << std::endl;
91 out << " - parameters : " << std::endl;
92 out << " - parameter key : " << std::endl;
93 return out;
94}
95
96// Have all the contained ROTs a common associated surface?
97bool
99{
100 return true;
101}
102
103}
Class for competing MuonClusters, it extends the Trk::CompetingRIOsOnTrack base class.
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
The global Position.
CompetingMuonClustersOnTrack()=default
Default Constructor for POOL.
std::vector< std::unique_ptr< const MuonClusterOnTrack > > m_containedChildRots
The vector of contained Muon::MuonClusterOnTrack objects.
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?
CompetingMuonClustersOnTrack & operator=(const CompetingMuonClustersOnTrack &compROT) noexcept
Assignment operator.
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.
Definition Surface.h:79
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.