laura is hosted by Hepforge, IPPP Durham
Laura++  v2r2
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauFitNtuple.hh
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2004 - 2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
23 //****************************************************************************
24 // Class to store the results from the fit/toy MC into an ntuple
25 // -- CLASS DESCRIPTION [MISC] --
27 
28 #ifndef LAU_FIT_NTUPLE
29 #define LAU_FIT_NTUPLE
30 
31 #include <vector>
32 
33 #include "TMatrixDfwd.h"
34 #include "TString.h"
35 
36 class TFile;
37 class TTree;
38 
39 class LauParameter;
40 
41 
42 class LauFitNtuple {
43 
44  public:
46 
50  LauFitNtuple(const TString& fileName, Bool_t storeAsymErrors);
51 
53  virtual ~LauFitNtuple();
54 
56 
62  void storeCorrMatrix(UInt_t iExpt, Double_t NLL, Int_t fitStatus, const TMatrixD& covMatrix);
63 
65 
69  void storeParsAndErrors(const std::vector<LauParameter*>& fitVars, const std::vector<LauParameter>& extraVars);
70 
72  void updateFitNtuple();
73 
75  void writeOutFitResults();
76 
77  private:
79  TString rootFileName_;
81  TFile* rootFile_;
83  TTree* fitResults_;
84 
86  std::vector<LauParameter*> fitVars_;
88  std::vector<LauParameter> extraVars_;
89 
91  std::vector< std::vector<Double_t> > corrMatrix_;
92 
97 
99  Int_t fitStatus_;
101  UInt_t nFitPars_;
103  UInt_t nFreePars_;
105  UInt_t nExtraPars_;
107  Double_t NLL_;
109  Int_t iExpt_;
110 
111  ClassDef(LauFitNtuple,0) // Fit/toyMC results ntuple
112 
113 };
114 
115 #endif
Bool_t definedFitTree_
Flags whether the fit tree has been defined.
Definition: LauFitNtuple.hh:94
std::vector< LauParameter * > fitVars_
Fit variables.
Definition: LauFitNtuple.hh:86
Int_t iExpt_
Experiment number.
UInt_t nExtraPars_
Number of extra parameters.
std::vector< std::vector< Double_t > > corrMatrix_
Correlation matrix.
Definition: LauFitNtuple.hh:91
std::vector< LauParameter > extraVars_
Extra variables.
Definition: LauFitNtuple.hh:88
void updateFitNtuple()
Update the fit ntuple.
TFile * rootFile_
Root file.
Definition: LauFitNtuple.hh:81
UInt_t nFitPars_
Number of fit parameters.
void writeOutFitResults()
Write out fit results.
LauFitNtuple(const TString &fileName, Bool_t storeAsymErrors)
Constructor.
Definition: LauFitNtuple.cc:35
void storeCorrMatrix(UInt_t iExpt, Double_t NLL, Int_t fitStatus, const TMatrixD &covMatrix)
Store the correlation matrix and other fit information.
Definition: LauFitNtuple.cc:64
Class for defining the fit parameter objects.
Definition: LauParameter.hh:33
Double_t NLL_
Minimised negative log likelihood.
virtual ~LauFitNtuple()
Destructor.
Definition: LauFitNtuple.cc:56
void storeParsAndErrors(const std::vector< LauParameter * > &fitVars, const std::vector< LauParameter > &extraVars)
Store parameters and their errors.
TTree * fitResults_
Fit results.
Definition: LauFitNtuple.hh:83
Class to store the results from the fit into an ntuple.
Definition: LauFitNtuple.hh:42
TString rootFileName_
Name of root file.
Definition: LauFitNtuple.hh:79
Int_t fitStatus_
Status of fit.
Definition: LauFitNtuple.hh:99
UInt_t nFreePars_
Number of free parameters.
Bool_t storeAsymErrors_
Flags whether or not to store the asymmetric error information.
Definition: LauFitNtuple.hh:96