ATLAS Offline Software
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ActsTrk::GlobalChiSquareFitterTool Class Reference

#include <GlobalChiSquareFitterTool.h>

Inheritance diagram for ActsTrk::GlobalChiSquareFitterTool:
Collaboration diagram for ActsTrk::GlobalChiSquareFitterTool:

Public Member Functions

 GlobalChiSquareFitterTool (const std::string &, const std::string &, const IInterface *)
 
virtual ~GlobalChiSquareFitterTool ()=default
 
virtual StatusCode initialize () override
 
virtual std::unique_ptr< Trk::Trackfit (const EventContext &ctx, const Trk::Track &, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
 refit a track More...
 
virtual std::unique_ptr< Trk::Trackfit (const EventContext &ctx, const Trk::PrepRawDataSet &, const Trk::TrackParameters &, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
 fit a set of PrepRawData objects More...
 
virtual std::unique_ptr< Trk::Trackfit (const EventContext &ctx, const Trk::MeasurementSet &, const Trk::TrackParameters &, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
 fit a set of MeasurementBase objects More...
 
virtual std::unique_ptr< Trk::Trackfit (const EventContext &ctx, const Trk::Track &, const Trk::PrepRawDataSet &, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
 extend a track fit including a new set of PrepRawData objects More...
 
virtual std::unique_ptr< ActsTrk::MutableTrackContainerfit (const EventContext &ctx, const std::vector< ActsTrk::ATLASUncalibSourceLink > &clusterList, const Acts::BoundTrackParameters &initialParams, const Acts::GeometryContext &tgContext, const Acts::MagneticFieldContext &mfContext, const Acts::CalibrationContext &calContext, const DetectorElementToActsGeometryIdMap &detectorElementToGeometryIdMap, const Acts::Surface *targetSurface=nullptr) const override
 fit a set of xAOD uncalibrated Measurements More...
 
virtual std::unique_ptr< Trk::Trackfit (const EventContext &ctx, const Trk::Track &, const Trk::MeasurementSet &, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
 extend a track fit including a new set of MeasurementBase objects More...
 
virtual std::unique_ptr< Trk::Trackfit (const EventContext &ctx, const Trk::Track &intrk1, const Trk::Track &intrk2, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
 combined track fit More...
 
virtual std::unique_ptr< ActsTrk::MutableTrackContainerfit (const EventContext &ctx, const ActsTrk::Seed &seed, const Acts::BoundTrackParameters &initialParams, const Acts::GeometryContext &tgContext, const Acts::MagneticFieldContext &mfContext, const Acts::CalibrationContext &calContext, const DetectorElementToActsGeometryIdMap &detectorElementToGeometryIdMap) const override
 Acts seed fit. More...
 

Private Types

using Fitter = Acts::Experimental::Gx2Fitter< Acts::Propagator< Acts::SympyStepper, Acts::Navigator >, ActsTrk::MutableTrackStateBackend >
 Type erased track fitter function. More...
 

Private Member Functions

std::unique_ptr< Trk::TrackmakeTrack (const EventContext &ctx, Acts::GeometryContext &tgContext, ActsTrk::MutableTrackContainer &tracks, Acts::Result< ActsTrk::MutableTrackContainer::TrackProxy, std::error_code > &fitResult, bool SourceLinkType=false) const
 
const Acts::Logger & logger () const
 Private access to the logger. More...
 

Private Attributes

ToolHandle< IActsExtrapolationToolm_extrapolationTool
 
ToolHandle< IActsTrackingGeometryToolm_trackingGeometryTool
 
ToolHandle< ActsTrk::IActsToTrkConverterToolm_ATLASConverterTool
 
ToolHandle< Trk::IExtendedTrackSummaryToolm_trkSummaryTool
 
ToolHandle< Trk::IBoundaryCheckToolm_boundaryCheckTool
 
Gaudi::Property< double > m_option_outlierChi2Cut
 
Gaudi::Property< int > m_option_maxPropagationStep
 
Gaudi::Property< double > m_option_seedCovarianceScale
 
std::unique_ptr< ActsTrk::detail::TrkMeasurementCalibratorm_calibrator
 
std::unique_ptr< Fitterm_fitter {nullptr}
 
Acts::Experimental::Gx2FitterExtensions< ActsTrk::MutableTrackStateBackendm_gx2fExtensions
 
ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder m_outlierFinder {0}
 
std::unique_ptr< const Acts::Logger > m_logger
 logging instance More...
 
ToolHandle< Trk::IRIO_OnTrackCreatorm_broadROTcreator
 
ToolHandle< Trk::IRIO_OnTrackCreatorm_ROTcreator {this, "RotCreatorTool", ""}
 
Gaudi::Property< bool > m_doReFitFromPRD
 

Detailed Description

Definition at line 77 of file GlobalChiSquareFitterTool.h.

Member Typedef Documentation

◆ Fitter

using ActsTrk::GlobalChiSquareFitterTool::Fitter = Acts::Experimental::Gx2Fitter< Acts::Propagator<Acts::SympyStepper, Acts::Navigator>, ActsTrk::MutableTrackStateBackend>
private

Type erased track fitter function.

Definition at line 196 of file GlobalChiSquareFitterTool.h.

Constructor & Destructor Documentation

◆ GlobalChiSquareFitterTool()

ActsTrk::GlobalChiSquareFitterTool::GlobalChiSquareFitterTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 160 of file GlobalChiSquareFitterTool.cxx.

163  : base_class(t, n, p) {}

◆ ~GlobalChiSquareFitterTool()

virtual ActsTrk::GlobalChiSquareFitterTool::~GlobalChiSquareFitterTool ( )
virtualdefault

Member Function Documentation

◆ fit() [1/8]

std::unique_ptr< ActsTrk::MutableTrackContainer > ActsTrk::GlobalChiSquareFitterTool::fit ( const EventContext &  ctx,
const ActsTrk::Seed seed,
const Acts::BoundTrackParameters &  initialParams,
const Acts::GeometryContext &  tgContext,
const Acts::MagneticFieldContext &  mfContext,
const Acts::CalibrationContext &  calContext,
const DetectorElementToActsGeometryIdMap detectorElementToGeometryIdMap 
) const
overridevirtual

Acts seed fit.

Definition at line 895 of file GlobalChiSquareFitterTool.cxx.

902  {
903  const Acts::TrackingGeometry* actsTrackingGeometry =
904  m_trackingGeometryTool->trackingGeometry().get();
905  if (!actsTrackingGeometry) {
906  throw std::runtime_error("No Acts tracking geometry.");
907  }
908 
909  std::vector<ActsTrk::ATLASUncalibSourceLink> sourceLinks;
910  sourceLinks.reserve(6);
911 
912  std::vector<const Acts::Surface*> surfaces;
913  surfaces.reserve(6);
914 
915  const auto& sps = seed.sp();
916  for (const xAOD::SpacePoint* sp : sps) {
917  const auto& measurements = sp->measurements();
918  for (const xAOD::UncalibratedMeasurement* umeas : measurements) {
920  sourceLinks.emplace_back(el);
921  surfaces.push_back(ActsTrk::getSurfaceOfMeasurement(
922  *actsTrackingGeometry, detectorElementToGeometryIdMap, *umeas));
923  }
924  }
925  return fit(ctx, sourceLinks, initialParams, tgContext, mfContext, calContext,
926  detectorElementToGeometryIdMap, surfaces.front());
927 }

◆ fit() [2/8]

std::unique_ptr< ActsTrk::MutableTrackContainer > ActsTrk::GlobalChiSquareFitterTool::fit ( const EventContext &  ctx,
const std::vector< ActsTrk::ATLASUncalibSourceLink > &  clusterList,
const Acts::BoundTrackParameters &  initialParams,
const Acts::GeometryContext &  tgContext,
const Acts::MagneticFieldContext &  mfContext,
const Acts::CalibrationContext &  calContext,
const DetectorElementToActsGeometryIdMap detectorElementToGeometryIdMap,
const Acts::Surface *  targetSurface = nullptr 
) const
overridevirtual

fit a set of xAOD uncalibrated Measurements

Definition at line 451 of file GlobalChiSquareFitterTool.cxx.

459  {
460  ATH_MSG_ERROR("The ACTS Global Chi Square Fitter has no direct fitter.");
461  return nullptr;
462 }

◆ fit() [3/8]

std::unique_ptr< Trk::Track > ActsTrk::GlobalChiSquareFitterTool::fit ( const EventContext &  ctx,
const Trk::MeasurementSet inputMeasSet,
const Trk::TrackParameters estimatedStartParameters,
const Trk::RunOutlierRemoval  runOutlier = false,
const Trk::ParticleHypothesis  matEffects = Trk::nonInteracting 
) const
overridevirtual

fit a set of MeasurementBase objects

Definition at line 306 of file GlobalChiSquareFitterTool.cxx.

310  {
311  std::unique_ptr<Trk::Track> track = nullptr;
312 
313  // protection against not having measurements on the input track
314  if (inputMeasSet.size() < 2) {
316  "called to refit empty measurement set or a measurement set with too "
317  "little information, reject fit");
318  return nullptr;
319  }
320 
321  // Construct a perigee surface as the target surface
322  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
323  Acts::Vector3{0., 0., 0.});
324 
325  Acts::GeometryContext tgContext =
326  m_trackingGeometryTool->getGeometryContext(ctx).context();
327  Acts::MagneticFieldContext mfContext =
328  m_extrapolationTool->getMagneticFieldContext(ctx);
329  // CalibrationContext converter not implemented yet.
330  Acts::CalibrationContext calContext = Acts::CalibrationContext();
331 
332  Acts::Experimental::Gx2FitterExtensions<ActsTrk::MutableTrackStateBackend>
333  gx2fExtensions = m_gx2fExtensions;
334 
335  ATLASSourceLinkSurfaceAccessor surfaceAccessor{&(*m_ATLASConverterTool)};
336  gx2fExtensions.surfaceAccessor
337  .connect<&ATLASSourceLinkSurfaceAccessor::operator()>(&surfaceAccessor);
338 
339  Acts::PropagatorPlainOptions propagationOption(tgContext, mfContext);
340  propagationOption.maxSteps = m_option_maxPropagationStep;
341  // Set the Gx2Fitter options
342  Acts::Experimental::Gx2FitterOptions gx2fOptions(
343  tgContext, mfContext, calContext, gx2fExtensions, propagationOption,
344  &(*pSurface));
345 
346  std::vector<Acts::SourceLink> trackSourceLinks;
347  trackSourceLinks.reserve(inputMeasSet.size());
348 
349  for (auto it = inputMeasSet.begin(); it != inputMeasSet.end(); ++it) {
350  trackSourceLinks.push_back(
351  m_ATLASConverterTool->trkMeasurementToSourceLink(tgContext, **it));
352  }
353  // protection against error in the conversion from Atlas measurement to ACTS
354  // source link
355  if (trackSourceLinks.empty()) {
357  "input contain measurement but no source link created, probable issue "
358  "with the converter, reject fit ");
359  return track;
360  }
361 
362  const auto& initialParams =
363  m_ATLASConverterTool->trkTrackParametersToActsParameters(
364  estimatedStartParameters, tgContext);
365 
367 
368  // Perform the fit
369  auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
370  initialParams, gx2fOptions, tracks);
371  if (result.ok()) {
372  track = makeTrack(ctx, tgContext, tracks, result);
373  }
374  return track;
375 }

◆ fit() [4/8]

std::unique_ptr< Trk::Track > ActsTrk::GlobalChiSquareFitterTool::fit ( const EventContext &  ctx,
const Trk::PrepRawDataSet inputPRDColl,
const Trk::TrackParameters estimatedStartParameters,
const Trk::RunOutlierRemoval  runOutlier = false,
const Trk::ParticleHypothesis  matEffects = Trk::nonInteracting 
) const
overridevirtual

fit a set of PrepRawData objects

Definition at line 379 of file GlobalChiSquareFitterTool.cxx.

383  {
384  ATH_MSG_DEBUG("--> entering GlobalChiSquareFitterTool::fit(PRDS,TP,)");
385 
386  std::unique_ptr<Trk::Track> track = nullptr;
387 
388  // Construct a perigee surface as the target surface
389  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
390  Acts::Vector3{0., 0., 0.});
391 
392  Acts::GeometryContext tgContext =
393  m_trackingGeometryTool->getGeometryContext(ctx).context();
394  Acts::MagneticFieldContext mfContext =
395  m_extrapolationTool->getMagneticFieldContext(ctx);
396  // CalibrationContext converter not implemented yet.
397  Acts::CalibrationContext calContext = Acts::CalibrationContext();
398 
399  Acts::Experimental::Gx2FitterExtensions<ActsTrk::MutableTrackStateBackend>
400  gx2fExtensions = m_gx2fExtensions;
401 
402  PRDSourceLinkCalibratorGX2F calibrator{}; // @TODO: Set tool pointers
403  calibrator.rotCreator = m_ROTcreator.get();
404  calibrator.broadRotCreator = m_broadROTcreator.get();
405  calibrator.converterTool = m_ATLASConverterTool.get();
406  gx2fExtensions.calibrator.connect<&PRDSourceLinkCalibratorGX2F::calibrate<
407  ActsTrk::MutableTrackStateBackend>>(&calibrator);
408 
409  PRDSourceLinkSurfaceAccessorGX2F surfaceAccessor{m_ATLASConverterTool.get()};
410  gx2fExtensions.surfaceAccessor
411  .connect<&PRDSourceLinkSurfaceAccessorGX2F::operator()>(&surfaceAccessor);
412 
413  Acts::PropagatorPlainOptions propagationOption(tgContext, mfContext);
414  propagationOption.maxSteps = m_option_maxPropagationStep;
415  // Set the Gx2Fitter options
416  Acts::Experimental::Gx2FitterOptions gx2fOptions(
417  tgContext, mfContext, calContext, gx2fExtensions, propagationOption,
418  &(*pSurface));
419 
420  std::vector<Acts::SourceLink> trackSourceLinks;
421  trackSourceLinks.reserve(inputPRDColl.size());
422 
423  for (const Trk::PrepRawData* prd : inputPRDColl) {
424  trackSourceLinks.push_back(Acts::SourceLink{PRDSourceLinkGX2F{prd}});
425  }
426  // protection against error in the conversion from Atlas measurement to ACTS
427  // source link
428  if (trackSourceLinks.empty()) {
430  "input contain measurement but no source link created, probable issue "
431  "with the converter, reject fit ");
432  return track;
433  }
434 
435  const auto& initialParams =
436  m_ATLASConverterTool->trkTrackParametersToActsParameters(
437  estimatedStartParameters, tgContext);
438 
440  // Perform the fit
441  auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
442  initialParams, gx2fOptions, tracks);
443  if (result.ok()) {
444  track = makeTrack(ctx, tgContext, tracks, result, true);
445  }
446  return track;
447 }

