ATLAS Offline Software
Loading...
Searching...
No Matches
MuonR4::TruthCalibrator Class Reference

The TruthCalibrator calibrates the measurements according to their available truth information. More...

#include <TruthCalibrator.h>

Inheritance diagram for MuonR4::TruthCalibrator:
Collaboration diagram for MuonR4::TruthCalibrator:

Public Types

enum class  ProjectorType {
  e1DimNoTime = 0 , e1DimRotNoTime = 1 , e2DimNoTime = 2 , e1DimWithTime = 3 ,
  e1DimRotWithTime = 4 , e2DimWithTime = 5
}
 Enum encoding the possible projectors used in ATLAS. More...
using SourceLink_t
 Encode the source links supported by the Calibrator class as a variant of the measurement class type pointer used within Athena.

Public Member Functions

virtual StatusCode initialize () override final
virtual CalibSpacePointPtr calibrate (const EventContext &ctx, const SpacePoint *spacePoint, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay) const override final
 Calibrates a single space point.
virtual CalibSpacePointPtr calibrate (const EventContext &ctx, const CalibratedSpacePoint &spacePoint, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay) const override final
 Calibrates a single space point.
virtual CalibSpacePointVec calibrate (const EventContext &ctx, const std::vector< const SpacePoint * > &spacePoints, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay) const override final
 Calibrates a single space point.
virtual CalibSpacePointVec calibrate (const Acts::CalibrationContext &cctx, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay, const CalibSpacePointVec &spacePoints) const override final
 Calibrates a single space point.
virtual double driftVelocity (const Acts::CalibrationContext &cctx, const CalibratedSpacePoint &spacePoint) const override final
 Returns the drift velocity (in ACTS units) for a given drift-circle space point.
virtual void calibrateSourceLink (const Acts::GeometryContext &geoctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &link, ActsTrk::MutableTrackStateBackend::TrackStateProxy state) const override final
 Function that's hooked to the calibration delegate of the implemented Acts fitters.
virtual void updateSigns (const Amg::Vector3D &trackPos, const Amg::Vector3D &trackDir, CalibSpacePointVec &hitsToCalib) const override final
 Update the signs of the drift radii for a given straight line track to fix the left <-> right ambiguity.
virtual void stampSignsOnMeasurements (const xAOD::MuonSegment &segment) const override final
 Stamps the signs of the drift radii w.r.t.
virtual double driftRadius (const Acts::CalibrationContext &cctx, const CalibratedSpacePoint &spacePoint, const double timeDelay) const override final
 Returns the drift radius for a given drift-circle space point and time delay.
virtual double driftVelocity (const Acts::CalibrationContext &cctx, const CalibratedSpacePoint &spacePoint, const double timeDelay) const override final
 Returns the drift velocity (in ACTS units) for a given drift-circle space point.
virtual double driftAcceleration (const Acts::CalibrationContext &cctx, const CalibratedSpacePoint &spacePoint, const double timeDelay) const override final
 Returns the drift acceleration (in ACTS units) for a given drift-circle space point.
virtual double driftAcceleration (const Acts::CalibrationContext &cctx, const CalibratedSpacePoint &spacePoint) const override final
 Returns the drift acceleration (in ACTS units) for a given drift-circle space point.
template<std::size_t Dim, Acts::TrackStateProxyConcept proxy_t, typename pos_t, typename cov_t>
void setState (const ProjectorType projector, const pos_t &locpos, const cov_t &cov, Acts::SourceLink link, proxy_t &trackState) const
 Copy the local position & covariance into the Acts track state proxy.

Static Public Member Functions

static SourceLinkType getType (const Acts::SourceLink &sl)
 Returns the enumeration corresponding to the object type cached within the Acts::SourceLink.
static SourceLink_t unpackBase (const Acts::SourceLink &sl)
 Unpack the SourceLink_t from the passed Acts source link.
