ROOTPWA
massDepFitLikeli.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 // File and Version Information:
3 // $Id$
4 //
5 // Description:
6 // mass dependent fit likelihood rank 1!
7 //
8 //
9 // Author List:
10 // Sebastian Neubert TUM (original author)
11 //
12 //
13 //-----------------------------------------------------------
14 
15 #ifndef MASSDEPFITLIKELI_HH
16 #define MASSDEPFITLIKELI_HH
17 
18 // Base Class Headers ----------------
19 #include "Math/IFunction.h"
20 
21 // Collaborating Class Headers -------
22 #include <vector>
23 #include <map>
24 #include <string>
25 #include "pwacomponent.h"
26 #include <boost/numeric/ublas/vector.hpp>
27 #include <boost/numeric/ublas/vector_proxy.hpp>
28 #include <boost/numeric/ublas/matrix.hpp>
29 #include "TMatrixD.h"
30 // Collaborating Class Declarations --
31 class TTree;
32 class TF1;
33 
34 namespace rpwa {
35 
36  class fitResult;
37 
38 namespace ublas = boost::numeric::ublas;
39 typedef std::complex<double> cnum;
40 typedef ublas::matrix<cnum> cmatrix;
41 typedef ublas::matrix<double> rmatrix;
42 typedef ublas::matrix<rmatrix> ccmatrix;
43 
44 
45  class massDepFitLikeli : public ROOT::Math::IBaseFunctionMultiDim {
46  public:
47 
48  // Constructors/Destructors ---------
50  virtual ~massDepFitLikeli(){}
51 
52 
53  // Accessors -----------------------
54  virtual unsigned int NDim() const;
55  unsigned int NDataPoints() const;
56 
57  // Modifiers -----------------------
58  void init(TTree* fitresulttree,
59  TF1* finalStatePhaseSpace,
60  pwacompset* compset,
61  double mmin=0, double mmax=5000,
62  bool doCov=true);
63 
64 
65 
66  // Operations ----------------------
67  virtual double DoEval (const double* par) const;
68 
69  virtual IBaseFunctionMultiDim* Clone()const {return new massDepFitLikeli(*this);}
70 
71 
72 
73  private:
74 
75  // Private Data Members ------------
76  TTree* _tree;
79  fitResult* _rhom; // measured spindensity matrix;
80  //std::vector<fitResult> _vrhom; // memory resident data
81  std::vector<cmatrix> _spindens; // mremory resident spindensity
82  std::vector<ccmatrix> _cov;
83  std::vector<double> _mass;
84 
85  std::vector<std::string> _wlist;
86  std::vector<unsigned int> _index; // wave indices in fitResult
87  double _mmin, _mmax; // fitrange
88  bool _doCov; // take covariance between Real and Imag into account?
89  // Private Methods -----------------
90 
91  };
92 
93 } // end namespace
94 
95 #endif
96 
97 //--------------------------------------------------------------
98 // $Log$
99 //--------------------------------------------------------------