ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::TrackStateOnSurface Class Reference

represents the track state (measurement, material, fit parameters and quality) at a surface. More...

#include <TrackStateOnSurface.h>

Inheritance diagram for Trk::TrackStateOnSurface:
Collaboration diagram for Trk::TrackStateOnSurface:

Public Types

enum  TrackStateOnSurfaceType {
  Measurement = 0 , InertMaterial = 1 , BremPoint = 2 , Scatterer = 3 ,
  Perigee = 4 , Outlier = 5 , Hole = 6 , Unknown = 7 ,
  CaloDeposit = 8 , Parameter = 9 , FitQuality = 10 , Alignment = 11 ,
  NumberOfTrackStateOnSurfaceTypes = 12
}
enum  PersistencyHint {
  PartialPersistification = 0 , PersistifyMeasurement = 1 , PersistifyTrackParameters = 2 , PersistifySlimCaloDeposit = 3 ,
  NumberOfPersistencyHints = 4
}
enum  Variety { SingleComponent = 0 , MultiComponent = 1 , Align = 2 }

Public Member Functions

 TrackStateOnSurface ()
 Default ctor for POOL.
 TrackStateOnSurface (const FitQualityOnSurface &fitQoS, std::unique_ptr< MeasurementBase > meas, std::unique_ptr< TrackParameters > trackParameters, std::unique_ptr< MaterialEffectsBase > materialEffects=nullptr, std::unique_ptr< AlignmentEffectsOnTrack > alignmentEffectsOnTrack=nullptr)
 Partial constructors.
 TrackStateOnSurface (std::unique_ptr< MeasurementBase > meas, std::unique_ptr< TrackParameters > trackParameters, std::unique_ptr< MaterialEffectsBase > materialEffects=nullptr, std::unique_ptr< AlignmentEffectsOnTrack > alignmentEffectsOnTrack=nullptr)
 TrackStateOnSurface (const FitQualityOnSurface &fitQoS, std::unique_ptr< MeasurementBase > meas, std::unique_ptr< TrackParameters > trackParameters, std::unique_ptr< MaterialEffectsBase > materialEffectsOnTrack, const std::bitset< TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes > &typePattern, std::unique_ptr< AlignmentEffectsOnTrack > alignmentEffectsOnTrack=nullptr)
 Full constructors.
 TrackStateOnSurface (std::unique_ptr< MeasurementBase > meas, std::unique_ptr< TrackParameters > trackParameters, std::unique_ptr< MaterialEffectsBase > materialEffectsOnTrack, const std::bitset< TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes > &typePattern, std::unique_ptr< AlignmentEffectsOnTrack > alignmentEffectsOnTrack=nullptr)
virtual TrackStateOnSurfaceclone () const
 Pseudo-constructor: needed to avoid excessive RTTI.
 TrackStateOnSurface (const TrackStateOnSurface &trackStateOnSurface)
 copy ctor
 TrackStateOnSurface (TrackStateOnSurface &&trackStateOnSurface) noexcept
 Move ctor.
Trk::TrackStateOnSurfaceoperator= (const Trk::TrackStateOnSurface &rhs)
Trk::TrackStateOnSurfaceoperator= (Trk::TrackStateOnSurface &&rhs) noexcept
virtual ~TrackStateOnSurface ()=default
 destructor
const FitQualityOnSurfacefitQualityOnSurface () const
 return FitQuality On Surface const overload
FitQualityOnSurfacefitQualityOnSurface ()
 return FitQuality On Surface non-const overload
const TrackParameterstrackParameters () const
 return ptr to trackparameters const overload
TrackParameterstrackParameters ()
 return ptr to trackparameters non-const overload
const MeasurementBasemeasurementOnTrack () const
 returns MeasurementBase const overload
MeasurementBasemeasurementOnTrack ()
 returns MeasurementBase non-const overload
const MaterialEffectsBasematerialEffectsOnTrack () const
 return material effects const overload
MaterialEffectsBasematerialEffectsOnTrack ()
 return material effects non-const overload
const AlignmentEffectsOnTrackalignmentEffectsOnTrack () const
 return the the alignment effects const overload