template<Acts::PointerConcept Ptr_t>
static Acts::SourceLink pack (const Ptr_t &measurement)
 Pack the measurement type pointer to an Acts::SourceLink including the intermediate conversion into a SourceLink_t.
template<Acts::PointerConcept Ptr_t>
static void pack (const std::vector< Ptr_t > &measList, std::vector< Acts::SourceLink > &targetSL)
 Converts a vector measurement pointers to Acts::SourceLinks.

Protected Member Functions

template<std::size_t Dim, Acts::TrackStateProxyConcept proxy_t>
void prepareCalibratedState (const ProjectorType projector, Acts::SourceLink link, proxy_t &trackState) const
 Queries the track proxy to allocate memory for the incoming calibration object.

Private Attributes

ActsTrk::ContextUtility m_ctxProvider {this}
 Context utility object to retrieve the geometry context.
SG::ReadDecorHandleKeyArray< xAOD::UncalibratedMeasurementContainerm_truthLinks {this, "truthLinks", {}}
 Dependencies on the truth matching of the uncalibrated measurement containers.
Gaudi::Property< std::vector< std::string > > m_prdContainers {this, "prdContainers", {}}
 Container names of the muon prd containers.
Gaudi::Property< std::string > m_simLinkDecor {this, "simHitLinkDecor", "simHitLink"}
 Decoration of the truth link.

Static Private Attributes

static constexpr std::array< Acts::BoundSubspaceIndices, 6 > s_boundSpaceIndices
 Array to map the Projector types to the bound index configurations used by the ATLAS detector measurements.

Detailed Description

The TruthCalibrator calibrates the measurements according to their available truth information.

If a truth hit is associated to the space point, the truth parameters are taken to calibrate the measurement. Otherwise the measurement is set exactly onto the predicted position eliminating its contribution to the chi2 and respective derivatives.

Definition at line 23 of file TruthCalibrator.h.

Member Typedef Documentation

◆ SourceLink_t

Initial value:
std::variant<std::monostate,
This class is the pure abstract base class for all fittable tracking measurements.
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.

Encode the source links supported by the Calibrator class as a variant of the measurement class type pointer used within Athena.

The std::monostate is used to encode nullptrs or not yet supported types

Definition at line 53 of file MeasurementCalibratorBase.h.

Member Enumeration Documentation

◆ ProjectorType

Enum encoding the possible projectors used in ATLAS.

Their integer representations correspond to the element index in the s_boundSpaceIndices member

Enumerator
e1DimNoTime 
e1DimRotNoTime 

Project out solely the locX (Applies to Itk strips, Rpc, Tgc, sTgc, Mm).

e2DimNoTime 

Project out solely the locY - Complementary projector if the strip plane is rotated (Applies to Itk endcap strips, Rpc, Tgc, sTgc).

e1DimWithTime 

Project out the two spatial coordinates - (Applies to ITk pixel, BI-Rpc, sTgc pad).

e1DimRotWithTime 

Project out the locX & time coordinate - (Applies to Rpc, Tgc, Mm, sTgc).

e2DimWithTime 

Project out the locY & time coordinate - (Applies to Rpc, Tgc, sTgc).

Definition at line 41 of file MeasurementCalibratorBase.h.

41 {
42 e1DimNoTime = 0,
43 e1DimRotNoTime = 1,
45 e2DimNoTime = 2,
46 e1DimWithTime = 3,
47 e1DimRotWithTime = 4,
48 e2DimWithTime = 5,
49 };

Member Function Documentation

◆ calibrate() [1/4]

CalibSpacePointVec MuonR4::TruthCalibrator::calibrate ( const Acts::CalibrationContext & cctx,
const Amg::Vector3D & seedPosInChamb,
const Amg::Vector3D & seedDirInChamb,
const double timeDelay,
const CalibSpacePointVec & spacePoints ) const
finaloverridevirtual

Calibrates a single space point.

