MINT2
FitFraction.cpp
Go to the documentation of this file.
1 #include "Mint/FitFraction.h"
2 
3 using namespace std;
4 
6  : _name("FractionWithNoName")
7  , _frac(0)
8  , _sigmaFit(-9999.0)
9  , _sigmaInteg(-9999.0)
10 {}
11 
12 FitFraction::FitFraction(const std::string& name
13  , double frac
14  , double sigmaFit
15  , double sigmaInteg)
16  : _name(name)
17  , _frac(frac)
18  , _sigmaFit(sigmaFit)
19  , _sigmaInteg(sigmaInteg)
20 {
21 }
23  : _name(other._name)
24  , _frac(other._frac)
25  , _sigmaFit(other._sigmaFit)
26  , _sigmaInteg(other._sigmaInteg)
27 {
28 }
29 void FitFraction::print(std::ostream& os) const{
30  os << name() << " = " << frac();
31  if(sigmaFit() >= 0.0) os << " +/- " << sigmaFit() << "(fit)";
32  if(sigmaInteg() >=0.0) os << " +/- " << sigmaInteg() << "(integ)";
33 }
34 
35 std::ostream& operator<<(std::ostream& os, const FitFraction& ff){
36  ff.print(os);
37  return os;
38 }
void print(std::ostream &os) const
Definition: FitFraction.cpp:29
double & sigmaFit()
Definition: FitFraction.h:24
double & sigmaInteg()
Definition: FitFraction.h:27
double & frac()
Definition: FitFraction.h:21
std::ostream & operator<<(std::ostream &os, const FitFraction &ff)
Definition: FitFraction.cpp:35
const std::string & name() const
Definition: FitFraction.h:19