◆ fit() [5/8]

std::unique_ptr< Trk::Track > ActsTrk::GlobalChiSquareFitterTool::fit ( const EventContext &  ctx,
const Trk::Track inputTrack,
const Trk::MeasurementSet addMeasColl,
const Trk::RunOutlierRemoval  runOutlier = false,
const Trk::ParticleHypothesis  matEffects = Trk::nonInteracting 
) const
overridevirtual

extend a track fit including a new set of MeasurementBase objects

Definition at line 468 of file GlobalChiSquareFitterTool.cxx.

472  {
474  "--> enter GlobalChiSquareFitterTool::fit(Track,Meas'BaseSet,,)");
476  " with Track from author = " << inputTrack.info().dumpInfo());
477 
478  // protection, if empty MeasurementSet
479  if (addMeasColl.empty()) {
481  "client tries to add an empty MeasurementSet to the track fit.");
482  return fit(ctx, inputTrack);
483  }
484 
485  // protection against not having measurements on the input track
486  if (!inputTrack.measurementsOnTrack() ||
487  (inputTrack.measurementsOnTrack()->size() < 2 && addMeasColl.empty())) {
489  "called to refit empty track or track with too little information, "
490  "reject fit");
491  return nullptr;
492  }
493 
494  // protection against not having track parameters on the input track
495  if (!inputTrack.trackParameters() || inputTrack.trackParameters()->empty()) {
497  "input fails to provide track parameters for seeding the GX2F, reject "
498  "fit");
499  return nullptr;
500  }
501 
502  std::unique_ptr<Trk::Track> track = nullptr;
503 
504  // Construct a perigee surface as the target surface
505  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
506  Acts::Vector3{0., 0., 0.});
507 
508  Acts::GeometryContext tgContext =
509  m_trackingGeometryTool->getGeometryContext(ctx).context();
510  Acts::MagneticFieldContext mfContext =
511  m_extrapolationTool->getMagneticFieldContext(ctx);
512  // CalibrationContext converter not implemented yet.
513  Acts::CalibrationContext calContext = Acts::CalibrationContext();
514 
515  Acts::Experimental::Gx2FitterExtensions<ActsTrk::MutableTrackStateBackend>
516  gx2fExtensions = m_gx2fExtensions;
517 
518  Acts::PropagatorPlainOptions propagationOption(tgContext, mfContext);
519  propagationOption.maxSteps = m_option_maxPropagationStep;
520  // Set the Gx2Fitter options
521  Acts::Experimental::Gx2FitterOptions gx2fOptions(
522  tgContext, mfContext, calContext, gx2fExtensions, propagationOption,
523  &(*pSurface));
524 
525  std::vector<Acts::SourceLink> trackSourceLinks =
526  m_ATLASConverterTool->trkTrackToSourceLinks(tgContext, inputTrack);
527  const auto& initialParams =
528  m_ATLASConverterTool->trkTrackParametersToActsParameters(
529  *(inputTrack.perigeeParameters()), tgContext);
530 
531  for (auto it = addMeasColl.begin(); it != addMeasColl.end(); ++it) {
532  trackSourceLinks.push_back(
533  m_ATLASConverterTool->trkMeasurementToSourceLink(tgContext, **it));
534  }
535  // protection against error in the conversion from Atlas measurement to ACTS
536  // source link
537  if (trackSourceLinks.empty()) {
539  "input contain measurement but no source link created, probable issue "
540  "with the converter, reject fit ");
541  return track;
542  }
543 
545  // Perform the fit
546  auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
547  initialParams, gx2fOptions, tracks);
548  if (result.ok()) {
549  track = makeTrack(ctx, tgContext, tracks, result);
550  }
551  return track;
552 }

