ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTSOSHelper.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
8#include <memory>
9
10namespace Muon {
11
13 public:
15 static std::unique_ptr<Trk::TrackStateOnSurface> cloneTSOS(const Trk::TrackStateOnSurface& tsos,
17 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern = tsos.types();
21 typePattern.set(Trk::TrackStateOnSurface::Outlier, false);
22 typePattern.set(type);
23
24 return std::make_unique<Trk::TrackStateOnSurface>(
26 tsos.measurementOnTrack() ? tsos.measurementOnTrack()->uniqueClone() : nullptr,
27 tsos.trackParameters() ? tsos.trackParameters()->uniqueClone() : nullptr,
29 typePattern);
30 }
31
33 static std::unique_ptr<Trk::TrackStateOnSurface>
35 const Trk::TrackParameters& pars,
37 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern = tsos.types();
41 typePattern.set(Trk::TrackStateOnSurface::Outlier, false);
42 typePattern.set(type);
43
44 return std::make_unique<Trk::TrackStateOnSurface>(
46 meas.uniqueClone(),
47 pars.uniqueClone(),
49 typePattern);
50 }
51
53 static std::unique_ptr<Trk::TrackStateOnSurface>
54 createPerigeeTSOS(std::unique_ptr<Trk::TrackParameters> perigee) {
55 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
56 typePattern.set(Trk::TrackStateOnSurface::Perigee);
57 return std::make_unique<Trk::TrackStateOnSurface>(nullptr, std::move(perigee), nullptr, typePattern);
58 }
59
61 static std::unique_ptr<Trk::TrackStateOnSurface>
62 createMeasTSOS(std::unique_ptr<Trk::MeasurementBase> meas,
63 std::unique_ptr<Trk::TrackParameters> pars,
65 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
67 typePattern.set(type);
68 return std::make_unique<Trk::TrackStateOnSurface>(std::move(meas), std::move(pars), nullptr, typePattern);
69 }
70
71
73 static std::unique_ptr<Trk::TrackStateOnSurface>
74 createMeasTSOSWithUpdate(const Trk::TrackStateOnSurface& tsos, std::unique_ptr<Trk::MeasurementBase> meas,
75 std::unique_ptr<Trk::TrackParameters> pars,
77 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern = tsos.types();
81 typePattern.set(Trk::TrackStateOnSurface::Outlier, false);
82 typePattern.set(type);
83 return std::make_unique<Trk::TrackStateOnSurface>(
85 std::move(meas),
86 std::move(pars),
88 typePattern);
89 }
90
92 static std::unique_ptr<Trk::TrackStateOnSurface> createHoleTSOS(std::unique_ptr<Trk::TrackParameters> pars) {
93 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
94 typePattern.set(Trk::TrackStateOnSurface::Hole);
95 return std::make_unique<Trk::TrackStateOnSurface>(nullptr, std::move(pars), nullptr, typePattern);
96 }
97 };
98} // namespace Muon
static std::unique_ptr< Trk::TrackStateOnSurface > createHoleTSOS(std::unique_ptr< Trk::TrackParameters > pars)
create a hole TSOS, takes ownership of the pointers
static std::unique_ptr< Trk::TrackStateOnSurface > createMeasTSOS(std::unique_ptr< Trk::MeasurementBase > meas, std::unique_ptr< Trk::TrackParameters > pars, Trk::TrackStateOnSurface::TrackStateOnSurfaceType type)
create a TSOS with a measurement, takes ownership of the pointers
static std::unique_ptr< Trk::TrackStateOnSurface > createPerigeeTSOS(std::unique_ptr< Trk::TrackParameters > perigee)
create a perigee TSOS, takes ownership of the Perigee
static std::unique_ptr< Trk::TrackStateOnSurface > createMeasTSOSWithUpdate(const Trk::TrackStateOnSurface &tsos, std::unique_ptr< Trk::MeasurementBase > meas, std::unique_ptr< Trk::TrackParameters > pars, Trk::TrackStateOnSurface::TrackStateOnSurfaceType type)
create a TSOS with a measurement, takes ownership of the pointers
static std::unique_ptr< Trk::TrackStateOnSurface > cloneTSOSWithUpdate(const Trk::TrackStateOnSurface &tsos, const Trk::MeasurementBase &meas, const Trk::TrackParameters &pars, Trk::TrackStateOnSurface::TrackStateOnSurfaceType type)
clone input, replacing the track parameteres and the measurement base and updating the type
static std::unique_ptr< Trk::TrackStateOnSurface > cloneTSOS(const Trk::TrackStateOnSurface &tsos, Trk::TrackStateOnSurface::TrackStateOnSurfaceType type)
clone input, update the type
std::unique_ptr< MaterialEffectsBase > uniqueClone() const
NVI uniqueClone.
This class is the pure abstract base class for all fittable tracking measurements.
std::unique_ptr< MeasurementBase > uniqueClone() const
NVI Clone giving up unique pointer.
std::unique_ptr< ParametersBase< DIM, T > > uniqueClone() const
clone method for polymorphic deep copy returning unique_ptr; it is not overriden, but uses the existi...
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.
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
const FitQualityOnSurface & fitQualityOnSurface() const
return FitQuality On Surface const overload
@ 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.
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
@ Hole
A hole on the track - this is defined in the following way.
const MaterialEffectsBase * materialEffectsOnTrack() const
return material effects const overload
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
ParametersBase< TrackParametersDim, Charged > TrackParameters