ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Trk::GaussianSumFitter Class Referencefinal

#include <GaussianSumFitter.h>

Inheritance diagram for Trk::GaussianSumFitter:
Collaboration diagram for Trk::GaussianSumFitter:

Public Types

using GSFTrajectory = std::vector< GSFTsos >
 

Public Member Functions

 GaussianSumFitter (const std::string &, const std::string &, const IInterface *)
 Constructor with parameters to be passed to AlgTool. More...
 
virtual ~GaussianSumFitter ()=default
 Virtual destructor. More...
 
virtual StatusCode initialize () override final
 AlgTool initialise method. More...
 
virtual std::unique_ptr< Trackfit (const EventContext &ctx, const Track &, const RunOutlierRemoval, const ParticleHypothesis particleHypothesis=nonInteracting) const override final
 Refit a track using the Gaussian Sum Filter. More...
 
virtual std::unique_ptr< Trackfit (const EventContext &ctx, const PrepRawDataSet &, const TrackParameters &, const RunOutlierRemoval, const ParticleHypothesis particleHypothesis=nonInteracting) const override final
 Fit a collection of 'PrepRawData' objects using the Gaussian Sum Filter. More...
 
virtual std::unique_ptr< Trackfit (const EventContext &ctx, const MeasurementSet &, const TrackParameters &, const RunOutlierRemoval, const ParticleHypothesis particleHypothesis=nonInteracting) const override final
 Fit a collection of 'RIO_OnTrack' objects using the Gaussian Sum Filter. More...
 
virtual std::unique_ptr< Trackfit (const EventContext &ctx, const Track &, const PrepRawDataSet &, const RunOutlierRemoval, const ParticleHypothesis matEffects=nonInteracting) const override final
 Refit a track adding a PrepRawDataSet. More...
 
virtual std::unique_ptr< Trackfit (const EventContext &ctx, const Track &, const MeasurementSet &, const RunOutlierRemoval, const ParticleHypothesis matEffects=nonInteracting) const override final
 Refit a track adding a measurement base set. More...
 
virtual std::unique_ptr< Trackfit (const EventContext &ctx, const Track &, const Track &, const RunOutlierRemoval, const ParticleHypothesis matEffects=nonInteracting) const override final
 Combine two tracks by refitting. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

std::unique_ptr< MultiComponentStateOnSurfaceDVconvertTrajToTrack (GSFTrajectory &trajectory) const
 
GSFTsos makePerigee (const EventContext &ctx, Trk::IMultiStateExtrapolator::Cache &, const GSFTrajectory &smoothedTrajectory, const ParticleHypothesis particleHypothesis=nonInteracting) const
 Produces a perigee from a smoothed trajectory. More...
 
bool stepForwardFit (const EventContext &ctx, IMultiStateExtrapolator::Cache &, GSFTrajectory &forwardTrajectory, const PrepRawData *originalPrepRawData, const MeasurementBase *originalMeasurement, const Surface &surface, MultiComponentState &updatedState, const ParticleHypothesis particleHypothesis=nonInteracting) const
 Progress one step along the fit. More...
 
GSFTrajectory forwardPRDfit (const EventContext &ctx, IMultiStateExtrapolator::Cache &cache, const PrepRawDataSet &inputPrepRawDataSet, const TrackParameters &estimatedTrackParametersNearOrigin, const ParticleHypothesis particleHypothesis=nonInteracting) const
 Forward GSF fit using PrepRawData. More...
 
GSFTrajectory forwardMeasurementFit (const EventContext &ctx, IMultiStateExtrapolator::Cache &cache, const MeasurementSet &inputMeasurementSet, const TrackParameters &estimatedTrackParametersNearOrigin, const ParticleHypothesis particleHypothesis=nonInteracting) const
 Forward GSF fit using MeasurementSet. More...
 
GSFTrajectory smootherFit (const EventContext &ctx, Trk::IMultiStateExtrapolator::Cache &, GSFTrajectory &forwardTrajectory, const ParticleHypothesis particleHypothesis=nonInteracting, const CaloCluster_OnTrack *ccot=nullptr) const
 Gsf smoothed trajectory. More...
 
MultiComponentState addCCOT (const EventContext &ctx, const Trk::CaloCluster_OnTrack *ccot, GSFTrajectory &smoothedTrajectory) const
 Methof to add the CaloCluster onto the track. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ToolHandle< IMultiStateExtrapolatorm_extrapolator
 
ToolHandle< IRIO_OnTrackCreatorm_rioOnTrackCreator
 
Gaudi::Property< unsigned int > m_maximumNumberOfComponents
 
Gaudi::Property< bool > m_reintegrateOutliers
 
Gaudi::Property< bool > m_refitOnMeasurementBase
 
Gaudi::Property< bool > m_combineWithFitter
 
Gaudi::Property< bool > m_useMode
 
Gaudi::Property< bool > m_slimTransientMTSOS
 
Gaudi::Property< double > m_cutChiSquaredPerNumberDOF
 
PropDirection m_directionToPerigee
 
TrkParametersComparisonFunction m_trkParametersComparisonFunction
 
std::vector< double > m_sortingReferencePoint
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 42 of file TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h.

Member Typedef Documentation

◆ GSFTrajectory

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ GaussianSumFitter()

Trk::GaussianSumFitter::GaussianSumFitter ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Constructor with parameters to be passed to AlgTool.

Definition at line 91 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

97  , m_sortingReferencePoint{ 0, 0, 0 }
98 {
99  declareInterface<ITrackFitter>(this);
100  declareProperty("SortingReferencePoint", m_sortingReferencePoint);
101 }

◆ ~GaussianSumFitter()

virtual Trk::GaussianSumFitter::~GaussianSumFitter ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ addCCOT()

Trk::MultiComponentState Trk::GaussianSumFitter::addCCOT ( const EventContext &  ctx,
const Trk::CaloCluster_OnTrack ccot,
GSFTrajectory smoothedTrajectory 
) const
private

Methof to add the CaloCluster onto the track.

Definition at line 1022 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

1026 {
1027  const GSFTsos& currentMultiStateOS = smoothedTrajectory.back();
1028  if (!ccot) {
1029  return {};
1030  }
1031  const auto& currentMultiComponentState = currentMultiStateOS.multiComponentState;
1032  const Trk::MeasurementBase* measurement = currentMultiStateOS.measurementOnTrack.get();
1033  const Trk::Surface* currentSurface(nullptr);
1034  if (measurement) {
1035  currentSurface = &(measurement->associatedSurface());
1036  }
1037  Trk::MultiComponentState extrapolatedState{};
1038  // Extrapolate to the Calo to get prediction
1039  if (currentSurface) {
1040  extrapolatedState =
1041  m_extrapolator->extrapolateDirectly(ctx,
1042  currentMultiComponentState,
1043  ccot->associatedSurface(),
1045  false,
1047  }
1048  if (extrapolatedState.empty()) {
1049  return {};
1050  }
1051  // Update newly extrapolated state with measurement
1054  std::move(extrapolatedState), *ccot, fitQuality);
1055  if (updatedState.empty()) {
1056  return {};
1057  }
1058 
1059  // Extrapolate back to the surface nearest the origin
1060  extrapolatedState = m_extrapolator->extrapolateDirectly(ctx,
1061  updatedState,
1062  *currentSurface,
1064  false,
1066  if (extrapolatedState.empty()) {
1067  return {};
1068  }
1069 
1070  // Build TSOS with CCOT at the surface of calo
1071  // updated state not used after this point
1072  smoothedTrajectory.emplace_back(
1073  fitQuality,
1074  std::unique_ptr<Trk::CaloCluster_OnTrack>(ccot->clone()),
1075  nullptr,
1076  std::move(updatedState));
1077 
1078  // Now build a dummy measurement .... we dont want to a double count the
1079  // measurement but we need to extrapolate back to origin to allow for the
1080  // perigee parameters to be estimated.
1081  // Note this only important if the track is
1082  // refit otherwise it has no influence.
1084  covMatrix.setZero();
1085  covMatrix(0, 0) = 1e6;
1086 
1088  Trk::LocalParameters locpars(locX);
1089 
1091  std::move(locpars), std::move(covMatrix), *currentSurface);
1092 
1093  // Combine the state and find the mode of the distribution
1094  std::unique_ptr<Trk::TrackParameters> combinedState =
1095  MultiComponentStateCombiner::combineToSingle(extrapolatedState, m_useMode);
1096  auto combinedFitQuality =
1097  Trk::GsfMeasurementUpdator::fitQuality(extrapolatedState, *ccot);
1098 
1099  // Build a TSOS using the dummy measurement and combined state
1100  smoothedTrajectory.emplace_back(
1101  combinedFitQuality,
1102  std::move(pseudoMeasurement),
1103  std::move(combinedState),
1104  MultiComponentStateHelpers::clone(extrapolatedState));
1105 
1106  return extrapolatedState;
1107 }

◆ convertTrajToTrack()

std::unique_ptr< MultiComponentStateOnSurfaceDV > Trk::GaussianSumFitter::convertTrajToTrack ( GSFTrajectory trajectory) const
private

Definition at line 530 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

531  {
532  bool slimTransientMTSOS = m_slimTransientMTSOS;
533  auto MTSOS = std::make_unique<MultiComponentStateOnSurfaceDV>();
534  MTSOS->reserve(trajectory.size());
535  for (GSFTsos& state : trajectory) {
536  MTSOS->push_back(state.convert(slimTransientMTSOS));
537  }
538  return MTSOS;
539 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ fit() [1/6]

std::unique_ptr< Trk::Track > Trk::GaussianSumFitter::fit ( const EventContext &  ctx,
const MeasurementSet measurementSet,
const TrackParameters estimatedParametersNearOrigin,
const  RunOutlierRemoval,
const ParticleHypothesis  particleHypothesis = nonInteracting 
) const
finaloverridevirtual

Fit a collection of 'RIO_OnTrack' objects using the Gaussian Sum Filter.

  • This requires that an trackParameters object be supplied also as an initial guess

Implements Trk::ITrackFitter.

Definition at line 306 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

312 {
313 
314  // Protect against empty PrepRawDataSet object
315  if (measurementSet.empty()) {
316  ATH_MSG_FATAL("MeasurementSet for fit is empty");
317  return nullptr;
318  }
319 
320  // We need to separate the possible CaloCluster on Track
321  // measurement from the rest
322  const Trk::CaloCluster_OnTrack* ccot(nullptr);
323 
324  Trk::MeasurementSet cleanedMeasurementSet;
325  cleanedMeasurementSet.reserve(measurementSet.size());
326 
327  for (const auto* meas : measurementSet) {
328  if (!meas) {
330  "There is an empty MeasurementBase object in the track! ");
331  continue;
332  }
334  ccot = static_cast<const Trk::CaloCluster_OnTrack*>(meas);
335  } else {
336  cleanedMeasurementSet.push_back(meas);
337  }
338  }
339 
340  // We need a sorted measurement set
341  Trk::MeasurementSet sortedMeasurementSet =
342  MeasurementSet(cleanedMeasurementSet);
343 
344  Trk::MeasurementBaseComparisonFunction measurementBaseComparisonFunction(
345  estimatedParametersNearOrigin.position(),
346  estimatedParametersNearOrigin.momentum());
347  sort(sortedMeasurementSet.begin(),
348  sortedMeasurementSet.end(),
349  measurementBaseComparisonFunction);
350 
351  // Create Extrapolator cache that holds material effects cache;
352  Trk::IMultiStateExtrapolator::Cache extrapolatorCache;
353 
354  // Perform GSF forwards fit
355  GSFTrajectory forwardTrajectory =
356  forwardMeasurementFit(ctx, extrapolatorCache, sortedMeasurementSet,
357  estimatedParametersNearOrigin, particleHypothesis);
358 
359  if (forwardTrajectory.empty()) {
360  return nullptr;
361  }
362 
363  // Perform GSF smoother operation
364  GSFTrajectory smoothedTrajectory = smootherFit(
365  ctx, extrapolatorCache, forwardTrajectory, particleHypothesis, ccot);
366  if (smoothedTrajectory.empty()) {
367  return nullptr;
368  }
369 
370  // fit quality
371  std::unique_ptr<FitQuality> fitQuality = buildFitQuality(smoothedTrajectory);
372  if (!fitQuality) {
373  return nullptr;
374  }
375 
376  // Create parameters at perigee if needed
377  auto perigeeMultiStateOnSurface =
378  makePerigee(ctx, extrapolatorCache, smoothedTrajectory, particleHypothesis);
379  if (!perigeeMultiStateOnSurface.multiComponentState.empty()) {
380  smoothedTrajectory.push_back(std::move(perigeeMultiStateOnSurface));
381  } else {
382  return nullptr;
383  }
384 
385  // Reverse the order of the TSOS's to make be order flow from inside to out
386  std::reverse(smoothedTrajectory.begin(), smoothedTrajectory.end());
387 
388  // Create track
390  info.setTrackProperties(TrackInfo::BremFit);
391  info.setTrackProperties(TrackInfo::BremFitSuccessful);
392  return std::make_unique<Track>(
393  info, convertTrajToTrack(smoothedTrajectory),
394  std::move(fitQuality));
395 }

◆ fit() [2/6]

std::unique_ptr< Trk::Track > Trk::GaussianSumFitter::fit ( const EventContext &  ctx,
const PrepRawDataSet prepRawDataSet,
const TrackParameters estimatedParametersNearOrigin,
const  RunOutlierRemoval,
const ParticleHypothesis  particleHypothesis = nonInteracting 
) const
finaloverridevirtual

Fit a collection of 'PrepRawData' objects using the Gaussian Sum Filter.

  • This requires that an trackParameters object be supplied also as an initial guess

Implements Trk::ITrackFitter.

Definition at line 231 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