◆ fit() [6/8]

std::unique_ptr< Trk::Track > ActsTrk::GlobalChiSquareFitterTool::fit ( const EventContext &  ctx,
const Trk::Track ,
const Trk::PrepRawDataSet ,
const Trk::RunOutlierRemoval  runOutlier = false,
const Trk::ParticleHypothesis  matEffects = Trk::nonInteracting 
) const
overridevirtual

extend a track fit including a new set of PrepRawData objects

Definition at line 556 of file GlobalChiSquareFitterTool.cxx.

560  {
562  "Fit of Track with additional PrepRawDataSet not yet implemented");
563  return nullptr;
564 }

◆ fit() [7/8]

std::unique_ptr< Trk::Track > ActsTrk::GlobalChiSquareFitterTool::fit ( const EventContext &  ctx,
const Trk::Track inputTrack,
const Trk::RunOutlierRemoval  runOutlier = false,
const Trk::ParticleHypothesis  matEffects = Trk::nonInteracting 
) const
overridevirtual

refit a track

Definition at line 211 of file GlobalChiSquareFitterTool.cxx.

214  {
215  std::unique_ptr<Trk::Track> track = nullptr;
217  "--> enter GlobalChiSquareFitterTool::fit(Track,,) with Track from "
218  "author = "
219  << inputTrack.info().dumpInfo());
220 
221  // protection against not having measurements on the input track
222  if (!inputTrack.measurementsOnTrack() ||
223  inputTrack.measurementsOnTrack()->size() < 2) {
225  "called to refit empty track or track with too little information, "
226  "reject fit");
227  return nullptr;
228  }
229 
230  // protection against not having track parameters on the input track
231  if (!inputTrack.trackParameters() || inputTrack.trackParameters()->empty()) {
233  "input fails to provide track parameters for seeding the GX2F, reject "
234  "fit");
235  return nullptr;
236  }
237 
238  // Construct a perigee surface as the target surface
239  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
240  Acts::Vector3{0., 0., 0.});
241 
242  Acts::GeometryContext tgContext =
243  m_trackingGeometryTool->getGeometryContext(ctx).context();
244  Acts::MagneticFieldContext mfContext =
245  m_extrapolationTool->getMagneticFieldContext(ctx);
246  // CalibrationContext converter not implemented yet.
247  Acts::CalibrationContext calContext = Acts::CalibrationContext();
248 
249  Acts::Experimental::Gx2FitterExtensions<ActsTrk::MutableTrackStateBackend>
250  gx2fExtensions = m_gx2fExtensions;
251 
252  ATLASSourceLinkSurfaceAccessor surfaceAccessor{&(*m_ATLASConverterTool)};
253  gx2fExtensions.surfaceAccessor
254  .connect<&ATLASSourceLinkSurfaceAccessor::operator()>(&surfaceAccessor);
255 
256  Acts::PropagatorPlainOptions propagationOption(tgContext, mfContext);
257  propagationOption.maxSteps = m_option_maxPropagationStep;
258  // Set the Gx2Fitter options
259  Acts::Experimental::Gx2FitterOptions gx2fOptions(
260  tgContext, mfContext, calContext, gx2fExtensions, propagationOption,
261  &(*pSurface));
262 
263  std::vector<Acts::SourceLink> trackSourceLinks =
264  m_ATLASConverterTool->trkTrackToSourceLinks(tgContext, inputTrack);
265  // protection against error in the conversion from Atlas measurement to ACTS
266  // source link
267  if (trackSourceLinks.empty()) {
269  "input contain measurement but no source link created, probable issue "
270  "with the converter, reject fit ");
271  return track;
272  }
273 
274  const auto& initialParams =
275  m_ATLASConverterTool->trkTrackParametersToActsParameters(
276  (*inputTrack.perigeeParameters()), tgContext);
277 
278  // The covariance from already fitted track are too small and would result an
279  // incorrect smoothing. We scale up the input covariance to avoid this.
280  Acts::BoundSquareMatrix scaledCov = Acts::BoundSquareMatrix::Identity();
281  for (int i = 0; i < 6; ++i) {
283  (scaledCov)(i, i) = scale * initialParams.covariance().value()(i, i);
284  }
285 
286  // @TODO: Synchronize with prtHypothesis
288 
289  const Acts::BoundTrackParameters scaledInitialParams(
290  initialParams.referenceSurface().getSharedPtr(),
291  initialParams.parameters(), scaledCov, hypothesis);
292 
294 
295  // Perform the fit
296  auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
297  scaledInitialParams, gx2fOptions, tracks);
298  if (result.ok()) {
299  track = makeTrack(ctx, tgContext, tracks, result);
300  }
301  return track;
302 }

◆ fit() [8/8]

std::unique_ptr< Trk::Track > ActsTrk::GlobalChiSquareFitterTool::fit ( const EventContext &  ctx,
const Trk::Track intrk1,
const Trk::Track intrk2,
const Trk::RunOutlierRemoval  runOutlier = false,
const Trk::ParticleHypothesis  matEffects = Trk::nonInteracting 
) const
overridevirtual

combined track fit

Definition at line 568 of file GlobalChiSquareFitterTool.cxx.

571  {
572  ATH_MSG_VERBOSE("--> enter GlobalChiSquareFitterTool::fit(Track,Track,)");
573  ATH_MSG_VERBOSE(" with Tracks from #1 = " << intrk1.info().dumpInfo()
574  << " and #2 = "
575  << intrk2.info().dumpInfo());
576 
577  // protection, if empty track2
578  if (!intrk2.measurementsOnTrack()) {
579  ATH_MSG_DEBUG("input #2 is empty try to fit track 1 alone");
580  return fit(ctx, intrk1);
581  }
582 
583  // protection, if empty track1
584  if (!intrk1.measurementsOnTrack()) {
585  ATH_MSG_DEBUG("input #1 is empty try to fit track 2 alone");
586  return fit(ctx, intrk2);
587  }
588 
589  // protection against not having track parameters on the input track
590  if (!intrk1.trackParameters() || intrk1.trackParameters()->empty()) {
592  "input #1 fails to provide track parameters for seeding the GX2F, "
593  "reject fit");
594  return nullptr;
595  }
596 
597  std::unique_ptr<Trk::Track> track = nullptr;
598 
599  // Construct a perigee surface as the target surface
600  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
601  Acts::Vector3{0., 0., 0.});
602 
603  Acts::GeometryContext tgContext =
604  m_trackingGeometryTool->getGeometryContext(ctx).context();
605  Acts::MagneticFieldContext mfContext =
606  m_extrapolationTool->getMagneticFieldContext(ctx);
607  // CalibrationContext converter not implemented yet.
608  Acts::CalibrationContext calContext = Acts::CalibrationContext();
609 
610  Acts::Experimental::Gx2FitterExtensions<ActsTrk::MutableTrackStateBackend>
611  gx2fExtensions = m_gx2fExtensions;
612 
613  Acts::PropagatorPlainOptions propagationOption(tgContext, mfContext);
614  propagationOption.maxSteps = m_option_maxPropagationStep;
615  // Set the Gx2Fitter options
616  Acts::Experimental::Gx2FitterOptions gx2fOptions(
617  tgContext, mfContext, calContext, gx2fExtensions, propagationOption,
618  &(*pSurface));
619 
620  std::vector<Acts::SourceLink> trackSourceLinks =
621  m_ATLASConverterTool->trkTrackToSourceLinks(tgContext, intrk1);
622  std::vector<Acts::SourceLink> trackSourceLinks2 =
623  m_ATLASConverterTool->trkTrackToSourceLinks(tgContext, intrk2);
624  trackSourceLinks.insert(trackSourceLinks.end(), trackSourceLinks2.begin(),
625  trackSourceLinks2.end());
626  // protection against error in the conversion from Atlas measurement to ACTS
627  // source link
628  if (trackSourceLinks.empty()) {
630  "input contain measurement but no source link created, probable issue "
631  "with the converter, reject fit ");
632  return track;
633  }
634 
635  const auto& initialParams =
636  m_ATLASConverterTool->trkTrackParametersToActsParameters(
637  *(intrk1.perigeeParameters()), tgContext);
638 
639  // The covariance from already fitted track are too small and would result an
640  // incorrect smoothing. We scale up the input covariance to avoid this.
641  Acts::BoundSquareMatrix scaledCov = Acts::BoundSquareMatrix::Identity();
642  for (int i = 0; i < 6; ++i) {
644  (scaledCov)(i, i) = scale * initialParams.covariance().value()(i, i);
645  }
646 
647  const Acts::BoundTrackParameters scaledInitialParams(
648  initialParams.referenceSurface().getSharedPtr(),
649  initialParams.parameters(), scaledCov, Acts::ParticleHypothesis::pion());
650 
652  // Perform the fit
653  auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
654  scaledInitialParams, gx2fOptions, tracks);
655  if (result.ok()) {
656  track = makeTrack(ctx, tgContext, tracks, result);
657  }
658  return track;
659 }

