MINT2
FitFractionList.cpp
Go to the documentation of this file.
1 #include "Mint/FitFractionList.h"
2 #include <algorithm>
3 
4 
5 
7  : MINT::PolymorphVector<FitFraction>()
8  , _sum("sum", 0.0)
9 {
10 }
11 
13  : MINT::PolymorphVector<FitFraction>(other)
14  , _sum(other._sum)
15 {
16 }
17 
19  _sum.frac() += f.frac();
20  this->push_back(f);
21 }
23  _sum.sigmaFit()=sfe;
24 }
26  _sum.sigmaInteg()=sie;
27 }
28 
29 void FitFractionList::print(std::ostream& os)const{
30  for(unsigned int i=0; i < this->size(); i++){
31  if(i > 0) os << '\n';
32  os << "\t(" << i+1 << ") " << (*this)[i];
33  }
34  if(_sum.frac() > -9998){
35  os << "\n=========================================================="
36  << "\n\t " << _sum
37  << "\n (can differ from 1 due to interference effects)";
38  }
39 }
40 
43  sort(this->begin(), this->end(), sorter);
44 }
47  sort(this->begin(), this->end(), sorter);
48 }
51  sort(this->begin(), this->end(), sorter);
52 }
55  sort(this->begin(), this->end(), sorter);
56 }
59  sort(this->begin(), this->end(), sorter);
60 }
61 
62 std::ostream& operator<<(std::ostream& os, const FitFractionList& f){
63  f.print(os);
64  return os;
65 }
66 
67 
68 //
69 
void setSumFitError(double sfe)
std::vector< FitFraction >::iterator end()
void push_back(const FitFraction &c)
void setSumIntegError(double sie)
double & sigmaFit()
Definition: FitFraction.h:24
FitFraction _sum
std::ostream & operator<<(std::ostream &os, const FitFractionList &f)
double & sigmaInteg()
Definition: FitFraction.h:27
void sortByMagnitudeAscending()
void add(const FitFraction &f)
double & frac()
Definition: FitFraction.h:21
std::vector< FitFraction >::iterator begin()
void print(std::ostream &os) const
void sortByMagnitudeDecending()