237 {
238 
239  // Protect against empty PrepRawDataSet object
240  if (prepRawDataSet.empty()) {
241  ATH_MSG_FATAL("PrepRawData set for fit is empty");
242  return nullptr;
243  }
244 
245  // We need a sorted PrepRawDataSet
246  Trk::PrepRawDataSet sortedPrepRawDataSet = PrepRawDataSet(prepRawDataSet);
247  Trk::PrepRawDataComparisonFunction prdComparisonFunction =
249  estimatedParametersNearOrigin.position(),
250  estimatedParametersNearOrigin.momentum());
251 
252  std::sort(sortedPrepRawDataSet.begin(),
253  sortedPrepRawDataSet.end(),
254  prdComparisonFunction);
255 
256  // Create Extrapolator cache that holds material effects cache;
257  Trk::IMultiStateExtrapolator::Cache extrapolatorCache;
258  // Perform GSF forward fit
259  GSFTrajectory forwardTrajectory =
260  forwardPRDfit(ctx, extrapolatorCache, sortedPrepRawDataSet,
261  estimatedParametersNearOrigin, particleHypothesis);
262 
263  if (forwardTrajectory.empty()) {
264  return nullptr;
265  }
266  // Perform GSF smoother operation
267  GSFTrajectory smoothedTrajectory =
268  smootherFit(ctx, extrapolatorCache, forwardTrajectory, particleHypothesis);
269  if (smoothedTrajectory.empty()) {
270  return nullptr;
271  }
272 
273  // Fit quality
274  std::unique_ptr<FitQuality> fitQuality = buildFitQuality(smoothedTrajectory);
275  if (!fitQuality) {
276  return nullptr;
277  }
278 
279  // Create parameters at perigee if needed
280  auto perigeeMultiStateOnSurface =
281  makePerigee(ctx, extrapolatorCache, smoothedTrajectory, particleHypothesis);
282  if (!perigeeMultiStateOnSurface.multiComponentState.empty()) {
283  smoothedTrajectory.push_back(std::move(perigeeMultiStateOnSurface));
284  } else {
285  return nullptr;
286  }
287 
288  // Reverse the order of the TSOS's after the smoother
289  // to make be order flow from inside to out
290  std::reverse(smoothedTrajectory.begin(), smoothedTrajectory.end());
291 
292  // Create Trk::Track
294  info.setTrackProperties(TrackInfo::BremFit);
295  info.setTrackProperties(TrackInfo::BremFitSuccessful);
296  return std::make_unique<Track>(
297  info, convertTrajToTrack(smoothedTrajectory),
298  std::move(fitQuality));
299 }

◆ fit() [3/6]

std::unique_ptr< Trk::Track > Trk::GaussianSumFitter::fit ( const EventContext &  ctx,
const Track inputTrack,
const MeasurementSet measurementSet,
const RunOutlierRemoval  runOutlier,
const ParticleHypothesis  matEffects = nonInteracting 
) const
finaloverridevirtual

Refit a track adding a measurement base set.

Implements Trk::ITrackFitter.

Definition at line 433 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

438 {
439 
440  // protection, if empty MeasurementSet
441  if (measurementSet.empty()) {
443  "Client tries to add an empty MeasurementSet to the track fit.");
444  return fit(ctx, inputTrack, runOutlier, matEffects);
445  }
446  // Check that the input track has well defined parameters
447  if (inputTrack.trackParameters()->empty()) {
448  ATH_MSG_FATAL("No estimation of track parameters near origin!");
449  return nullptr;
450  }
451  // Check that the input track has associated MeasurementBase objects
452  if (inputTrack.trackStateOnSurfaces()->empty()) {
453  ATH_MSG_FATAL("Attempting to fit track to empty MeasurementBase "
454  "collection!");
455  return nullptr;
456  }
457  // Retrieve the set of track parameters closest to the reference point
458  const Trk::TrackParameters* parametersNearestReference =
459  *(std::min_element(inputTrack.trackParameters()->begin(),
460  inputTrack.trackParameters()->end(),
462 
464  inputTrack, measurementSet);
465 
466  // delegate to measurementBase fit method
467  return fit(
468  ctx, combinedMS, *parametersNearestReference, runOutlier, matEffects);
469 }

◆ fit() [4/6]

std::unique_ptr< Trk::Track > Trk::GaussianSumFitter::fit ( const EventContext &  ctx,
const Track intrk,
const PrepRawDataSet addPrdColl,
const RunOutlierRemoval  runOutlier,
const ParticleHypothesis  matEffects = nonInteracting 
) const
finaloverridevirtual

Refit a track adding a PrepRawDataSet.

Implements Trk::ITrackFitter.

Definition at line 402 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

407 {
408  // protection, if empty PrepRawDataSet
409  if (addPrdColl.empty()) {
411  "client tries to add an empty PrepRawDataSet to the track fit.");
412  return fit(ctx, intrk, runOutlier, matEffects);
413  }
414  // determine the Track Parameter which is the start of the trajectory
415  const TrackParameters* estimatedStartParameters =
416  *(std::min_element(intrk.trackParameters()->begin(),
417  intrk.trackParameters()->end(),
419 
420  // use external preparator class to prepare PRD set for fitter interface
422  intrk, addPrdColl, false, true);
423 
424  // delegate to fitting PrepRawData interface method
425  return fit(ctx, PRDColl, *estimatedStartParameters, runOutlier, matEffects);
426 }

◆ fit() [5/6]

std::unique_ptr< Trk::Track > Trk::GaussianSumFitter::fit ( const EventContext &  ctx,
const Track inputTrack,
const  RunOutlierRemoval,
const ParticleHypothesis  particleHypothesis = nonInteracting 
) const
finaloverridevirtual

Refit a track using the Gaussian Sum Filter.

Implements Trk::ITrackFitter.

Definition at line 141 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

146 {
147  // Check that the input track has well defined parameters
148  if (inputTrack.trackParameters()->empty()) {
149  ATH_MSG_FATAL("No track parameters on Track!");
150  return nullptr;
151  }
152  // Check that the input track has associated MeasurementBase objects
153  if (inputTrack.trackStateOnSurfaces()->empty()) {
154  ATH_MSG_FATAL("Empty MeasurementBase ");
155  return nullptr;
156  }
157  // Retrieve the set of track parameters closest to the reference point
158  const Trk::TrackParameters* parametersNearestReference =
159  *(std::min_element(inputTrack.trackParameters()->begin(),
160  inputTrack.trackParameters()->end(),
162 
163  // If we refit using measurement base then
164  // extract the measurements from the input track
165  // and fit them
167 
168  MeasurementSet measurementSet;
169 
170  for (const auto* tsos : *(inputTrack.trackStateOnSurfaces())) {
171 
172  if (!(tsos)) {
173  ATH_MSG_WARNING("Track contains an empty MeasurementBase object ");
174  continue;
175  }
176 
177  const MeasurementBase* meas = tsos->measurementOnTrack();
178  if (meas) {
179  if (tsos->type(TrackStateOnSurface::Measurement)) {
180  measurementSet.push_back(meas);
181  } else if (m_reintegrateOutliers &&
182  tsos->type(TrackStateOnSurface::Outlier)) {
183  measurementSet.push_back(meas);
184  }
185  }
186  }
187 
188  return fit(ctx,
189  measurementSet,
190  *parametersNearestReference,
191  outlierRemoval,
192  particleHypothesis);
193  }
194 
195  // If we refit using PrepRawData level then
196  // extract the the PrepRawData from the input track
197  // and fit them
198  PrepRawDataSet prepRawDataSet;
199 
200  for (const auto* meas : *(inputTrack.measurementsOnTrack())) {
201 
202  if (!meas) {
203  continue;
204  }
205  const Trk::RIO_OnTrack* rioOnTrack = nullptr;
206  if (meas->type(Trk::MeasurementBaseType::RIO_OnTrack)) {
207  rioOnTrack = static_cast<const Trk::RIO_OnTrack*>(meas);
208  }
209  if (!rioOnTrack) {
210  continue;
211  }
212  const PrepRawData* prepRawData = rioOnTrack->prepRawData();
213  if (!prepRawData) {
214  continue;
215  }
216  prepRawDataSet.push_back(prepRawData);
217  }
218 
219  return fit(ctx,
220  prepRawDataSet,
221  *parametersNearestReference,
222  outlierRemoval,
223  particleHypothesis);
224 }

◆ fit() [6/6]

std::unique_ptr< Trk::Track > Trk::GaussianSumFitter::fit ( const EventContext &  ctx,
const Track intrk1,
const Track intrk2,
const RunOutlierRemoval  runOutlier,
const ParticleHypothesis  matEffects = nonInteracting 
) const
finaloverridevirtual

Combine two tracks by refitting.

Implements Trk::ITrackFitter.

Definition at line 476 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

481 {
482  // Just add the hits on tracks
483  // protection against not having measurements on the input tracks
484  if (!intrk1.trackStateOnSurfaces() || !intrk2.trackStateOnSurfaces() ||
485  intrk1.trackStateOnSurfaces()->size() < 2) {
486  ATH_MSG_WARNING("called to refit empty track or track with too little "
487  "information, reject fit");
488  return nullptr;
489  }
490  if (!intrk1.trackParameters() || intrk1.trackParameters()->empty()) {
491  ATH_MSG_WARNING("input #1 fails to provide track parameters for "
492  "seeding the GXF, reject fit");
493  return nullptr;
494  }
495 
496  const TrackParameters* minPar = *(intrk1.trackParameters()->begin());
498  for (const auto* tsos : *(intrk1.trackStateOnSurfaces())) {
499  if (!(tsos->type(Trk::TrackStateOnSurface::Measurement) ||
500  tsos->type(Trk::TrackStateOnSurface::Outlier))) {
501  continue;
502  }
503 
504  if (tsos->measurementOnTrack()->type(
506  continue;
507  }
508 
509  ms.push_back(tsos->measurementOnTrack());
510  }
511 
512  for (const auto* tsos : *(intrk2.trackStateOnSurfaces())) {
513 
514  if (!(tsos->type(Trk::TrackStateOnSurface::Measurement) ||
515  tsos->type(Trk::TrackStateOnSurface::Outlier))) {
516  continue;
517  }
518 
519  if (tsos->measurementOnTrack()->type(
521  continue;
522  }
523  ms.push_back(tsos->measurementOnTrack());
524  }
525  // call measurement base interface
526  return fit(ctx, ms, *minPar, runOutlier, matEffects);
527 }

◆ forwardMeasurementFit()

Trk::GaussianSumFitter::GSFTrajectory Trk::GaussianSumFitter::forwardMeasurementFit ( const EventContext &  ctx,
IMultiStateExtrapolator::Cache cache,
const MeasurementSet inputMeasurementSet,
const TrackParameters estimatedTrackParametersNearOrigin,
const ParticleHypothesis  particleHypothesis = nonInteracting 
) const
private

Forward GSF fit using MeasurementSet.

Definition at line 669 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

675 {
676 
677  if (inputMeasurementSet.empty()) {
678  ATH_MSG_ERROR("forwardMeasurementFit: Input MeasurementSet is empty!");
679  return GSFTrajectory{};
680  }
681  // For starting guess a multicompoment state
682  // that has single component with weight 1
683  const AmgVector(5)& par = estimatedTrackParametersNearOrigin.parameters();
684  Trk::ComponentParameters componentParametersNearOrigin = {
685  estimatedTrackParametersNearOrigin.associatedSurface()
686  .createUniqueTrackParameters(par[Trk::loc1],
687  par[Trk::loc2],
688  par[Trk::phi],
689  par[Trk::theta],
690  par[Trk::qOverP],
691  std::nullopt /*no errors*/),
692  1.};
693  Trk::MultiComponentState multiComponentStateNearOrigin{};
694  multiComponentStateNearOrigin.push_back(
695  std::move(componentParametersNearOrigin));
696 
697  GSFTrajectory forwardTrajectory{};
698  forwardTrajectory.reserve(inputMeasurementSet.size());
699  for (const auto* measurement : inputMeasurementSet) {
700  // Every step the ForwardTrajectory is updated
701  bool stepIsValid = stepForwardFit(ctx,
702  extrapolatorCache,
703  forwardTrajectory,
704  nullptr,
705  measurement,
706  measurement->associatedSurface(),
707  multiComponentStateNearOrigin,
708  particleHypothesis);
709 
710  if (!stepIsValid) {
711  return GSFTrajectory{};
712  }
713  }
714  return forwardTrajectory;
715 }

◆ forwardPRDfit()

Trk::GaussianSumFitter::GSFTrajectory Trk::GaussianSumFitter::forwardPRDfit ( const EventContext &  ctx,
IMultiStateExtrapolator::Cache cache,
const PrepRawDataSet inputPrepRawDataSet,
const TrackParameters estimatedTrackParametersNearOrigin,
const ParticleHypothesis  particleHypothesis = nonInteracting 
) const
private

Forward GSF fit using PrepRawData.

Definition at line 607 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

613 {
614 
615  // Extract PrepRawDataSet into new local object and check that the PrepRawData
616  // is associated with a detector element
617  Trk::PrepRawDataSet prepRawDataSet;
618  for (const auto* rawData : inputPrepRawDataSet) {
619  if (!(rawData->detectorElement())) {
620  ATH_MSG_WARNING("PrepRawData has no Element link... disregard it");
621  } else {
622  prepRawDataSet.push_back(rawData);
623  }
624  }
625  // For starting guess a multicompoment state
626  // that has single component with weight 1
627  const AmgVector(5)& par = estimatedTrackParametersNearOrigin.parameters();
628  Trk::ComponentParameters componentParametersNearOrigin = {
629  estimatedTrackParametersNearOrigin.associatedSurface()
630  .createUniqueTrackParameters(par[Trk::loc1],
631  par[Trk::loc2],
632  par[Trk::phi],
633  par[Trk::theta],
634  par[Trk::qOverP],
635  std::nullopt /*no errors*/),
636  1.};
637 
638  Trk::MultiComponentState multiComponentStateNearOrigin{};
639  multiComponentStateNearOrigin.push_back(
640  std::move(componentParametersNearOrigin));
641 
642  // Create new trajectory
643  GSFTrajectory forwardTrajectory{};
644  forwardTrajectory.reserve(prepRawDataSet.size());
645  for (const auto* prepRawData : prepRawDataSet) {
646  // Every step the ForwardTrajectory is updated
647  bool stepIsValid = stepForwardFit(
648  ctx,
649  extrapolatorCache,
650  forwardTrajectory,
651  prepRawData,
652  nullptr,
653  prepRawData->detectorElement()->surface(prepRawData->identify()),
654  multiComponentStateNearOrigin,
655  particleHypothesis);
656 
657  if (!stepIsValid) {
658  return GSFTrajectory{};
659  }
660  }
661  return forwardTrajectory;
662 }

◆ initialize()

StatusCode Trk::GaussianSumFitter::initialize ( )
finaloverridevirtual

AlgTool initialise method.

Definition at line 104 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

105 {
106 
108  ATH_MSG_FATAL("Requested MaximumNumberOfComponents > "
110  return StatusCode::FAILURE;
111  }
112 
113  // GSF extrapolator
114  ATH_CHECK(m_extrapolator.retrieve());
115 
116  // We need a to create RIO_OnTrack (calibrated/corrected)
117  // measurements only if we start from PrePRawData.
119  ATH_CHECK(m_rioOnTrackCreator.retrieve());
120  } else {
121  m_rioOnTrackCreator.disable();
122  }
123  // Initialise the closest track parameters search algorithm
124  Amg::Vector3D referencePosition(m_sortingReferencePoint[0],
127 
129  Trk::TrkParametersComparisonFunction(referencePosition);
130 
131  return StatusCode::SUCCESS;
132 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& Trk::ITrackFitter::interfaceID ( )
inlinestaticinherited

Definition at line 45 of file ITrackFitter.h.

46  {
47  return IID_ITrackFitter;
48  }

◆ makePerigee()

GSFTsos Trk::GaussianSumFitter::makePerigee ( const EventContext &  ctx,
Trk::IMultiStateExtrapolator::Cache extrapolatorCache,
const GSFTrajectory smoothedTrajectory,
const ParticleHypothesis  particleHypothesis = nonInteracting 
) const
private

Produces a perigee from a smoothed trajectory.

Definition at line 546 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

551 {
552 
553  // Start at the end of the smoothed trajectory
554  // we should be the closest to perigee/origin.
555  const GSFTsos&
556  multiComponentStateOnSurfaceNearestOrigin = smoothedTrajectory.back();
557  const Trk::MultiComponentState* multiComponentState =
558  &(multiComponentStateOnSurfaceNearestOrigin.multiComponentState);
559 
560  // Extrapolate to perigee
561  const Trk::PerigeeSurface perigeeSurface;
562  Trk::MultiComponentState stateExtrapolatedToPerigee =
563  m_extrapolator->extrapolate(ctx,
564  extrapolatorCache,
565  *multiComponentState,
566  perigeeSurface,
568  false,
569  particleHypothesis);
570 
571  if (stateExtrapolatedToPerigee.empty()) {
572  return {};
573  }
574 
575  // Determine the combined state
576  std::unique_ptr<Trk::TrackParameters> combinedPerigee =
577  MultiComponentStateCombiner::combineToSingle(stateExtrapolatedToPerigee, m_useMode);
578 
579  // Perigee is an additional MultiComponentStateOnSurface
580  std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes>
581  pattern(0);
583 
584  if(std::abs(combinedPerigee->position().z())>10000.) {
585  ATH_MSG_WARNING("Pathological perigee well outside of detector!! Returning {}");
586  return {};
587  }
588 
589  if (std::abs(combinedPerigee->parameters()[Trk::qOverP]) > 1e8) {
591  "makePerigee() about to return with 0 momentum!! Returning {}");
592  return {};
593  }
594 
595  return {Trk::FitQualityOnSurface{},
596  nullptr,
597  std::move(combinedPerigee),
598  std::move(stateExtrapolatedToPerigee),
599  pattern};
600 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ smootherFit()

Trk::GaussianSumFitter::GSFTrajectory Trk::GaussianSumFitter::smootherFit ( const EventContext &  ctx,
Trk::IMultiStateExtrapolator::Cache extrapolatorCache,
GSFTrajectory forwardTrajectory,
const ParticleHypothesis  particleHypothesis = nonInteracting,
const CaloCluster_OnTrack ccot = nullptr 
) const
private

Gsf smoothed trajectory.

This method can handle additional info like calorimeter cluster constraints. It also produces what we actually store in Trk::Tracks.

Definition at line 824 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

830 {
831  if (forwardTrajectory.empty()) {
833  "Attempting to smooth an empty forward trajectory... Exiting!");
834  return {};
835  }
836 
837  GSFTrajectory smoothedTrajectory;
838  smoothedTrajectory.reserve(forwardTrajectory.size());
839  // For the smoother we start from the end and we go
840  // to begin. We need to find the the first track
841  // state on surface in this reverse direction
842  GSFTrajectory::reverse_iterator trackStateOnSurfaceItr =
843  forwardTrajectory.rbegin();
844  bool foundMeasurement = false;
845  for (; trackStateOnSurfaceItr != forwardTrajectory.rend();
846  ++trackStateOnSurfaceItr) {
847  if (!(*trackStateOnSurfaceItr).typeFlags.test(TrackStateOnSurface::Measurement)) {
848  smoothedTrajectory.emplace_back(std::move(*trackStateOnSurfaceItr));
849  } else {
850  foundMeasurement = true;
851  break;
852  }
853  }
854 
855  if(!foundMeasurement){
856  return {};
857  }
858  // This is the 1st track state on surface for a measurement
859  // in the reverse direction. Our starting point for the smoother
860  MultiComponentState smootherPredictionMultiState =
861  std::move(trackStateOnSurfaceItr->multiComponentState);
862  // Perform the update with the measurement and create the
863  // the 1st updated/smoothed entry in the trajectory
864  std::unique_ptr<Trk::MeasurementBase> firstSmootherMeasurementOnTrack =
865  std::move(trackStateOnSurfaceItr->measurementOnTrack);
866  if (!firstSmootherMeasurementOnTrack) {
868  "Initial state on surface in smoother does not have an associated "
869  "MeasurementBase object");
870  return {};
871  }
873  Trk::MultiComponentState firstSmoothedState =
874  Trk::GsfMeasurementUpdator::update(std::move(smootherPredictionMultiState),
875  *firstSmootherMeasurementOnTrack,
876  fitQuality);
877  if (firstSmoothedState.empty()) {
878  return {};
879  }
880 
881  if (!MultiComponentStateHelpers::allHaveCovariance(firstSmoothedState)) {
883  "Not all components have covariance. Rejecting smoothed state.");
884  return {};
885  }
886  // The first in reverse (last in normal order) TSOS is special so we do a proper collapse
887  // of the multi component to single TrackParameter
888  std::unique_ptr<Trk::TrackParameters> combinedFirstSmoothedState =
890  smoothedTrajectory.emplace_back(
891  fitQuality, std::move(firstSmootherMeasurementOnTrack),
892  std::move(combinedFirstSmoothedState),
893  MultiComponentStateHelpers::clone(firstSmoothedState));
894  const auto& updatedFirstStateOnSurface = smoothedTrajectory.back();
895 
896  // continue the reverse looping of the TrackStateOnSurfaces
897  // in the forward trajectory
898  ++trackStateOnSurfaceItr;
899  // The is the last one we will see
900  auto lasttrackStateOnSurface = forwardTrajectory.rend() - 1;
901  // TSOS that the cluster measuremenet will added on.
902  auto secondLastTrackStateOnSurface = forwardTrajectory.rend() - 2;
903  // Generate a prediction by scaling the covariance of all components in the
904  // first smoothed state and perform a measurement update to it.
905  // This way there is no dependance on error of prediction
906  // NB local Y and theta are not blown out too much to help in the TRT.
907  Trk::MultiComponentState smoothedStateWithScaledError =
909  std::move(firstSmoothedState), 15., 5., 15., 5., 15.);
910  Trk::FitQualityOnSurface fitQualityWithScaledErrors;
912  std::move(smoothedStateWithScaledError),
913  *(updatedFirstStateOnSurface.measurementOnTrack),
914  fitQualityWithScaledErrors);
915  if (updatedState.empty()) {
916  ATH_MSG_WARNING("Smoother prediction could not be determined");
917  return {};
918  }
919 
920  // loopUpdatedState is a plain ptr to the most recent
921  // predicted MultiComponentState.
922  // We start from our previous inflated prediction
923  Trk::MultiComponentState* loopUpdatedState = &updatedState;
924 
925  for (; trackStateOnSurfaceItr != forwardTrajectory.rend();
926  ++trackStateOnSurfaceItr) {
927  auto& trackStateOnSurface = (*trackStateOnSurfaceItr);
928  // Retrieve the MeasurementBase object from the TrackStateOnSurface object
929  std::unique_ptr<Trk::MeasurementBase> measurement =
930  std::move(trackStateOnSurface.measurementOnTrack);
931  if (!measurement) {
932  ATH_MSG_WARNING("MeasurementBase object could not be extracted from a "
933  "measurement TSOS... continuing");
934  continue;
935  }
936  // Create prediction for the next measurement surface.
937  // For the smoother the direction of propagation
938  // is opposite to the direction of momentum
939  Trk::MultiComponentState extrapolatedState =
940  m_extrapolator->extrapolate(ctx,
941  extrapolatorCache,
942  (*loopUpdatedState),
943  measurement->associatedSurface(),
945  false,
946  particleHypothesis);
947 
948  if (extrapolatedState.empty()) {
949  return {};
950  }
951  // Handle the case where Original measurement was flagged as an outlier
952  if (!trackStateOnSurface.typeFlags.test(TrackStateOnSurface::Measurement)) {
953  std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> type(
954  0);
956  smoothedTrajectory.emplace_back(
957  FitQualityOnSurface(1, 1),
958  std::move(measurement),
959  nullptr,
960  std::move(extrapolatedState),
961  type);
962  loopUpdatedState = &(smoothedTrajectory.back().multiComponentState);
963  continue;
964  }
965  // Update with the measurement
966  updatedState = Trk::GsfMeasurementUpdator::update(
967  std::move(extrapolatedState), *measurement, fitQuality);
968  if (updatedState.empty()) {
970  "Could not update the multi-component state... rejecting track!");
971  return {};
972  }
973  // last in reverse (first in normal order) is special as we collapse to single track Parameters
974  bool islast = (trackStateOnSurfaceItr == lasttrackStateOnSurface);
975  if (m_combineWithFitter) {
976  // Optional combine smoother state with fitter state
977  // e.g combine the current tsos (from the forward) with
978  // the updated from the smoother
979  const Trk::MultiComponentState& forwardsMultiState =
980  trackStateOnSurface.multiComponentState;
981  Trk::MultiComponentState combinedfitterState =
983  forwardsMultiState, updatedState, m_maximumNumberOfComponents);
984  //
985  if (combinedfitterState.empty()) {
986  ATH_MSG_WARNING("Could not combine state from forward fit with "
987  "smoother state");
988  return {};
989  }
990  auto combinedFitQuality = Trk::GsfMeasurementUpdator::fitQuality(
991  combinedfitterState, *measurement);
992  smoothedTrajectory.emplace_back(
993  smootherHelper(std::move(combinedfitterState), std::move(measurement),
994  combinedFitQuality, islast, m_useMode));
995  } else {
996  // If combination with forwards state is not done
997  smoothedTrajectory.emplace_back(
998  smootherHelper(std::move(updatedState), std::move(measurement),
999  fitQuality, islast, m_useMode));
1000  }
1001  //
1002  // For the next iteration start from last added
1003  loopUpdatedState = &(smoothedTrajectory.back().multiComponentState);
1004  // Handle adding measurement from calo if it is present
1005  if (ccot && trackStateOnSurfaceItr == secondLastTrackStateOnSurface) {
1006  Trk::MultiComponentState ccotState =
1007  addCCOT(ctx, ccot, smoothedTrajectory);
1008  if (!ccotState.empty()) {
1009  (*loopUpdatedState) = std::move(ccotState);
1010  }
1011  }
1012  } // End for loop over all components
1013 
1014  return smoothedTrajectory;
1015 }

