ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
Trk::Segment Class Referenceabstract

#include <Segment.h>

Inheritance diagram for Trk::Segment:
Collaboration diagram for Trk::Segment:

Public Types

enum  Author {
  AuthorUnknown = 0, MooMdtSegmentMakerTool = 1, MooCscSegmentMakerTool = 2, Muonboy = 3,
  DCMathSegmentMaker = 4, MDT_DHoughSegmentMakerTool = 5, CSC_DHoughSegmentMakerTool = 6, Csc2dSegmentMaker = 7,
  Csc4dSegmentMaker = 8, TRT_SegmentMaker = 9, CTBTracking = 10, DCMathSegmentMakerCurved = 11,
  NswStereoSeeded = 12, NswStgcSeeded = 13, NswPadSeeded = 14, NswQuadAlign = 15,
  NumberOfAuthors = 16
}
 enum to identify who created the segment. More...
 

Public Member Functions

 Segment ()
 Default Constructor for POOL. More...
 
 Segment (const Segment &seg)
 Copy Constructor. More...
 
 Segment (Segment &&) noexcept
 Move Constructor. More...
 
Segmentoperator= (const Segment &seg)
 Assignment operator. More...
 
Segmentoperator= (Segment &&) noexcept
 Move assignment operator. More...
 
 Segment (LocalParameters &&locpars, Amg::MatrixX &&locerr, DataVector< const MeasurementBase > &&measurements, FitQuality *fitq=nullptr, Author author=AuthorUnknown)
 Constructor with parameters. More...
 
virtual ~Segment ()
 Destructor. More...
 
virtual Segmentclone () const override=0
 Pseudo-constructor: needed to avoid excessive RTTI. More...
 
std::unique_ptr< SegmentuniqueClone () const
 NVI uniqueClone method. More...
 
virtual bool type (MeasurementBaseType::Type type) const override final
 Extended method checking the type. More...
 
const std::vector< const Trk::MeasurementBase * > & containedMeasurements () const
 returns the vector of Trk::MeasurementBase objects More...
 
const DataVector< const Trk::MeasurementBase > & containedMeasurementsDataVector () const
 
bool hasContainedMeasurements () const
 
unsigned int numberOfMeasurementBases () const
 Return the number of contained Trk::MeasurementBase (s) More...
 
const MeasurementBasemeasurement (unsigned int) const
 returns the Trk::MeasurementBase objects depending on the integer More...
 
const FitQualityfitQuality () const
 return the FitQuality object, returns NULL if no FitQuality is defined More...
 
void setAuthor (Author a)
 sets the segment author More...
 
Author author () const
 return segment author More...
 
std::string dumpAuthor () const
 returns human readble string version of author More...
 
const LocalParameterslocalParameters () const
 Interface method to get the LocalParameters. More...
 
const Amg::MatrixXlocalCovariance () const
 Interface method to get the localError. More...
 
virtual const SurfaceassociatedSurface () const =0
 Interface method to get the associated Surface. More...
 
virtual const Amg::Vector3DglobalPosition () const =0
 Interface method to get the global Position. More...
 
virtual MsgStream & dump (MsgStream &out) const =0
 Interface method for output, to be overloaded by child classes*. More...
 
virtual std::ostream & dump (std::ostream &out) const =0
 Interface method for output, to be overloaded by child classes*. More...
 

Static Public Member Functions

static std::size_t numberOfInstantiations ()
 

Static Public Attributes

static std::atomic_size_t s_numberOfInstantiations
 

Protected Attributes

std::unique_ptr< FitQualitym_fitQuality
 The fit quality of the Segment. More...
 
DataVector< const MeasurementBasem_containedMeasBases
 The vector of contained (generic) Trk::MeasurementBase objects. More...
 
Author m_author
 segment author More...
 
LocalParameters m_localParams
 
Amg::MatrixX m_localCovariance
 

Friends

class ::SegmentCnv_p1
 

Detailed Description

Base class for all TrackSegment implementations, extends the common MeasurementBase.

Trk::LocalParameters, an Trk::ErrorMatrix and a number of fitted RIOs are the commonalities of all track segments, the derived classes can overwrite the base class definitions of Trk::RIO_OnTrack, Trk::PrepRawData and Trk::Surface with derived classes for internal use and to avoid extensive RTTI.

The Surface is chosen not to be a private member of the base class, such that dedicated Segments can save specific Surface types and overwrite the return type by a child class to avoid extensive RTTI.

Access to any information of the contained ROTs, such as the underlying Trk::PrepRawData, the pointer to the Trk::DetectorElementBase such as identifiers have to be retrieved from the ROT itself.

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Christos Anastopoulos Athena MT

Definition at line 53 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

Member Enumeration Documentation

◆ Author

enum to identify who created the segment.

If you update this don't forget to update the dump method.

