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

Status codes for track fitters. More...

#include <FitterStatusCode.h>

Collaboration diagram for Trk::FitterStatusCode:

Public Types

enum  FitCode {
  Success = 0, StraightTrackModelUsed = 1, BadInput = 2, UpdateFailure = 3,
  FitQualityFailure = 4, MissingCovariance = 5, ExtrapolationFailure = 6, ExtrapolationFailureDueToSmallMomentum = 7,
  CombineStatesFailure = 8, WeaklyConstraintPars = 9, OutlierLogicFailure = 10, PerigeeMakingFailure = 11,
  ForwardFilterFailure = 12, SmootherFailure = 13, FewFittableMeasurements = 14, SeedFailure = 15,
  MatrixInversionFailure = 16, NoConvergence = 17, InvalidAngles = 18, NumberOfStatusCodes = 19
}
 fitter status codes More...
 

Public Member Functions

 FitterStatusCode ()
 default constructor More...
 
 FitterStatusCode (FitCode)
 constructor More...
 
bool isFailure () const
 
 operator unsigned long () const
 Cast operator. More...
 
 operator StatusCode () const
 Cast operator. More...
 
unsigned long getCode () const
 Get the status code by value. More...
 
std::string getString () const
 Get the status code as descriptive string. More...
 

Private Attributes

unsigned long m_code
 fitter status code More...
 

Detailed Description

Status codes for track fitters.

This class can be returned by track fitters to give a more detailed feedback of fit failures.

Author
Sebastian.Fleischmann -at- cern.ch

Definition at line 32 of file FitterStatusCode.h.

Member Enumeration Documentation

◆ FitCode

fitter status codes

Enumerator
Success 

fit successfull

StraightTrackModelUsed 

fit successfull, but straight track model was used

BadInput 

bad input

UpdateFailure 

parameter update failed

FitQualityFailure 

fit quality production failed

MissingCovariance 

covariance missed

ExtrapolationFailure 

extrapolation failed

ExtrapolationFailureDueToSmallMomentum 

extrapolation failed due to small momentum

CombineStatesFailure 

fit states could not be combined

WeaklyConstraintPars 

parameters only weakly constrained

OutlierLogicFailure 

outlier logic failed

PerigeeMakingFailure 

perigee could not be produced

ForwardFilterFailure 

forward filter failed

SmootherFailure 

smoother failed

FewFittableMeasurements 

number of fittable measurements on trajectory too small

SeedFailure 

wrong seed, not recoverable or recovery off.

MatrixInversionFailure 
NoConvergence 
InvalidAngles 
NumberOfStatusCodes 

number of different status codes

Definition at line 37 of file FitterStatusCode.h.

37  {
38  Success = 0,
40  BadInput = 2,
41  UpdateFailure = 3,
42  FitQualityFailure = 4,
43  MissingCovariance = 5,
48  OutlierLogicFailure = 10,
51  SmootherFailure = 13,
53  SeedFailure = 15,
55  NoConvergence = 17,
56  InvalidAngles = 18,
58 
59  };

Constructor & Destructor Documentation

◆ FitterStatusCode() [1/2]

Trk::FitterStatusCode::FitterStatusCode ( )

default constructor

Definition at line 15 of file FitterStatusCode.cxx.

16  :
17  //StatusCode( ),
18  m_code( 0 ) {}

◆ FitterStatusCode() [2/2]

Trk::FitterStatusCode::FitterStatusCode ( FitCode  thecode)

constructor

Parameters
codestatus code according to the enum

Definition at line 20 of file FitterStatusCode.cxx.

21  :
22  //StatusCode( (thecode>1)?StatusCode::SUCCESS : StatusCode::FAILURE ),
23  m_code( thecode ) {}

Member Function Documentation

◆ getCode()

unsigned long Trk::FitterStatusCode::getCode ( ) const

Get the status code by value.

Definition at line 37 of file FitterStatusCode.cxx.

37  {
38  return m_code;
39 }

◆ getString()

std::string Trk::FitterStatusCode::getString ( ) const

Get the status code as descriptive string.

Definition at line 41 of file FitterStatusCode.cxx.