AlignmentEffectsOnTrackalignmentEffectsOnTrack ()
 return the the alignment effects non-const overload
bool type (const TrackStateOnSurfaceType type) const
 Use this method to find out if the TSoS is of a certain type: i.e.
virtual Trk::TrackStateOnSurface::Variety variety () const
 Use this method to find if this is a Single, Multi or Align TrackStateOnsurface.
std::string dumpType () const
 returns a string with the expanded type of the object (i.e.
const std::bitset< NumberOfTrackStateOnSurfaceTypestypes () const
 returns a bitset with the types of this bitset.
void setHints (const uint8_t hints) const
 Use this method to set persistification hints.
const std::bitset< NumberOfPersistencyHintshints () const
 Use this method to get the persistification hints.
const Trk::Surfacesurface () const
 return associated surface
bool isSane () const

Static Public Member Functions

static unsigned int long joinBitsets (const std::bitset< NumberOfTrackStateOnSurfaceTypes > &types, const std::bitset< NumberOfPersistencyHints > &hints)
static void splitToBitsets (const unsigned int long input, std::bitset< NumberOfTrackStateOnSurfaceTypes > &types, std::bitset< NumberOfPersistencyHints > &hints)

Protected Attributes

uint16_t m_typeFlags {}
std::atomic< uint8_t > m_hints {}

Private Member Functions

void setFlags ()
 set sensible default flags

Private Attributes

FitQualityOnSurface m_fitQualityOnSurface {}
std::unique_ptr< TrackParametersm_trackParameters {}
std::unique_ptr< MeasurementBasem_measurementOnTrack {}
std::unique_ptr< MaterialEffectsBasem_materialEffectsOnTrack {}
std::unique_ptr< AlignmentEffectsOnTrackm_alignmentEffectsOnTrack {}

Friends

class ::TrackCollectionCnv
class ::TrackStateOnSurfaceCnv_p3

Detailed Description

represents the track state (measurement, material, fit parameters and quality) at a surface.

As the name suggests TrackStateOnSurface is intended to represent the state of a track at a surface, and will be of particular relevance for track fitting, extrapolating and following (for example it provides a way to store scattering angle information).

The principle is that these objects can contain pointers to other objects. Not all are required to be passed, and so not all will exist. As a rule of thumb, if an object is returned by pointer then you cannot be sure it exists and should check.

The code does not (for speed reasons) enforce contraints on what is placed in a TrackStateOnSurface. What follows are simple guidelines for the use of TrackStateOnSurface.

Author
edwar.nosp@m.d.mo.nosp@m.yse@c.nosp@m.ern..nosp@m.ch
Chistos Anastopoulos Athena MT migration

Definition at line 70 of file TrackStateOnSurface.h.

Member Enumeration Documentation

◆ PersistencyHint

Enumerator
PartialPersistification 
PersistifyMeasurement 

Mark the measuremenet for persistification.

PersistifyTrackParameters 

Mark track parameters for persisitification.

PersistifySlimCaloDeposit 

Mark track parameters for persisitification.

NumberOfPersistencyHints 

Definition at line 155 of file TrackStateOnSurface.h.

156 {
157
163
168
173
175 };
@ PersistifySlimCaloDeposit
Mark track parameters for persisitification.
@ PersistifyMeasurement
Mark the measuremenet for persistification.
@ PersistifyTrackParameters
Mark track parameters for persisitification.

◆ TrackStateOnSurfaceType

Enumerator
Measurement 

This is a measurement, and will at least contain a Trk::MeasurementBase.

InertMaterial 

This represents inert material, and so will contain MaterialEffectsBase.

BremPoint 

This represents a brem point on the track, and so will contain TrackParameters and MaterialEffectsBase.

Scatterer 

This represents a scattering point on the track, and so will contain TrackParameters and MaterialEffectsBase.

Perigee 

This represents a perigee, and so will contain a Perigee object only.

Outlier 

This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used in the track fit.

Hole 

A hole on the track - this is defined in the following way.

A hole is a missing measurement BETWEEN the first and last actual measurements. i.e. if your track starts in the SCT, you should not consider a missing b-layer hit as a hole.

Unknown 

For some reason this does not fall into any of the other categories PLEASE DO NOT USE THIS - DEPRECATED!

CaloDeposit 

This TSOS contains a CaloEnergy object.

Parameter 

This TSOS contains a Trk::ParameterBase.

FitQuality 

This TSOS contains a Trk::FitQualityOnSurface.

Alignment 

This TSOS contains a Trk::AlignmentEffectsOnTrack.

NumberOfTrackStateOnSurfaceTypes 

Definition at line 97 of file TrackStateOnSurface.h.

98 {
101 Measurement = 0,
102
105 InertMaterial = 1,
106
109 BremPoint = 2,
110
113 Scatterer = 3,
114
117 Perigee = 4,
118
122 Outlier = 5,
123
128 Hole = 6,
129
132 Unknown = 7,
133
135 CaloDeposit = 8,
136
140 Parameter = 9,
141
145 FitQuality = 10,
146
150 Alignment = 11,
151
153 };
@ Unknown
For some reason this does not fall into any of the other categories PLEASE DO NOT USE THIS - DEPRECAT...
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
@ BremPoint
This represents a brem point on the track, and so will contain TrackParameters and MaterialEffectsBas...
@ Parameter
This TSOS contains a Trk::ParameterBase.
@ Alignment
This TSOS contains a Trk::AlignmentEffectsOnTrack.
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
@ InertMaterial
This represents inert material, and so will contain MaterialEffectsBase.
@ Scatterer
This represents a scattering point on the track, and so will contain TrackParameters and MaterialEffe...
@ Hole
A hole on the track - this is defined in the following way.
@ CaloDeposit
This TSOS contains a CaloEnergy object.
@ FitQuality
This TSOS contains a Trk::FitQualityOnSurface.

◆ Variety

Enumerator
SingleComponent 
MultiComponent 
Align 

Definition at line 211 of file TrackStateOnSurface.h.

Constructor & Destructor Documentation

◆ TrackStateOnSurface() [1/7]

Trk::TrackStateOnSurface::TrackStateOnSurface ( )
default

Default ctor for POOL.

Do not use!

◆ TrackStateOnSurface() [2/7]

Trk::TrackStateOnSurface::TrackStateOnSurface ( const FitQualityOnSurface & fitQoS,
std::unique_ptr< MeasurementBase > meas,
std::unique_ptr< TrackParameters > trackParameters,
std::unique_ptr< MaterialEffectsBase > materialEffects = nullptr,
std::unique_ptr< AlignmentEffectsOnTrack > alignmentEffectsOnTrack = nullptr )
explicit

Partial constructors.

The objects passed in belong to the this object, or to the Track to which this FQOS will be assigned.

These ctors will set appropriate flags for all non-null objects passed

Definition at line 15 of file TrackStateOnSurface.cxx.

21 : m_fitQualityOnSurface(fitQoS)
23 , m_measurementOnTrack(std::move(meas))
24 , m_materialEffectsOnTrack(std::move(materialEffects))
26{
27 assert(isSane());
28 setFlags();
29}
std::unique_ptr< TrackParameters > m_trackParameters
std::unique_ptr< MeasurementBase > m_measurementOnTrack
void setFlags()
set sensible default flags
std::unique_ptr< MaterialEffectsBase > m_materialEffectsOnTrack
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
std::unique_ptr< AlignmentEffectsOnTrack > m_alignmentEffectsOnTrack
FitQualityOnSurface m_fitQualityOnSurface
const AlignmentEffectsOnTrack * alignmentEffectsOnTrack() const
return the the alignment effects const overload

◆ TrackStateOnSurface() [3/7]

Trk::TrackStateOnSurface::TrackStateOnSurface ( std::unique_ptr< MeasurementBase > meas,
std::unique_ptr< TrackParameters > trackParameters,
std::unique_ptr< MaterialEffectsBase > materialEffects = nullptr,
std::unique_ptr< AlignmentEffectsOnTrack > alignmentEffectsOnTrack = nullptr )
explicit

Definition at line 31 of file TrackStateOnSurface.cxx.

38 , m_measurementOnTrack(std::move(meas))
39 , m_materialEffectsOnTrack(std::move(materialEffects))
41{
42 assert(isSane());
43 setFlags();
44}

◆ TrackStateOnSurface() [4/7]

Trk::TrackStateOnSurface::TrackStateOnSurface ( const FitQualityOnSurface & fitQoS,
std::unique_ptr< MeasurementBase > meas,
std::unique_ptr< TrackParameters > trackParameters,
std::unique_ptr< MaterialEffectsBase > materialEffectsOnTrack,
const std::bitset< TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes > & typePattern,
std::unique_ptr< AlignmentEffectsOnTrack > alignmentEffectsOnTrack = nullptr )
explicit

Full constructors.

Parameters
[in]FitQualityOnSurface(we provide one without it)
[in]uniquepointer to a MeasurementBase, or 0 if no object is being passed.
[in]uniguetrackParameter pointer to a TrackParameters, or 0 if no object is being passed. being passed.
[in]materialEffectsOnTrackpointer to a MaterialEffectsBase, or 0 if no object is being passed.
[in]typePatternThe pattern of 'types' which correspond to this TSoS. You create the bitset as follows:

Definition at line 47 of file TrackStateOnSurface.cxx.

54 : m_fitQualityOnSurface(fitQoS)
56 , m_measurementOnTrack(std::move(meas))
57 , m_materialEffectsOnTrack(std::move(materialEffects))
59 , m_typeFlags(typePattern.to_ulong())
60{
61 assert(isSane());
62}

◆ TrackStateOnSurface() [5/7]

Trk::TrackStateOnSurface::TrackStateOnSurface ( std::unique_ptr< MeasurementBase > meas,
std::unique_ptr< TrackParameters > trackParameters,
std::unique_ptr< MaterialEffectsBase > materialEffectsOnTrack,
const std::bitset< TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes > & typePattern,
std::unique_ptr< AlignmentEffectsOnTrack > alignmentEffectsOnTrack = nullptr )
explicit

Definition at line 64 of file TrackStateOnSurface.cxx.

72 , m_measurementOnTrack(std::move(meas))
73 , m_materialEffectsOnTrack(std::move(materialEffects))
75 , m_typeFlags(typePattern.to_ulong())
76{
77 assert(isSane());
78}

◆ TrackStateOnSurface() [6/7]

Trk::TrackStateOnSurface::TrackStateOnSurface ( const TrackStateOnSurface & trackStateOnSurface)

copy ctor

Definition at line 81 of file TrackStateOnSurface.cxx.

82 : m_fitQualityOnSurface(rhs.m_fitQualityOnSurface),
83 m_trackParameters(rhs.m_trackParameters ? rhs.m_trackParameters->clone()
84 : nullptr),
85 m_measurementOnTrack(rhs.m_measurementOnTrack
86 ? rhs.m_measurementOnTrack->clone()
87 : nullptr),
88 m_materialEffectsOnTrack(rhs.m_materialEffectsOnTrack
89 ? rhs.m_materialEffectsOnTrack->clone()
90 : nullptr),
91 m_alignmentEffectsOnTrack(rhs.m_alignmentEffectsOnTrack
92 ? std::make_unique<AlignmentEffectsOnTrack>(
93 *rhs.m_alignmentEffectsOnTrack)
94 : nullptr),
95 m_typeFlags(rhs.m_typeFlags) {}

◆ TrackStateOnSurface() [7/7]

Trk::TrackStateOnSurface::TrackStateOnSurface ( TrackStateOnSurface && trackStateOnSurface)
noexcept

Move ctor.

Definition at line 98 of file TrackStateOnSurface.cxx.

99 : m_fitQualityOnSurface(rhs.m_fitQualityOnSurface)
100 , m_trackParameters(std::move(rhs.m_trackParameters))
101 , m_measurementOnTrack(std::move(rhs.m_measurementOnTrack))
102 , m_materialEffectsOnTrack(std::move(rhs.m_materialEffectsOnTrack))
103 , m_alignmentEffectsOnTrack(std::move(rhs.m_alignmentEffectsOnTrack))
104 , m_typeFlags(rhs.m_typeFlags)
105{
106}

◆ ~TrackStateOnSurface()

virtual Trk::TrackStateOnSurface::~TrackStateOnSurface ( )
virtualdefault

destructor

Member Function Documentation

◆ alignmentEffectsOnTrack() [1/2]

AlignmentEffectsOnTrack * Trk::TrackStateOnSurface::alignmentEffectsOnTrack ( )

return the the alignment effects non-const overload

◆ alignmentEffectsOnTrack() [2/2]

const AlignmentEffectsOnTrack * Trk::TrackStateOnSurface::alignmentEffectsOnTrack ( ) const

return the the alignment effects const overload

◆ clone()

virtual TrackStateOnSurface * Trk::TrackStateOnSurface::clone ( ) const
virtual

Pseudo-constructor: needed to avoid excessive RTTI.

Reimplemented in Trk::MultiComponentStateOnSurface.

◆ dumpType()

std::string Trk::TrackStateOnSurface::dumpType ( ) const

returns a string with the expanded type of the object (i.e.

if it has several type bits set, they all will be returned)

Definition at line 147 of file TrackStateOnSurface.cxx.

148{
149 std::string type;
150 const auto& typesSet = types();
151 if (typesSet.test(TrackStateOnSurface::Measurement)) {
152 type += "Measurement ";
153 }
154 if (typesSet.test(TrackStateOnSurface::InertMaterial)) {
155 type += "InertMaterial ";
156 }
157 if (typesSet.test(TrackStateOnSurface::BremPoint)) {
158 type += "BremPoint ";
159 }
160 if (typesSet.test(TrackStateOnSurface::Scatterer)) {
161 type += "Scatterer ";
162 }
163 if (typesSet.test(TrackStateOnSurface::Perigee)) {
164 type += "Perigee ";
165 }
166 if (typesSet.test(TrackStateOnSurface::Outlier)) {
167 type += "Outlier ";
168 }
169 if (typesSet.test(TrackStateOnSurface::Hole)) {
170 type += "Hole ";
171 }
172 if (typesSet.test(TrackStateOnSurface::CaloDeposit)) {
173 type += "CaloDeposit ";
174 }
175 if (typesSet.test(TrackStateOnSurface::Parameter)) {
176 type += "Parameter ";
177 }
178 if (typesSet.test(TrackStateOnSurface::FitQuality)) {
179 type += "FitQuality ";
180 }
181 if (typesSet.test(TrackStateOnSurface::Alignment)) {
182 type += "Alignment ";
183 }
184 return type;
185}
const std::bitset< NumberOfTrackStateOnSurfaceTypes > types() const
returns a bitset with the types of this bitset.
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.

◆ fitQualityOnSurface() [1/2]

FitQualityOnSurface & Trk::TrackStateOnSurface::fitQualityOnSurface ( )

return FitQuality On Surface non-const overload

◆ fitQualityOnSurface() [2/2]

const FitQualityOnSurface & Trk::TrackStateOnSurface::fitQualityOnSurface ( ) const

return FitQuality On Surface const overload

◆ hints()

const std::bitset< NumberOfPersistencyHints > Trk::TrackStateOnSurface::hints ( ) const

Use this method to get the persistification hints.

◆ isSane()

bool Trk::TrackStateOnSurface::isSane ( ) const

Definition at line 203 of file TrackStateOnSurface.cxx.

204{
205 bool surfacesDiffer =
209 if (surfacesDiffer) {
210 std::cerr << "TrackStateOnSurface::isSane. With :" << '\n';
211 std::cerr << "Types : " << types().to_string() << '\n';
212 std::cerr << "Hints " << hints().to_string() << '\n';
213 std::cerr << "Surfaces differ! " << std::endl;
214 if (m_trackParameters) {
215 std::cerr << "ParamSurf: [" << &(m_trackParameters->associatedSurface())
216 << "] " << m_trackParameters->associatedSurface() << std::endl;
217 }
219 std::cerr << "measSurf: [" << &(m_measurementOnTrack->associatedSurface())
220 << "] " << m_measurementOnTrack->associatedSurface()
221 << std::endl;
222 }
224 std::cerr << "matSurf: ["
225 << &(m_materialEffectsOnTrack->associatedSurface()) << "] "
226 << m_materialEffectsOnTrack->associatedSurface() << std::endl;
227 }
228 return false;
229 }
230
231 return true;
232}
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
const std::bitset< NumberOfPersistencyHints > hints() const
Use this method to get the persistification hints.
const MaterialEffectsBase * materialEffectsOnTrack() const
return material effects const overload
bool consistentSurfaces(U)

