Public Member Functions | Private Attributes | Friends | List of all members
cmf::PointResult Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/CovarianceMatrixFit/dataProducts/PointResult.h"

Public Member Functions

 PointResult ()
 
 ~PointResult ()
 
 PointResult (double const &chiSqr, int const &status, cmf::OscillationParameterMap const &parameterSpaceLoc, cmf::Spectrum const &spectrum)
 
double const & ChiSqr () const
 
int const & FitStatus () const
 
OscillationParameterMap const & ParameterSpaceLocation () const
 
double const ParameterSpaceValue (cmf::OscParm_t const &param) const
 
cmf::Spectrum const & PredictedSpectrum () const
 
bool operator< (cmf::PointResult const &other) const
 

Private Attributes

double fChiSqr
 the chi^2 for this point More...
 
int fFitStatus
 the status code returned by the fitter. More...
 
cmf::OscillationParameterMap fParameterSpaceVals
 the location in parameter space of this point More...
 
cmf::Spectrum fSpectrum
 best fit predicted spectrum More...
 

Friends

std::ostream & operator<< (std::ostream &o, cmf::PointResult const &pr)
 

Detailed Description

Definition at line 21 of file PointResult.h.

Constructor & Destructor Documentation

cmf::PointResult::PointResult ( )

Definition at line 21 of file PointResult.cxx.

23  , fFitStatus(-1)
24  {
25 
26  }
static const double kGarbageDouble
Definition: Constants.h:22
int fFitStatus
the status code returned by the fitter.
Definition: PointResult.h:30
double fChiSqr
the chi^2 for this point
Definition: PointResult.h:29
cmf::PointResult::~PointResult ( )

Definition at line 41 of file PointResult.cxx.

References fParameterSpaceVals.

42  {
43  fParameterSpaceVals.clear();
44  }
cmf::OscillationParameterMap fParameterSpaceVals
the location in parameter space of this point
Definition: PointResult.h:31
cmf::PointResult::PointResult ( double const &  chiSqr,
int const &  status,
cmf::OscillationParameterMap const &  parameterSpaceLoc,
cmf::Spectrum const &  spectrum 
)

Definition at line 29 of file PointResult.cxx.

33  : fChiSqr (chiSqr )
34  , fFitStatus (status )
35  , fParameterSpaceVals(parameterSpaceLoc)
36  , fSpectrum (predictedSpectrum)
37  {
38  }
int status
Definition: fabricate.py:1613
cmf::Spectrum fSpectrum
best fit predicted spectrum
Definition: PointResult.h:32
int fFitStatus
the status code returned by the fitter.
Definition: PointResult.h:30
cmf::OscillationParameterMap fParameterSpaceVals
the location in parameter space of this point
Definition: PointResult.h:31
double fChiSqr
the chi^2 for this point
Definition: PointResult.h:29

Member Function Documentation

double const & cmf::PointResult::ChiSqr ( ) const
inline

Definition at line 58 of file PointResult.h.

References fChiSqr.

Referenced by cmf::FitFeldmanCousinsPoint::FillHistograms(), operator<(), and cmf::operator<<().

58 { return fChiSqr; }
double fChiSqr
the chi^2 for this point
Definition: PointResult.h:29
int const & cmf::PointResult::FitStatus ( ) const
inline

Definition at line 59 of file PointResult.h.

References fFitStatus.

Referenced by cmf::FitFeldmanCousinsPoint::FillHistograms().

59 { return fFitStatus; }
int fFitStatus
the status code returned by the fitter.
Definition: PointResult.h:30
bool cmf::PointResult::operator< ( cmf::PointResult const &  other) const

Definition at line 53 of file PointResult.cxx.

References ChiSqr(), and fChiSqr.

Referenced by PredictedSpectrum().

54  {
55  return (fChiSqr < other.ChiSqr());
56  }
double fChiSqr
the chi^2 for this point
Definition: PointResult.h:29
cmf::OscillationParameterMap const & cmf::PointResult::ParameterSpaceLocation ( ) const
inline

Definition at line 60 of file PointResult.h.

References fParameterSpaceVals.

Referenced by cmf::FitFeldmanCousinsPoint::FillHistograms(), and cmf::operator<<().

60 { return fParameterSpaceVals; }
cmf::OscillationParameterMap fParameterSpaceVals
the location in parameter space of this point
Definition: PointResult.h:31
double const cmf::PointResult::ParameterSpaceValue ( cmf::OscParm_t const &  param) const

Definition at line 47 of file PointResult.cxx.

References fParameterSpaceVals.

48  {
49  return fParameterSpaceVals.find(param)->second;
50  }
cmf::OscillationParameterMap fParameterSpaceVals
the location in parameter space of this point
Definition: PointResult.h:31
cmf::Spectrum const& cmf::PointResult::PredictedSpectrum ( ) const
inline

Definition at line 47 of file PointResult.h.

References fSpectrum, msf_helper::o, operator<(), operator<<, fhicl::other, and gammaraytel::pr.

47 { return fSpectrum; }
cmf::Spectrum fSpectrum
best fit predicted spectrum
Definition: PointResult.h:32

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
cmf::PointResult const &  pr 
)
friend

Definition at line 59 of file PointResult.cxx.

Referenced by PredictedSpectrum().

60  {
61  o << "PointResult:" << std::endl
62  << "\tChiSqr = " << std::setw(5) << std::right << pr.ChiSqr() << std::endl;
63 
64  o << "Oscillation parameters:" << std::endl;
65  for(auto itr : pr.ParameterSpaceLocation() ){
66  if(itr.first == cmf::kdCP)
67  o << "\t" << std::setw(20) << cmf::cOscParams_Strings[itr.first] << " " << itr.second << " = " << itr.second/TMath::Pi() << "(pi)" << std::endl;
68  else if(cmf::IsAngleParameter(itr.first))
69  o << "\t" << std::setw(20) << cmf::cOscParams_Strings[itr.first] << " " << itr.second << ": sin^2(" << cmf::cOscParams_Strings[itr.first] << ") : " << std::pow(std::sin(itr.second), 2.) << std::endl;
70  else o << "\t" << std::setw(20) << cmf::cOscParams_Strings[itr.first] << " " << itr.second << std::endl;
71  }
72 
73  return o;
74  }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112
constexpr T pow(T x)
Definition: pow.h:75
static bool IsAngleParameter(cmf::OscParm_t const &par)
Definition: StaticFuncs.h:350
const std::string cOscParams_Strings[kNumOscParams]
Definition: Constants.h:257
T sin(T number)
Definition: d0nt_math.hpp:132

Member Data Documentation

double cmf::PointResult::fChiSqr
private

the chi^2 for this point

Definition at line 29 of file PointResult.h.

Referenced by ChiSqr(), and operator<().

int cmf::PointResult::fFitStatus
private

the status code returned by the fitter.

Definition at line 30 of file PointResult.h.

Referenced by FitStatus().

cmf::OscillationParameterMap cmf::PointResult::fParameterSpaceVals
private

the location in parameter space of this point

Definition at line 31 of file PointResult.h.

Referenced by ParameterSpaceLocation(), ParameterSpaceValue(), and ~PointResult().

cmf::Spectrum cmf::PointResult::fSpectrum
private

best fit predicted spectrum

Definition at line 32 of file PointResult.h.

Referenced by PredictedSpectrum().


The documentation for this class was generated from the following files: