ATLAS Offline Software
Loading...
Searching...
No Matches
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>
15class MsgStream;
16
17namespace Trk {
30
32{
33public:
35 FitQualityImpl() = default;
36 FitQualityImpl(const FitQualityImpl&) = default;
40
47
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
76protected:
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
97{
98public:
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
127MsgStream&
128operator<<(MsgStream& sl, const FitQualityImpl& fq);
130std::ostream&
131operator<<(std::ostream& sl, const FitQualityImpl& fq);
132
133} // end ns
135#endif // TRKEVENTPRIMITIVES_FITQUALITY_H
simple/trivial Implemenation class for fit the fit quality.
Definition FitQuality.h:32
FitQualityImpl(FitQualityImpl &&)=default
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Definition FitQuality.h:60
FitQualityImpl(const FitQualityImpl &)=default
FitQualityImpl(double chiSquared, int numberDoF)
Constructor with and .
Definition FitQuality.h:42
double chiSquared() const
returns the of the overall track fit
Definition FitQuality.h:56
void setChiSquared(double chiSquared)
set the
Definition FitQuality.h:71
FitQualityImpl(double chiSquared, double numberDoF)
Constructor hadling double type of NDF.
Definition FitQuality.h:49
FitQualityImpl()=default
default ctor for POOL
double doubleNumberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as double
Definition FitQuality.h:68
FitQualityImpl & operator=(const FitQualityImpl &)=default
~FitQualityImpl()=default
void setNumberDoF(double numberDoF)
set the number of degrees of freedom
Definition FitQuality.h:74
FitQualityImpl & operator=(FitQualityImpl &&)=default
double chiSquared() const
returns the of the overall track fit
Definition FitQuality.h:56
virtual ~FitQuality()=default
FitQualityImpl()=default
default ctor for POOL
double doubleNumberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as double
Definition FitQuality.h:68
virtual FitQuality * clone() const
Virtual constructor.
std::unique_ptr< FitQuality > uniqueClone() const
NVI uniqueClone.
FitQuality(const FitQualityImpl &fq)
Definition FitQuality.h:111
Ensure that the ATLAS eigen extensions are properly loaded.
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output