◆ joinBitsets()

unsigned int long Trk::TrackStateOnSurface::joinBitsets ( const std::bitset< NumberOfTrackStateOnSurfaceTypes > & types,
const std::bitset< NumberOfPersistencyHints > & hints )
inlinestatic

Definition at line 183 of file TrackStateOnSurface.h.

186 {
187 //put hints in place
188 unsigned int long res = hints.to_ulong();
189 //shift them up
191 //Add type
192 res += types.to_ulong();
193 return res;
194 }
std::pair< std::vector< unsigned int >, bool > res

◆ materialEffectsOnTrack() [1/2]

MaterialEffectsBase * Trk::TrackStateOnSurface::materialEffectsOnTrack ( )

return material effects non-const overload

◆ materialEffectsOnTrack() [2/2]

const MaterialEffectsBase * Trk::TrackStateOnSurface::materialEffectsOnTrack ( ) const

return material effects const overload

◆ measurementOnTrack() [1/2]

MeasurementBase * Trk::TrackStateOnSurface::measurementOnTrack ( )

returns MeasurementBase non-const overload

◆ measurementOnTrack() [2/2]

const MeasurementBase * Trk::TrackStateOnSurface::measurementOnTrack ( ) const

returns MeasurementBase const overload

◆ operator=() [1/2]

