FarOverNearFit Class Reference

#include <FarOverNearFit.h>

Inheritance diagram for FarOverNearFit:
NuMMRun

List of all members.

Public Types

enum  whichPred { CC, NC }
enum  whichDet { ND, FD }

Public Member Functions

 FarOverNearFit ()
virtual ~FarOverNearFit ()
void SetNDMC (TFile *MC_file, TFile *Nue_file, TFile *NuTau_file)
void SetDataFromTFile (TFile *NDData_file, TFile *FDData_file)
void SetNDBaseline (double baseline)
void SetFDMC (TFile *MC_file, TFile *Nue_file, TFile *NuTau_file)
void SetFDBaseline (double baseline)
void SetCorrectionFile (TFile *file)
void SetMatrices (TFile *Data_file)
void SetPOT (double POT_)
void Initalise ()
void TurnOnCorrection ()
void DoNotRebinData ()
void TurnOnDynamic ()
void TurnOffCC ()
void TurnOffNC ()
virtual Double_t ComparePredWithData (const NuMMParameters &pars)
virtual std::vector< TH1D > WriteFDPredHistos (const NuMMParameters &pars) const
void LoadHelpers ()
void LoadMatrices ()
void LoadCorrection ()
void ApplyCorrectionToHelpers ()
TH2D * AlterTH2D (TH2D *orig, TH1D *hCorr)
std::vector< Double_t > LogBins (int nbins, double xlo, double xhi)
Double_t NDNormPenaltyTerm (whichPred Pred)
Double_t GetTotalChi2_CC ()
Double_t GetTotalChi2_NC ()
void CalculateNDIntegrals ()
void MakeFlucuatedRatios (const NuMMParameters &parameters)
NuMMParameters CreateThreeFlavPars (NuMMParameters pars, bool upper, bool nh)
NuMMParameters CreatePars (NuMMParameters pars, bool upper, bool nh)
void CreateFakeHighStatsData (const NuMMParameters &parameters)
void CreatePrediction (const NuMMParameters &parameters)
void ScaleCCMatrices ()
void ScaleNCMatrices ()
NuMMParameters DoFit (NuSystFitter *fitter, NuMMParameters pars)
void PerformInitialThreeFlavourFit (NuSystFitter *fitter, NuMMParameters pars)
void FitTheta34Only (NuSystFitter *fitter, NuMMParameters pars)
Double_t PenaltyTermDm232 (Double_t dm232)
Double_t ChiSqFunction (TH1D *rPred, TH1D *rData, TMatrixD *CoVarInvert)
void ProfileMassHierarchy ()
void UseDm241 (bool YesorNo)
void Add (FarOverNearFit *fnFit)
void SetUseCC (bool use)
void SetUseNC (bool use)

Public Attributes

SterileSpecSpectrumClass
std::vector< NuMMParametersvfitPars_three
std::vector< NuMMParametersvfitPars_th34onlyfit
TMatrixD * CoVarCCinvert
TMatrixD * CoVarNCinvert
TMatrixD * CoVarCC
TMatrixD * CoVarNC
TMatrixD * CoVarCCNoScale
TMatrixD * CoVarNCNoScale
TH1F * ND_MC_POT
TH1F * ND_Nue_POT
TH1F * ND_NuTau_POT
TH1F * ND_data_POT
TH1F * FD_MC_POT
TH1F * FD_Nue_POT
TH1F * FD_NuTau_POT
TH2D * NDNC_TrueNC
TH2D * NDNC_NuMu
TH2D * NDNC_BeamNue
TH2D * NDNC_AppNue
TH2D * NDNC_AppNuTau
TH2D * NDCC_TrueNC
TH2D * NDCC_NuMu
TH2D * NDCC_BeamNue
TH2D * NDCC_AppNue
TH2D * NDCC_AppNuTau
TH2D * FDNC_TrueNC
TH2D * FDNC_NuMu
TH2D * FDNC_BeamNue
TH2D * FDNC_AppNue
TH2D * FDNC_AppNuTau
TH2D * FDCC_TrueNC
TH2D * FDCC_NuMu
TH2D * FDCC_BeamNue
TH2D * FDCC_AppNue
TH2D * FDCC_AppNuTau
TH1D * FD_dataNC
TH1D * FD_dataCC
TH1D * ND_dataNC
TH1D * ND_dataCC
TH1D * FDfakeNC
TH1D * FDfakeCC
TH1D * NDfakeNC
TH1D * NDfakeCC
TH1D * FDOscCC_MC
TH1D * NDOscCC_MC
TH1D * FDOscNC_MC
TH1D * NDOscNC_MC
TH1D * FDOsc3CC_MC
TH1D * NDOsc3CC_MC
TH1D * FDOsc3NC_MC
TH1D * NDOsc3NC_MC
TH1D * hCorrectionFDCC
TH1D * hCorrectionFDNC
TH1D * hCorrectionNDCC
TH1D * hCorrectionNDNC
TH1D * RdataCC
TH1D * RdataNC
TH1D * RpredCC
TH1D * RpredNC
TH1D * RflucCC
TH1D * RflucNC
TH1D * RfakeCC
TH1D * RfakeNC
Double_t ND_baseline
Double_t FD_baseline
Double_t totalChi2
Double_t totalChi2_NC
Double_t totalChi2_CC
bool use41
bool got_helpers
bool got_matrices
bool got_correction
bool RebinData
bool ApplyCorrection
bool Dynamic
bool useCC
bool useNC

Private Member Functions

 ClassDef (FarOverNearFit, 0)

Private Attributes

TFile * ND_MC
TFile * ND_Nue
TFile * ND_NuTau
TFile * ND_data
TFile * FD_MC
TFile * FD_Nue
TFile * FD_NuTau
TFile * FD_data
TFile * matrix
TFile * correctionfile
Double_t POT
Double_t TotalNDCC
Double_t TotalNDNC
Double_t Ri
Double_t Rj
Double_t Ni
Double_t stat
Double_t syst
Double_t sig2
Int_t binNumberCC
Int_t binNumberNC
bool init
bool DatafromTFile
bool got_NDint
bool ProfileMH
bool Do3FlavFit
bool Doth34onlyFit

Detailed Description

Definition at line 20 of file FarOverNearFit.h.


Member Enumeration Documentation

Enumerator:
ND 
FD 

Definition at line 24 of file FarOverNearFit.h.

00024 {ND, FD};

Enumerator:
CC 
NC 

Definition at line 23 of file FarOverNearFit.h.

00023 {CC, NC};


Constructor & Destructor Documentation

FarOverNearFit::FarOverNearFit (  ) 

Definition at line 27 of file FarOverNearFit.cxx.

References init(), and Munits::km.

00027                               :ND_MC(0), ND_Nue(0), ND_NuTau(0), ND_data(0),
00028                                  FD_MC(0), FD_Nue(0), FD_NuTau(0), FD_data(0),
00029                                  POT(0.0)
00030 {
00031   ND_baseline = 0.00*Munits::km;
00032   FD_baseline = 0.00*Munits::km;
00033 
00034   got_helpers     = false;
00035   got_matrices    = false;
00036   got_correction  = false;
00037   init            = false;
00038   DatafromTFile   = false;
00039   RebinData       = true;
00040   got_NDint       = false;
00041   ProfileMH       = false;
00042   use41           = false;
00043 
00044   Do3FlavFit      = false;
00045   Doth34onlyFit   = false;
00046   ApplyCorrection = false;
00047 
00048   useCC           = true;
00049   useNC           = true;
00050 
00051   SpectrumClass = new SterileSpec();
00052 }

FarOverNearFit::~FarOverNearFit (  )  [virtual]

Definition at line 55 of file FarOverNearFit.cxx.

00056 {
00057 
00058 }


Member Function Documentation

void FarOverNearFit::Add ( FarOverNearFit fnFit  ) 

Definition at line 341 of file FarOverNearFit.cxx.

References FD_dataCC, FD_dataNC, FDCC_AppNue, FDCC_AppNuTau, FDCC_BeamNue, FDCC_NuMu, FDCC_TrueNC, FDNC_AppNue, FDNC_AppNuTau, FDNC_BeamNue, FDNC_NuMu, FDNC_TrueNC, ND_dataCC, ND_dataNC, NDCC_AppNue, NDCC_AppNuTau, NDCC_BeamNue, NDCC_NuMu, NDCC_TrueNC, NDNC_AppNue, NDNC_AppNuTau, NDNC_BeamNue, NDNC_NuMu, NDNC_TrueNC, RdataCC, RdataNC, SterileSpec::SetFDMCHistograms(), SterileSpec::SetNDMCHistograms(), and SpectrumClass.

00341                                              {
00342 
00343   // data
00344   FD_dataNC->Add(fnFit->FD_dataNC);
00345   FD_dataCC->Add(fnFit->FD_dataCC);
00346   ND_dataNC->Add(fnFit->ND_dataNC);
00347   ND_dataCC->Add(fnFit->ND_dataCC);
00348 
00349   // data ratios
00350   RdataCC = (TH1D*)FD_dataCC->Clone();
00351   RdataCC->Divide(ND_dataCC);
00352   RdataNC = (TH1D*)FD_dataNC->Clone();
00353   RdataNC->Divide(ND_dataNC);
00354 
00355   // ND
00356   NDNC_TrueNC   ->Add(fnFit->NDNC_TrueNC);
00357   NDNC_NuMu     ->Add(fnFit->NDNC_NuMu);
00358   NDNC_BeamNue  ->Add(fnFit->NDNC_BeamNue);
00359   NDNC_AppNue   ->Add(fnFit->NDNC_AppNue);
00360   NDNC_AppNuTau ->Add(fnFit->NDNC_AppNuTau);
00361 
00362   NDCC_TrueNC   ->Add(fnFit->NDCC_TrueNC);
00363   NDCC_NuMu     ->Add(fnFit->NDCC_NuMu);
00364   NDCC_BeamNue  ->Add(fnFit->NDCC_BeamNue);
00365   NDCC_AppNue   ->Add(fnFit->NDCC_AppNue);
00366   NDCC_AppNuTau ->Add(fnFit->NDCC_AppNuTau);
00367 
00368   // FD
00369   FDNC_TrueNC   ->Add(fnFit->FDNC_TrueNC);
00370   FDNC_NuMu     ->Add(fnFit->FDNC_NuMu);
00371   FDNC_BeamNue  ->Add(fnFit->FDNC_BeamNue);
00372   FDNC_AppNue   ->Add(fnFit->FDNC_AppNue);
00373   FDNC_AppNuTau ->Add(fnFit->FDNC_AppNuTau);
00374 
00375   FDCC_TrueNC   ->Add(fnFit->FDCC_TrueNC);
00376   FDCC_NuMu     ->Add(fnFit->FDCC_NuMu);
00377   FDCC_BeamNue  ->Add(fnFit->FDCC_BeamNue);
00378   FDCC_AppNue   ->Add(fnFit->FDCC_AppNue);
00379   FDCC_AppNuTau ->Add(fnFit->FDCC_AppNuTau);
00380 
00381   // send the sum to SpectrumClass
00382   SpectrumClass->SetNDMCHistograms(NDNC_TrueNC, NDNC_NuMu, NDNC_BeamNue, NDNC_AppNue, NDNC_AppNuTau,
00383                                    NDCC_TrueNC, NDCC_NuMu, NDCC_BeamNue, NDCC_AppNue, NDCC_AppNuTau);
00384   SpectrumClass->SetFDMCHistograms(FDNC_TrueNC, FDNC_NuMu, FDNC_BeamNue, FDNC_AppNue, FDNC_AppNuTau,
00385                                    FDCC_TrueNC, FDCC_NuMu, FDCC_BeamNue, FDCC_AppNue, FDCC_AppNuTau);
00386 
00387   cout << "Add done" << endl;
00388 }

TH2D * FarOverNearFit::AlterTH2D ( TH2D *  orig,
TH1D *  hCorr 
)

Definition at line 207 of file FarOverNearFit.cxx.

Referenced by ApplyCorrectionToHelpers().

00208 {
00209   TH2D* newhist = new TH2D(*orig);
00210 
00211   for(Int_t ybin = 1; ybin <= orig->GetNbinsY(); ++ybin){
00212 
00213     double recoenergy = orig->GetYaxis()->GetBinCenter(ybin);
00214     double factor = hCorr->GetBinContent(hCorr->FindFixBin(recoenergy));
00215 
00216     // now loop over true L/E and apply this
00217     for(Int_t xbin = 1; xbin <= orig->GetNbinsX(); ++xbin){
00218 
00219       double newvalue = (orig->GetBinContent(xbin, ybin) * factor);
00220       newhist->SetBinContent(xbin, ybin, newvalue);
00221 
00222     }
00223   }
00224 
00225   return newhist;
00226 } 

void FarOverNearFit::ApplyCorrectionToHelpers (  ) 

Definition at line 177 of file FarOverNearFit.cxx.

References AlterTH2D(), FDCC_AppNue, FDCC_AppNuTau, FDCC_BeamNue, FDCC_NuMu, FDCC_TrueNC, FDNC_AppNue, FDNC_AppNuTau, FDNC_BeamNue, FDNC_NuMu, FDNC_TrueNC, hCorrectionFDCC, hCorrectionFDNC, hCorrectionNDCC, hCorrectionNDNC, NDCC_AppNue, NDCC_AppNuTau, NDCC_BeamNue, NDCC_NuMu, NDCC_TrueNC, NDNC_AppNue, NDNC_AppNuTau, NDNC_BeamNue, NDNC_NuMu, and NDNC_TrueNC.

Referenced by Initalise().

void FarOverNearFit::CalculateNDIntegrals (  ) 

Definition at line 400 of file FarOverNearFit.cxx.

References SterileSpec::CC, SterileSpec::CreateTotalSpectrum(), NuMMParameters::Dm2(), NuMMParameters::Dm221(), got_NDint, SterileSpec::NC, SterileSpec::ND, SpectrumClass, NuMMParameters::Theta12(), NuMMParameters::Theta13(), NuMMParameters::Theta23(), TotalNDCC, and TotalNDNC.

Referenced by NDNormPenaltyTerm().

00401 {
00402   if(got_NDint) return;
00403 
00404   // This function will save two numbers the CC and NC ND Integrals from 0 - 40 Gev    
00405   // Firt create a NuMMPars which is zero oscills for the ND
00406   NuMMParameters pars0;
00407   pars0.Dm2(0.0);     pars0.Dm221(0.0); 
00408   pars0.Theta23(0.0); pars0.Theta13(0.0); 
00409   pars0.Theta12(0.0); 
00410 
00411   TH1D* NDCCUnosc = SpectrumClass->CreateTotalSpectrum(pars0, SterileSpec::CC, SterileSpec::ND);
00412   TH1D* NDNCUnosc = SpectrumClass->CreateTotalSpectrum(pars0, SterileSpec::NC, SterileSpec::ND);
00413 
00414   // I need to find the bin index for 40 gev for intergal
00415   TotalNDCC = NDCCUnosc->Integral(1, NDCCUnosc->FindFixBin(40) );
00416   TotalNDNC = NDNCUnosc->Integral(1, NDNCUnosc->FindFixBin(40) );
00417 
00418   //std::cout << "NDCC UnOscillated Int = " << TotalNDCC << std::endl;
00419   //std::cout << "NDNC UnOscillated Int = " << TotalNDNC << std::endl;
00420 
00421   got_NDint = true;
00422 }

Double_t FarOverNearFit::ChiSqFunction ( TH1D *  rPred,
TH1D *  rData,
TMatrixD *  CoVarInvert 
)

Definition at line 1116 of file FarOverNearFit.cxx.

Referenced by ComparePredWithData().

01117 {
01118   if(!(rPred->GetNbinsX() == rData->GetNbinsX())){ 
01119     std::cout << "Incorrect Binning agreement. Asserting" << std::endl;
01120     assert(false);
01121   }
01122 
01123   Int_t NumberOfBins = rPred->GetNbinsX() - 1; // miss out the last bin as its 40Gev+
01124 
01125   // This will be my diff between data and MC
01126   TVectorD Difference(NumberOfBins);
01127 
01128   // Fill the vector up
01129   for(Int_t i=1; i<=NumberOfBins; ++i){
01130     Difference(i-1) = (rData->GetBinContent(i) - rPred->GetBinContent(i));
01131   }
01132 
01133   TVectorD temp = Difference;
01134   temp *= (*CoVarInvert);
01135 
01136   Double_t TotalChiSq = temp*Difference;
01137 
01138   return TotalChiSq;
01139 
01140 }

FarOverNearFit::ClassDef ( FarOverNearFit  ,
 
) [private]
Double_t FarOverNearFit::ComparePredWithData ( const NuMMParameters pars  )  [virtual]

Implements NuMMRun.

Definition at line 612 of file FarOverNearFit.cxx.

References SterileSpec::CC, CC, ChiSqFunction(), CoVarCCinvert, CoVarNCinvert, SterileSpec::CreateTotalSpectrum(), NuMMParameters::Dm2(), NuMMParameters::Dm221(), Dynamic, SterileSpec::FD, FDOscCC_MC, FDOscNC_MC, Initalise(), SterileSpec::NC, NC, SterileSpec::ND, NDNormPenaltyTerm(), NDOsc3CC_MC, NDOsc3NC_MC, NDOscCC_MC, NDOscNC_MC, PenaltyTermDm232(), RdataCC, RdataNC, RpredCC, RpredNC, ScaleCCMatrices(), ScaleNCMatrices(), SpectrumClass, NuMMParameters::Theta12(), NuMMParameters::Theta13(), NuMMParameters::Theta23(), totalChi2, totalChi2_CC, totalChi2_NC, useCC, and useNC.

Referenced by FeldmanSterile::CalculateChi2Best1D(), FeldmanSterile::CalculateChi2Best2D(), FeldmanSterile::CalculateChi2Profile(), DoFit(), FitTheta34Only(), FeldmanSterile::FitThreeFlavourOnly(), and PerformInitialThreeFlavourFit().

00613 {
00614   Initalise();
00615   
00616   //pars.PrintStatus();
00617 
00618   Double_t NormCCpen = 0.0;
00619   Double_t NormNCpen = 0.0;
00620 
00621   Double_t chisqCC = 0.0;
00622   Double_t chisqNC = 0.0;
00623   Double_t Penalty = 0.0;
00624 
00625   NuMMParameters pars3; // Need to get 3-flavour parameters for stat matrix scaling
00626   pars3.Dm2(pars.Dm2());
00627   pars3.Dm221(pars.Dm221());
00628   pars3.Theta23(pars.Theta23());
00629   pars3.Theta13(pars.Theta13());
00630   pars3.Theta12(pars.Theta12());
00631 
00632   if(useCC){
00633     // I need to oscillate my MC
00634     FDOscCC_MC = SpectrumClass->CreateTotalSpectrum(pars, SterileSpec::CC, SterileSpec::FD);
00635     NDOscCC_MC = SpectrumClass->CreateTotalSpectrum(pars, SterileSpec::CC, SterileSpec::ND);
00636     NDOsc3CC_MC = SpectrumClass->CreateTotalSpectrum(pars3, SterileSpec::CC, SterileSpec::ND);
00637     // Now i create the Ratios
00638     RpredCC    = (TH1D*)FDOscCC_MC->Clone();
00639     RpredCC->Divide(NDOscCC_MC);
00640     if(Dynamic){
00641       ScaleCCMatrices();
00642     }
00643     chisqCC    = ChiSqFunction(RpredCC, RdataCC, CoVarCCinvert);
00644     // Penalty Terms
00645     NormCCpen  = NDNormPenaltyTerm(CC);
00646   }
00647 
00648   if(useNC){
00649     FDOscNC_MC = SpectrumClass->CreateTotalSpectrum(pars, SterileSpec::NC, SterileSpec::FD);
00650     NDOscNC_MC = SpectrumClass->CreateTotalSpectrum(pars, SterileSpec::NC, SterileSpec::ND);
00651     NDOsc3NC_MC = SpectrumClass->CreateTotalSpectrum(pars3, SterileSpec::NC, SterileSpec::ND);
00652     RpredNC    = (TH1D*)FDOscNC_MC->Clone();
00653     RpredNC->Divide(NDOscNC_MC);
00654     if(Dynamic){
00655       ScaleNCMatrices();
00656     }
00657     chisqNC    = ChiSqFunction(RpredNC, RdataNC, CoVarNCinvert);
00658     NormNCpen  = NDNormPenaltyTerm(NC);
00659   }
00660 
00661   Penalty = PenaltyTermDm232(pars.Dm2());
00662   // CC and NC parts
00663   totalChi2_CC = chisqCC + NormCCpen;
00664   totalChi2_NC = chisqNC + NormNCpen;
00665 
00666   totalChi2 = totalChi2_CC + totalChi2_NC + Penalty;
00667 
00668   /*
00669   std::cout << " " << std::endl;
00670   std::cout << "NC chi sq    = " << chisqNC << std::endl;
00671   std::cout << "NC pen term  = " << NormNCpen << std::endl;
00672   std::cout << "CC chi sq    = " << chisqCC << std::endl;
00673   std::cout << "CC pen term  = " << NormCCpen << std::endl;
00674   std::cout << "Penalty Term = " << Penalty << std::endl;
00675   std::cout << "Total CC     = " << chisqCC + NormCCpen << std::endl;
00676   std::cout << "Total NC     = " << chisqNC + NormNCpen << std::endl;
00677   std::cout << "Total Chi2   = " << chisqCC + NormCCpen + chisqNC + NormNCpen + Penalty << std::endl;
00678   */
00679 
00680   return totalChi2;
00681 }

void FarOverNearFit::CreateFakeHighStatsData ( const NuMMParameters parameters  ) 
NuMMParameters FarOverNearFit::CreatePars ( NuMMParameters  pars,
bool  upper,
bool  nh 
)

Definition at line 712 of file FarOverNearFit.cxx.

References NuMMParameters::Dm2(), and NuMMParameters::Theta23().

Referenced by CreateThreeFlavPars(), DoFit(), and FitTheta34Only().

00713 {
00714   // This will change the MH and octatns but keep evrything else the same.
00715   // Good for looping thurgh the 4 options.
00716   NuMMParameters parsnew = pars;
00717 
00718   // Make sure we are in the right hierarchy
00719   if ( nh == true ){
00720     if ( pars.Dm2() >= 0 )  parsnew.Dm2( pars.Dm2() );
00721     else parsnew.Dm2( pars.Dm2() * (-1) );
00722   }
00723   if ( nh == false ){
00724     if ( pars.Dm2() >= 0 )  parsnew.Dm2( pars.Dm2() * (-1) );
00725     else parsnew.Dm2( pars.Dm2() );
00726   }
00727 
00728   // Ensure theta23 is in the right octant, if not.. change it
00729   if (upper == true) {
00730     if ( pars.Theta23() <= TMath::Pi()/4 ){
00731       parsnew.Theta23( 0.89816 );
00732     }
00733   }
00734   else if (upper == false){
00735     if ( pars.Theta23() > TMath::Pi()/4 ){
00736       parsnew.Theta23(0.681);
00737     }
00738   }
00739 
00740   return parsnew;
00741 }

void FarOverNearFit::CreatePrediction ( const NuMMParameters parameters  ) 

Definition at line 518 of file FarOverNearFit.cxx.

References SterileSpec::CC, SterileSpec::CreateTotalSpectrum(), NuMMParameters::Dm2(), NuMMParameters::Dm221(), SterileSpec::FD, FDOsc3CC_MC, FDOsc3NC_MC, FDOscCC_MC, FDOscNC_MC, Initalise(), SterileSpec::NC, SterileSpec::ND, NDOsc3CC_MC, NDOsc3NC_MC, NDOscCC_MC, NDOscNC_MC, RpredCC, RpredNC, SpectrumClass, NuMMParameters::Theta12(), NuMMParameters::Theta13(), and NuMMParameters::Theta23().

Referenced by MakeFlucuatedRatios().

00519 {
00520   Initalise();
00521 
00522   NuMMParameters pars3;
00523   pars3.Dm2(pars.Dm2());
00524   pars3.Dm221(pars.Dm221());
00525   pars3.Theta23(pars.Theta23());
00526   pars3.Theta13(pars.Theta13());
00527   pars3.Theta12(pars.Theta12());
00528 
00529   NDOsc3CC_MC = SpectrumClass->CreateTotalSpectrum(pars3, SterileSpec::CC, SterileSpec::ND);
00530   NDOsc3NC_MC = SpectrumClass->CreateTotalSpectrum(pars3, SterileSpec::NC, SterileSpec::ND);
00531   FDOsc3CC_MC = SpectrumClass->CreateTotalSpectrum(pars3, SterileSpec::CC, SterileSpec::FD);
00532   FDOsc3NC_MC = SpectrumClass->CreateTotalSpectrum(pars3, SterileSpec::NC, SterileSpec::FD);
00533 
00534   // I need to oscillate my MC
00535   FDOscCC_MC = SpectrumClass->CreateTotalSpectrum(pars, SterileSpec::CC, SterileSpec::FD);
00536   FDOscNC_MC = SpectrumClass->CreateTotalSpectrum(pars, SterileSpec::NC, SterileSpec::FD);
00537   NDOscCC_MC = SpectrumClass->CreateTotalSpectrum(pars, SterileSpec::CC, SterileSpec::ND);
00538   NDOscNC_MC = SpectrumClass->CreateTotalSpectrum(pars, SterileSpec::NC, SterileSpec::ND);
00539 
00540   // Now i create the Ratios
00541   RpredCC = (TH1D*)FDOscCC_MC->Clone();
00542   RpredCC->Divide(NDOscCC_MC);
00543 
00544   RpredNC = (TH1D*)FDOscNC_MC->Clone();
00545   RpredNC->Divide(NDOscNC_MC);
00546 
00547 }

NuMMParameters FarOverNearFit::CreateThreeFlavPars ( NuMMParameters  pars,
bool  upper,
bool  nh 
)

Definition at line 693 of file FarOverNearFit.cxx.

References CreatePars(), NuMMParameters::FixAllParameters(), NuMMParameters::FixCCSystematics(), NuMMParameters::FixNCSystematics(), NuMMParameters::ReleaseDm2(), and NuMMParameters::ReleaseTheta23().

Referenced by PerformInitialThreeFlavourFit().

00694 {
00695   // This function just takes the users pars but fixes everything except Dm232 and th23                                                      
00696   // By making another pars i dont have to know what is already fixed/free  
00697 
00698   NuMMParameters pars3 = CreatePars(pars, upper, nh);
00699   
00700   // Fix everything
00701   pars3.FixAllParameters();
00702   pars3.FixCCSystematics();
00703   pars3.FixNCSystematics();
00704 
00705   // Now release what i want
00706   pars3.ReleaseDm2();
00707   pars3.ReleaseTheta23();
00708   
00709   return pars3;
00710 }

NuMMParameters FarOverNearFit::DoFit ( NuSystFitter fitter,
NuMMParameters  pars 
)

Definition at line 1001 of file FarOverNearFit.cxx.

References ComparePredWithData(), NuMMParameters::ConstrainDelta1(), NuMMParameters::ConstrainDelta2(), NuMMParameters::ConstrainDelta3(), NuMMParameters::ConstrainTheta23(), NuMMParameters::ConstrainTheta24(), NuMMParameters::ConstrainTheta34(), CreatePars(), NuMMParameters::Dm2(), Do3FlavFit, Doth34onlyFit, MuELoss::e, Initalise(), NuSystFitter::Minimise(), ProfileMH, OscFit::Theta23(), NuMMParameters::Theta23(), NuMMParameters::Theta34(), vfitPars_th34onlyfit, and vfitPars_three.

01002 {
01003   Initalise();
01004 
01005   std::cout << " " << std::endl;
01006   std::cout << "Doing Sterile Fit" << std::endl;
01007 
01008   std::vector<NuMMParameters> vpars;
01009   std::vector<NuMMParameters> vfitPars;
01010   std::vector<Double_t> vchi2;
01011 
01012   Int_t index(0);
01013 
01014   if( ProfileMH == true ){
01015 
01016     std::cout << "Profiling over both mass hierarchies" << std::endl;
01017 
01018     for (int i = 0; i < 2; ++i) {
01019       for (int j = 0; j < 2; ++j) {
01020         
01021         cout << "i = " << i << ", j = " << j << endl;
01022         
01023         if (Do3FlavFit == true ){
01024           // If there was a three flavour fit i want this intial starting points                                                             
01025           // choose starting Dm2  
01026           pars.Dm2( vfitPars_three[index].Dm2() );
01027           pars.Theta23( vfitPars_three[index].Theta23() );
01028 
01029           cout << "Dm2 from 3 flav = " << vfitPars_three[index].Dm2() << endl;
01030           cout << "th23 from 3 flav = " << vfitPars_three[index].Theta23() << endl;
01031         }
01032 
01033         //if i fit for Theta34 only then set this as a good starting point
01034         if ( Doth34onlyFit == true ) pars.Theta34( vfitPars_th34onlyfit[index].Theta34() );
01035 
01036         NuMMParameters currPars = CreatePars( pars, i, j);
01037         
01038         //currPars.ConstrainDm2( -1e-1, 1e-1 );
01039         currPars.ConstrainTheta23( 0, TMath::Pi()/2 + 1e-2);
01040         currPars.ConstrainTheta34( 0, TMath::Pi()/2 + 1e-2);
01041         currPars.ConstrainTheta24( 0, TMath::Pi()/2 + 1e-2);
01042         currPars.ConstrainDelta1(  0, 2*TMath::Pi() + 1e-2);
01043         currPars.ConstrainDelta2(  0, 2*TMath::Pi() + 1e-2);
01044         currPars.ConstrainDelta3(  0, 2*TMath::Pi() + 1e-2);
01045         
01046         NuMMParameters currBest = fitter->Minimise( currPars );
01047         double currChi2 = ComparePredWithData( currBest );
01048         
01049         vpars.push_back( currPars );
01050         vfitPars.push_back( currBest );
01051         vchi2.push_back( currChi2 );
01052 
01053         index++;
01054       }
01055     }
01056   }
01057   else{ // Do a single mass heirachy
01058 
01059     Int_t MH(0);
01060 
01061     // Figure out which one the user has specified
01062     if( pars.Dm2() > 0 ){
01063       std::cout << "Only doing NH" << std::endl;
01064       MH = 1;
01065     }
01066     else{
01067       std::cout << "Only doing IH" << std::endl;
01068       MH = 0;
01069     }
01070 
01071     for (int i = 0; i < 2; ++i) {
01072 
01073       cout << "i = " << i << endl;
01074 
01075       if ( Doth34onlyFit == true ) pars.Theta34( vfitPars_th34onlyfit[i].Theta34() );
01076       
01077       NuMMParameters currPars = CreatePars( pars, i, MH);
01078 
01079       //if ( MH == 1 ) currPars.ConstrainDm2( 0     , 1e-2 );
01080       //if ( MH == 0 ) currPars.ConstrainDm2( -1e-2 , 0    );
01081 
01082       currPars.ConstrainTheta23( 0, TMath::Pi()/2 );
01083       currPars.ConstrainTheta34( 0, TMath::Pi()/2 );
01084       currPars.ConstrainTheta24( 0, TMath::Pi()/2 );
01085       currPars.ConstrainDelta1(  0, 2*TMath::Pi() );
01086       currPars.ConstrainDelta2(  0, 2*TMath::Pi() );
01087       currPars.ConstrainDelta3(  0, 2*TMath::Pi() );
01088 
01089       NuMMParameters currBest = fitter->Minimise( currPars );
01090       double currChi2 = ComparePredWithData( currBest );
01091 
01092       vpars.push_back( currPars );
01093       vfitPars.push_back( currBest );
01094       vchi2.push_back( currChi2 );
01095       
01096       index++;
01097     }
01098   }
01099   
01100   NuMMParameters bestPars;
01101   Double_t bestChi2 = vchi2[0];
01102 
01103   for ( Int_t i = 0; i < (Int_t)vchi2.size(); ++i) {
01104     if ( vchi2[i] <= bestChi2 ) {
01105       bestChi2 = vchi2[i];
01106       bestPars = vfitPars[i];
01107     }
01108   }
01109 
01110   std::cout << " " << std::endl;
01111   std::cout << "Sterile Fit complete pars fit Complete:" << std::endl;
01112 
01113   return bestPars;
01114 }

void FarOverNearFit::DoNotRebinData (  ) 

Definition at line 94 of file FarOverNearFit.cxx.

References RebinData.

00095 {
00096   std::cout << "Not Rebinning Data." << std::endl;
00097   
00098   RebinData = false;
00099 }

void FarOverNearFit::FitTheta34Only ( NuSystFitter fitter,
NuMMParameters  pars 
)

Definition at line 743 of file FarOverNearFit.cxx.

References ComparePredWithData(), NuMMParameters::ConstrainTheta23(), NuMMParameters::ConstrainTheta34(), CreatePars(), NuMMParameters::Dm2(), Do3FlavFit, Doth34onlyFit, NuMMParameters::FixAllParameters(), Initalise(), NuSystFitter::Minimise(), ProfileMH, NuMMParameters::ReleaseTheta34(), OscFit::Theta23(), NuMMParameters::Theta23(), NuMMParameters::Theta34(), vfitPars_th34onlyfit, and vfitPars_three.

00744 {
00745   Initalise();
00746   
00747   std::cout << " " << std::endl;
00748   std::cout << "Fitting Theta34 only" << std::endl;
00749 
00750   std::vector<NuMMParameters> vpars;
00751   std::vector<Double_t> vchi2;
00752 
00753   Int_t index(0);
00754 
00755   if( ProfileMH == true ){
00756 
00757     std::cout << "Profiling over both mass hierarchies" << std::endl;
00758 
00759     for (int i = 0; i < 2; ++i) {
00760       for (int j = 0; j < 2; ++j) {
00761 
00762         if (Do3FlavFit == true ){
00763           pars.Dm2( vfitPars_three[index].Dm2() );
00764           pars.Theta23( vfitPars_three[index].Theta23() );
00765         }
00766         
00767         NuMMParameters currPars = CreatePars( pars, i, j);
00768         
00769         //currPars.ConstrainDm2( -1e-2, 1e-2 );
00770         
00771         currPars.ConstrainTheta23( 0, TMath::Pi()/2 );
00772         currPars.ConstrainTheta34( 0, TMath::Pi()/2 );
00773         
00774         // Only want Theta34 free though                                                                                                     
00775         currPars.FixAllParameters();
00776         currPars.ReleaseTheta34();
00777         
00778         NuMMParameters currBest = fitter->Minimise( currPars );
00779         double currChi2 = ComparePredWithData( currBest );
00780         
00781         vpars.push_back( currPars );
00782         vfitPars_th34onlyfit.push_back( currBest );
00783         vchi2.push_back( currChi2 );
00784         
00785         index++;
00786       }
00787     }
00788   }
00789   else{
00790     Int_t MH(0);
00791     
00792     if( pars.Dm2() > 0 ){
00793       std::cout << "Only doing NH" << std::endl;
00794       MH = 1;
00795     }
00796     else{
00797       std::cout << "Only doing IH" << std::endl;
00798       MH = 0;
00799     }
00800  
00801     for (int i = 0; i < 2; ++i) {
00802       
00803       if (Do3FlavFit == true ){
00804             pars.Dm2( vfitPars_three[i].Dm2() );
00805             pars.Theta23( vfitPars_three[i].Theta23() );
00806       }
00807  
00808       NuMMParameters currPars = CreatePars( pars, i, MH);
00809       
00810       //if ( MH == 1 ) currPars.ConstrainDm2( 0      , 1e-2 );
00811       //if ( MH == 0 ) currPars.ConstrainDm2( -1e-2  , 0     );
00812       
00813       currPars.ConstrainTheta34( 0, TMath::Pi()/2 );
00814       
00815       currPars.FixAllParameters();
00816       currPars.ReleaseTheta34();
00817       
00818       NuMMParameters currBest = fitter->Minimise( currPars );
00819       double currChi2 = ComparePredWithData( currBest );
00820       
00821       vpars.push_back( currPars );
00822       vfitPars_th34onlyfit.push_back( currBest );
00823       vchi2.push_back( currChi2 );
00824 
00825       index++;
00826     }
00827   }
00828 
00829   NuMMParameters bestPars;
00830   Double_t bestChi2 = vchi2[0];
00831   
00832   for ( Int_t i = 0; i < (Int_t)vchi2.size(); ++i) {
00833     if ( vchi2[i] <= bestChi2 ) {
00834       bestChi2 = vchi2[i];
00835       bestPars = vfitPars_th34onlyfit[i];
00836     }
00837   }
00838   
00839   std::cout << " " << std::endl;
00840   std::cout << "Theta34 Only Fit Complete:" << std::endl;
00841   
00842   if( ProfileMH == true ){
00843     
00844     std::cout << "Dm243 best       = " << vfitPars_th34onlyfit[0].Dm243() << " eV^2" << std::endl;
00845     std::cout << "Theta24 best     = " << vfitPars_th34onlyfit[0].Theta24() << " eV^2" << std::endl;
00846     std::cout << "Dm232 best LO IH = " << vfitPars_th34onlyfit[0].Dm2() << " eV^2" << std::endl;
00847     std::cout << "Dm232 best LO NH = " << vfitPars_th34onlyfit[1].Dm2() << " eV^2" << std::endl;
00848     std::cout << "Dm232 best UO IH = " << vfitPars_th34onlyfit[2].Dm2() << " eV^2" << std::endl;
00849     std::cout << "Dm232 best UO NH = " << vfitPars_th34onlyfit[3].Dm2() << " eV^2" << std::endl;
00850     std::cout << "th23 best LO IH  = " << vfitPars_th34onlyfit[0].Theta23() << " radians" << std::endl;
00851     std::cout << "th23 best LO NH  = " << vfitPars_th34onlyfit[1].Theta23() << " radians " << std::endl;
00852     std::cout << "th23 best UO IH  = " << vfitPars_th34onlyfit[2].Theta23() << " radians" << std::endl;
00853     std::cout << "th23 best UO NH  = " << vfitPars_th34onlyfit[3].Theta23() << " radians " << std::endl;
00854     std::cout << "th34 best LO IH  = " << vfitPars_th34onlyfit[0].Theta34() << " radians" << std::endl;
00855     std::cout << "th34 best LO NH  = " << vfitPars_th34onlyfit[1].Theta34() << " radians " << std::endl;
00856     std::cout << "th34 best UO IH  = " << vfitPars_th34onlyfit[2].Theta34() << " radians" << std::endl;
00857     std::cout << "th34 best UO NH  = " << vfitPars_th34onlyfit[3].Theta34() << " radians " << std::endl;
00858     std::cout << "chi2 LO IH       = " << vchi2[0] << " units." << std::endl;
00859     std::cout << "chi2 LO NH       = " << vchi2[1] << " units." << std::endl;
00860     std::cout << "chi2 UO IH       = " << vchi2[2] << " units." << std::endl;
00861     std::cout << "chi2 UO NH       = " << vchi2[3] << " units." << std::endl;
00862   }
00863   else{
00864     std::cout << "Dm232 best LO  = " << vfitPars_th34onlyfit[0].Dm2() << " eV^2" << std::endl;
00865     std::cout << "Dm232 best UO  = " << vfitPars_th34onlyfit[1].Dm2() << " eV^2" << std::endl;
00866     std::cout << "th23 best LO   = " << vfitPars_th34onlyfit[0].Theta23() << " radians" << std::endl;
00867     std::cout << "th23 best UO   = " << vfitPars_th34onlyfit[1].Theta23() << " radians" << std::endl;
00868     std::cout << "th34 best LO   = " << vfitPars_th34onlyfit[0].Theta34() << " radians" << std::endl;
00869     std::cout << "th34 best UO   = " << vfitPars_th34onlyfit[1].Theta34() << " radians" << std::endl;
00870     std::cout << "chi2 LO        = " << vchi2[0] << " units." << std::endl;
00871     std::cout << "chi2 UO        = " << vchi2[1] << " units." << std::endl;
00872   }
00873   
00874   std::cout << " " << std::endl;
00875   std::cout << "Theta23 best     = " << bestPars.Theta23() << " radians" << std::endl;
00876   std::cout << "Theta34 best     = " << bestPars.Theta34() << " radians" << std::endl;
00877   std::cout << "Dm232 best       = " << bestPars.Dm2() << " eV^2" << std::endl;
00878   std::cout << "chi2 best value  = " << bestChi2 << std::endl;
00879   std::cout << " " << std::endl;
00880       
00881   Doth34onlyFit = true;
00882 }

Double_t FarOverNearFit::GetTotalChi2_CC (  ) 

Definition at line 395 of file FarOverNearFit.cxx.

References totalChi2_CC.

00396 {
00397   return totalChi2_CC;
00398 }

Double_t FarOverNearFit::GetTotalChi2_NC (  ) 

Definition at line 390 of file FarOverNearFit.cxx.

References totalChi2_NC.

00391 {
00392   return totalChi2_NC;
00393 }

void FarOverNearFit::Initalise (  ) 

Definition at line 456 of file FarOverNearFit.cxx.

References ApplyCorrection, ApplyCorrectionToHelpers(), CoVarCC, CoVarCCinvert, CoVarNC, CoVarNCinvert, FD_baseline, FDCC_AppNue, FDCC_AppNuTau, FDCC_BeamNue, FDCC_NuMu, FDCC_TrueNC, FDNC_AppNue, FDNC_AppNuTau, FDNC_BeamNue, FDNC_NuMu, FDNC_TrueNC, init, LoadCorrection(), LoadHelpers(), LoadMatrices(), ND_baseline, NDCC_AppNue, NDCC_AppNuTau, NDCC_BeamNue, NDCC_NuMu, NDCC_TrueNC, NDNC_AppNue, NDNC_AppNuTau, NDNC_BeamNue, NDNC_NuMu, NDNC_TrueNC, SterileSpec::SetFDBaseline(), SterileSpec::SetFDMCHistograms(), SterileSpec::SetMatrices(), SterileSpec::SetNDBaseline(), SterileSpec::SetNDMCHistograms(), and SpectrumClass.

Referenced by ComparePredWithData(), CreatePrediction(), DoFit(), FitTheta34Only(), PerformInitialThreeFlavourFit(), and FeldmanSterile::SetUpFarOverNearFitClass().

00457 {
00458   if(init) return;
00459 
00460   LoadHelpers();
00461   LoadMatrices();
00462   
00463   if(ApplyCorrection == true){
00464     LoadCorrection();
00465     ApplyCorrectionToHelpers();
00466   }
00467 
00468   SpectrumClass->SetNDMCHistograms(NDNC_TrueNC, NDNC_NuMu, NDNC_BeamNue, NDNC_AppNue, NDNC_AppNuTau,
00469                                    NDCC_TrueNC, NDCC_NuMu, NDCC_BeamNue, NDCC_AppNue, NDCC_AppNuTau);
00470   SpectrumClass->SetFDMCHistograms(FDNC_TrueNC, FDNC_NuMu, FDNC_BeamNue, FDNC_AppNue, FDNC_AppNuTau,
00471                                    FDCC_TrueNC, FDCC_NuMu, FDCC_BeamNue, FDCC_AppNue, FDCC_AppNuTau);
00472 
00473   // Set the Baselines (Very Important)
00474   // Codes defaults to no oscillations if these are set to zero.
00475   SpectrumClass->SetNDBaseline(ND_baseline);
00476   SpectrumClass->SetFDBaseline(FD_baseline);
00477 
00478   SpectrumClass->SetMatrices(CoVarCCinvert, CoVarNCinvert, CoVarCC, CoVarNC);
00479 
00480   init = true;
00481 }

void FarOverNearFit::LoadCorrection (  ) 

Definition at line 137 of file FarOverNearFit.cxx.

References correctionfile, got_correction, hCorrectionFDCC, hCorrectionFDNC, hCorrectionNDCC, and hCorrectionNDNC.

Referenced by Initalise().

00138 {
00139   if(got_correction) return;
00140 
00141   // These are the FD and ND errors to correct the helper files with
00142   hCorrectionFDCC = (TH1D*)correctionfile->Get("FDErr_AshleyCreated_RecoEnergyCC"); assert(hCorrectionFDCC);
00143   hCorrectionFDNC = (TH1D*)correctionfile->Get("FDErr_AshleyCreated_RecoEnergyNC"); assert(hCorrectionFDNC);
00144 
00145   hCorrectionNDCC = (TH1D*)correctionfile->Get("NDErr_AshleyCreated_RecoEnergyCC"); assert(hCorrectionNDCC);
00146   hCorrectionNDNC = (TH1D*)correctionfile->Get("NDErr_AshleyCreated_RecoEnergyNC"); assert(hCorrectionNDNC);
00147 
00148   got_correction = true;
00149 
00150 }

void FarOverNearFit::LoadHelpers (  ) 

Definition at line 228 of file FarOverNearFit.cxx.

References SterileSpec::CC, DatafromTFile, FD_data, FD_dataCC, FD_dataNC, FD_MC, FD_Nue, FD_NuTau, FDCC_AppNue, FDCC_AppNuTau, FDCC_BeamNue, FDCC_NuMu, FDCC_TrueNC, FDNC_AppNue, FDNC_AppNuTau, FDNC_BeamNue, FDNC_NuMu, FDNC_TrueNC, got_helpers, SterileSpec::NC, ND_data, ND_dataCC, ND_dataNC, ND_MC, ND_Nue, ND_NuTau, NDCC_AppNue, NDCC_AppNuTau, NDCC_BeamNue, NDCC_NuMu, NDCC_TrueNC, NDNC_AppNue, NDNC_AppNuTau, NDNC_BeamNue, NDNC_NuMu, NDNC_TrueNC, RdataCC, RdataNC, RebinData, and SpectrumClass.

Referenced by Initalise().

00229 {
00230   if(got_helpers) return;
00231 
00232   // Do we have the TFiles? If not.. assert.
00233   assert(ND_MC); assert(ND_Nue); assert(ND_NuTau);
00234   assert(FD_MC); assert(FD_Nue); assert(FD_NuTau);
00235   
00236   ND_MC->GetObject("hRecoToTrueNCSelectedTrueNC",      NDNC_TrueNC);   assert(NDNC_TrueNC);
00237   ND_MC->GetObject("hRecoToTrueNCSelectedTrueCCNuMu",  NDNC_NuMu);     assert(NDNC_NuMu);
00238   ND_MC->GetObject("hRecoToTrueNCSelectedTrueBeamNuE",     NDNC_BeamNue);  assert(NDNC_BeamNue);
00239   ND_Nue->GetObject("hRecoToTrueNCSelectedTrueAppearedNuE",   NDNC_AppNue);   assert(NDNC_AppNue);
00240   ND_NuTau->GetObject("hRecoToTrueNCSelectedTrueAppearedTau", NDNC_AppNuTau); assert(NDNC_AppNuTau);
00241 
00242   ND_MC->GetObject("hRecoToTrueCCSelectedTrueNC_All",      NDCC_TrueNC);   assert(NDCC_TrueNC);
00243   ND_MC->GetObject("hRecoToTrueCCSelectedTrueCCNuMu_All",  NDCC_NuMu);     assert(NDCC_NuMu);
00244   ND_MC->GetObject("hRecoToTrueCCSelectedTrueBeamNuE_All",     NDCC_BeamNue);  assert(NDCC_BeamNue);
00245   ND_Nue->GetObject("hRecoToTrueCCSelectedTrueAppearedNuE_All",   NDCC_AppNue);   assert(NDCC_AppNue);
00246   ND_NuTau->GetObject("hRecoToTrueCCSelectedTrueAppearedTau_All", NDCC_AppNuTau); assert(NDCC_AppNuTau);
00247 
00248   FD_MC->GetObject("hRecoToTrueNCSelectedTrueNC",      FDNC_TrueNC);   assert(FDNC_TrueNC);
00249   FD_MC->GetObject("hRecoToTrueNCSelectedTrueCCNuMu",  FDNC_NuMu);     assert(FDNC_NuMu);
00250   FD_MC->GetObject("hRecoToTrueNCSelectedTrueBeamNuE",     FDNC_BeamNue);  assert(FDNC_BeamNue);
00251   FD_Nue->GetObject("hRecoToTrueNCSelectedTrueAppearedNuE",   FDNC_AppNue);   assert(FDNC_AppNue);
00252   FD_NuTau->GetObject("hRecoToTrueNCSelectedTrueAppearedTau", FDNC_AppNuTau); assert(FDNC_AppNuTau);
00253 
00254   FD_MC->GetObject("hRecoToTrueCCSelectedTrueNC_All",      FDCC_TrueNC);   assert(FDCC_TrueNC);
00255   FD_MC->GetObject("hRecoToTrueCCSelectedTrueCCNuMu_All",  FDCC_NuMu);     assert(FDCC_NuMu);
00256   FD_MC->GetObject("hRecoToTrueCCSelectedTrueBeamNuE_All",     FDCC_BeamNue);  assert(FDCC_BeamNue);
00257   FD_Nue->GetObject("hRecoToTrueCCSelectedTrueAppearedNuE_All",   FDCC_AppNue);   assert(FDCC_AppNue);
00258   FD_NuTau->GetObject("hRecoToTrueCCSelectedTrueAppearedTau_All", FDCC_AppNuTau); assert(FDCC_AppNuTau);
00259 
00260   //ND_MC->GetObject("hTotalPot", ND_MC_POT);    assert(ND_MC_POT);
00261   //ND_Nue->GetObject("hTotalPot", ND_Nue_POT);   assert(ND_Nue_POT);
00262   //ND_NuTau->GetObject("hTotalPot", ND_NuTau_POT); assert(ND_NuTau_POT);
00263   //FD_MC->GetObject("hTotalPot", FD_MC_POT);    assert(FD_MC_POT);
00264   //FD_Nue->GetObject("hTotalPot", FD_Nue_POT);   assert(FD_Nue_POT);
00265   //FD_NuTau->GetObject("hTotalPot", FD_NuTau_POT); assert(FD_NuTau_POT);
00266 
00267   if( DatafromTFile == true ){
00268 
00269     FD_data->GetObject("hRecoEnergyNC",    FD_dataNC); assert(FD_dataNC);
00270     FD_dataNC->SetName("hRecoEnergyNC_FD");
00271     FD_data->GetObject("hRecoEnergyCCAll", FD_dataCC); assert(FD_dataCC);
00272     FD_dataCC->SetName("hRecoEnergyCCAll_FD");
00273 
00274     ND_data->GetObject("hRecoEnergyNC",    ND_dataNC); assert(ND_dataNC);
00275     ND_dataNC->SetName("hRecoEnergyNC_ND");
00276     ND_data->GetObject("hRecoEnergyCCAll", ND_dataCC); assert(ND_dataCC);
00277     ND_dataCC->SetName("hRecoEnergyCCAll_ND");
00278 
00279     // Normalise ND with POT
00280     //ND_data->GetObject("hTotalPot", ND_data_POT);  assert(ND_data_POT);
00281     //double dataPOT = ND_data_POT->Integral();
00282     //ND_dataNC->Scale(POT/dataPOT);
00283     //ND_dataCC->Scale(POT/dataPOT);
00284 
00285     if( RebinData == true ){
00286       // Might as well rebin the data now
00287       FD_dataNC = SpectrumClass->SterileSpec::Rebin4Chi2(FD_dataNC, SterileSpec::NC);
00288       FD_dataCC = SpectrumClass->SterileSpec::Rebin4Chi2(FD_dataCC, SterileSpec::CC);
00289       ND_dataNC = SpectrumClass->SterileSpec::Rebin4Chi2(ND_dataNC, SterileSpec::NC);
00290       ND_dataCC = SpectrumClass->SterileSpec::Rebin4Chi2(ND_dataCC, SterileSpec::CC);
00291     }
00292     else{
00293       // Do nothing
00294     }
00295     // Create data ratios
00296     RdataCC = (TH1D*)FD_dataCC->Clone();
00297     RdataCC->Divide(ND_dataCC);
00298 
00299     RdataNC = (TH1D*)FD_dataNC->Clone();
00300     RdataNC->Divide(ND_dataNC);
00301   }
00302  
00303   /*
00304   // Normalise everything
00305   double ndmcPOT = ND_MC_POT->Integral();
00306   NDNC_TrueNC->Scale(POT/ndmcPOT);
00307   NDNC_NuMu->Scale(POT/ndmcPOT);
00308   NDNC_BeamNue->Scale(POT/ndmcPOT);
00309   NDCC_TrueNC->Scale(POT/ndmcPOT);
00310   NDCC_NuMu->Scale(POT/ndmcPOT);
00311   NDCC_BeamNue->Scale(POT/ndmcPOT);
00312 
00313   double ndnuePOT = ND_Nue_POT->Integral();
00314   NDNC_AppNue->Scale(POT/ndnuePOT);
00315   NDCC_AppNue->Scale(POT/ndnuePOT);
00316 
00317   double ndnutauPOT = ND_NuTau_POT->Integral();
00318   NDNC_AppNuTau->Scale(POT/ndnutauPOT);
00319   NDCC_AppNuTau->Scale(POT/ndnutauPOT);
00320 
00321   double fdmcPOT = FD_MC_POT->Integral();
00322   FDNC_TrueNC->Scale(POT/fdmcPOT);
00323   FDNC_NuMu->Scale(POT/fdmcPOT);
00324   FDNC_BeamNue->Scale(POT/fdmcPOT);
00325   FDCC_TrueNC->Scale(POT/fdmcPOT);
00326   FDCC_NuMu->Scale(POT/fdmcPOT);
00327   FDCC_BeamNue->Scale(POT/fdmcPOT);
00328 
00329   double fdnuePOT = FD_Nue_POT->Integral();
00330   FDNC_AppNue->Scale(POT/fdnuePOT);
00331   FDCC_AppNue->Scale(POT/fdnuePOT);
00332 
00333   double fdnutauPOT = FD_NuTau_POT->Integral();
00334   FDNC_AppNuTau->Scale(POT/fdnutauPOT);
00335   FDCC_AppNuTau->Scale(POT/fdnutauPOT);
00336   */
00337 
00338   got_helpers = true;
00339 }

void FarOverNearFit::LoadMatrices (  ) 

Definition at line 152 of file FarOverNearFit.cxx.

References CoVarCCinvert, CoVarCCNoScale, CoVarNCinvert, CoVarNCNoScale, got_matrices, and matrix.

Referenced by Initalise().

00153 {
00154   if(got_matrices) return;
00155 
00156   CoVarCCinvert = (TMatrixD*)matrix->Get("TotalInvertCC"); assert(CoVarCCinvert);
00157   CoVarNCinvert = (TMatrixD*)matrix->Get("TotalInvertNC"); assert(CoVarNCinvert);
00158 
00159   CoVarCCNoScale = (TMatrixD*)matrix->Get("TotalCCCovar"); assert(CoVarCCNoScale);
00160   CoVarNCNoScale = (TMatrixD*)matrix->Get("TotalNCCovar"); assert(CoVarNCNoScale);
00161 
00162 }

std::vector<Double_t> FarOverNearFit::LogBins ( int  nbins,
double  xlo,
double  xhi 
)
void FarOverNearFit::MakeFlucuatedRatios ( const NuMMParameters parameters  ) 

Definition at line 498 of file FarOverNearFit.cxx.

References CoVarCC, CoVarNC, CreatePrediction(), Dynamic, MultiVarGauss::Generate(), RflucCC, RflucNC, RpredCC, RpredNC, ScaleCCMatrices(), and ScaleNCMatrices().

Referenced by FeldmanSterile::Calculate2DdeltaChi2().

00499 {
00500   CreatePrediction(pars); // create the prediction for scaling and fluctuating
00501   if(Dynamic){  // check for rescaling option
00502     ScaleCCMatrices(); // scale the CC matrices
00503     ScaleNCMatrices(); // scale the NC matrices
00504   }
00505 
00506   // Make sure my pointers are clean and tidy
00507   if (RflucCC) {delete RflucCC;  RflucCC = 0;}
00508   if (RflucNC) {delete RflucNC;  RflucNC = 0;}
00509 
00510   // Flucuate it bin to bin correlations from matrix
00511   MultiVarGauss SampleFlucCC(RpredCC, CoVarCC);
00512   MultiVarGauss SampleFlucNC(RpredNC, CoVarNC);
00513 
00514   RflucCC = new TH1D(*SampleFlucCC.Generate());
00515   RflucNC = new TH1D(*SampleFlucNC.Generate());
00516 }

Double_t FarOverNearFit::NDNormPenaltyTerm ( whichPred  Pred  ) 

Definition at line 424 of file FarOverNearFit.cxx.

References CalculateNDIntegrals(), CC, NC, ND_dataCC, ND_dataNC, NDOsc3CC_MC, NDOsc3NC_MC, NDOscCC_MC, NDOscNC_MC, TotalNDCC, and TotalNDNC.

Referenced by ComparePredWithData().

00425 {
00426   CalculateNDIntegrals();
00427 
00428   Double_t UnOsc = 0.0;
00429   Double_t TotalNDData = 0.0;
00430   Double_t TotalstdOscNDMC = 0.0;
00431   Double_t TotalOscNDMC = 0.0;
00432 
00433   if(Pred == CC){
00434     UnOsc = TotalNDCC;
00435     TotalNDData = ND_dataCC->Integral(1, ND_dataCC->FindFixBin(40) );
00436     TotalstdOscNDMC = NDOsc3CC_MC->Integral(1, NDOsc3CC_MC->FindFixBin(40));
00437     TotalOscNDMC = NDOscCC_MC->Integral(1, NDOscCC_MC->FindFixBin(40));
00438   }
00439 
00440   if(Pred == NC){
00441     UnOsc = TotalNDNC;
00442     TotalNDData = ND_dataNC->Integral(1, ND_dataNC->FindFixBin(40));
00443     TotalstdOscNDMC = NDOsc3NC_MC->Integral(1, NDOsc3NC_MC->FindFixBin(40));
00444     TotalOscNDMC = NDOscNC_MC->Integral(1, NDOscNC_MC->FindFixBin(40));
00445   }
00446 
00447   // This is a 50% uncertainty from the 3-flavour ND prediction
00448   Double_t sigma = 0.5*TotalstdOscNDMC;
00449   Double_t Norm = (TotalNDData - TotalOscNDMC) * (TotalNDData - TotalOscNDMC);
00450   // The difference is taken between data and the (3+1)-flavour prediction
00451   Norm = Norm / (sigma * sigma);
00452 
00453   return Norm;
00454 }

Double_t FarOverNearFit::PenaltyTermDm232 ( Double_t  dm232  ) 

Definition at line 683 of file FarOverNearFit.cxx.

Referenced by ComparePredWithData().

00684 {
00685   // This is just (Dm2 - CentralValue)^2/(sigma)^2 
00686   Double_t dm232_pen = 0.0;
00687   dm232_pen = TMath::Power( (TMath::Abs(dm232) - 0.0025) , 2); // numerator
00688   dm232_pen /= TMath::Power( 0.0005, 2);
00689 
00690   return dm232_pen;
00691 }

void FarOverNearFit::PerformInitialThreeFlavourFit ( NuSystFitter fitter,
NuMMParameters  pars 
)

Definition at line 884 of file FarOverNearFit.cxx.

References ComparePredWithData(), NuMMParameters::ConstrainDelta1(), NuMMParameters::ConstrainDelta2(), NuMMParameters::ConstrainDelta3(), NuMMParameters::ConstrainTheta23(), NuMMParameters::ConstrainTheta24(), NuMMParameters::ConstrainTheta34(), CreateThreeFlavPars(), NuMMParameters::Dm2(), Do3FlavFit, Initalise(), NuSystFitter::Minimise(), ProfileMH, NuMMParameters::Theta23(), and vfitPars_three.

00885 {
00886   Initalise();
00887 
00888   std::cout << " " << std::endl;
00889   std::cout << "Initally performing Three flavour fit" << std::endl;
00890   
00891   std::vector<NuMMParameters> vpars;
00892   std::vector<Double_t> vchi2;
00893   
00894   if( ProfileMH == true ){
00895 
00896     std::cout << "Profiling over both mass hierarchies" << std::endl;
00897 
00898     for (int i = 0; i < 2; ++i) {
00899       for (int j = 0; j < 2; ++j) {
00900 
00901         NuMMParameters currPars = CreateThreeFlavPars( pars, i, j);
00902 
00903         //currPars.ConstrainDm2( -1e-2, 1e-2 );
00904         currPars.ConstrainTheta23( 0, TMath::Pi()/2 );
00905         currPars.ConstrainTheta34( 0, TMath::Pi()/2 );
00906         currPars.ConstrainTheta24( 0, TMath::Pi()/2 );
00907         currPars.ConstrainDelta1(  0, 2*TMath::Pi() );
00908         currPars.ConstrainDelta2(  0, 2*TMath::Pi() );
00909         currPars.ConstrainDelta3(  0, 2*TMath::Pi() );
00910 
00911         NuMMParameters currBest = fitter->Minimise( currPars );
00912         double currChi2 = ComparePredWithData( currBest );
00913 
00914         vpars.push_back( currPars );
00915         vfitPars_three.push_back( currBest );
00916         vchi2.push_back( currChi2 );
00917       }
00918     }
00919   }
00920   else{
00921     Int_t MH(0);
00922 
00923     if( pars.Dm2() > 0 ){
00924       std::cout << "Only doing NH" << std::endl;
00925       MH = 1;
00926     }
00927     else{
00928       std::cout << "Only doing IH" << std::endl;
00929       MH = 0;
00930     }
00931 
00932     for (int i = 0; i < 2; ++i) {
00933 
00934       NuMMParameters currPars = CreateThreeFlavPars( pars, i, MH);
00935 
00936       //if ( MH == 1 ) currPars.ConstrainDm2( 0      , 1e-2 );
00937       //if ( MH == 0 ) currPars.ConstrainDm2( -1e-2 , 0     );
00938 
00939       currPars.ConstrainTheta23( 0, TMath::Pi()/2 );
00940       currPars.ConstrainTheta34( 0, TMath::Pi()/2 );
00941       currPars.ConstrainTheta24( 0, TMath::Pi()/2 );
00942       currPars.ConstrainDelta1(  0, 2*TMath::Pi() );
00943       currPars.ConstrainDelta2(  0, 2*TMath::Pi() );
00944       currPars.ConstrainDelta3(  0, 2*TMath::Pi() );
00945 
00946       NuMMParameters currBest = fitter->Minimise( currPars );
00947       double currChi2 = ComparePredWithData( currBest );
00948 
00949       vpars.push_back( currPars );
00950       vfitPars_three.push_back( currBest );
00951       vchi2.push_back( currChi2 );
00952     }
00953   }
00954 
00955   NuMMParameters bestPars;
00956   Double_t bestChi2 = vchi2[0];
00957 
00958   for ( Int_t i = 0; i < (Int_t)vchi2.size(); ++i) {
00959     if ( vchi2[i] <= bestChi2 ) {
00960       bestChi2 = vchi2[i];
00961       bestPars = vfitPars_three[i];
00962     }
00963   }
00964 
00965   std::cout << " " << std::endl;
00966   std::cout << "Three flavour fit Complete:" << std::endl;
00967 
00968   if( ProfileMH == true ){
00969     std::cout << "Dm232 best LO IH = " << vfitPars_three[0].Dm2() << " eV^2" << std::endl;
00970     std::cout << "Dm232 best LO NH = " << vfitPars_three[1].Dm2() << " eV^2" << std::endl;
00971     std::cout << "Dm232 best UO IH = " << vfitPars_three[2].Dm2() << " eV^2" << std::endl;
00972     std::cout << "Dm232 best UO NH = " << vfitPars_three[3].Dm2() << " eV^2" << std::endl;
00973     std::cout << "th23 best LO IH  = " << vfitPars_three[0].Theta23() << " radians" << std::endl;
00974     std::cout << "th23 best LO NH  = " << vfitPars_three[1].Theta23() << " radians " << std::endl;
00975     std::cout << "th23 best UO IH  = " << vfitPars_three[2].Theta23() << " radians" << std::endl;
00976     std::cout << "th23 best UO NH  = " << vfitPars_three[3].Theta23() << " radians " << std::endl;
00977     std::cout << "chi2 LO IH       = " << vchi2[0] << " units." << std::endl;
00978     std::cout << "chi2 LO NH       = " << vchi2[1] << " units." << std::endl;
00979     std::cout << "chi2 UO IH       = " << vchi2[2] << " units." << std::endl;
00980     std::cout << "chi2 UO NH       = " << vchi2[3] << " units." << std::endl;
00981   }
00982   else{
00983     std::cout << "Dm232 best LO  = " << vfitPars_three[0].Dm2() << " eV^2" << std::endl;
00984     std::cout << "Dm232 best UO  = " << vfitPars_three[1].Dm2() << " eV^2" << std::endl;
00985     std::cout << "th23 best LO   = " << vfitPars_three[0].Theta23() << " radians" << std::endl;
00986     std::cout << "th23 best UO   = " << vfitPars_three[1].Theta23() << " radians" << std::endl;
00987     std::cout << "chi2 LO        = " << vchi2[0] << " units." << std::endl;
00988     std::cout << "chi2 UO        = " << vchi2[1] << " units." << std::endl;
00989   }
00990 
00991   std::cout << " " << std::endl;
00992   std::cout << "Theta23 best     = " << bestPars.Theta23() << " radians" << std::endl;
00993   std::cout << "Dm232 best       = " << bestPars.Dm2() << " eV^2" << std::endl;
00994   std::cout << "chi2 best value  = " << bestChi2 << std::endl;
00995   std::cout << " " << std::endl;
00996 
00997   Do3FlavFit = true;
00998 
00999 }

void FarOverNearFit::ProfileMassHierarchy (  ) 

Definition at line 1142 of file FarOverNearFit.cxx.

References ProfileMH.

01143 {
01144   ProfileMH = true;
01145 }

void FarOverNearFit::ScaleCCMatrices (  ) 

Definition at line 549 of file FarOverNearFit.cxx.

References binNumberCC, CoVarCC, CoVarCCinvert, CoVarCCNoScale, NDOsc3CC_MC, Ni, Ri, Rj, RpredCC, sig2, stat, and syst.

Referenced by ComparePredWithData(), and MakeFlucuatedRatios().

00550 {
00551   binNumberCC = RpredCC->GetNbinsX();
00552   CoVarCC = new TMatrixD(binNumberCC-1, binNumberCC-1);
00553 
00554   //Compute the scaled errors and fill the matrix
00555   for(Int_t i=1; i<=binNumberCC-1; ++i){
00556     for(Int_t j=1; j<=binNumberCC-1; ++j){
00557       Ri = RpredCC->GetBinContent(i); // get the F/N ratio from the ith bin
00558       Rj = RpredCC->GetBinContent(j); // get the F/N ratio from the jth bin
00559       stat = 0; // reset the errors
00560       sig2 = 0;
00561       if(i==j){
00562         Ni = NDOsc3CC_MC->GetBinContent(i);
00563         stat = Ri/Ni; // see DocDB 11466 for this formula, 4-flavour ratio / 3-flavour ND
00564       }
00565       syst = CoVarCCNoScale->operator()(i-1,j-1); // the relative systematics matrix element
00566       syst = Ri*Rj*syst; // scale the systematics contribution
00567       sig2 = stat + syst; // combined stats and systematics
00568       CoVarCC->operator()(i-1,j-1) = sig2; // fill the scaled matrix
00569     }
00570   }
00571   // Now invert the scaled matrix
00572   TDecompSVD* DeCom = new TDecompSVD(*CoVarCC);
00573   TMatrixD* invert = new TMatrixD(DeCom->Invert());
00574   CoVarCCinvert = new TMatrixD(*invert);
00575   // Clean up from inverting
00576   DeCom->Delete();
00577   invert->Delete();
00578 }

void FarOverNearFit::ScaleNCMatrices (  ) 

Definition at line 580 of file FarOverNearFit.cxx.

References binNumberNC, CoVarNC, CoVarNCinvert, CoVarNCNoScale, NDOsc3NC_MC, Ni, Ri, Rj, RpredNC, sig2, stat, and syst.

Referenced by ComparePredWithData(), and MakeFlucuatedRatios().

00581 {
00582   // see ScaleCCMatrices for line by line comments
00583   binNumberNC = RpredNC->GetNbinsX();
00584   CoVarNC = new TMatrixD(binNumberNC-1, binNumberNC-1);
00585 
00586   //Compute the scaled errors and fill the matrix
00587   for(Int_t i=1; i<=binNumberNC-1; ++i){
00588     for(Int_t j=1; j<=binNumberNC-1; ++j){
00589       Ri = RpredNC->GetBinContent(i);
00590       Rj = RpredNC->GetBinContent(j);
00591       stat = 0;
00592       sig2 = 0;
00593       if(i==j){
00594         Ni = NDOsc3NC_MC->GetBinContent(i);
00595         stat = Ri/Ni;
00596       }
00597       syst = CoVarNCNoScale->operator()(i-1,j-1);
00598       syst = Ri*Rj*syst;
00599       sig2 = stat + syst;
00600       CoVarNC->operator()(i-1,j-1) = sig2;
00601     }
00602   }
00603 
00604   TDecompSVD* DeCom = new TDecompSVD(*CoVarNC);
00605   TMatrixD* invert = new TMatrixD(DeCom->Invert());
00606   CoVarNCinvert = new TMatrixD(*invert);
00607 
00608   DeCom->Delete();
00609   invert->Delete();
00610 }

void FarOverNearFit::SetCorrectionFile ( TFile *  file  ) 

Definition at line 132 of file FarOverNearFit.cxx.

References correctionfile.

00133 {
00134   correctionfile = file;
00135 }

void FarOverNearFit::SetDataFromTFile ( TFile *  NDData_file,
TFile *  FDData_file 
)

Definition at line 68 of file FarOverNearFit.cxx.

References DatafromTFile, FD_data, and ND_data.

00069 {
00070   ND_data = NDData_file;
00071   FD_data = FDData_file;
00072 
00073   DatafromTFile = true;
00074 }

void FarOverNearFit::SetFDBaseline ( double  baseline  ) 

Definition at line 121 of file FarOverNearFit.cxx.

References FD_baseline.

00122 {
00123   FD_baseline = baseline;
00124 }

void FarOverNearFit::SetFDMC ( TFile *  MC_file,
TFile *  Nue_file,
TFile *  NuTau_file 
)

Definition at line 82 of file FarOverNearFit.cxx.

References FD_MC, FD_Nue, and FD_NuTau.

00083 {
00084   FD_MC    = MC_file;
00085   FD_Nue   = Nue_file;
00086   FD_NuTau = NuTau_file;
00087 }

void FarOverNearFit::SetMatrices ( TFile *  Data_file  ) 

Definition at line 116 of file FarOverNearFit.cxx.

References matrix.

00117 {
00118   matrix = Data_file;
00119 }

void FarOverNearFit::SetNDBaseline ( double  baseline  ) 

Definition at line 76 of file FarOverNearFit.cxx.

References ND_baseline.

00077 {
00078   ND_baseline = baseline;
00079 }

void FarOverNearFit::SetNDMC ( TFile *  MC_file,
TFile *  Nue_file,
TFile *  NuTau_file 
)

Definition at line 60 of file FarOverNearFit.cxx.

References ND_MC, ND_Nue, and ND_NuTau.

00061 {
00062   ND_MC    = MC_file;
00063   ND_Nue   = Nue_file;
00064   ND_NuTau = NuTau_file;
00065 }

void FarOverNearFit::SetPOT ( double  POT_  ) 

Definition at line 127 of file FarOverNearFit.cxx.