◆ initialize()

StatusCode ActsTrk::GlobalChiSquareFitterTool::initialize ( )
overridevirtual

Definition at line 165 of file GlobalChiSquareFitterTool.cxx.

165  {
166 
167  ATH_MSG_DEBUG(name() << "::" << __FUNCTION__);
168  ATH_CHECK(m_trackingGeometryTool.retrieve());
169  ATH_CHECK(m_extrapolationTool.retrieve());
170  ATH_CHECK(m_ATLASConverterTool.retrieve());
171  ATH_CHECK(m_trkSummaryTool.retrieve());
172  if (m_doReFitFromPRD) {
173  ATH_CHECK(m_ROTcreator.retrieve());
174  ATH_CHECK(m_broadROTcreator.retrieve());
175  }
176 
177  m_logger = makeActsAthenaLogger(this, "Gx2fRefit");
178 
179  auto field = std::make_shared<ATLASMagneticFieldWrapper>();
180 
181  // Fitter
182  Acts::SympyStepper stepper(field);
183  Acts::Navigator navigator(
184  Acts::Navigator::Config{m_trackingGeometryTool->trackingGeometry()},
185  logger().cloneWithSuffix("Navigator"));
186  Acts::Propagator<Acts::SympyStepper, Acts::Navigator> propagator(
187  stepper, std::move(navigator), logger().cloneWithSuffix("Prop"));
188 
189  m_fitter = std::make_unique<Fitter>(
190  std::move(propagator), logger().cloneWithSuffix("GlobalChiSquareFitter"));
191 
192  m_calibrator = std::make_unique<ActsTrk::detail::TrkMeasurementCalibrator>(
195 
196  m_gx2fExtensions.outlierFinder
197  .connect<&ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder::
199  m_gx2fExtensions.updater
202  m_gx2fExtensions.calibrator
205 
206  return StatusCode::SUCCESS;
207 }

◆ logger()

const Acts::Logger& ActsTrk::GlobalChiSquareFitterTool::logger ( ) const
inlineprivate

Private access to the logger.

Definition at line 207 of file GlobalChiSquareFitterTool.h.

207 { return *m_logger; }

◆ makeTrack()

std::unique_ptr< Trk::Track > ActsTrk::GlobalChiSquareFitterTool::makeTrack ( const EventContext &  ctx,
Acts::GeometryContext &  tgContext,
ActsTrk::MutableTrackContainer tracks,
Acts::Result< ActsTrk::MutableTrackContainer::TrackProxy, std::error_code > &  fitResult,
bool  SourceLinkType = false 
) const
private

Definition at line 661 of file GlobalChiSquareFitterTool.cxx.

666  {
667 
668  if (not fitResult.ok()) {
669  return nullptr;
670  }
671 
672  std::unique_ptr<Trk::Track> newtrack = nullptr;
673 
674  // Get the fit output object
675  const auto& acts_track = fitResult.value();
676  auto finalTrajectory = std::make_unique<Trk::TrackStates>();
677 
678  // initialise the number of dead Pixel and ACTS strip
679  int numberOfDeadPixel = 0;
680  int numberOfDeadSCT = 0;
681 
682  std::vector<std::unique_ptr<const Acts::BoundTrackParameters>>
683  actsSmoothedParam;
684  // Loop over all the output state to create track state
685  tracks.trackStateContainer().visitBackwards(
686  acts_track.tipIndex(), [&](const auto& state) -> void {
687  // First only consider states with an associated detector element not in
688  // the TRT
689  auto flag = state.typeFlags();
690  const auto* associatedDetEl =
691  state.referenceSurface().associatedDetectorElement();
692  if (not associatedDetEl) {
693  return;
694  }
695 
696  const auto* actsElement =
697  dynamic_cast<const ActsDetectorElement*>(associatedDetEl);
698  if (not actsElement) {
699  return;
700  }
701 
702  const auto* upstreamDetEl = actsElement->upstreamDetectorElement();
703  if (not upstreamDetEl) {
704  return;
705  }
706 
707  // ATH_MSG_VERBOSE("Try casting to TRT for if");
708  // if (dynamic_cast<const
709  // InDetDD::TRT_BaseElement*>(upstreamDetEl)) { return; }
710 
711  const auto* trkDetElem =
712  dynamic_cast<const Trk::TrkDetElementBase*>(upstreamDetEl);
713  if (not trkDetElem) {
714  return;
715  }
716 
718  "trkDetElem type: "
719  << static_cast<std::underlying_type_t<Trk::DetectorElemType>>(
720  trkDetElem->detectorType()));
721 
722  ATH_MSG_VERBOSE("Try casting to SiDetectorElement");
723  const auto* detElem =
724  dynamic_cast<const InDetDD::SiDetectorElement*>(upstreamDetEl);
725  if (not detElem) {
726  return;
727  }
728  ATH_MSG_VERBOSE("detElem = " << detElem);
729 
730  // We need to determine the type of state
731  std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes>
732  typePattern;
733  std::unique_ptr<Trk::TrackParameters> parm;
734 
735  // State is a hole (no associated measurement), use predicted parameters
736  if (flag.test(Acts::TrackStateFlag::HoleFlag)) {
737  ATH_MSG_VERBOSE("State is a hole (no associated measurement)");
738  const Acts::BoundTrackParameters actsParam(
739  state.referenceSurface().getSharedPtr(), state.smoothed(),
740  state.smoothedCovariance(), acts_track.particleHypothesis());
741  parm = m_ATLASConverterTool->actsTrackParametersToTrkParameters(
742  actsParam, tgContext);
743  auto boundaryCheck = m_boundaryCheckTool->boundaryCheck(*parm);
744  // Check if this is a hole, a dead sensors or a state outside the
745  // sensor boundary
747  "Check if this is a hole, a dead sensors or a state outside the "
748  "sensor boundary");
749  if (boundaryCheck == Trk::BoundaryCheckResult::DeadElement) {
750  if (detElem->isPixel()) {
751  ++numberOfDeadPixel;
752  } else if (detElem->isSCT()) {
753  ++numberOfDeadSCT;
754  }
755  // Dead sensors states are not stored
756  return;
757  } else if (boundaryCheck != Trk::BoundaryCheckResult::Candidate) {
758  // States outside the sensor boundary are ignored
759  return;
760  }
761  typePattern.set(Trk::TrackStateOnSurface::Hole);
762  } else if (flag.test(Acts::TrackStateFlag::OutlierFlag)) {
763  ATH_MSG_VERBOSE("The state was tagged as an outlier");
764  const Acts::BoundTrackParameters actsParam(
765  state.referenceSurface().getSharedPtr(), state.smoothed(),
766  state.smoothedCovariance(), acts_track.particleHypothesis());
767  parm = m_ATLASConverterTool->actsTrackParametersToTrkParameters(
768  actsParam, tgContext);
769  typePattern.set(Trk::TrackStateOnSurface::Outlier);
770  } else {
771  ATH_MSG_VERBOSE("The state is a measurement state");
772 
773  const Acts::BoundTrackParameters actsParam(
774  state.referenceSurface().getSharedPtr(), state.smoothed(),
775  state.smoothedCovariance(), acts_track.particleHypothesis());
776 
777  actsSmoothedParam.push_back(
778  std::make_unique<const Acts::BoundTrackParameters>(
779  Acts::BoundTrackParameters(actsParam)));
780  parm = m_ATLASConverterTool->actsTrackParametersToTrkParameters(
781  actsParam, tgContext);
782  typePattern.set(Trk::TrackStateOnSurface::Measurement);
783  }
784 
785  std::unique_ptr<Trk::MeasurementBase> measState;
786  if (state.hasUncalibratedSourceLink() && !SourceLinkType) {
787  auto sl =
788  state.getUncalibratedSourceLink().template get<ATLASSourceLink>();
789  assert(sl);
790  measState = sl->uniqueClone();
791  } else if (state.hasUncalibratedSourceLink() && SourceLinkType) {
792  // If the SourceLink is of type PRDSourceLinkGX2F, we need to create
793  // the RIO_OnTrack here.
794  auto sl = state.getUncalibratedSourceLink()
795  .template get<PRDSourceLinkGX2F>()
796  .prd;
797 
798  // ROT creation
799  const IdentifierHash idHash = sl->detectorElement()->identifyHash();
800  int dim = state.calibratedSize();
801  std::unique_ptr<Trk::RIO_OnTrack> rot;
802  if (dim == 1) {
803  const InDet::SCT_Cluster* sct_Cluster =
804  dynamic_cast<const InDet::SCT_Cluster*>(sl);
805  if (!sct_Cluster) {
806  ATH_MSG_ERROR("ERROR could not cast PRD to SCT_Cluster");
807  return;
808  }
809  rot = std::make_unique<InDet::SCT_ClusterOnTrack>(
810  sct_Cluster,
812  state.template calibrated<1>()[0], Trk::loc1)),
813  state.template calibratedCovariance<1>(), idHash);
814  } else if (dim == 2) {
816  dynamic_cast<const InDet::PixelCluster*>(sl);
817  if (!pixelCluster) {
818  // sometimes even with dim=2, only the SCT_Cluster implementation
819  // work for RIO_OnTrack creation
821  "Dimension is 2 but we need SCT_Cluster for this "
822  "measurement");
823  const InDet::SCT_Cluster* sct_Cluster =
824  dynamic_cast<const InDet::SCT_Cluster*>(sl);
825  rot = std::make_unique<InDet::SCT_ClusterOnTrack>(
826  sct_Cluster,
828  state.template calibrated<1>()[0], Trk::loc1)),
829  state.template calibratedCovariance<1>(), idHash);
830  } else {
831  rot = std::make_unique<InDet::PixelClusterOnTrack>(
832  pixelCluster,
833  Trk::LocalParameters(state.template calibrated<2>()),
834  state.template calibratedCovariance<2>(), idHash);
835  }
836  } else {
837  throw std::domain_error("Cannot handle measurement dim>2");
838  }
839  measState = rot->uniqueClone();
840  }
841 
842  double nDoF = state.calibratedSize();
843  auto quality = Trk::FitQualityOnSurface(state.chi2(), nDoF);
844  const Trk::TrackStateOnSurface* perState =
845  new Trk::TrackStateOnSurface(quality, std::move(measState),
846  std::move(parm), nullptr, typePattern);
847  // If a state was successfully created add it to the trajectory
848  if (perState) {
850  "State successfully created, adding it to the trajectory");
851  finalTrajectory->insert(finalTrajectory->begin(), perState);
852  }
853  });
854 
855  // Convert the perigee state and add it to the trajectory
856  const Acts::BoundTrackParameters actsPer(
857  acts_track.referenceSurface().getSharedPtr(), acts_track.parameters(),
858  acts_track.covariance(), acts_track.particleHypothesis());
859  std::unique_ptr<Trk::TrackParameters> per =
860  m_ATLASConverterTool->actsTrackParametersToTrkParameters(actsPer,
861  tgContext);
862  std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes>
863  typePattern;
864  typePattern.set(Trk::TrackStateOnSurface::Perigee);
866  nullptr, std::move(per), nullptr, typePattern);
867  if (perState) {
868  finalTrajectory->insert(finalTrajectory->begin(), perState);
869  }
870 
871  // Create the track using the states
874  // Mark the fitter as GlobalChi2Fitter
875  newInfo.setTrackFitter(Trk::TrackInfo::TrackFitter::GlobalChi2Fitter);
876  newtrack = std::make_unique<Trk::Track>(newInfo, std::move(finalTrajectory),
877  nullptr);
878  if (newtrack) {
879  // Create the track summary and update the holes information
880  if (!newtrack->trackSummary()) {
881  newtrack->setTrackSummary(std::make_unique<Trk::TrackSummary>());
883  newtrack->trackSummary()->update(Trk::numberOfSCTHoles, 0);
884  newtrack->trackSummary()->update(Trk::numberOfTRTHoles, 0);
886  numberOfDeadPixel);
888  numberOfDeadSCT);
889  }
890  m_trkSummaryTool->updateTrackSummary(ctx, *newtrack, true);
891  }
892  return newtrack;
893 }

Member Data Documentation

◆ m_ATLASConverterTool

ToolHandle<ActsTrk::IActsToTrkConverterTool> ActsTrk::GlobalChiSquareFitterTool::m_ATLASConverterTool
private
Initial value:
{
this, "ATLASConverterTool", ""}

Definition at line 174 of file GlobalChiSquareFitterTool.h.

◆ m_boundaryCheckTool

ToolHandle<Trk::IBoundaryCheckTool> ActsTrk::GlobalChiSquareFitterTool::m_boundaryCheckTool
private
Initial value:
{
this, "BoundaryCheckTool", "",
"Boundary checking tool for detector sensitivities"}

Definition at line 178 of file GlobalChiSquareFitterTool.h.

◆ m_broadROTcreator

ToolHandle<Trk::IRIO_OnTrackCreator> ActsTrk::GlobalChiSquareFitterTool::m_broadROTcreator
private
Initial value:
{
this, "BroadRotCreatorTool", ""}

Definition at line 212 of file GlobalChiSquareFitterTool.h.

◆ m_calibrator

std::unique_ptr<ActsTrk::detail::TrkMeasurementCalibrator> ActsTrk::GlobalChiSquareFitterTool::m_calibrator
private
Initial value:
{
nullptr}

Definition at line 192 of file GlobalChiSquareFitterTool.h.

◆ m_doReFitFromPRD

Gaudi::Property<bool> ActsTrk::GlobalChiSquareFitterTool::m_doReFitFromPRD
private
Initial value:
{this, "DoReFitFromPRD", false,
"Do Refit From PRD instead of ROT"}