◆ stepForwardFit()

bool Trk::GaussianSumFitter::stepForwardFit ( const EventContext &  ctx,
IMultiStateExtrapolator::Cache extrapolatorCache,
GSFTrajectory forwardTrajectory,
const PrepRawData originalPrepRawData,
const MeasurementBase originalMeasurement,
const Surface surface,
Trk::MultiComponentState updatedState,
const ParticleHypothesis  particleHypothesis = nonInteracting 
) const
private

Progress one step along the fit.

Definition at line 722 of file TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx.

731 {
732  // Protect against undefined Measurement or PrepRawData
733  if (!originalPrepRawData && !originalMeasurement) {
734  ATH_MSG_WARNING("No measurement base or PrepRawData passed to "
735  "StepForwardFit!");
736  return false;
737  }
738 
739  if (!originalMeasurement && m_refitOnMeasurementBase) {
740  ATH_MSG_WARNING("No measurement base information passed to StepForwardFit");
741  return false;
742  }
743  // Propagate the multi-component state to the next measurement surface
744  // accounting for the material effects. This gives us
745  // the prediction at that surface.
746  Trk::MultiComponentState extrapolatedState =
747  m_extrapolator->extrapolate(ctx,
748  extrapolatorCache,
749  updatedState,
750  surface,
752  false,
753  particleHypothesis);
754  if (extrapolatedState.empty()) {
755  return false;
756  }
757 
758  // we need to account for either measurement base input
759  // or PrepRawData input.
760  std::unique_ptr<Trk::MeasurementBase> measurement = nullptr;
761  if (originalMeasurement) { // clone original MeasurementBase object
762  measurement.reset(originalMeasurement->clone());
763  } else {
764  std::unique_ptr<Trk::TrackParameters> combinedState =
766  if (!combinedState) {
767  ATH_MSG_WARNING("State combination failed... exiting");
768  return false;
769  }
770  // Create a new MeasurementBase object from PrepRawData
771  measurement.reset(
772  m_rioOnTrackCreator->correct(*originalPrepRawData, *combinedState));
773  combinedState.reset();
774  }
775  if (!measurement) {
776  ATH_MSG_WARNING("stepForwardFit no measurement to update with");
777  return false;
778  }
779 
780  // Perform measurement update
782  // We need to keep the extrapolatedState so clone
783  updatedState = Trk::GsfMeasurementUpdator::update(
784  MultiComponentStateHelpers::clone(extrapolatedState),
785  *measurement,
786  fitQuality);
787 
788  if (updatedState.empty()) {
789  return false;
790  }
791 
792  // Hits with excessive chi2 are outliers.
793  // We ingore the update, reset back to the extrapolated
794  // state before the update
795  if (fitQuality.chiSquared() >
797  fitQuality = FitQualityOnSurface(1, 1);
798  std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> type(0);
800  forwardTrajectory.emplace_back(
801  fitQuality,
802  std::move(measurement),
803  nullptr,
804  // used below for the updated state so clone
805  Trk::MultiComponentStateHelpers::clone(extrapolatedState),
806  type);
807  // reset the updated state to the extrapolated state
808  // before the measurement update
809  updatedState = std::move(extrapolatedState);
810  } else {
811  forwardTrajectory.emplace_back(fitQuality,
812  std::move(measurement),
813  nullptr,
814  std::move(extrapolatedState));
815  }
816  return true;
817 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_combineWithFitter

Gaudi::Property<bool> Trk::GaussianSumFitter::m_combineWithFitter
private
Initial value:
{
this,
"CombineStateWithFitter",
false,
"Combine with forwards state during Smoothing"}

Definition at line 196 of file TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h.

◆ m_cutChiSquaredPerNumberDOF

Gaudi::Property<double> Trk::GaussianSumFitter::m_cutChiSquaredPerNumberDOF
private
Initial value:
{
this,
"StateChi2PerNDOFCut",
50.,
"Cut on Chi2 per NDOF"}

Definition at line 215 of file TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_directionToPerigee

PropDirection Trk::GaussianSumFitter::m_directionToPerigee
private

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extrapolator

ToolHandle<IMultiStateExtrapolator> Trk::GaussianSumFitter::m_extrapolator
private
Initial value:
{
this,
"ToolForExtrapolation",
"Trk::GsfExtrapolator/GsfExtrapolator",
""}

Definition at line 167 of file TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h.

◆ m_maximumNumberOfComponents

Gaudi::Property<unsigned int> Trk::GaussianSumFitter::m_maximumNumberOfComponents
private
Initial value:
{
this,
"MaximumNumberOfComponents",
12,
"Maximum number of components"}

Definition at line 178 of file TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h.

◆ m_refitOnMeasurementBase

Gaudi::Property<bool> Trk::GaussianSumFitter::m_refitOnMeasurementBase
private
Initial value:
{
this,
"RefitOnMeasurementBase",
true,
"Refit On Measurement Base"}

Definition at line 190 of file TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h.

◆ m_reintegrateOutliers

Gaudi::Property<bool> Trk::GaussianSumFitter::m_reintegrateOutliers
private
Initial value:
{
this,
"ReintegrateOutliers",
true,
"Reintegrate Outliers"}

Definition at line 184 of file TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h.

◆ m_rioOnTrackCreator

ToolHandle<IRIO_OnTrackCreator> Trk::GaussianSumFitter::m_rioOnTrackCreator
private
Initial value:
{
this,
"ToolForROTCreation", "",
"Tool for converting Raw Data to measurements if we do not fit "
"measurements directly"}

Definition at line 172 of file TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h.

◆ m_slimTransientMTSOS

Gaudi::Property<bool> Trk::GaussianSumFitter::m_slimTransientMTSOS
private
Initial value:
{
this,
"slimTransientMTSOS",
true,
"Slim the transient MTSOS . keeping just the combined state and not all "
"components"}

Definition at line 208 of file TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h.

◆ m_sortingReferencePoint

std::vector<double> Trk::GaussianSumFitter::m_sortingReferencePoint
private

◆ m_trkParametersComparisonFunction

TrkParametersComparisonFunction Trk::GaussianSumFitter::m_trkParametersComparisonFunction
private

◆ m_useMode

Gaudi::Property<bool> Trk::GaussianSumFitter::m_useMode
private
Initial value:
{
this,
"useMode",
true,
"Combine/Collapse MultiComponent State Mode rather than mean"}

Definition at line 202 of file TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
grepfile.info
info
Definition: grepfile.py:38
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
Trk::MultiComponentStateHelpers::allHaveCovariance
bool allHaveCovariance(const MultiComponentState &in)
Check to see if all components have covariance Matrix.
Definition: ComponentParameters.cxx:66
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
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Trk::TrackInfo::GaussianSumFilter
@ GaussianSumFilter
Tracks from Gaussian Sum Filter.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:53
Trk::GaussianSumFitter::smootherFit
GSFTrajectory smootherFit(const EventContext &ctx, Trk::IMultiStateExtrapolator::Cache &, GSFTrajectory &forwardTrajectory, const ParticleHypothesis particleHypothesis=nonInteracting, const CaloCluster_OnTrack *ccot=nullptr) const
Gsf smoothed trajectory.
Definition: TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx:824
Trk::PrepRawDataSet
std::vector< const PrepRawData * > PrepRawDataSet
vector of clusters and drift circles
Definition: FitterTypes.h:26
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Trk::locX
@ locX
Definition: ParamDefs.h:43
Trk::GaussianSumFitter::m_directionToPerigee
PropDirection m_directionToPerigee
Definition: TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h:221
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
make_unique
std::unique_ptr< T > make_unique(Args &&... args)
Definition: SkimmingToolEXOT5.cxx:23
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Trk::oppositeMomentum
@ oppositeMomentum
Definition: PropDirection.h:21
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::TrackFitInputPreparator::stripPrepRawData
PrepRawDataSet stripPrepRawData(const Track &, const PrepRawDataSet &, const SortInputFlag, const bool)
create a vector of PrepRawData* from the mixed input of track and single PrepRawData.
Definition: TrackFitInputPreparator.cxx:42
Trk::GaussianSumFitter::m_slimTransientMTSOS
Gaudi::Property< bool > m_slimTransientMTSOS
Definition: TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h:208
Trk::MeasurementBaseType::CaloCluster_OnTrack
@ CaloCluster_OnTrack
Definition: MeasurementBase.h:53
Trk::TrackInfo::BremFitSuccessful
@ BremFitSuccessful
A brem fit was performed on this track and this fit was successful.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:81
Trk::GaussianSumFitter::convertTrajToTrack
std::unique_ptr< MultiComponentStateOnSurfaceDV > convertTrajToTrack(GSFTrajectory &trajectory) const
Definition: TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx:530
Trk::GaussianSumFitter::forwardPRDfit
GSFTrajectory forwardPRDfit(const EventContext &ctx, IMultiStateExtrapolator::Cache &cache, const PrepRawDataSet &inputPrepRawDataSet, const TrackParameters &estimatedTrackParametersNearOrigin, const ParticleHypothesis particleHypothesis=nonInteracting) const
Forward GSF fit using PrepRawData.
Definition: TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx:607
Trk::GaussianSumFitter::m_extrapolator
ToolHandle< IMultiStateExtrapolator > m_extrapolator
Definition: TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h:167
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Trk::loc2
@ loc2
generic first and second local coordinate
Definition: ParamDefs.h:41
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
Trk::alongMomentum
@ alongMomentum
Definition: PropDirection.h:20
Trk::MultiComponentStateCombiner::combineToSingle
std::unique_ptr< Trk::TrackParameters > combineToSingle(const MultiComponentState &, const bool useMode=false)
@bried Calculate combined state of many components
Definition: MultiComponentStateCombiner.cxx:305
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::TrackParameters
ParametersBase< 5, Charged > TrackParameters
Definition: Tracking/TrkEvent/TrkParameters/TrkParameters/TrackParameters.h:24
Trk::GaussianSumFitter::m_sortingReferencePoint
std::vector< double > m_sortingReferencePoint
Definition: TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h:223
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:554
python.Utilities.clone
clone
Definition: Utilities.py:134
Trk::DefinedParameter
std::pair< double, ParamDefs > DefinedParameter
Definition: DefinedParameter.h:27
Trk::GaussianSumFitter::GSFTrajectory
std::vector< GSFTsos > GSFTrajectory
Definition: TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h:111
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
Trk::GaussianSumFitter::stepForwardFit
bool stepForwardFit(const EventContext &ctx, IMultiStateExtrapolator::Cache &, GSFTrajectory &forwardTrajectory, const PrepRawData *originalPrepRawData, const MeasurementBase *originalMeasurement, const Surface &surface, MultiComponentState &updatedState, const ParticleHypothesis particleHypothesis=nonInteracting) const
Progress one step along the fit.
Definition: TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx:722
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
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
GSFConstants::maxNumberofStateComponents
constexpr int8_t maxNumberofStateComponents
Note the Gaussian sum approach as describe e.g in " Optimal Filtering" Anderson and Moore "Track Fitt...
Definition: GsfConstants.h:47
Trk::GaussianSumFitter::m_refitOnMeasurementBase
Gaudi::Property< bool > m_refitOnMeasurementBase
Definition: TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h:190
Trk::AmgSymMatrix
AmgSymMatrix(5) &GXFTrackState
Definition: GXFTrackState.h:156
Trk::FitQualityOnSurface
Definition: FitQualityOnSurface.h:19
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::CaloCluster_OnTrack::associatedSurface
virtual const Surface & associatedSurface() const override final
returns the surface for the local to global transformation
Definition: CaloCluster_OnTrack.h:98
Trk::theta
@ theta
Definition: ParamDefs.h:72
xAOD::covMatrix
covMatrix
Definition: TrackMeasurement_v1.cxx:19
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
Trk::CaloCluster_OnTrack::clone
virtual CaloCluster_OnTrack * clone() const override final
Pseudo-constructor, needed to avoid excessive RTTI.
Definition: CaloCluster_OnTrack.cxx:62
GSFTsos::measurementOnTrack
std::unique_ptr< Trk::MeasurementBase > measurementOnTrack
Definition: GSFTsos.h:24
Trk::MultiComponentStateHelpers::clone
MultiComponentState clone(const MultiComponentState &in)
Clone TrackParameters method.
Definition: ComponentParameters.cxx:15
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::MultiComponentState
std::vector< ComponentParameters > MultiComponentState
Definition: ComponentParameters.h:27
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::TrackInfo::BremFit
@ BremFit
A brem fit was performed on this track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:78
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::FitQualityOnSurface::numberDoF
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Definition: FitQuality.h:60
Trk::IMultiStateExtrapolator::Cache
MultiStateExtrapolator cache class.
Definition: IMultiStateExtrapolator.h:56
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
GSFTsos
Definition: GSFTsos.h:17
Trk::MultiComponentStateHelpers::WithScaledError
MultiComponentState WithScaledError(MultiComponentState &&in, double errorScaleLocX, double errorScaleLocY, double errorScalePhi, double errorScaleTheta, double errorScaleQoverP)
Scale the covariance matrix components by individual factors.
Definition: ComponentParameters.cxx:26
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
Trk::MeasurementSet
std::vector< const MeasurementBase * > MeasurementSet
vector of fittable measurements
Definition: FitterTypes.h:30
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trk::GaussianSumFitter::m_useMode
Gaudi::Property< bool > m_useMode
Definition: TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h:202
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::GaussianSumFitter::forwardMeasurementFit
GSFTrajectory forwardMeasurementFit(const EventContext &ctx, IMultiStateExtrapolator::Cache &cache, const MeasurementSet &inputMeasurementSet, const TrackParameters &estimatedTrackParametersNearOrigin, const ParticleHypothesis particleHypothesis=nonInteracting) const
Forward GSF fit using MeasurementSet.
Definition: TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx:669
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::CaloCluster_OnTrack
Definition: CaloCluster_OnTrack.h:32
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Trk::MeasurementBase::associatedSurface
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
Trk::nonInteracting
@ nonInteracting
Definition: ParticleHypothesis.h:25
Trk::pseudoMeasurement
@ pseudoMeasurement
Definition: MeasurementType.h:26
GSFTsos::multiComponentState
Trk::MultiComponentState multiComponentState
Definition: GSFTsos.h:20
Trk::ComponentParameters
Definition: ComponentParameters.h:22
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::RIO_OnTrack::prepRawData
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
Trk::GaussianSumFitter::fit
virtual std::unique_ptr< Track > fit(const EventContext &ctx, const Track &, const RunOutlierRemoval, const ParticleHypothesis particleHypothesis=nonInteracting) const override final
Refit a track using the Gaussian Sum Filter.
Definition: TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx:141
Trk::GsfMeasurementUpdator::fitQuality
FitQualityOnSurface fitQuality(const MultiComponentState &, const MeasurementBase &)
Method for determining the chi2 of the multi-component state and the number of degrees of freedom.
Definition: GsfMeasurementUpdator.cxx:845
a
TList * a
Definition: liststreamerinfos.cxx:10
h
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::GaussianSumFitter::m_combineWithFitter
Gaudi::Property< bool > m_combineWithFitter
Definition: TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h:196
Trk::TrkParametersComparisonFunction
ComparisonFunction< TrackParameters > TrkParametersComparisonFunction
Definition: TrkParametersComparisonFunction.h:26
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Trk::GaussianSumFitter::makePerigee
GSFTsos makePerigee(const EventContext &ctx, Trk::IMultiStateExtrapolator::Cache &, const GSFTrajectory &smoothedTrajectory, const ParticleHypothesis particleHypothesis=nonInteracting) const
Produces a perigee from a smoothed trajectory.
Definition: TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx:546
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:73
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
Trk::MeasurementBaseType::PseudoMeasurementOnTrack
@ PseudoMeasurementOnTrack
Definition: MeasurementBase.h:51
Trk::phi
@ phi
Definition: ParamDefs.h:81
Trk::PrepRawDataComparisonFunction
Class providing comparison function, or relational definition, for PrepRawData.
Definition: PrepRawDataComparisonFunction.h:33
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
Trk::GaussianSumFitter::addCCOT
MultiComponentState addCCOT(const EventContext &ctx, const Trk::CaloCluster_OnTrack *ccot, GSFTrajectory &smoothedTrajectory) const
Methof to add the CaloCluster onto the track.
Definition: TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx:1022
Trk::GaussianSumFitter::m_trkParametersComparisonFunction
TrkParametersComparisonFunction m_trkParametersComparisonFunction
Definition: TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h:222
Trk::MeasurementBaseComparisonFunction
Class implementing a comparison function for sorting MeasurementBase objects.
Definition: MeasurementBaseComparisonFunction.h:40
Trk::MultiComponentStateCombiner::combineWithSmoother
Trk::MultiComponentState combineWithSmoother(const Trk::MultiComponentState &forwardsMultiState, const Trk::MultiComponentState &smootherMultiState, unsigned int maximumNumberOfComponents)
Helper to combine forward with smoother MultiComponentStates.
Definition: MultiComponentStateCombiner.cxx:409
Trk::GsfMeasurementUpdator::update
MultiComponentState update(Trk::MultiComponentState &&, const Trk::MeasurementBase &, FitQualityOnSurface &fitQoS)
Method for updating the multi-state with a new measurement and calculate the fit qaulity at the same ...
Definition: GsfMeasurementUpdator.cxx:808
Trk::GaussianSumFitter::m_maximumNumberOfComponents
Gaudi::Property< unsigned int > m_maximumNumberOfComponents
Definition: TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h:178
Trk::loc1
@ loc1
Definition: ParamDefs.h:40
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::GaussianSumFitter::m_reintegrateOutliers
Gaudi::Property< bool > m_reintegrateOutliers
Definition: TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h:184
Trk::GaussianSumFitter::m_cutChiSquaredPerNumberDOF
Gaudi::Property< double > m_cutChiSquaredPerNumberDOF
Definition: TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h:215
Trk::GaussianSumFitter::m_rioOnTrackCreator
ToolHandle< IRIO_OnTrackCreator > m_rioOnTrackCreator
Definition: TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h:172
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Trk::TrackFitInputPreparator::stripMeasurements
MeasurementSet stripMeasurements(const Track &, const MeasurementSet &)
get the MeasurementSet out of a track+measurements combination.
Definition: TrackFitInputPreparator.cxx:19
Trk::FitQualityOnSurface::chiSquared
double chiSquared() const
returns the of the overall track fit
Definition: FitQuality.h:56
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
fitman.k
k
Definition: fitman.py:528