simple-tof-analysis
 All Classes Namespaces Functions Variables Groups Pages
TSTemplatedLikelihoodCalc.h
1 /*
2  * TSTemplatedLikelihoodCalc.h
3  *
4  * Created on: Nov 3, 2014
5  * Author: Silvestro di Luise
6  * Silvestro.Di.Luise@cern.ch
7  *
8  */
9 
10 #ifndef TSTEMPLATEDLIKELIHOODCALC_H_
11 #define TSTEMPLATEDLIKELIHOODCALC_H_
12 
13 
14 #include <TObjArray.h>
15 #include <TH1.h>
16 
17 #include "TSNuiParamSet.h"
18 #include "TSMinimizationFunction.h"
19 #include "TSChi2ConstraintCalc.h"
20 
21 
22 #include "TSEventDataSet.h"
23 
24 /*
25  *
26  */
27 
29 
30 public:
32  virtual ~TSTemplatedLikelihoodCalc();
33 
34 
35  void AddObservedVsExpected(TH1 *Obs, TSEventDataSet *Exp);
36 
37  void AddParamChi2Constraint(TSChi2ConstraintCalc &);
38 
39  virtual double Compute() const;
40 
41  virtual double ComputeChi2Constraint() const;
42 
43  virtual double GetValue() const {return fValue;}
44  virtual double GetLikeValue() const {return fLikeValue;}
45 
46  virtual double GetChi2ConstraintValue() const {return fConstraintValue;}
47 
48 
49  double GetLikeValuePart(int);
50 
51  bool HasParamSet() const {return fHasParamSet;}
52 
53  void Init();
54 
55  //void RandomizeDataObs();
56 
57 protected:
58 
59 
60 private:
61 
62  mutable double fValue;
63  mutable std::vector<double> fLikeValuePart;
64 
65  mutable double fLikeValue;
66  mutable double fConstraintValue;
67 
68  int fNHistoPairs;
69  int fNConstraints;
70 
71  TObjArray aObsData;
72  TObjArray aObsDataRef;
73  TObjArray aExpData;
74  TObjArray aExpDataMgr;
75  TObjArray aConstraint;
76 
77 
78  TSNuiParamSet fNuiParam_Set;
79  bool fHasParamSet;
80 
81 };
82 
83 #endif /* TSTEMPLATEDLIKELIHOODCALC_H_ */
Definition: TSChi2ConstraintCalc.h:31
Definition: TSEventDataSet.h:32
Definition: TSMinimizationFunction.h:46
Definition: TSNuiParamSet.h:36
Definition: TSTemplatedLikelihoodCalc.h:28