Enumerator
AuthorUnknown 
MooMdtSegmentMakerTool 
MooCscSegmentMakerTool 
Muonboy 
DCMathSegmentMaker 
MDT_DHoughSegmentMakerTool 
CSC_DHoughSegmentMakerTool 
Csc2dSegmentMaker 
Csc4dSegmentMaker 
TRT_SegmentMaker 
CTBTracking 
DCMathSegmentMakerCurved 
NswStereoSeeded 
NswStgcSeeded 
NswPadSeeded 
NswQuadAlign 
NumberOfAuthors 

Definition at line 62 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

63  {
64  AuthorUnknown = 0,
67  Muonboy = 3,
73  TRT_SegmentMaker = 9,
74  CTBTracking = 10,
76  NswStereoSeeded = 12,
77  NswStgcSeeded = 13,
78  NswPadSeeded = 14,
79  NswQuadAlign = 15,
80  NumberOfAuthors = 16
81  };

Constructor & Destructor Documentation

◆ Segment() [1/4]

Trk::Segment::Segment ( )

Default Constructor for POOL.

Definition at line 15 of file TrkEvent/TrkSegment/src/Segment.cxx.

18  , m_fitQuality(nullptr)
21 {
22 }

◆ Segment() [2/4]

Trk::Segment::Segment ( const Segment seg)

Copy Constructor.

Definition at line 38 of file TrkEvent/TrkSegment/src/Segment.cxx.

41  , m_fitQuality(seg.m_fitQuality ? seg.m_fitQuality->clone() : nullptr)
43  , m_author(seg.m_author)
44 {
45  // DV deep copy
46  m_containedMeasBases.reserve(seg.m_containedMeasBases.size());
47  for (const Trk::MeasurementBase* const measurement :
48  seg.m_containedMeasBases) {
50  }
51 }

◆ Segment() [3/4]

Trk::Segment::Segment ( Trk::Segment &&  seg)
noexcept

Move Constructor.

Definition at line 54 of file TrkEvent/TrkSegment/src/Segment.cxx.

56  , m_fitQuality(std::move(seg.m_fitQuality))
58  , m_author(seg.m_author)
59 {
60 }

◆ Segment() [4/4]

Trk::Segment::Segment ( Trk::LocalParameters &&  locpars,
Amg::MatrixX &&  locerr,
DataVector< const MeasurementBase > &&  measurements,
FitQuality fitq = nullptr,
Author  author = AuthorUnknown 
)

Constructor with parameters.

Definition at line 24 of file TrkEvent/TrkSegment/src/Segment.cxx.

29  : Trk::MeasurementBase(std::move(locpars), std::move(locerr))
31  , m_fitQuality(fitqual)
32  , m_containedMeasBases(std::move(measurements))
33  , m_author(author)
34 {
35 }

◆ ~Segment()

Trk::Segment::~Segment ( )
virtualdefault

Destructor.

Member Function Documentation

◆ associatedSurface()

virtual const Surface& Trk::MeasurementBase::associatedSurface ( ) const
pure virtualinherited

◆ author()

Segment::Author Trk::Segment::author ( ) const
inline

return segment author

Definition at line 199 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

200 {
201  return m_author;
202 }

◆ clone()

virtual Segment* Trk::Segment::clone ( ) const
overridepure virtual

Pseudo-constructor: needed to avoid excessive RTTI.

Implements Trk::MeasurementBase.

Implemented in Muon::MuonSegment, and Trk::TrackSegment.

◆ containedMeasurements()

const std::vector< const MeasurementBase * > & Trk::Segment::containedMeasurements ( ) const
inline

returns the vector of Trk::MeasurementBase objects

Definition at line 166 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

167 {
168  return m_containedMeasBases.stdcont();
169 }

◆ containedMeasurementsDataVector()

const DataVector< const MeasurementBase > & Trk::Segment::containedMeasurementsDataVector ( ) const
inline

Definition at line 172 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

173 {
174  return m_containedMeasBases;
175 }

◆ dump() [1/2]

virtual MsgStream& Trk::MeasurementBase::dump ( MsgStream &  out) const
pure virtualinherited

◆ dump() [2/2]

virtual std::ostream& Trk::MeasurementBase::dump ( std::ostream &  out) const
pure virtualinherited

◆ dumpAuthor()

std::string Trk::Segment::dumpAuthor ( ) const

returns human readble string version of author

Definition at line 97 of file TrkEvent/TrkSegment/src/Segment.cxx.

