#include <Chi2Calc.h>
|  | 
|  | Chi2Calc (int pars=0) | 
|  | Constructor (takes ownership of LArCellInfo object)  More... 
 | 
|  | 
| virtual | ~Chi2Calc () | 
|  | 
| TVectorD | deltas (const AbsShape &data, const AbsShape &reference, CovMatrix &errors, const ScaledErrorData *shapeError=0, int lwb=-1, int upb=-1, bool noDataError=false) | 
|  | 
| double | chi2 (const AbsShape &data, const AbsShape &reference, const ScaledErrorData *shapeError=0, int lwb=-1, int upb=-1) | 
|  | 
| double | scalarProduct (const TVectorD &values1, const TVectorD &values2, const CovMatrix &invCovMat) const | 
|  | 
| int | lwb () const | 
|  | 
| int | upb () const | 
|  | 
| unsigned int | nDof () const | 
|  | 
| bool | bestRescale (const AbsShape &data, const AbsShape &reference, double &k, double &chi2, double deltaT=0, const ScaledErrorData *sed=0, unsigned int minNDof=0) const | 
|  | 
| bool | isInRange (int i) const | 
|  | 
| bool | hasSameRange (int lw, int up) const | 
|  | 
| bool | hasSameRange (const IndexRange &other) const | 
|  | 
| bool | hasSameRange (const TVectorD &v) const | 
|  | 
| bool | providesRange (int lw, int up) const | 
|  | 
| bool | providesRange (const IndexRange &other) const | 
|  | 
| bool | providesRange (const TVectorD &v) const | 
|  | 
| TString | rangeStr () const | 
|  | 
| int | commonLwb (const IndexRange &other) const | 
|  | 
| int | commonUpb (const IndexRange &other) const | 
|  | 
| bool | checkRange (int &l, int &h) const | 
|  | 
Definition at line 26 of file Chi2Calc.h.
 
◆ Chi2Calc()
  
  | 
        
          | LArSamples::Chi2Calc::Chi2Calc | ( | int | pars = 0 | ) |  |  | inline | 
 
 
◆ ~Chi2Calc()
  
  | 
        
          | virtual LArSamples::Chi2Calc::~Chi2Calc | ( |  | ) |  |  | inlinevirtual | 
 
 
◆ bestRescale()
Definition at line 88 of file Chi2Calc.cxx.
  105     if (sed2.providesRange(
r)) 
r += sed2.offsets(
r.GetLwb(), 
r.GetUpb());
 
  108   TVectorD 
v = 
data.values(
r.GetLwb(), 
r.GetUpb());
 
  113   k = sumR2==0 ? 0 : sumRV/sumR2; 
 
  114   chi2 = sumV2 - 2*
k*sumRV + 
k*
k*sumR2; 
 
 
 
 
◆ checkRange()
  
  | 
        
          | bool IndexRange::checkRange | ( | int & | l, |  
          |  |  | int & | h |  
          |  | ) |  | const |  | inherited | 
 
Definition at line 14 of file IndexRange.cxx.
   19     cout << 
"IndexRange::checkRange : lower bound " << 
l << 
" is out of bounds" << endl;
 
   26     cout << 
"IndexRange::checkRange : upper bound " << 
h << 
" is out of bounds" << endl;
 
 
 
 
◆ chi2()
Definition at line 60 of file Chi2Calc.cxx.
   66   if (
dv.GetNrows() == 0) 
return -1;
 
 
 
 
◆ commonLwb()
◆ commonUpb()
◆ deltas()
Definition at line 36 of file Chi2Calc.cxx.
   41     cout << 
"Chi2Calc::deltas : Could not find overlap region between data and reference in [" << 
lw << 
", " << 
up << 
"]." << endl;
 
   44   m_lwb = refVals.GetLwb();
 
   45   m_upb = refVals.GetUpb();
 
 
 
 
◆ hasSameRange() [1/3]
  
  | 
        
          | bool LArSamples::IndexRange::hasSameRange | ( | const IndexRange & | other | ) | const |  | inlineinherited | 
 
 
◆ hasSameRange() [2/3]
  
  | 
        
          | bool LArSamples::IndexRange::hasSameRange | ( | const TVectorD & | v | ) | const |  | inlineinherited | 
 
 
◆ hasSameRange() [3/3]
  
  | 
        
          | bool LArSamples::IndexRange::hasSameRange | ( | int | lw, |  
          |  |  | int | up |  
          |  | ) |  | const |  | inlineinherited | 
 
 
◆ isInRange()
  
  | 
        
          | bool LArSamples::IndexRange::isInRange | ( | int | i | ) | const |  | inlineinherited | 
 
 
◆ lwb()
  
  | 
        
          | int LArSamples::Chi2Calc::lwb | ( |  | ) | const |  | inlinevirtual | 
 
 
◆ nDof()
  
  | 
        
          | unsigned int LArSamples::Chi2Calc::nDof | ( |  | ) | const |  | inline | 
 
 
◆ providesRange() [1/3]
  
  | 
        
          | bool LArSamples::IndexRange::providesRange | ( | const IndexRange & | other | ) | const |  | inlineinherited | 
 
 
◆ providesRange() [2/3]
  
  | 
        
          | bool LArSamples::IndexRange::providesRange | ( | const TVectorD & | v | ) | const |  | inlineinherited | 
 
 
◆ providesRange() [3/3]
  
  | 
        
          | bool LArSamples::IndexRange::providesRange | ( | int | lw, |  
          |  |  | int | up |  
          |  | ) |  | const |  | inlineinherited | 
 
 
◆ rangeStr()
  
  | 
        
          | TString LArSamples::IndexRange::rangeStr | ( |  | ) | const |  | inlineinherited | 
 
 
◆ scalarProduct()
      
        
          | double Chi2Calc::scalarProduct | ( | const TVectorD & | values1, | 
        
          |  |  | const TVectorD & | values2, | 
        
          |  |  | const CovMatrix & | invCovMat | 
        
          |  | ) |  | const | 
      
 
Definition at line 19 of file Chi2Calc.cxx.
   22   if (values1.GetLwb() != invCovMat.GetRowLwb() || values1.GetUpb() != invCovMat.GetRowUpb()) 
return -1;
 
   23   if (values2.GetLwb() != invCovMat.GetColLwb() || values2.GetUpb() != invCovMat.GetColUpb()) 
return -1;
 
   27   for (
int i = values1.GetLwb(); 
i <= values1.GetUpb(); 
i++) {
 
   28     for (
int j = values2.GetLwb(); j <= values2.GetUpb(); j++) {
 
   29       chi2Val += invCovMat(
i, j)*values1(
i)*values2(j);
 
 
 
 
◆ upb()
  
  | 
        
          | int LArSamples::Chi2Calc::upb | ( |  | ) | const |  | inlinevirtual | 
 
 
◆ useCorrs()
  
  | 
        
          | bool LArSamples::Chi2Calc::useCorrs | ( |  | ) | const |  | inlineprivate | 
 
 
◆ m_lwb
  
  | 
        
          | int LArSamples::Chi2Calc::m_lwb |  | private | 
 
 
◆ m_pars
  
  | 
        
          | int LArSamples::Chi2Calc::m_pars |  | private | 
 
 
◆ m_upb
  
  | 
        
          | int LArSamples::Chi2Calc::m_upb |  | private | 
 
 
The documentation for this class was generated from the following files:
 
TVectorD deltas(const AbsShape &data, const AbsShape &reference, CovMatrix &errors, const ScaledErrorData *shapeError=0, int lwb=-1, int upb=-1, bool noDataError=false)