Definition at line 216 of file GlobalChiSquareFitterTool.h.

◆ m_extrapolationTool

ToolHandle<IActsExtrapolationTool> ActsTrk::GlobalChiSquareFitterTool::m_extrapolationTool
private
Initial value:
{
this, "ExtrapolationTool", ""}

Definition at line 170 of file GlobalChiSquareFitterTool.h.

◆ m_fitter

std::unique_ptr<Fitter> ActsTrk::GlobalChiSquareFitterTool::m_fitter {nullptr}
private

Definition at line 199 of file GlobalChiSquareFitterTool.h.

◆ m_gx2fExtensions

Acts::Experimental::Gx2FitterExtensions<ActsTrk::MutableTrackStateBackend> ActsTrk::GlobalChiSquareFitterTool::m_gx2fExtensions
private

Definition at line 202 of file GlobalChiSquareFitterTool.h.

◆ m_logger

std::unique_ptr<const Acts::Logger> ActsTrk::GlobalChiSquareFitterTool::m_logger
private

logging instance

Definition at line 210 of file GlobalChiSquareFitterTool.h.

◆ m_option_maxPropagationStep

Gaudi::Property<int> ActsTrk::GlobalChiSquareFitterTool::m_option_maxPropagationStep
private
Initial value:
{
this, "MaxPropagationStep", 5000,
"Maximum number of steps for one propagate call"}

Definition at line 185 of file GlobalChiSquareFitterTool.h.

◆ m_option_outlierChi2Cut

Gaudi::Property<double> ActsTrk::GlobalChiSquareFitterTool::m_option_outlierChi2Cut
private
Initial value:
{
this, "OutlierChi2Cut", 12.5, "Chi2 cut used by the outlier finder"}

Definition at line 183 of file GlobalChiSquareFitterTool.h.

◆ m_option_seedCovarianceScale

Gaudi::Property<double> ActsTrk::GlobalChiSquareFitterTool::m_option_seedCovarianceScale
private
Initial value:
{
this, "SeedCovarianceScale", 100.,
"Scale factor for the input seed covariance when doing refitting"}

Definition at line 188 of file GlobalChiSquareFitterTool.h.

◆ m_outlierFinder

ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder ActsTrk::GlobalChiSquareFitterTool::m_outlierFinder {0}
private

Definition at line 204 of file GlobalChiSquareFitterTool.h.

◆ m_ROTcreator

ToolHandle<Trk::IRIO_OnTrackCreator> ActsTrk::GlobalChiSquareFitterTool::m_ROTcreator {this, "RotCreatorTool", ""}
private

Definition at line 214 of file GlobalChiSquareFitterTool.h.

◆ m_trackingGeometryTool

ToolHandle<IActsTrackingGeometryTool> ActsTrk::GlobalChiSquareFitterTool::m_trackingGeometryTool
private
Initial value:
{
this, "TrackingGeometryTool", ""}

Definition at line 172 of file GlobalChiSquareFitterTool.h.

◆ m_trkSummaryTool

ToolHandle<Trk::IExtendedTrackSummaryTool> ActsTrk::GlobalChiSquareFitterTool::m_trkSummaryTool
private
Initial value:
{
this, "SummaryTool", "", "ToolHandle for track summary tool"}

Definition at line 176 of file GlobalChiSquareFitterTool.h.


