ATLAS Offline Software
FitQuality.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // FitQuality.h, (c) ATLAS Detector software
8 
9 #ifndef TRKEVENTPRIMITIVES_TRKFITQUALITY_H
10 #define TRKEVENTPRIMITIVES_TRKFITQUALITY_H
11 
12 #include <cmath> //for std::floor in the included .icc file
13 #include <iosfwd>
14 #include <memory>
15 class MsgStream;
16 
17 namespace Trk {
32 {
33 public:
35  FitQualityImpl() = default;
36  FitQualityImpl(const FitQualityImpl&) = default;
40 
45  {
46  }
47 
52  {
53  }
54 
56  double chiSquared() const { return m_chiSquared; }
57 
60  int numberDoF() const
61  {
62 
63  return static_cast<int>(std::floor(m_numberDoF + 0.5));
64  }
65 
68  double doubleNumberDoF() const { return m_numberDoF; }
69 
72 
75 
76 protected:
77  //Protected
78  //We do not want to create/destroy
79  //objects via this class
80  ~FitQualityImpl() = default;
81  double m_chiSquared{};
82  double m_numberDoF{};
83 
84 }; // end of class definitions
85 
96 class FitQuality : public FitQualityImpl
97 {
98 public:
100  using FitQualityImpl::operator=;
106 
107  // Needed for T/P since we used to have only
108  // FitQuality, This copies the payload
109  // we set to the persistent type
110  // i.e FitQuality_p1.
113  {
114  }
115 
116  virtual ~FitQuality() = default;
117 
119  virtual FitQuality* clone() const;
120 
122  std::unique_ptr<FitQuality> uniqueClone() const;
123 
124 }; // end of class definitions
125 
127 MsgStream&
128 operator<<(MsgStream& sl, const FitQualityImpl& fq);
130 std::ostream&
131 operator<<(std::ostream& sl, const FitQualityImpl& fq);
132 
133 } // end ns
135 #endif // TRKEVENTPRIMITIVES_FITQUALITY_H
Trk::FitQualityImpl::FitQualityImpl
FitQualityImpl()=default
default ctor for POOL
Trk::FitQuality::FitQuality
FitQuality(const FitQualityImpl &fq)
Definition: FitQuality.h:111
Trk::FitQualityImpl::chiSquared
double chiSquared() const
returns the of the overall track fit
Definition: FitQuality.h:56
Trk::FitQuality::clone
virtual FitQuality * clone() const
Virtual constructor.
Trk::FitQualityImpl::FitQualityImpl
FitQualityImpl(FitQualityImpl &&)=default
Trk::FitQualityImpl::setChiSquared
void setChiSquared(double chiSquared)
set the
Definition: FitQuality.h:71
Trk::FitQualityImpl::operator=
FitQualityImpl & operator=(const FitQualityImpl &)=default
Trk::FitQualityImpl::m_numberDoF
double m_numberDoF
Definition: FitQuality.h:82
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition: FitQuality.h:97
Trk::FitQualityImpl::FitQualityImpl
FitQualityImpl(const FitQualityImpl &)=default
Trk::FitQualityImpl::operator=
FitQualityImpl & operator=(FitQualityImpl &&)=default
Trk::FitQualityImpl::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
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::FitQuality::uniqueClone
std::unique_ptr< FitQuality > uniqueClone() const
NVI uniqueClone.
Trk::FitQualityImpl::setNumberDoF
void setNumberDoF(double numberDoF)
set the number of degrees of freedom
Definition: FitQuality.h:74
FitQuality.icc
Trk::FitQualityImpl
simple/trivial Implemenation class for fit the fit quality. It holds the same payload as FitQuality_p...
Definition: FitQuality.h:32
Trk::FitQualityImpl::FitQualityImpl
FitQualityImpl(double chiSquared, double numberDoF)
Constructor hadling double type of NDF.
Definition: FitQuality.h:49
Trk::FitQualityImpl::m_chiSquared
double m_chiSquared
Definition: FitQuality.h:81
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition: AlignModule.cxx:204
Trk::FitQualityImpl::~FitQualityImpl
~FitQualityImpl()=default
Trk::FitQualityImpl::FitQualityImpl
FitQualityImpl(double chiSquared, int numberDoF)
Constructor with and .
Definition: FitQuality.h:42
Trk::FitQualityImpl::doubleNumberDoF
double doubleNumberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as double
Definition: FitQuality.h:68
Trk::FitQuality::~FitQuality
virtual ~FitQuality()=default