ATLAS Offline Software
Loading...
Searching...
No Matches
CompetingRIOsOnTrack.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// CompetingRIOsOnTrack.h, (c) ATLAS Detector software
8
9#ifndef COMPETINGRIOSONTRACK_H
10#define COMPETINGRIOSONTRACK_H
11
12// Amg
15
16// Trk
19#include <atomic>
20#include <cassert>
21#include <iosfwd>
22#include <memory>
23
24class MsgStream;
26
27namespace Trk {
28
29class PrepRawData;
30class RIO_OnTrack;
32
62
64{
65
66public:
69 typedef double AssignmentProb;
70
74 CompetingRIOsOnTrack(std::vector<AssignmentProb>&& assgnProb);
76 CompetingRIOsOnTrack(const CompetingRIOsOnTrack& compROT) = default;
77 CompetingRIOsOnTrack(CompetingRIOsOnTrack&& compROT) noexcept = default;
80 CompetingRIOsOnTrack& operator=(CompetingRIOsOnTrack&& compROT) noexcept = default;
82 virtual ~CompetingRIOsOnTrack() = default;
83
85 virtual CompetingRIOsOnTrack* clone() const override = 0;
86
88 std::unique_ptr<CompetingRIOsOnTrack> uniqueClone() const
89 {
90 return std::unique_ptr<CompetingRIOsOnTrack>(clone());
91 }
92
95 virtual unsigned int numberOfContainedROTs() const = 0;
96
100 unsigned int indexOfMaxAssignProb() const;
101
105 virtual const RIO_OnTrack& rioOnTrack(unsigned int) const = 0;
106
110 AssignmentProb assignmentProbability(unsigned int indx) const;
111
114
116 virtual bool type(MeasurementBaseType::Type type) const override final
117 {
119 }
120
121protected:
122 friend class ::CompetingRIOsOnTrackCnv_p1;
123
125 std::vector<AssignmentProb> m_assignProb;
126
130 virtual bool ROTsHaveCommonSurface(const bool withNonVanishingAssignProb = true) const = 0;
131
133 virtual MsgStream& dump(MsgStream& out) const override;
135 virtual std::ostream& dump(std::ostream& out) const override;
136};
137
140{
141 assert(indx < numberOfContainedROTs());
142 if (indx < numberOfContainedROTs()) {
143 return m_assignProb[indx];
144 }
145 return 0; // could consider throwing an exception here - EJWM
146}
147
148}
149
150#endif // COMPETINGRIOSONTRACK_H
151
virtual bool ROTsHaveCommonSurface(const bool withNonVanishingAssignProb=true) const =0
query if all the contained ROTs have a common associated surface.
CompetingRIOsOnTrack(const CompetingRIOsOnTrack &compROT)=default
Copy Constructor.
CompetingRIOsOnTrack(CompetingRIOsOnTrack &&compROT) noexcept=default
virtual void setLocalParametersAndErrorMatrix()
recalculate the LocalParameters and ErrorMatrix
double AssignmentProb
Type def of Assignment probability: probability for a certain RIO_OnTrack to be assigned to the track...
virtual CompetingRIOsOnTrack * clone() const override=0
Pseudo-constructor: needed to avoid excessive RTTI.
std::unique_ptr< CompetingRIOsOnTrack > uniqueClone() const
NVI Clone.
std::vector< AssignmentProb > m_assignProb
assignment probabilities of the ROTs
AssignmentProb assignmentProbability(unsigned int indx) const
returns the AssignmentProbability depending on the integer.
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.
CompetingRIOsOnTrack & operator=(const CompetingRIOsOnTrack &compROT)=default
Assignment operator.
CompetingRIOsOnTrack & operator=(CompetingRIOsOnTrack &&compROT) noexcept=default
virtual unsigned int numberOfContainedROTs() const =0
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
virtual ~CompetingRIOsOnTrack()=default
Destructor.
unsigned int indexOfMaxAssignProb() const
Index of the ROT with the highest assignment probability.
virtual const RIO_OnTrack & rioOnTrack(unsigned int) const =0
returns the RIO_OnTrack (also known as ROT) objects depending on the integer.
CompetingRIOsOnTrack()
Default Constructor for POOL.
MeasurementBase()=default
Default constructor - needed for POOL/SEAL.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Definition RIO_OnTrack.h:70
This is the base class for all tracking detector elements with read-out relevant information.
Ensure that the ATLAS eigen extensions are properly loaded.
-event-from-file