Mdt drift radii are corrected for time slew, signal propagation & LorentzAngle effects. The second coordinate of 1D space points is updated according to the closest approach of the strip to the complemntary coordinate. The space point calibrator always returns a calibrated object. But the state of the space point is set to FailedCalib in if the calibration fails.

Parameters
ctxEventContext to access conditions data
spacePointPointer to the space point to calibrate.
seedPosInChambPosition of the external seed expressed in the sector frame
seedDirInChambDirection of the external seed expressed in the sector frame
timeDelayShift in time (in ACTS units) to be added to the time of flight of a particle going a straight path

we need to recalibrate because the fake hits fill be set to the track position

Definition at line 138 of file TruthCalibrator.cxx.

142 {
145 std::ranges::transform(spacePoints,std::back_inserter(result), [&](const CalibSpacePointPtr& sp){
146 return calibrate(*cctx.get<const EventContext*>(), *sp,
147 seedPosInChamb, seedDirInChamb, timeDelay);
148 });
149 return result;
150 }
static Double_t sp
virtual CalibSpacePointPtr calibrate(const EventContext &ctx, const SpacePoint *spacePoint, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay) const override final
Calibrates a single space point.
ISpacePointCalibrator::CalibSpacePointVec CalibSpacePointVec
ISpacePointCalibrator::CalibSpacePointPtr CalibSpacePointPtr

◆ calibrate() [2/4]

CalibSpacePointPtr MuonR4::TruthCalibrator::calibrate ( const EventContext & ctx,
const CalibratedSpacePoint & spacePoint,
const Amg::Vector3D & seedPosInChamb,
const Amg::Vector3D & seedDirInChamb,
const double timeDelay ) const
finaloverridevirtual

Calibrates a single space point.

Mdt drift radii are corrected for time slew, signal propagation & LorentzAngle effects. The second coordinate of 1D space points is updated according to the closest approach of the strip to the complemntary coordinate. The space point calibrator always returns a calibrated object. But the state of the space point is set to FailedCalib in if the calibration fails.

Parameters
ctxEventContext to access conditions data
spacePointPointer to the space point to calibrate.
seedPosInChambPosition of the external seed expressed in the sector frame
seedDirInChambDirection of the external seed expressed in the sector frame
timeDelayShift in time (in ACTS units) to be added to the time of flight of a particle going a straight path

Definition at line 114 of file TruthCalibrator.cxx.

118 {
119 if (!spacePoint.spacePoint()) {
120 CalibSpacePointPtr copy{std::make_unique<CalibratedSpacePoint>(spacePoint)};
121 copy->setFitState(CalibratedSpacePoint::State::Outlier);
122 return copy;
123 }
124 return calibrate(ctx, spacePoint.spacePoint(), seedPosInChamb, seedDirInChamb, timeDelay);
125 }
bool copy
Definition calibdata.py:26

◆ calibrate() [3/4]

CalibSpacePointPtr MuonR4::TruthCalibrator::calibrate ( const EventContext & ctx,
const SpacePoint * spacePoint,
const Amg::Vector3D & seedPosInChamb,
const Amg::Vector3D & seedDirInChamb,
const double timeDelay ) const
finaloverridevirtual

Calibrates a single space point.

Mdt drift radii are corrected for time slew, signal propagation & LorentzAngle effects. The second coordinate of 1D space points is updated according to the closest approach of the strip to the complemntary coordinate. The space point calibrator always returns a calibrated object. But the state of the space point is set to FailedCalib in if the calibration fails.

Parameters
ctxEventContext to access conditions data
spacePointPointer to the space point to calibrate.
seedPosInChambPosition of the external seed expressed in the sector frame
seedDirInChambDirection of the external seed expressed in the sector frame
timeDelayShift in time (in ACTS units) to be added to the time of flight of a particle going a straight path

Update the drift radius accordingly

Definition at line 84 of file TruthCalibrator.cxx.