The documentation for this class was generated from the following files:
Trk::RIO_OnTrack::uniqueClone
std::unique_ptr< RIO_OnTrack > uniqueClone() const
NVI clone returning unique_ptr.
Definition: RIO_OnTrack.h:97
Trk::noHypothesis
@ noHypothesis
Definition: ParticleHypothesis.h:37
Trk::LocalParameters
Definition: LocalParameters.h:98
Trk::TrackInfo
Contains information about the 'fitter' of this track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:32
Trk::TrackStateOnSurface::Perigee
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
Definition: TrackStateOnSurface.h:117
ActsTrk::GlobalChiSquareFitterTool::m_doReFitFromPRD
Gaudi::Property< bool > m_doReFitFromPRD
Definition: GlobalChiSquareFitterTool.h:216
ActsTrk::PRDSourceLinkCalibratorGX2F::calibrate
void calibrate(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &sl, typename trajectory_t::TrackStateProxy trackState) const
The following is the implementation of the PRDSourceLinkCalibratorGX2F.
Definition: GlobalChiSquareFitterTool.cxx:57
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
get_generator_info.result
result
Definition: get_generator_info.py:21
Trk::BoundaryCheckResult::DeadElement
@ DeadElement
outside the element
ActsTrk::detail::FitterHelperFunctions::gainMatrixUpdate
Acts::Result< void > gainMatrixUpdate(const Acts::GeometryContext &gctx, typename trajectory_t::TrackStateProxy trackState, const Acts::Logger &logger)
Definition: FitterHelperFunctions.h:23
ActsTrk::GlobalChiSquareFitterTool::m_extrapolationTool
ToolHandle< IActsExtrapolationTool > m_extrapolationTool
Definition: GlobalChiSquareFitterTool.h:170
ActsTrk::detail::Navigator
Acts::Navigator Navigator
Definition: Tracking/Acts/ActsTrackReconstruction/src/detail/Definitions.h:31
Trk::numberOfSCTDeadSensors
@ numberOfSCTDeadSensors
number of TRT hits
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:76
Trk::Track::info
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
Trk::BoundaryCheckResult::Candidate
@ Candidate
skel.it
it
Definition: skel.GENtoEVGEN.py:396
ActsTrk::GlobalChiSquareFitterTool::m_logger
std::unique_ptr< const Acts::Logger > m_logger
logging instance
Definition: GlobalChiSquareFitterTool.h:210
xAOD::pion
@ pion
Definition: TrackingPrimitives.h:196
xAOD::SpacePoint_v1
Definition: SpacePoint_v1.h:29
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
ActsTrk::GlobalChiSquareFitterTool::logger
const Acts::Logger & logger() const
Private access to the logger.
Definition: GlobalChiSquareFitterTool.h:207
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::GlobalChi2Fitter
@ GlobalChi2Fitter
Track's from Thijs' global chi^2 fitter or the ACTS implementation.
Definition: TrackingPrimitives.h:51
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
ActsTrk::GlobalChiSquareFitterTool::fit
virtual std::unique_ptr< Trk::Track > fit(const EventContext &ctx, const Trk::Track &, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
refit a track
Definition: GlobalChiSquareFitterTool.cxx:211
Trk::numberOfSCTHoles
@ numberOfSCTHoles
number of Holes in both sides of a SCT module
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:73
Trk::numberOfTRTHoles
@ numberOfTRTHoles
number of TRT hits which pass the high threshold (only xenon counted) total number of TRT hits which ...
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:83
Trk::TrackSummary::update
bool update(Trk::SummaryType type, int new_value)
Update unset summary information.
ActsTrk::GlobalChiSquareFitterTool::m_option_outlierChi2Cut
Gaudi::Property< double > m_option_outlierChi2Cut
Definition: GlobalChiSquareFitterTool.h:183
Trk::DefinedParameter
std::pair< double, ParamDefs > DefinedParameter
Definition: DefinedParameter.h:27
ActsTrk::getSurfaceOfMeasurement
const Acts::Surface * getSurfaceOfMeasurement(const Acts::TrackingGeometry &tracking_geometry, const DetectorElementToActsGeometryIdMap &detector_element_to_geoid, const xAOD::UncalibratedMeasurement &measurement)
Definition: SurfaceOfMeasurementUtil.h:13
ActsTrk::detail::TrkMeasurementCalibrator::calibrate
void calibrate([[maybe_unused]] const Acts::GeometryContext &gctx, [[maybe_unused]] const Acts::CalibrationContext &cctx, const Acts::SourceLink &sl, typename Acts::MultiTrajectory< trajectory_t >::TrackStateProxy trackState) const
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
makeActsAthenaLogger
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
Definition: Tracking/Acts/ActsInterop/src/Logger.cxx:64
Trk::FitQualityOnSurface
Definition: FitQualityOnSurface.h:19
ActsTrk::MutableMultiTrajectory
Athena implementation of ACTS::MultiTrajectory (ReadWrite version) The data is stored in 4 external b...
Definition: MultiTrajectory.h:81
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
ActsTrk::makeATLASUncalibSourceLink
ATLASUncalibSourceLink makeATLASUncalibSourceLink(const xAOD::UncalibratedMeasurementContainer *container, std::size_t index, [[maybe_unused]] const EventContext &ctx)
Definition: ATLASSourceLink.h:30
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ActsTrk::GlobalChiSquareFitterTool::m_boundaryCheckTool
ToolHandle< Trk::IBoundaryCheckTool > m_boundaryCheckTool
Definition: GlobalChiSquareFitterTool.h:178
Trk::TrackStateOnSurface::Hole
@ Hole
A hole on the track - this is defined in the following way.
Definition: TrackStateOnSurface.h:128
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
ActsTrk::GlobalChiSquareFitterTool::m_trackingGeometryTool
ToolHandle< IActsTrackingGeometryTool > m_trackingGeometryTool
Definition: GlobalChiSquareFitterTool.h:172
Trk::MeasurementBase::uniqueClone
std::unique_ptr< MeasurementBase > uniqueClone() const
NVI Clone giving up unique pointer.
Definition: MeasurementBase.h:77
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Trk::numberOfPixelDeadSensors
@ numberOfPixelDeadSensors
number of pixel hits with broad errors (width/sqrt(12))
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:65
ActsTrk::GlobalChiSquareFitterTool::m_calibrator
std::unique_ptr< ActsTrk::detail::TrkMeasurementCalibrator > m_calibrator
Definition: GlobalChiSquareFitterTool.h:192
master.flag
bool flag
Definition: master.py:29
ActsTrk::GlobalChiSquareFitterTool::m_ATLASConverterTool
ToolHandle< ActsTrk::IActsToTrkConverterTool > m_ATLASConverterTool
Definition: GlobalChiSquareFitterTool.h:174
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ActsDetectorElement
Definition: ActsDetectorElement.h:42
ActsTrk::GlobalChiSquareFitterTool::makeTrack
std::unique_ptr< Trk::Track > makeTrack(const EventContext &ctx, Acts::GeometryContext &tgContext, ActsTrk::MutableTrackContainer &tracks, Acts::Result< ActsTrk::MutableTrackContainer::TrackProxy, std::error_code > &fitResult, bool SourceLinkType=false) const
Definition: GlobalChiSquareFitterTool.cxx:661
InDet::SCT_Cluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_Cluster.h:34
ActsTrk::GlobalChiSquareFitterTool::m_gx2fExtensions
Acts::Experimental::Gx2FitterExtensions< ActsTrk::MutableTrackStateBackend > m_gx2fExtensions
Definition: GlobalChiSquareFitterTool.h:202
Trk::numberOfPixelHoles
@ numberOfPixelHoles
number of pixels which have a ganged ambiguity.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:59
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk::Track::trackParameters
const DataVector< const TrackParameters > * trackParameters() const
Return a pointer to a vector of TrackParameters.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:97
Trk::Track::perigeeParameters
const Perigee * perigeeParameters() const
return Perigee.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:163
ActsTrk::GlobalChiSquareFitterTool::m_ROTcreator
ToolHandle< Trk::IRIO_OnTrackCreator > m_ROTcreator
Definition: GlobalChiSquareFitterTool.h:214
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Trk::TrackInfo::dumpInfo
std::string dumpInfo() const
Returns a string with the name of the fitter of this track (i.e.
Definition: Tracking/TrkEvent/TrkTrack/src/TrackInfo.cxx:45
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
xAOD::ParticleHypothesis
ParticleHypothesis
Definition: TrackingPrimitives.h:192
ActsTrk::GlobalChiSquareFitterTool::m_option_seedCovarianceScale
Gaudi::Property< double > m_option_seedCovarianceScale
Definition: GlobalChiSquareFitterTool.h:188
InDet::PixelCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:49
Trk::Track::measurementsOnTrack
const DataVector< const MeasurementBase > * measurementsOnTrack() const
return a pointer to a vector of MeasurementBase (NOT including any that come from outliers).
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:178
Trk::pixelCluster
@ pixelCluster
Definition: MeasurementType.h:22
ActsTrk::GlobalChiSquareFitterTool::m_broadROTcreator
ToolHandle< Trk::IRIO_OnTrackCreator > m_broadROTcreator
Definition: GlobalChiSquareFitterTool.h:212
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::Track::trackSummary
const Trk::TrackSummary * trackSummary() const
Returns a pointer to the const Trk::TrackSummary owned by this const track (could be nullptr)
ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder::StateChiSquaredPerNumberDoFCut
double StateChiSquaredPerNumberDoFCut
Definition: FitterHelperFunctions.h:50
ActsTrk::GlobalChiSquareFitterTool::m_fitter
std::unique_ptr< Fitter > m_fitter
Definition: GlobalChiSquareFitterTool.h:199
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
Trk::Track::setTrackSummary
void setTrackSummary(std::unique_ptr< Trk::TrackSummary > input)
Set the track summary.
ActsTrk::GlobalChiSquareFitterTool::m_trkSummaryTool
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trkSummaryTool
Definition: GlobalChiSquareFitterTool.h:176
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
ActsTrk::GlobalChiSquareFitterTool::m_outlierFinder
ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder m_outlierFinder
Definition: GlobalChiSquareFitterTool.h:204
Trk::loc1
@ loc1
Definition: ParamDefs.h:34
ActsTrk::MutableTrackContainer
Definition: TrackContainer.h:122
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
ActsTrk::GlobalChiSquareFitterTool::m_option_maxPropagationStep
Gaudi::Property< int > m_option_maxPropagationStep
Definition: GlobalChiSquareFitterTool.h:185