Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:51:14

0001 #ifndef RecoCandidate_FitQuality_h
0002 #define RecoCandidate_FitQuality_h
0003 /** \class reco::FitQuality
0004  *
0005  * structure containg fit quality
0006  *
0007  * \author Luca Lista, INFN
0008  *
0009  *
0010  */
0011 
0012 #include "Rtypes.h"
0013 
0014 namespace reco {
0015 
0016   class FitQuality {
0017   public:
0018     /// default constructor
0019     FitQuality() : chi2_(0), ndof_(0) {}
0020     /// constructor form values
0021     FitQuality(double chi2, double ndof) : chi2_(chi2), ndof_(ndof) {}
0022     /// chi-squared
0023     double chi2() const { return chi2_; }
0024     /// number of degrees of freedom
0025     double ndof() const { return ndof_; }
0026     /// normalized chi-squared
0027     double normalizedChi2() const { return chi2_ / ndof_; }
0028 
0029   private:
0030     Double32_t chi2_;
0031     Double32_t ndof_;
0032   };
0033 
0034 }  // namespace reco
0035 
0036 #endif