97  {
98  std::string author;
99  switch (m_author) {
100  case AuthorUnknown:
101  author = "AuthorUnknown";
102  break;
104  author = "MooMdtSegmentMakerTool";
105  break;
107  author = "MooCscSegmentMakerTool";
108  break;
109  case Muonboy:
110  author = "Muonboy";
111  break;
112  case DCMathSegmentMaker:
113  author = "DCMathSegmentMaker";
114  break;
116  author = "MDT_DHoughSegmentMakerTool";
117  break;
119  author = "CSC_DHoughSegmentMakerTool";
120  break;
121  case Csc2dSegmentMaker:
122  author = "Csc2dSegmentMaker";
123  break;
124  case Csc4dSegmentMaker:
125  author = "Csc4dSegmentMaker";
126  break;
127  case TRT_SegmentMaker:
128  author = "TRT_SegmentMaker";
129  break;
130  case NswStereoSeeded:
131  author = "Nsw MM stereo seeded";
132  break;
133  case NswStgcSeeded:
134  author = "Nsw sTgc seeded";
135  break;
136  case NswQuadAlign:
137  author = "Nsw single quad";
138  break;
139  case NswPadSeeded:
140  author = "Nsw single quad";
141  break;
142  default:
143  author = "Unrecognised author, enum = " + std::to_string(m_author);
144  break;
145  }
146  return author;
147 }

◆ fitQuality()

const FitQuality * Trk::Segment::fitQuality ( ) const
inline

return the FitQuality object, returns NULL if no FitQuality is defined

Definition at line 160 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

161 {
162  return m_fitQuality.get();
163 }

◆ globalPosition()

virtual const Amg::Vector3D& Trk::MeasurementBase::globalPosition ( ) const
pure virtualinherited

◆ hasContainedMeasurements()

bool Trk::Segment::hasContainedMeasurements ( ) const
inline

Definition at line 178 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

179 {
180  return !m_containedMeasBases.empty();
181 }

◆ localCovariance()

const Amg::MatrixX & Trk::MeasurementBase::localCovariance ( ) const
inlineinherited

Interface method to get the localError.

Definition at line 138 of file MeasurementBase.h.

139 {
140  return m_localCovariance;
141 }

◆ localParameters()

const Trk::LocalParameters & Trk::MeasurementBase::localParameters ( ) const
inlineinherited

Interface method to get the LocalParameters.

Definition at line 132 of file MeasurementBase.h.

133 {
134  return m_localParams;
135 }

◆ measurement()

const MeasurementBase * Trk::Segment::measurement ( unsigned int  indx) const
inline

returns the Trk::MeasurementBase objects depending on the integer

Definition at line 184 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

185 {
186  if (!m_containedMeasBases.empty() && indx < m_containedMeasBases.size()) {
187  return std::as_const(m_containedMeasBases)[indx];
188  }
189  return nullptr;
190 }

◆ numberOfInstantiations()

static std::size_t Trk::ObjectCounter< Trk::Segment >::numberOfInstantiations ( )
inlinestaticinherited

Definition at line 25 of file TrkObjectCounter.h.

26  {
27 #ifndef NDEBUG
28  return s_numberOfInstantiations.load();
29 #endif
30  return 0;
31  }

◆ numberOfMeasurementBases()

unsigned int Trk::Segment::numberOfMeasurementBases ( ) const
inline

Return the number of contained Trk::MeasurementBase (s)

Definition at line 193 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

194 {
195  return m_containedMeasBases.size();
196 }

◆ operator=() [1/2]

Trk::Segment & Trk::Segment::operator= ( const Segment seg)

Assignment operator.

Definition at line 67 of file TrkEvent/TrkSegment/src/Segment.cxx.

68 {
69  if (this != &seg) {
71  m_fitQuality.reset(seg.m_fitQuality ? seg.m_fitQuality->clone() : nullptr);
72  // Deep copy
73  m_containedMeasBases.clear();
74  m_containedMeasBases.reserve(seg.m_containedMeasBases.size());
75  for (const Trk::MeasurementBase* const measurement :
76  seg.m_containedMeasBases) {
78  }
79  m_author = seg.m_author;
80  }
81  return (*this);
82 }

◆ operator=() [2/2]

Trk::Segment & Trk::Segment::operator= ( Trk::Segment &&  seg)
noexcept

Move assignment operator.

Definition at line 86 of file TrkEvent/TrkSegment/src/Segment.cxx.

87 {
88  if (this != &seg) {
90  m_fitQuality = std::move(seg.m_fitQuality);
92  m_author = seg.m_author;
93  }
94  return (*this);
95 }

◆ setAuthor()

void Trk::Segment::setAuthor ( Author  a)

sets the segment author

Definition at line 148 of file TrkEvent/TrkSegment/src/Segment.cxx.

148  {
149  m_author = a;
150 }

◆ type()

virtual bool Trk::Segment::type ( MeasurementBaseType::Type  type) const
inlinefinaloverridevirtual

Extended method checking the type.

Implements Trk::MeasurementBase.

Definition at line 114 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

115  {
117  }

◆ uniqueClone()