TrackStateOnSurface & Trk::TrackStateOnSurface::operator= ( const Trk::TrackStateOnSurface & rhs)

Definition at line 110 of file TrackStateOnSurface.cxx.

111{
112 if (this != &rhs) {
114 m_trackParameters.reset(
115 rhs.m_trackParameters ? rhs.m_trackParameters->clone() : nullptr);
117 rhs.m_measurementOnTrack ? rhs.m_measurementOnTrack->clone() : nullptr);
119 ? rhs.m_materialEffectsOnTrack->clone()
120 : nullptr);
122 ? std::make_unique<AlignmentEffectsOnTrack>(
124 : nullptr;
126 assert(isSane());
127 }
128 return *this;
129}

◆ operator=() [2/2]

TrackStateOnSurface & Trk::TrackStateOnSurface::operator= ( Trk::TrackStateOnSurface && rhs)
noexcept

Definition at line 133 of file TrackStateOnSurface.cxx.

134{
135 if (this != &rhs) {
137 m_trackParameters = std::move(rhs.m_trackParameters);
142 }
143 return *this;
144}

◆ setFlags()

void Trk::TrackStateOnSurface::setFlags ( )
private

set sensible default flags

◆ setHints()

void Trk::TrackStateOnSurface::setHints ( const uint8_t hints) const