88 {
89
90 CalibSpacePointPtr calibSp{std::make_unique<CalibratedSpacePoint>(spacePoint,
91 closestApproach(m_ctxProvider.getGeometryContext(ctx),
92 seedPosInChamb, seedDirInChamb, *spacePoint))};
93
94 const xAOD::MuonSimHit* simHit = getMatchingSimHit(*spacePoint);
95 if (!simHit) {
96 calibSp->setFitState(CalibratedSpacePoint::State::Outlier);
97 }
99 if (spacePoint->isStraw()) {
100 if (!simHit) {
101 using namespace Acts::detail::LineHelper;
102 calibSp->setDriftRadius(signedDistance(seedPosInChamb, seedDirInChamb,
103 spacePoint->localPosition(),
104 spacePoint->sensorDirection()));
105 } else {
106 using namespace SegmentFit;
107 calibSp->setDriftRadius(spacePoint->localPosition().perp() *
108 SeedingAux::strawSign(seedPosInChamb, seedDirInChamb, *calibSp));
109 }
110 }
111 return calibSp;
112 }
ActsTrk::ContextUtility m_ctxProvider
Context utility object to retrieve the geometry context.
double signedDistance(const Amg::Vector3D &posA, const Amg::Vector3D &dirA, const Amg::Vector3D &posB, const Amg::Vector3D &dirB)
Calculates the signed distance between two lines in 3D space.
MuonSimHit_v1 MuonSimHit
Defined the version of the MuonSimHit.
Definition MuonSimHit.h:12

◆ calibrate() [4/4]

CalibSpacePointVec MuonR4::TruthCalibrator::calibrate ( const EventContext & ctx,
const std::vector< const SpacePoint * > & spacePoints,
const Amg::Vector3D & seedPosInChamb,
const Amg::Vector3D & seedDirInChamb,
const double timeDelay ) const
finaloverridevirtual

Calibrates a single space point.

Mdt drift radii are corrected for time slew, signal propagation & LorentzAngle effects. The second coordinate of 1D space points is updated according to the closest approach of the strip to the complemntary coordinate. The space point calibrator always returns a calibrated object. But the state of the space point is set to FailedCalib in if the calibration fails.

Parameters
ctxEventContext to access conditions data
spacePointPointer to the space point to calibrate.
seedPosInChambPosition of the external seed expressed in the sector frame
seedDirInChambDirection of the external seed expressed in the sector frame
timeDelayShift in time (in ACTS units) to be added to the time of flight of a particle going a straight path

Definition at line 126 of file TruthCalibrator.cxx.

130 {
132 std::ranges::transform(spacePoints, std::back_inserter(result), [&](const SpacePoint* sp){
133 return calibrate(ctx, sp, seedPosInChamb, seedDirInChamb, timeDelay);
134 });
135 return result;
136 }

◆ calibrateSourceLink()

void MuonR4::TruthCalibrator::calibrateSourceLink ( const Acts::GeometryContext & geoctx,
const Acts::CalibrationContext & cctx,
const Acts::SourceLink & link,
ActsTrk::MutableTrackStateBackend::TrackStateProxy state ) const
finaloverridevirtual

Function that's hooked to the calibration delegate of the implemented Acts fitters.

Parameters
geoctxThe geometry context to fetch the local -> global transformations for the surfaces
cctxCalibration context which is a packed pointer to the current ATLAS EventContext
linkSourcelink to the actual measurement to calibrate
stateProxy to the track-state to which the calibrated constants are written

Definition at line 157 of file TruthCalibrator.cxx.