std::unique_ptr<Segment> Trk::Segment::uniqueClone ( ) const
inline

NVI uniqueClone method.

Definition at line 108 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

109  {
110  return std::unique_ptr<Segment>(clone());
111  }

Friends And Related Function Documentation

◆ ::SegmentCnv_p1

friend class ::SegmentCnv_p1
friend

Member Data Documentation

◆ m_author

Author Trk::Segment::m_author
protected

segment author

Definition at line 156 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

◆ m_containedMeasBases

DataVector<const MeasurementBase> Trk::Segment::m_containedMeasBases
protected

The vector of contained (generic) Trk::MeasurementBase objects.

Definition at line 153 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

◆ m_fitQuality

std::unique_ptr<FitQuality> Trk::Segment::m_fitQuality
protected

The fit quality of the Segment.

Definition at line 150 of file Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h.

◆ m_localCovariance

Amg::MatrixX Trk::MeasurementBase::m_localCovariance
protectedinherited

Definition at line 112 of file MeasurementBase.h.

◆ m_localParams

LocalParameters Trk::MeasurementBase::m_localParams
protectedinherited

Definition at line 111 of file MeasurementBase.h.

◆ s_numberOfInstantiations

std::atomic_size_t Trk::ObjectCounter< Trk::Segment >::s_numberOfInstantiations
inlinestaticinherited

Definition at line 22 of file TrkObjectCounter.h.


The documentation for this class was generated from the following files:
Trk::Segment::DCMathSegmentMaker
@ DCMathSegmentMaker
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:68
Trk::MeasurementBase::operator=
MeasurementBase & operator=(const MeasurementBase &)=default
Trk::Segment::MDT_DHoughSegmentMakerTool
@ MDT_DHoughSegmentMakerTool
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:69
Trk::MeasurementBase::clone
virtual MeasurementBase * clone() const =0
Pseudo-Constructor.
Trk::Segment::MooMdtSegmentMakerTool
@ MooMdtSegmentMakerTool
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:65
Trk::Segment::Muonboy
@ Muonboy
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:67
Trk::Segment::CSC_DHoughSegmentMakerTool
@ CSC_DHoughSegmentMakerTool
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:70
Csc4dSegmentMaker
Definition: Csc4dSegmentMaker.h:37
Trk::Segment::m_containedMeasBases
DataVector< const MeasurementBase > m_containedMeasBases
The vector of contained (generic) Trk::MeasurementBase objects.
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:153
Trk::Segment::type
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:114
Trk::ObjectCounter< Trk::Segment >
Trk::Segment::MooCscSegmentMakerTool
@ MooCscSegmentMakerTool
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:66
Trk::Segment::clone
virtual Segment * clone() const override=0
Pseudo-constructor: needed to avoid excessive RTTI.
Trk::Segment::NswPadSeeded
@ NswPadSeeded
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:78
Trk::Segment::measurement
const MeasurementBase * measurement(unsigned int) const
returns the Trk::MeasurementBase objects depending on the integer
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:184
Trk::Segment::Csc2dSegmentMaker
@ Csc2dSegmentMaker
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:71
Trk::Segment::AuthorUnknown
@ AuthorUnknown
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:64
Trk::MeasurementBase::m_localParams
LocalParameters m_localParams
Definition: MeasurementBase.h:111
Trk::Segment::NswStereoSeeded
@ NswStereoSeeded
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:76
Trk::Segment::DCMathSegmentMakerCurved
@ DCMathSegmentMakerCurved
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:75
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Trk::Segment::Csc4dSegmentMaker
@ Csc4dSegmentMaker
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:72
Trk::MeasurementBaseType::Segment
@ Segment
Definition: MeasurementBase.h:47
Trk::Segment::m_fitQuality
std::unique_ptr< FitQuality > m_fitQuality
The fit quality of the Segment.
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:150
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
Trk::Segment::m_author
Author m_author
segment author
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:156
Trk::MeasurementBase::m_localCovariance
Amg::MatrixX m_localCovariance
Definition: MeasurementBase.h:112
Trk::ObjectCounter< Trk::Segment >::s_numberOfInstantiations
static std::atomic_size_t s_numberOfInstantiations
Definition: TrkObjectCounter.h:22
a
TList * a
Definition: liststreamerinfos.cxx:10
Trk::Segment::CTBTracking
@ CTBTracking
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:74
Trk::Segment::author
Author author() const
return segment author
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:199
Trk::Segment::NswQuadAlign
@ NswQuadAlign
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:79
Trk::Segment::NswStgcSeeded
@ NswStgcSeeded
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:77
Trk::Segment::TRT_SegmentMaker
@ TRT_SegmentMaker
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:73
Csc2dSegmentMaker
Definition: Csc2dSegmentMaker.h:24
Trk::Segment::NumberOfAuthors
@ NumberOfAuthors
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:80