Use this method to set persistification hints.

This can be called only once per TSOS It will set a cached Value which we can not reset But this allows it to be const..

Definition at line 235 of file TrackStateOnSurface.cxx.

236{
237 // The extra "hidden" bit we save (1<<NumberOfPersistencyHints)
238 // is to dissalow repeated calls to setHints(0).
239 uint8_t exp = 0;
240 if (!m_hints.compare_exchange_strong(
241 exp, hints | (1 << NumberOfPersistencyHints))) {
242 throw std::runtime_error(
243 "TSOS trying to set again already set Persistification Hints");
244 }
245}
std::atomic< uint8_t > m_hints

◆ splitToBitsets()

void Trk::TrackStateOnSurface::splitToBitsets ( const unsigned int long input,
std::bitset< NumberOfTrackStateOnSurfaceTypes > & types,
std::bitset< NumberOfPersistencyHints > & hints )
inlinestatic

Definition at line 196 of file TrackStateOnSurface.h.

200 {
201 // mask with NumberOfTrackStateOnSurfaceTypes bits set to 1
202 constexpr unsigned int long maskTypesSet =
204 //keep just the Type part of the input
205 types = std::bitset<NumberOfTrackStateOnSurfaceTypes>(input & maskTypesSet);
206 //keep the upper Hints part of the input
207 hints = std::bitset<NumberOfPersistencyHints>(
209 }

◆ surface()

const Surface & Trk::TrackStateOnSurface::surface ( ) const

return associated surface

Used to perform sanity checks on this object (i.e. all consistuents are on the same surface). Returns 'true' if it seems okay.

Definition at line 188 of file TrackStateOnSurface.cxx.

189{
190 if (m_trackParameters) {
191 return m_trackParameters->associatedSurface();
192 }
194 return m_measurementOnTrack->associatedSurface();
195 }
197 return m_materialEffectsOnTrack->associatedSurface();
198 }
199 throw std::runtime_error("TrackStateOnSurface without Surface!");
200}

◆ trackParameters() [1/2]

TrackParameters * Trk::TrackStateOnSurface::trackParameters ( )

return ptr to trackparameters non-const overload

◆ trackParameters() [2/2]

const TrackParameters * Trk::TrackStateOnSurface::trackParameters ( ) const

return ptr to trackparameters const overload

◆ type()

bool Trk::TrackStateOnSurface::type ( const TrackStateOnSurfaceType type) const

Use this method to find out if the TSoS is of a certain type: i.e.

if ( tsos->type(TrackStateOnSurface::Measurement) { //etc }

Returns
true if the TrackStateOnSurface is of this type

◆ types()

const std::bitset< NumberOfTrackStateOnSurfaceTypes > Trk::TrackStateOnSurface::types ( ) const

returns a bitset with the types of this bitset.

As an example of how this is used, see the type( const TrackStateOnSurfaceType& type ) method but a better example would be if you wanted to check several type flags at once.

const bitset<NumberOfTrackStateOnSurfaceTypes> mask;
mask.set(Measurement,true);
mask.set(BremPoint,true);
// loop over lots of TSoS and call:
if (tsos.types() & mask ) { // do something}

◆ variety()

virtual Trk::TrackStateOnSurface::Variety Trk::TrackStateOnSurface::variety ( ) const
virtual

Use this method to find if this is a Single, Multi or Align TrackStateOnsurface.

Reimplemented in Trk::AlignTSOS, and Trk::MultiComponentStateOnSurface.

◆ ::TrackCollectionCnv

friend class ::TrackCollectionCnv
friend

Definition at line 72 of file TrackStateOnSurface.h.

◆ ::TrackStateOnSurfaceCnv_p3

friend class ::TrackStateOnSurfaceCnv_p3
friend

Definition at line 73 of file TrackStateOnSurface.h.

Member Data Documentation

◆ m_alignmentEffectsOnTrack

std::unique_ptr<AlignmentEffectsOnTrack> Trk::TrackStateOnSurface::m_alignmentEffectsOnTrack {}
private

Definition at line 371 of file TrackStateOnSurface.h.

371{};

◆ m_fitQualityOnSurface

FitQualityOnSurface Trk::TrackStateOnSurface::m_fitQualityOnSurface {}
private

Definition at line 367 of file TrackStateOnSurface.h.

367{};

◆ m_hints

std::atomic<uint8_t> Trk::TrackStateOnSurface::m_hints {}
mutableprotected

Definition at line 374 of file TrackStateOnSurface.h.

374{};

◆ m_materialEffectsOnTrack

std::unique_ptr<MaterialEffectsBase> Trk::TrackStateOnSurface::m_materialEffectsOnTrack {}
private

Definition at line 370 of file TrackStateOnSurface.h.

370{};

◆ m_measurementOnTrack

std::unique_ptr<MeasurementBase> Trk::TrackStateOnSurface::m_measurementOnTrack {}
private

Definition at line 369 of file TrackStateOnSurface.h.

369{};

◆ m_trackParameters

std::unique_ptr<TrackParameters> Trk::TrackStateOnSurface::m_trackParameters {}
private

Definition at line 368 of file TrackStateOnSurface.h.

368{};

◆ m_typeFlags

uint16_t Trk::TrackStateOnSurface::m_typeFlags {}
protected

Definition at line 373 of file TrackStateOnSurface.h.

373{};

The documentation for this class was generated from the following files: