#include <NuEZRunsFitter.h>
Public Member Functions | |
| NuEZRunsFitter () | |
| Constructor. | |
| ~NuEZRunsFitter () | |
| void | AddRun (std::string Helper, std::string NeardetData, std::string FardetData) |
| Adds a new run to the multirun fitter. | |
| void | AddRun (NuEZFitter *EZFitter) |
| Adds an existing NuEZFitter run to the fitter. | |
| NuMatrixSpectrum | PredictionNQ (Double_t dm2bar, Double_t sn2bar, Double_t dm2=2.4e-3, Double_t sn2=1.0) const |
| Generates an NQ prediction. | |
| NuMatrixSpectrum | PredictionNQ (const NuMMParameters ¶ms) const |
| Generates an NQ prediction. | |
| NuMatrixSpectrum | PredictionPQ (Double_t dm2bar, Double_t sn2bar, Double_t dm2=2.4e-3, Double_t sn2=1.0) const |
| Generates an PQ prediction. | |
| NuMatrixSpectrum | PredictionPQ (const NuMMParameters ¶ms) const |
| Generates an PQ prediction. | |
| NuMatrixSpectrum | FDDataNQ () const |
| Returns the NQ Far detector spectrum. | |
| NuMatrixSpectrum | FDDataPQ () const |
| Returns the PQ Far detector spectrum. | |
| NuSystFitter * | Fitter () |
| Returns the fitter object. | |
| Double_t | Chi2 (Double_t dm2bar, Double_t sn2bar, Double_t dm2=2.4e-3, Double_t sn2=1.0) const |
| Returns the Delta-chi squared of a point This function accepts a set of oscillation parameters, makes a prediction at those values and then does a log-likelihood comparison to calculate the chi2. | |
| Double_t | Chi2 (const NuMMParameters ¶ms) const |
| Returns the Delta-chi squared of a point Accepts a NuMMParameters, and returns the chi2 at the point represented. | |
Private Member Functions | |
| void | BuildFitter (void) |
Private Attributes | |
| std::vector< NuEZFitter * > | fFitters |
| std::vector< NuEZFitter * > | fOwnedFitters |
| NuSystFitter * | fFitter |
| NuMMParameters * | fFitResult |
|
|
Constructor.
Definition at line 15 of file NuEZRunsFitter.cxx. 00015 : fFitter(0) 00016 { 00017 00018 }
|
|
|
Definition at line 20 of file NuEZRunsFitter.cxx. References fOwnedFitters. 00021 {
00022 // Delete our owned fitters
00023 while (!fOwnedFitters.empty())
00024 {
00025 // delete and remove the last element
00026 if (fOwnedFitters.back()) delete fOwnedFitters.back();
00027 fOwnedFitters.pop_back();
00028 }
00029 }
|
|
|
Adds an existing NuEZFitter run to the fitter.
Definition at line 41 of file NuEZRunsFitter.cxx. References BuildFitter(), and fFitters. 00042 {
00043 // Only accept if they passed a (valid) pointer
00044 if (EZFitter) fFitters.push_back(EZFitter);
00045
00046 BuildFitter();
00047 }
|
|
||||||||||||||||
|
Adds a new run to the multirun fitter.
Definition at line 31 of file NuEZRunsFitter.cxx. References BuildFitter(), fFitters, and fOwnedFitters. 00033 {
00034 NuEZFitter *f = new NuEZFitter(Helper, NeardetData, FardetData);
00035 fFitters.push_back(f);
00036 fOwnedFitters.push_back(f);
00037
00038 BuildFitter();
00039 }
|
|
|
Definition at line 118 of file NuEZRunsFitter.cxx. References fFitter, fFitters, and NuSystFitter::push_back(). Referenced by AddRun(). 00119 {
00120 // First delete the old fitter, if it exists
00121 if (fFitter) delete fFitter;
00122 fFitter = 0;
00123
00124 // Only build if we have runs
00125 if (fFitters.size() == 0) return;
00126
00127 // Create!
00128 fFitter = new NuSystFitter();
00129
00130 // Add all of our runs to the new fitter
00131 for(UInt_t i = 0; i < fFitters.size(); i++) {
00132 fFitter->push_back(fFitters[i]->Run());
00133 }
00134 }
|
|
|
Returns the Delta-chi squared of a point Accepts a NuMMParameters, and returns the chi2 at the point represented.
Definition at line 148 of file NuEZRunsFitter.cxx. References MSG, and NuMMParameters::VectorParameters(). 00149 {
00150 if (fFitter) {
00151 return (*fFitter)(params.VectorParameters());
00152 } else {
00153 MSG("NuEZRunsFitter",Msg::kError) << "No Fitter exists. Have you added FD data?" << endl;
00154 return 0;
00155 }
00156 }
|
|
||||||||||||||||||||
|
Returns the Delta-chi squared of a point This function accepts a set of oscillation parameters, makes a prediction at those values and then does a log-likelihood comparison to calculate the chi2.
Definition at line 136 of file NuEZRunsFitter.cxx. References NuMMParameters::Dm2(), NuMMParameters::Dm2Bar(), NuMMParameters::Sn2(), and NuMMParameters::Sn2Bar(). 00137 {
00138 NuMMParameters mmPars;
00139 mmPars.Dm2(dm2);
00140 mmPars.Sn2(sn2);
00141 mmPars.Dm2Bar(dm2bar);
00142 mmPars.Sn2Bar(sn2bar);
00143
00144 // return (*fFitter)(mmPars.VectorParameters());
00145 return Chi2(mmPars);
00146 }
|
|
|
Returns the NQ Far detector spectrum.
Definition at line 95 of file NuEZRunsFitter.cxx. References NuMatrixSpectrum::Add(), fFitters, and total(). 00096 {
00097 NuMatrixSpectrum total;
00098 // Loop over all runs, and combine the spectra
00099 for (UInt_t i = 0; i < fFitters.size(); i++) {
00100 // Add the data spectrum, accumulating POTs
00101 total.Add(fFitters[i]->FDDataNQ(), true);
00102 }
00103
00104 return total;
00105 }
|
|
|
Returns the PQ Far detector spectrum.
Definition at line 107 of file NuEZRunsFitter.cxx. References NuMatrixSpectrum::Add(), fFitters, and total(). 00108 {
00109 NuMatrixSpectrum total;
00110 // Loop over all runs, and combine the spectra
00111 for (UInt_t i = 0; i < fFitters.size(); i++) {
00112 total.Add(fFitters[i]->FDDataPQ(), true);
00113 }
00114
00115 return total;
00116 }
|
|
|
Returns the fitter object.
Definition at line 45 of file NuEZRunsFitter.h. 00045 { return fFitter; }
|
|
|
Generates an NQ prediction.
Definition at line 74 of file NuEZRunsFitter.cxx. References NuMatrixSpectrum::Add(), fFitters, PredictionNQ(), and total(). 00075 {
00076 NuMatrixSpectrum total;
00077 // Loop over all runs, and combine the spectra
00078 for (UInt_t i = 0; i < fFitters.size(); i++) {
00079 total.Add(fFitters[i]->PredictionNQ(params), true);
00080 }
00081
00082 return total;
00083 }
|
|
||||||||||||||||||||
|
Generates an NQ prediction.
Definition at line 50 of file NuEZRunsFitter.cxx. References NuMMParameters::Dm2(), NuMMParameters::Dm2Bar(), NuMMParameters::Sn2(), and NuMMParameters::Sn2Bar(). Referenced by PredictionNQ(). 00052 {
00053 NuMMParameters mmPars;
00054 mmPars.Dm2(dm2);
00055 mmPars.Sn2(sn2);
00056 mmPars.Dm2Bar(dm2bar);
00057 mmPars.Sn2Bar(sn2bar);
00058
00059 return PredictionNQ(mmPars);
00060 }
|
|
|
Generates an PQ prediction.
Definition at line 84 of file NuEZRunsFitter.cxx. References NuMatrixSpectrum::Add(), fFitters, PredictionPQ(), and total(). 00085 {
00086 NuMatrixSpectrum total;
00087 // Loop over all runs, and combine the spectra
00088 for (UInt_t i = 0; i < fFitters.size(); i++) {
00089 total.Add(fFitters[i]->PredictionPQ(params), true);
00090 }
00091
00092 return total;
00093 }
|
|
||||||||||||||||||||
|
Generates an PQ prediction.
Definition at line 62 of file NuEZRunsFitter.cxx. References NuMMParameters::Dm2(), NuMMParameters::Dm2Bar(), NuMMParameters::Sn2(), and NuMMParameters::Sn2Bar(). Referenced by PredictionPQ(). 00064 {
00065 NuMMParameters mmPars;
00066 mmPars.Dm2(dm2);
00067 mmPars.Sn2(sn2);
00068 mmPars.Dm2Bar(dm2bar);
00069 mmPars.Sn2Bar(sn2bar);
00070
00071 return PredictionPQ(mmPars);
00072 }
|
|
|
Definition at line 70 of file NuEZRunsFitter.h. |
|
|
Definition at line 69 of file NuEZRunsFitter.h. Referenced by BuildFitter(). |
|
|
Definition at line 66 of file NuEZRunsFitter.h. Referenced by AddRun(), BuildFitter(), FDDataNQ(), FDDataPQ(), PredictionNQ(), and PredictionPQ(). |
|
|
Definition at line 67 of file NuEZRunsFitter.h. Referenced by AddRun(), and ~NuEZRunsFitter(). |
1.3.9.1