00128 {
00129   POT = POT_;
00130 }

void FarOverNearFit::SetUseCC ( bool  use  )  [inline]

Definition at line 85 of file FarOverNearFit.h.

References useCC.

00085 {useCC = use;};

void FarOverNearFit::SetUseNC ( bool  use  )  [inline]

Definition at line 86 of file FarOverNearFit.h.

00086 {useNC = use;};

void FarOverNearFit::TurnOffCC (  ) 

Definition at line 106 of file FarOverNearFit.cxx.

References useCC.

00107 {
00108   useCC = false;
00109 }

void FarOverNearFit::TurnOffNC (  ) 

Definition at line 111 of file FarOverNearFit.cxx.

References useNC.

00112 {
00113   useNC = false;
00114 }

void FarOverNearFit::TurnOnCorrection (  ) 

Definition at line 89 of file FarOverNearFit.cxx.

References ApplyCorrection.

00090 {
00091   ApplyCorrection = true;
00092 }

void FarOverNearFit::TurnOnDynamic (  ) 

Definition at line 101 of file FarOverNearFit.cxx.

References Dynamic.

00102 {
00103   Dynamic = true;
00104 }

void FarOverNearFit::UseDm241 ( bool  YesorNo  ) 

Definition at line 1147 of file FarOverNearFit.cxx.

References SpectrumClass, and use41.

01148 {
01149   use41 = YesorNo;
01150   SpectrumClass->SterileSpec::UseDm241(use41);
01151 }

std::vector< TH1D > FarOverNearFit::WriteFDPredHistos ( const NuMMParameters pars  )  const [virtual]

Implements NuMMRun.

Definition at line 1153 of file FarOverNearFit.cxx.

01154 {
01155   // This is a virtual function i need because i inherhit
01156   return vector<TH1D>();
01157 }


Member Data Documentation

Definition at line 140 of file FarOverNearFit.h.

Referenced by Initalise(), and TurnOnCorrection().

Int_t FarOverNearFit::binNumberCC [private]

Definition at line 160 of file FarOverNearFit.h.

Referenced by ScaleCCMatrices().

Int_t FarOverNearFit::binNumberNC [private]

Definition at line 160 of file FarOverNearFit.h.

Referenced by ScaleNCMatrices().

Definition at line 155 of file FarOverNearFit.h.

Referenced by LoadCorrection(), and SetCorrectionFile().

Definition at line 96 of file FarOverNearFit.h.

Referenced by LoadMatrices(), and ScaleCCMatrices().

Definition at line 96 of file FarOverNearFit.h.

Referenced by LoadMatrices(), and ScaleNCMatrices().

Definition at line 162 of file FarOverNearFit.h.

Referenced by LoadHelpers(), and SetDataFromTFile().

Definition at line 164 of file FarOverNearFit.h.

Referenced by DoFit(), FitTheta34Only(), and PerformInitialThreeFlavourFit().

Definition at line 164 of file FarOverNearFit.h.

Referenced by DoFit(), and FitTheta34Only().

Definition at line 141 of file FarOverNearFit.h.

Referenced by ComparePredWithData(), MakeFlucuatedRatios(), and TurnOnDynamic().

TFile * FarOverNearFit::FD_data [private]

Definition at line 149 of file FarOverNearFit.h.

Referenced by LoadHelpers(), and SetDataFromTFile().

Definition at line 111 of file FarOverNearFit.h.

Referenced by Add(), FeldmanSterile::Calculate2DdeltaChi2(), and LoadHelpers().

Definition at line 111 of file FarOverNearFit.h.

Referenced by Add(), FeldmanSterile::Calculate2DdeltaChi2(), and LoadHelpers().

TFile* FarOverNearFit::FD_MC [private]

Definition at line 149 of file FarOverNearFit.h.

Referenced by LoadHelpers(), and SetFDMC().

Definition at line 100 of file FarOverNearFit.h.

TFile * FarOverNearFit::FD_Nue [private]

Definition at line 149 of file FarOverNearFit.h.

Referenced by LoadHelpers(), and SetFDMC().

Definition at line 100 of file FarOverNearFit.h.

TFile * FarOverNearFit::FD_NuTau [private]

Definition at line 149 of file FarOverNearFit.h.

Referenced by LoadHelpers(), and SetFDMC().

Definition at line 100 of file FarOverNearFit.h.

Definition at line 116 of file FarOverNearFit.h.

Referenced by CreatePrediction().

Definition at line 116 of file FarOverNearFit.h.

Referenced by CreatePrediction().

Definition at line 115 of file FarOverNearFit.h.

Referenced by ComparePredWithData(), and CreatePrediction().

Definition at line 115 of file FarOverNearFit.h.

Referenced by ComparePredWithData(), and CreatePrediction().

Definition at line 136 of file FarOverNearFit.h.

Referenced by LoadCorrection().

Definition at line 136 of file FarOverNearFit.h.

Referenced by LoadHelpers(), and FeldmanSterile::SetUpFarOverNearFitClass().

Definition at line 136 of file FarOverNearFit.h.

Referenced by LoadMatrices(), and FeldmanSterile::SetUpFarOverNearFitClass().

bool FarOverNearFit::got_NDint [private]

Definition at line 162 of file FarOverNearFit.h.

Referenced by CalculateNDIntegrals().

Definition at line 119 of file FarOverNearFit.h.

Referenced by ApplyCorrectionToHelpers(), and LoadCorrection().

Definition at line 120 of file FarOverNearFit.h.

Referenced by ApplyCorrectionToHelpers(), and LoadCorrection().

Definition at line 121 of file FarOverNearFit.h.

Referenced by ApplyCorrectionToHelpers(), and LoadCorrection().

Definition at line 122 of file FarOverNearFit.h.

Referenced by ApplyCorrectionToHelpers(), and LoadCorrection().

bool FarOverNearFit::init [private]

Definition at line 162 of file FarOverNearFit.h.

Referenced by Initalise().

TFile* FarOverNearFit::matrix [private]

Definition at line 152 of file FarOverNearFit.h.

Referenced by LoadMatrices(), and SetMatrices().

TFile * FarOverNearFit::ND_data [private]

Definition at line 148 of file FarOverNearFit.h.

Referenced by LoadHelpers(), and SetDataFromTFile().

Definition at line 99 of file FarOverNearFit.h.

TFile* FarOverNearFit::ND_MC [private]

Definition at line 148 of file FarOverNearFit.h.

Referenced by LoadHelpers(), and SetNDMC().

Definition at line 99 of file FarOverNearFit.h.

TFile * FarOverNearFit::ND_Nue [private]

Definition at line 148 of file FarOverNearFit.h.

Referenced by LoadHelpers(), and SetNDMC().

Definition at line 99 of file FarOverNearFit.h.

TFile * FarOverNearFit::ND_NuTau [private]

Definition at line 148 of file FarOverNearFit.h.

Referenced by LoadHelpers(), and SetNDMC().

Definition at line 99 of file FarOverNearFit.h.

Definition at line 115 of file FarOverNearFit.h.

Referenced by ComparePredWithData(), CreatePrediction(), and NDNormPenaltyTerm().

Definition at line 115 of file FarOverNearFit.h.

Referenced by ComparePredWithData(), CreatePrediction(), and NDNormPenaltyTerm().

Double_t FarOverNearFit::Ni [private]

Definition at line 159 of file FarOverNearFit.h.

Referenced by ScaleCCMatrices(), and ScaleNCMatrices().

Double_t FarOverNearFit::POT [private]

Definition at line 157 of file FarOverNearFit.h.

bool FarOverNearFit::ProfileMH [private]

Definition at line 138 of file FarOverNearFit.h.

Referenced by DoNotRebinData(), and LoadHelpers().

Definition at line 128 of file FarOverNearFit.h.

Referenced by CreateFakeHighStatsData().

Definition at line 128 of file FarOverNearFit.h.

Referenced by CreateFakeHighStatsData().

Definition at line 127 of file FarOverNearFit.h.

Referenced by FeldmanSterile::Calculate2DdeltaChi2(), and MakeFlucuatedRatios().

Definition at line 127 of file FarOverNearFit.h.

Referenced by FeldmanSterile::Calculate2DdeltaChi2(), and MakeFlucuatedRatios().

Double_t FarOverNearFit::Ri [private]

Definition at line 159 of file FarOverNearFit.h.

Referenced by ScaleCCMatrices(), and ScaleNCMatrices().

Double_t FarOverNearFit::Rj [private]

Definition at line 159 of file FarOverNearFit.h.

Referenced by ScaleCCMatrices(), and ScaleNCMatrices().

Double_t FarOverNearFit::sig2 [private]

Definition at line 159 of file FarOverNearFit.h.

Referenced by ScaleCCMatrices(), and ScaleNCMatrices().

Double_t FarOverNearFit::stat [private]

Definition at line 159 of file FarOverNearFit.h.

Referenced by ScaleCCMatrices(), and ScaleNCMatrices().

Double_t FarOverNearFit::syst [private]

Definition at line 159 of file FarOverNearFit.h.

Referenced by ScaleCCMatrices(), and ScaleNCMatrices().

Definition at line 132 of file FarOverNearFit.h.

Referenced by ComparePredWithData().

Definition at line 132 of file FarOverNearFit.h.

Referenced by ComparePredWithData(), and GetTotalChi2_CC().

Definition at line 132 of file FarOverNearFit.h.

Referenced by ComparePredWithData(), and GetTotalChi2_NC().

Double_t FarOverNearFit::TotalNDCC [private]

Definition at line 158 of file FarOverNearFit.h.

Referenced by CalculateNDIntegrals(), and NDNormPenaltyTerm().

Double_t FarOverNearFit::TotalNDNC [private]

Definition at line 158 of file FarOverNearFit.h.

Referenced by CalculateNDIntegrals(), and NDNormPenaltyTerm().

Definition at line 134 of file FarOverNearFit.h.

Referenced by UseDm241().

Definition at line 142 of file FarOverNearFit.h.

Referenced by ComparePredWithData(), SetUseCC(), and TurnOffCC().

Definition at line 143 of file FarOverNearFit.h.

Referenced by ComparePredWithData(), and TurnOffNC().

Definition at line 90 of file FarOverNearFit.h.

Referenced by DoFit(), and FitTheta34Only().

Definition at line 86 of file FarOverNearFit.h.

Referenced by DoFit(), FitTheta34Only(), and PerformInitialThreeFlavourFit().


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1