laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauFitNtuple.hh
Go to the documentation of this file.
1 
2 /*
3 Copyright 2004 University of Warwick
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 */
17 
18 /*
19 Laura++ package authors:
20 John Back
21 Paul Harrison
22 Thomas Latham
23 */
24 
37 //****************************************************************************
38 // Class to store the results from the fit/toy MC into an ntuple
39 // -- CLASS DESCRIPTION [MISC] --
41 
42 #ifndef LAU_FIT_NTUPLE
43 #define LAU_FIT_NTUPLE
44 
45 #include "LauAbsFitter.hh"
46 
47 #include "TMatrixDfwd.h"
48 #include "TString.h"
49 
50 #include <set>
51 #include <vector>
52 
53 class TFile;
54 class TTree;
55 
56 class LauParameter;
57 
58 class LauFitNtuple {
59 
60  public:
62 
66  LauFitNtuple( const TString& fileName, Bool_t storeAsymErrors );
67 
69  virtual ~LauFitNtuple();
70 
72 
77  void storeCorrMatrix( const UInt_t iExpt,
78  const LauAbsFitter::FitStatus& fitStatus,
79  const TMatrixD& covMatrix );
80 
82 
87  void storeParsAndErrors( const std::vector<LauParameter*>& fitVars,
88  const std::set<TString>& constrainedVars,
89  const std::vector<LauParameter>& extraVars );
90 
92  void updateFitNtuple();
93 
95  void writeOutFitResults();
96 
97  private:
99  LauFitNtuple( const LauFitNtuple& rhs );
100 
103 
105  TString rootFileName_;
107  TFile* rootFile_;
109  TTree* fitResults_;
110 
112  std::vector<LauParameter*> fitVars_;
114  std::set<TString> constrainedVars_;
116  std::vector<LauParameter> extraVars_;
117 
119  std::vector<std::vector<Double_t>> corrMatrix_;
120 
125 
129  UInt_t nFitPars_;
131  UInt_t nFreePars_;
133  UInt_t nExtraPars_;
135  Int_t iExpt_;
136 
137  ClassDef( LauFitNtuple, 0 ) // Fit/toyMC results ntuple
138 };
139 
140 #endif
Bool_t storeAsymErrors_
Flags whether or not to store the asymmetric error information.
UInt_t nExtraPars_
Number of extra parameters.
LauFitNtuple & operator=(const LauFitNtuple &rhs)
Copy assignment operator (not implemented)
Class for defining the fit parameter objects.
Definition: LauParameter.hh:49
Struct to store fit status information.
Definition: LauAbsFitter.hh:54
File containing declaration of LauAbsFitter class.
std::vector< LauParameter * > fitVars_
Fit variables.
TFile * rootFile_
Root file.
TTree * fitResults_
Fit results.
std::vector< LauParameter > extraVars_
Extra variables.
virtual ~LauFitNtuple()
Destructor.
Definition: LauFitNtuple.cc:66
void storeCorrMatrix(const UInt_t iExpt, const LauAbsFitter::FitStatus &fitStatus, const TMatrixD &covMatrix)
Store the correlation matrix and other fit information.
Definition: LauFitNtuple.cc:76
std::set< TString > constrainedVars_
Fit variables that are included in a multi-dimensional constraint.
Class to store the results from the fit into an ntuple.
Definition: LauFitNtuple.hh:58
UInt_t nFreePars_
Number of free parameters.
Bool_t definedFitTree_
Flags whether the fit tree has been defined.
Int_t iExpt_
Experiment number.
LauAbsFitter::FitStatus fitStatus_
Status of fit.
TString rootFileName_
Name of root file.
void writeOutFitResults()
Write out fit results.
std::vector< std::vector< Double_t > > corrMatrix_
Correlation matrix.
void storeParsAndErrors(const std::vector< LauParameter * > &fitVars, const std::set< TString > &constrainedVars, const std::vector< LauParameter > &extraVars)
Store parameters and their errors.
LauFitNtuple(const LauFitNtuple &rhs)
Copy constructor (not implemented)
LauFitNtuple(const TString &fileName, Bool_t storeAsymErrors)
Constructor.
Definition: LauFitNtuple.cc:44
void updateFitNtuple()
Update the fit ntuple.
UInt_t nFitPars_
Number of fit parameters.