6#include "GaudiKernel/MsgStream.h"
17 std::unique_ptr<MeasurementBase> meas,
19 std::unique_ptr<MaterialEffectsBase> materialEffects,
32 std::unique_ptr<MeasurementBase> meas,
34 std::unique_ptr<MaterialEffectsBase> materialEffects,
49 std::unique_ptr<MeasurementBase> meas,
51 std::unique_ptr<MaterialEffectsBase> materialEffects,
52 const std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes>& typePattern,
65 std::unique_ptr<MeasurementBase> meas,
67 std::unique_ptr<MaterialEffectsBase> materialEffects,
68 const std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes>& typePattern,
122 ? std::make_unique<AlignmentEffectsOnTrack>(
150 const auto& typesSet =
types();
152 type +=
"Measurement ";
155 type +=
"InertMaterial ";
158 type +=
"BremPoint ";
161 type +=
"Scatterer ";
173 type +=
"CaloDeposit ";
176 type +=
"Parameter ";
179 type +=
"FitQuality ";
182 type +=
"Alignment ";
199 throw std::runtime_error(
"TrackStateOnSurface without Surface!");
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;
224 std::cerr <<
"matSurf: ["
240 if (!
m_hints.compare_exchange_strong(
242 throw std::runtime_error(
243 "TSOS trying to set again already set Persistification Hints");
252 std::string name(
"TrackStateOnSurface: ");
255 if (sl.level() < MSG::INFO) {
256 sl << name <<
"Detailed dump of contained objects follows:" <<
endmsg;
272 <<
"\n (end of MaterialEffectsBase dump)" <<
endmsg;
277 <<
"\n (end of AlignmentEffectsOnTrack dump)" <<
endmsg;
286 std::string name(
"TrackStateOnSurface: ");
287 sl << name <<
"\t of type : " << tsos.
dumpType() << std::endl;
289 sl <<
"\t FitQualityOnSurface(s)." << std::endl;
293 sl <<
"\t HAS TrackParameter(s)." << std::endl;
296 sl <<
"\t NO TrackParameters." << std::endl;
300 sl <<
"\t HAS MeasurementBase(s)." << std::endl;
303 sl <<
"\t NO MeasurementBase." << std::endl;
307 sl <<
"\t HAS MaterialEffectsBase." << std::endl;
310 sl <<
"\t NO MaterialEffects." << std::endl;
314 sl <<
"\t HAS AlignmentEffectsOnTrack." << std::endl;
317 sl <<
"\t NO AlignmentEffectsOnTrack." << std::endl;
Class to represent misalignments or 'discontinuities' on tracks These have a surface where the z axis...
Abstract Base Class for tracking surfaces.
represents the track state (measurement, material, fit parameters and quality) at a surface.
const std::bitset< NumberOfTrackStateOnSurfaceTypes > types() const
returns a bitset with the types of this bitset.
virtual TrackStateOnSurface * clone() const
Pseudo-constructor: needed to avoid excessive RTTI.
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
std::unique_ptr< TrackParameters > m_trackParameters
std::unique_ptr< MeasurementBase > m_measurementOnTrack
void setFlags()
set sensible default flags
TrackStateOnSurface()
Default ctor for POOL.
std::unique_ptr< MaterialEffectsBase > m_materialEffectsOnTrack
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
const std::bitset< NumberOfPersistencyHints > hints() const
Use this method to get the persistification hints.
std::string dumpType() const
returns a string with the expanded type of the object (i.e.
void setHints(const uint8_t hints) const
Use this method to set persistification hints.
const FitQualityOnSurface & fitQualityOnSurface() const
return FitQuality On Surface const overload
Trk::TrackStateOnSurface & operator=(const Trk::TrackStateOnSurface &rhs)
std::atomic< uint8_t > m_hints
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
@ NumberOfPersistencyHints
@ 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.
std::unique_ptr< AlignmentEffectsOnTrack > m_alignmentEffectsOnTrack
const MaterialEffectsBase * materialEffectsOnTrack() const
return material effects const overload
FitQualityOnSurface m_fitQualityOnSurface
const Trk::Surface & surface() const
return associated surface
const AlignmentEffectsOnTrack * alignmentEffectsOnTrack() const
return the the alignment effects const overload
Ensure that the ATLAS eigen extensions are properly loaded.
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
bool consistentSurfaces(U)