MINT2
FitAmpPairFitCovariance.h
Go to the documentation of this file.
1 #ifndef FIT_AMP_PAIR_FIT_COVARIANCE_HH
2 #define FIT_AMP_PAIR_FIT_COVARIANCE_HH
3 
4 #include <map>
5 #include <string>
6 #include "TMatrixT.h"
7 #include "TMatrixTSym.h"
8 
9 class FitAmpPairList;
10 
12  static unsigned int _maxSize;
14  TMatrixTSym<double> _fitCov;
15  unsigned int _Nevents;
16  unsigned int _size;
18 
19  TMatrixTSym<double> _fitResult;
20 
21  TMatrixTSym<double> _pairCov, _pairCorr;
22  TMatrixTSym<double> _fractionCov;
23  TMatrixTSym<double> _fractionSumCov;
24  TMatrixTSym<double> _interferenceFracSumCov;
25  TMatrixTSym<double> _totalFractionSumCov; // debug only
26 
28  TMatrixT<double> _dFraction_by_dFitAmpPair;
29  TMatrixT<double> _dFractionSum_by_dFraction;
31  TMatrixT<double> _dTotalFractionSum_by_dFraction; // debug only
32 
33  std::string realName(int i) const;
34  std::string imagName(int i) const;
35 
36  inline int indexReal(int i){return 2*i;}
37  inline int indexImag(int i){return 2*i + 1;}
38  inline int listPositionFromIndex(int idx){return idx/2;}
39 
45 
46  bool resize();
47  unsigned int maxSize()const{return _maxSize;}
48 
49  bool makeFitAmpPairCov();
53  bool makeTotalFractionSumCovariance(); // debug only
54 
55  public:
57  , const TMatrixTSym<double>& fitCov);
59 
60  bool addLastEventFromList();
61  bool calculateAll();
62 
63  double getPairVariance(int i, int j);
64  double getPairError(int i, int j);
65 
66  double getFractionVariance(int i);
67  double getFractionError(int i);
68 
69  double getFractionSumVariance();
70  double getFractionSumError();
71 
74 
75  double getTotalFractionSumVariance(); //debug only - should always return 0.
76  double getTotalFractionSumError(); //debug only - should always return 0.
77  unsigned int size() const;
78  bool isValid()const;
79 };
80 
81 #endif
82 //
TMatrixTSym< double > _fitCov
TMatrixTSym< double > _totalFractionSumCov
TMatrixTSym< double > _fractionCov
const FitAmpPairList * _myList
TMatrixTSym< double > _interferenceFracSumCov
TMatrixTSym< double > _pairCorr
TMatrixTSym< double > _fitResult
TMatrixTSym< double > _pairCov
double getPairVariance(int i, int j)
TMatrixT< double > _dTotalFractionSum_by_dFraction
TMatrixT< double > _dFractionSum_by_dFraction
FitAmpPairFitCovariance(const FitAmpPairList *myList, const TMatrixTSym< double > &fitCov)
unsigned int maxSize() const
TMatrixT< double > _dFitAmpPair_by_dFitParameters
TMatrixT< double > _dInterferenceFracSum_by_dFraction
std::string realName(int i) const
TMatrixTSym< double > _fractionSumCov
TMatrixT< double > _dFraction_by_dFitAmpPair
std::string imagName(int i) const