41  {
42  switch(m_code)
43  {
44  case Success:
45  return "success";
47  return "success, using straight track model";
48  case BadInput:
49  return "bad input";
50  case UpdateFailure:
51  return "parameter update failure";
52  case FitQualityFailure:
53  return "fit quality production failed";
54  case MissingCovariance:
55  return "covariance missing";
57  return "extrapolation failed";
59  return "extrapolation failed due to small momentum";
61  return "fit states combination failed";
63  return "parameters only weakly constrained";
65  return "outlier logic failed";
67  return "perigee could not be produced";
69  return "forward filter failed";
70  case SmootherFailure:
71  return "smoother failed";
73  return "too few fittable measurements";
75  return "matrix inversion failed";
76  case NoConvergence:
77  return "fit did not converge";
78  case InvalidAngles:
79  return "invalid results for theta, phi";
80  default :
81  return "unknown";
82  };
83 }

◆ isFailure()

bool Trk::FitterStatusCode::isFailure ( ) const

Definition at line 25 of file FitterStatusCode.cxx.

25  {
26  return m_code>1;
27 }

◆ operator StatusCode()

Trk::FitterStatusCode::operator StatusCode ( ) const

Cast operator.

Definition at line 33 of file FitterStatusCode.cxx.

33  {
34  return { (m_code>1)?StatusCode::SUCCESS : StatusCode::FAILURE };
35 }

◆ operator unsigned long()

Trk::FitterStatusCode::operator unsigned long ( ) const

Cast operator.

Definition at line 29 of file FitterStatusCode.cxx.

29  {
30  return m_code;
31 }

Member Data Documentation

◆ m_code

unsigned long Trk::FitterStatusCode::m_code
private

fitter status code

Definition at line 90 of file FitterStatusCode.h.


The documentation for this class was generated from the following files:
Trk::FitterStatusCode::MatrixInversionFailure
@ MatrixInversionFailure
Definition: FitterStatusCode.h:54
Trk::FitterStatusCode::ForwardFilterFailure
@ ForwardFilterFailure
forward filter failed
Definition: FitterStatusCode.h:50
Trk::FitterStatusCode::SeedFailure
@ SeedFailure
wrong seed, not recoverable or recovery off.
Definition: FitterStatusCode.h:53
Trk::FitterStatusCode::CombineStatesFailure
@ CombineStatesFailure
fit states could not be combined
Definition: FitterStatusCode.h:46
Trk::FitterStatusCode::Success
@ Success
fit successfull
Definition: FitterStatusCode.h:38
Trk::FitterStatusCode::ExtrapolationFailure
@ ExtrapolationFailure
extrapolation failed
Definition: FitterStatusCode.h:44
Trk::FitterStatusCode::StraightTrackModelUsed
@ StraightTrackModelUsed
fit successfull, but straight track model was used
Definition: FitterStatusCode.h:39
Trk::FitterStatusCode::ExtrapolationFailureDueToSmallMomentum
@ ExtrapolationFailureDueToSmallMomentum
extrapolation failed due to small momentum
Definition: FitterStatusCode.h:45
Trk::FitterStatusCode::MissingCovariance
@ MissingCovariance
covariance missed
Definition: FitterStatusCode.h:43
Trk::FitterStatusCode::NumberOfStatusCodes
@ NumberOfStatusCodes
number of different status codes
Definition: FitterStatusCode.h:57
Trk::FitterStatusCode::FewFittableMeasurements
@ FewFittableMeasurements
number of fittable measurements on trajectory too small
Definition: FitterStatusCode.h:52
Trk::FitterStatusCode::NoConvergence
@ NoConvergence
Definition: FitterStatusCode.h:55
Trk::FitterStatusCode::WeaklyConstraintPars
@ WeaklyConstraintPars
parameters only weakly constrained
Definition: FitterStatusCode.h:47
Trk::FitterStatusCode::InvalidAngles
@ InvalidAngles
Definition: FitterStatusCode.h:56
Trk::FitterStatusCode::m_code
unsigned long m_code
fitter status code
Definition: FitterStatusCode.h:90
Trk::FitterStatusCode::PerigeeMakingFailure
@ PerigeeMakingFailure
perigee could not be produced
Definition: FitterStatusCode.h:49
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
Trk::FitterStatusCode::FitQualityFailure
@ FitQualityFailure
fit quality production failed
Definition: FitterStatusCode.h:42
Trk::FitterStatusCode::BadInput
@ BadInput
bad input
Definition: FitterStatusCode.h:40
Trk::FitterStatusCode::UpdateFailure
@ UpdateFailure
parameter update failed
Definition: FitterStatusCode.h:41
Trk::FitterStatusCode::SmootherFailure
@ SmootherFailure
smoother failed
Definition: FitterStatusCode.h:51
Trk::FitterStatusCode::OutlierLogicFailure
@ OutlierLogicFailure
outlier logic failed
Definition: FitterStatusCode.h:48