160 {
161 const auto* uncalib = dynamic_cast<const xAOD::MuonMeasurement*>(ActsTrk::detail::xAODUncalibMeasCalibrator::unpack(link));
162 assert(uncalib != nullptr);
163
164 const xAOD::MuonSimHit* simHit{getTruthMatchedHit(*uncalib)};
165 if (!simHit && uncalib->numDimensions() == 0) {
166 const auto* strip = dynamic_cast<const xAOD::CombinedMuonStrip*>(uncalib);
167 simHit = getTruthMatchedHit(*strip->primaryStrip());
168 if (!simHit) {
169 simHit = getTruthMatchedHit(*strip->secondaryStrip());
170 }
171 }
172 const auto boundPars{makeBoundPars(state)};
173 const Acts::Surface& surface{boundPars.referenceSurface()};
174 assert(surface.geometryId() == xAOD::muonSurface(uncalib).geometryId());
175 ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<" - Calibrate muon measurement "
176 <<uncalib->readoutElement()->idHelperSvc()->toString(uncalib->identify())
177 <<", @"<<surface.geometryId()
178 <<", is truth "<<(simHit != nullptr)
179 <<", parameters:\n"<<boundPars
180 <<",\n direction: "<<Amg::toString(boundPars.direction())
181 <<", momentum: "<<boundPars.absoluteMomentum());
183 if (simHit !=nullptr) {
184 const Amg::Vector3D locPos = xAOD::toEigen(simHit->localPosition());
185 ATH_MSG_VERBOSE(__func__<<"() "<<__LINE__<<" - Sim hit position "<<Amg::toString(locPos)
186 <<", angle: "
187 <<Amg::angle(surface.localToGlobalTransform(tgContext).linear()*xAOD::toEigen(simHit->localDirection()),
188 boundPars.direction()) / 1._degree);
189 if (uncalib->type() != xAOD::UncalibMeasType::MdtDriftCircleType) {
190 if (uncalib->numDimensions() == 1) {
191 setState<1>(uncalib->measuresPhi() ?
194 locPos.block<1,1>(uncalib->measuresPhi(),0),
195 uncalib->localCovariance<1>(), link, state);
196 } else {
197 setState<2>(ProjectorType::e2DimNoTime, locPos.block<2,1>(0,0),
198 uncalib->localCovariance<2>(), link, state);
199 }
200 } else {
201 using namespace Acts::detail::LineHelper;
202 const double r = signedDistance(locPos, xAOD::toEigen(simHit->localDirection()),
203 Amg::Vector3D::Zero(),Amg::Vector3D::UnitZ());
204 const double z = simHit->localPosition().z();
205 if (uncalib->numDimensions() == 1) {
206 setState<1>(ProjectorType::e1DimNoTime, Acts::Vector<1>{r},
207 uncalib->localCovariance<1>(), link, state);
208 } else {
209 setState<2>(ProjectorType::e2DimNoTime, Acts::Vector2{r, z},
210 uncalib->localCovariance<2>(), link, state);
211 }
212 }
213 } else {
214 if (uncalib->numDimensions() == 1) {
215 setState<1>(ProjectorType::e1DimNoTime, state.parameters().block<1,1>(0,0),
216 uncalib->localCovariance<1>(), link, state);
217 } else {
218 setState<2>(ProjectorType::e2DimNoTime, state.parameters().block<2,1>(0,0),
219 uncalib->localCovariance<2>(), link, state);
220 }
221 }
222 }
#define ATH_MSG_VERBOSE(x,...)
#define z
ProjectorType
Enum encoding the possible projectors used in ATLAS.
@ e2DimNoTime
Project out solely the locY - Complementary projector if the strip plane is rotated (Applies to Itk e...
@ e1DimRotNoTime
Project out solely the locX (Applies to Itk strips, Rpc, Tgc, sTgc, Mm).
void setState(const ProjectorType projector, const pos_t &locpos, const cov_t &cov, Acts::SourceLink link, proxy_t &trackState) const
Copy the local position & covariance into the Acts track state proxy.
static const xAOD::UncalibratedMeasurement * unpack(const Acts::SourceLink &sl)
Helper method to unpack an Acts source link to an uncalibrated measurement.
ConstVectorMap< 3 > localDirection() const
Returns the local direction of the traversing particle.
ConstVectorMap< 3 > localPosition() const
Returns the local postion of the traversing particle.
int r
Definition globals.cxx:22
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
double angle(const Amg::Vector3D &v1, const Amg::Vector3D &v2)
calculates the opening angle between two vectors
Eigen::Matrix< double, 3, 1 > Vector3D
const xAOD::MuonSimHit * getTruthMatchedHit(const xAOD::MuonMeasurement &prdHit)
Returns the MuonSimHit, if there's any, matched to the uncalibrated muon measurement.
pointer & link(pointer p) const
Return a reference to the link for an element.
MuonMeasurement_v1 MuonMeasurement
const Acts::Surface & muonSurface(const UncalibratedMeasurement *meas)
Returns the associated Acts surface to the measurement.
CombinedMuonStrip_v1 CombinedMuonStrip

◆ driftAcceleration() [1/2]

double MuonR4::TruthCalibrator::driftAcceleration ( const Acts::CalibrationContext & cctx,
const CalibratedSpacePoint & spacePoint ) const
finaloverridevirtual

Returns the drift acceleration (in ACTS units) for a given drift-circle space point.

Parameters
cctxCalibration context which is a packed pointer to the current ATLAS EventContext
spacePointReference to the calibrated space point for which the acceleration needs to be calculated.

Definition at line 253 of file TruthCalibrator.cxx.

254 {
255 ATH_MSG_WARNING(__func__<<"() - Implement me ");
256 return 0.;
257 }
#define ATH_MSG_WARNING(x,...)

◆ driftAcceleration() [2/2]

double MuonR4::TruthCalibrator::driftAcceleration ( const Acts::CalibrationContext & cctx,
const CalibratedSpacePoint & spacePoint,
const double timeDelay ) const
finaloverridevirtual

Returns the drift acceleration (in ACTS units) for a given drift-circle space point.

Parameters
cctxCalibration context which is a packed pointer to the current ATLAS EventContext
spacePointReference to the calibrated space point for which the acceleration needs to be calculated.

Definition at line 246 of file TruthCalibrator.cxx.

248 {
249 ATH_MSG_WARNING(__func__<<"() - Implement me ");
250 return 0.;
251 }

◆ driftRadius()

double MuonR4::TruthCalibrator::driftRadius ( const Acts::CalibrationContext & cctx,
const CalibratedSpacePoint & spacePoint,
const double timeDelay ) const
finaloverridevirtual

Returns the drift radius for a given drift-circle space point and time delay.

Needed for the fast fitter.

Parameters
cctxCalibration context which is a packed pointer to the current ATLAS EventContext
spacePointReference to the calibrated space point for which the drift radius needs to be calculated
timeDelayShift in time (in ACTS units) to be added to the time of flight of a
particle going a straight path .

Definition at line 233 of file TruthCalibrator.cxx.

235 {
236 ATH_MSG_WARNING(__func__<<"() - Implement me ");
237 return 0.;
238 }

◆ driftVelocity() [1/2]

double MuonR4::TruthCalibrator::driftVelocity ( const Acts::CalibrationContext & cctx,
const CalibratedSpacePoint & spacePoint ) const
finaloverridevirtual

Returns the drift velocity (in ACTS units) for a given drift-circle space point.

Parameters
cctxCalibration context which is a packed pointer to the current ATLAS EventContext
spacePointReference to the calibrated space point for which the velocity needs to be calculated.

Definition at line 151 of file TruthCalibrator.cxx.

152 {
153 ATH_MSG_WARNING(__func__<<"() - Implement me ");
154 return 0.;
155 }

◆ driftVelocity() [2/2]

double MuonR4::TruthCalibrator::driftVelocity ( const Acts::CalibrationContext & cctx,
const CalibratedSpacePoint & spacePoint,
const double timeDelay ) const
finaloverridevirtual

Returns the drift velocity (in ACTS units) for a given drift-circle space point.

Parameters
cctxCalibration context which is a packed pointer to the current ATLAS EventContext
spacePointReference to the calibrated space point for which the velocity needs to be calculated.

Definition at line 240 of file TruthCalibrator.cxx.

242 {
243 ATH_MSG_WARNING(__func__<<"() - Implement me ");
244 return 0.;
245 }

◆ getType()

SourceLinkType ActsTrk::detail::MeasurementCalibratorBase::getType ( const Acts::SourceLink & sl)
staticinherited

Returns the enumeration corresponding to the object type cached within the Acts::SourceLink.

The SourceLink must have been created by a MeasurementCalibrator to ensure that the underlying variant is cached. If the variant is a monostate, nTypes is returned

Parameters
slReference to the source link to unpack.

◆ initialize()

StatusCode MuonR4::TruthCalibrator::initialize ( )
finaloverridevirtual

Definition at line 71 of file TruthCalibrator.cxx.

71 {
72 if (m_prdContainers.value().empty()) {
73 ATH_MSG_ERROR("No prd containers configured");
74 return StatusCode::SUCCESS;
75 }
76 ATH_MSG_DEBUG("Scheudle truth depenency on "<<m_prdContainers<<" using "<<m_simLinkDecor);
77 for (const std::string& prdCont : m_prdContainers){
78 m_truthLinks.emplace_back(std::format("{:}.{:}", prdCont, m_simLinkDecor.value()));
79 }
80 ATH_CHECK(m_truthLinks.initialize());
81 ATH_CHECK(m_ctxProvider.initialize());
82 return StatusCode::SUCCESS;
83 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
SG::ReadDecorHandleKeyArray< xAOD::UncalibratedMeasurementContainer > m_truthLinks
Dependencies on the truth matching of the uncalibrated measurement containers.
Gaudi::Property< std::vector< std::string > > m_prdContainers
Container names of the muon prd containers.
Gaudi::Property< std::string > m_simLinkDecor
Decoration of the truth link.

◆ pack() [1/2]

template<Acts::PointerConcept Ptr_t>
Acts::SourceLink ActsTrk::detail::MeasurementCalibratorBase::pack ( const Ptr_t & measurement)
staticinherited

Pack the measurement type pointer to an Acts::SourceLink including the intermediate conversion into a SourceLink_t.

Nullptrs are converted to a std::monostate.

Parameters
measurementPointer to the measurement to transform into a SourceLInk

◆ pack() [2/2]

template<Acts::PointerConcept Ptr_t>
void ActsTrk::detail::MeasurementCalibratorBase::pack ( const std::vector< Ptr_t > & measList,
std::vector< Acts::SourceLink > & targetSL )
staticinherited

Converts a vector measurement pointers to Acts::SourceLinks.

Parameters
measListThe list of measurement pointers for conversion
targetSLThe allocated SourceLink vectors to which the Acts::SourceLink objects are appended.

◆ prepareCalibratedState()

template<std::size_t Dim, Acts::TrackStateProxyConcept proxy_t>
void ActsTrk::detail::MeasurementCalibratorBase::prepareCalibratedState ( const ProjectorType projector,
Acts::SourceLink link,
proxy_t & trackState ) const
protectedinherited

Queries the track proxy to allocate memory for the incoming calibration object.

Defines the projector indices and allocates the source link to the state

Parameters
projectorProjector configuration of the measurement
linkSource link to associate with the state
trackStateRefrence to the track state proxy to write.

◆ setState()

template<std::size_t Dim, Acts::TrackStateProxyConcept proxy_t, typename pos_t, typename cov_t>
void ActsTrk::detail::MeasurementCalibratorBase::setState ( const ProjectorType projector,
const pos_t & locpos,
const cov_t & cov,
Acts::SourceLink link,
proxy_t & trackState ) const
inherited

Copy the local position & covariance into the Acts track state proxy.

Template Parameters
DimDimension of the measurement
trajectory_tData type of the track state proxy backend
pos_tData type of the [Dim x 1] position vector
cov_tData type of the [Dim x Dim] covariance matrix
Parameters
projectorProjector configuration of the measurement
locposCalibrated local postion
covCalibrated local covariance
linkSource link to associate with the state
trackStateRefrence to the track state proxy to write.

◆ stampSignsOnMeasurements()

void MuonR4::TruthCalibrator::stampSignsOnMeasurements ( const xAOD::MuonSegment & segment) const
finaloverridevirtual

Stamps the signs of the drift radii w.r.t.

the segment line onto the uncalibrated measurements. The stamped signs are later picked up by the source link calibration in the context of the track fit to stabilize the fit.

Parameters
segmentReference to the reconstructed segment for which the sign stamp shall be executed

Truth signs are correct already nothing to do

Definition at line 229 of file TruthCalibrator.cxx.

229 {
231 }

◆ unpackBase()

SourceLink_t ActsTrk::detail::MeasurementCalibratorBase::unpackBase ( const Acts::SourceLink & sl)
staticinherited

Unpack the SourceLink_t from the passed Acts source link.

Parameters
slReference to the source link to unpack.

◆ updateSigns()

void MuonR4::TruthCalibrator::updateSigns ( const Amg::Vector3D & trackPos,
const Amg::Vector3D & trackDir,
CalibSpacePointVec & hitsToCalib ) const
finaloverridevirtual

Update the signs of the drift radii for a given straight line track to fix the left <-> right ambiguity.

Parameters
trackPosPosition of the track intercept in the sector frame
trackDirDirection of the track in the sector frame
hitsToCalibList of space points to calibrate

Truth signs are correct already nothing to do

Definition at line 224 of file TruthCalibrator.cxx.

226 {
228 }

Member Data Documentation

◆ m_ctxProvider

ActsTrk::ContextUtility MuonR4::TruthCalibrator::m_ctxProvider {this}
private

Context utility object to retrieve the geometry context.

Definition at line 86 of file TruthCalibrator.h.

86{this};

◆ m_prdContainers

Gaudi::Property<std::vector<std::string> > MuonR4::TruthCalibrator::m_prdContainers {this, "prdContainers", {}}
private

Container names of the muon prd containers.

Definition at line 90 of file TruthCalibrator.h.

90{this, "prdContainers", {}};

◆ m_simLinkDecor

Gaudi::Property<std::string> MuonR4::TruthCalibrator::m_simLinkDecor {this, "simHitLinkDecor", "simHitLink"}
private

Decoration of the truth link.

Definition at line 92 of file TruthCalibrator.h.

92{this, "simHitLinkDecor", "simHitLink"};

◆ m_truthLinks

SG::ReadDecorHandleKeyArray<xAOD::UncalibratedMeasurementContainer> MuonR4::TruthCalibrator::m_truthLinks {this, "truthLinks", {}}
private

Dependencies on the truth matching of the uncalibrated measurement containers.

Definition at line 88 of file TruthCalibrator.h.

88{this, "truthLinks", {}};

◆ s_boundSpaceIndices

std::array<Acts::BoundSubspaceIndices, 6> ActsTrk::detail::MeasurementCalibratorBase::s_boundSpaceIndices
staticconstexprprivateinherited
Initial value:
{
Acts::BoundSubspaceIndices{Acts::eBoundLoc0},
Acts::BoundSubspaceIndices{Acts::eBoundLoc1},
Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundLoc1},
Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundTime},
Acts::BoundSubspaceIndices{Acts::eBoundLoc1, Acts::eBoundTime},
Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::eBoundTime}
}

Array to map the Projector types to the bound index configurations used by the ATLAS detector measurements.

Definition at line 115 of file MeasurementCalibratorBase.h.

115 {
116 Acts::BoundSubspaceIndices{Acts::eBoundLoc0}, // One dimenion without time
117 Acts::BoundSubspaceIndices{Acts::eBoundLoc1}, // Complementary one dimension without time
118 Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundLoc1},
119 Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundTime}, // One dimension with time
120 Acts::BoundSubspaceIndices{Acts::eBoundLoc1, Acts::eBoundTime}, // Complementary one dimension with time
121 Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::eBoundTime}
122 };

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