FeldmanSterile Class Reference

#include <FeldmanSterile.h>

List of all members.

Public Types

enum  ParameterSpace { kdm241vsth24, kdm241vsth34 }

Public Member Functions

 FeldmanSterile ()
virtual ~FeldmanSterile ()
void SetNDBaseline (Double_t baseline)
void SetFDBaseline (Double_t baseline)
void SetNDMC (TFile *MC_file, TFile *Nue_file, TFile *NuTau_file)
void SetFDMC (TFile *MC_file, TFile *Nue_file, TFile *NuTau_file)
void LoadDataContour (TFile *datacontour)
void SetMatrices (TFile *Data_file)
void SetPremadeFakeData (TH1D *CC, TH1D *NC)
void SetParameterSpace (Int_t ParameterSpace, Double_t massSplitting, Double_t theta, Bool_t useInvertedHierarchyforFakeData)
void SetPOT (Double_t POT_)
void SetUpFarOverNearFitClass ()
void UseDm241 (bool YesorNo)
void UseFakeDataDegenValues ()
void GetHistos ()
void GetMatrices ()
Double_t GetChi2Profile ()
Double_t GetChi2Best ()
Double_t GetTheta24_best ()
Double_t GetTheta34_best ()
Double_t GetTheta23_best ()
Double_t GetDm232_best ()
Double_t GetDm2Sterile_best ()
void ApplyConstraints (NuMMParameters pars)
void FitThreeFlavourOnly (NuSystFitter fitter, NuMMParameters pars)
Double_t CalculateChi2Best2D (NuSystFitter fitter, NuMMParameters pars, Double_t Chi2ProfileTest)
Double_t CalculateChi2Best1D (NuSystFitter fitter, NuMMParameters pars)
Double_t CalculateChi2Profile (NuSystFitter fitter, NuMMParameters pars)
Double_t Calculate1DdeltaChi2 (Bool_t ProfileMassHierarchy)
Double_t Calculate2DdeltaChi2 (Bool_t ProfileMassHierarchy)
void VaryDm232 ()
void VaryTheta23 ()
void VaryTheta34 ()
void VaryTheta24 ()
void SetStartingPoint (Double_t mass, Double_t theta, Bool_t useInvertedHierarchyforFakeData)
void ThreeFlavourPars ()
TH1D * CreateGrid ()
void Add (FeldmanSterile *fs)

Public Attributes

FarOverNearFitFoverN
NuMMParametersgridPoint
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
TH2D * hDataContour
TH2D * hDataTheta23
TH2D * hDataTheta34
TH2D * hDataDm232
TH1D * RFlucCC
TH1D * RFlucNC
TH1F * ND_MC_POT
TH1F * ND_Nue_POT
TH1F * ND_NuTau_POT
TH1F * FD_MC_POT
TH1F * FD_Nue_POT
TH1F * FD_NuTau_POT
TMatrixD * CoVarCCinvert
TMatrixD * CoVarNCinvert
TMatrixD * CoVarCC
TMatrixD * CoVarNC
NuMMParameters fakedataPars
NuMMParameters parsfit_threeNH
NuMMParameters parsfit_threeIH
NuMMParameters parsfit_NH
NuMMParameters parsfit_IH
NuMMParameters Chi2ProfilebestPars
Double_t startDm232
Double_t start_th23_lower
Double_t start_th23_upper
Double_t coarsegridth23
Double_t DeltaChi2
Double_t Chi2_best
Double_t Chi2_profile
Double_t fakedata_dm232
Double_t fakedata_dm221
Double_t fakedata_dmSterile
Double_t fakedata_theta23
Double_t fakedata_theta12
Double_t fakedata_theta13
Double_t fakedata_theta24
Double_t fakedata_theta34
Double_t fakedata_theta14
Double_t ND_baseline
Double_t FD_baseline
Bool_t got_histos
Bool_t setup_FarOverNearFit
Bool_t ChoosePresetDeterimedValues
Bool_t UseLowerOctantInGridSearch
Bool_t use41
Bool_t setFluc
Bool_t setup_FakeSterile
Bool_t varyDm232
Bool_t varyTheta23
Bool_t varyTheta34
Bool_t varyTheta24
Bool_t useInvertedHierarchyforFakeData
Bool_t fakedata_degenvalue

Private Member Functions

 ClassDef (FeldmanSterile, 0)

Private Attributes

Double_t POT
Double_t startdm2Sterile
Double_t starttheta24
Double_t starttheta34
Int_t NumberOfFakeExps
Int_t GlobalParameterSpace
TFile * matrix
TFile * ND_MC
TFile * ND_Nue
TFile * ND_NuTau
TFile * ND_data
TFile * FD_MC
TFile * FD_Nue
TFile * FD_NuTau
TFile * FD_data
Double_t theta24_best
Double_t theta34_best
Double_t theta23_best
Double_t Dm232_best
Double_t Dm2Sterile_best
Double_t theta24_profile
Double_t theta34_profile
Double_t theta23_profile
Double_t Dm232_profile
Double_t Dm2Sterile_profile

Detailed Description

Definition at line 19 of file FeldmanSterile.h.


Member Enumeration Documentation

Enumerator:
kdm241vsth24 
kdm241vsth34 

Definition at line 26 of file FeldmanSterile.h.

00026                      {
00027     kdm241vsth24,
00028     kdm241vsth34
00029   };


Constructor & Destructor Documentation

FeldmanSterile::FeldmanSterile (  ) 

Definition at line 27 of file FeldmanSterile.cxx.

00028 {
00029   // Iniialise TFiles and POT exposure variable
00030   ND_MC = 0;
00031   ND_Nue = 0;
00032   ND_NuTau = 0;
00033   FD_MC = 0;
00034   FD_Nue = 0;
00035   FD_NuTau = 0;
00036 
00037   POT = 0.0;
00038 
00039   // Initalise my sterile parameter space point for my fake data
00040   startdm2Sterile = 0.0;
00041   starttheta24    = 0.0;
00042   starttheta34    = 0.0;
00043 
00044   // Booleans 
00045   got_histos                      = false;
00046   setFluc                         = false;
00047   use41                           = false;
00048   useInvertedHierarchyforFakeData = false;
00049   ChoosePresetDeterimedValues     = false;
00050   UseLowerOctantInGridSearch      = false;
00051   fakedata_degenvalue             = false;
00052   setup_FarOverNearFit            = false;
00053   varyDm232                       = false;
00054   varyTheta23                     = false;
00055   varyTheta34                     = false;
00056   varyTheta24                     = false;
00057 
00058   // Initalise
00059   DeltaChi2    = -999.0;
00060   Chi2_best    = -999.0;
00061   Chi2_profile = -999.0;
00062 
00063   // The code needs to know what parameter space we are in
00064   // this is globally set so i get the correct angle
00065   GlobalParameterSpace = -999;
00066 
00067   startDm232       = -999.0;
00068   start_th23_lower = -999.0;
00069   start_th23_upper = -999.0;
00070   coarsegridth23   = -999.0;
00071 
00072   // Chi2 profile best fits
00073   theta24_profile     = -999.0;
00074   theta34_profile     = -999.0;
00075   theta23_profile     = -999.0;
00076   Dm232_profile       = -999.0;
00077   Dm2Sterile_profile  = -999.0;
00078 
00079   // Chi2 best best fits
00080   theta24_best    = -999.0;
00081   theta34_best    = -999.0;
00082   theta23_best    = -999.0;
00083   Dm232_best      = -999.0;
00084   Dm2Sterile_best = -999.0;
00085 
00086   // Fake data values
00087   fakedata_dm232     = -999.0;
00088   fakedata_dm221     = -999.0;
00089   fakedata_dmSterile = -999.0;
00090   fakedata_theta23   = -999.0;
00091   fakedata_theta12   = -999.0;
00092   fakedata_theta13   = -999.0;
00093   fakedata_theta24   = -999.0;
00094   fakedata_theta34   = -999.0;
00095   fakedata_theta14   = -999.0;
00096 
00097 
00098   NuMMParameters fakedataPars;
00099 
00100   NuMMParameters parsfit_threeNH;
00101   NuMMParameters parsfit_threeIH;
00102   NuMMParameters parsfit_NH;
00103   NuMMParameters parsfit_IH;
00104 
00105   NuMMParameters Chi2ProfilebestPars;
00106 
00107   FoverN = new FarOverNearFit();
00108 }

FeldmanSterile::~FeldmanSterile (  )  [virtual]

Definition at line 110 of file FeldmanSterile.cxx.

References FoverN.

00111 {
00112   delete FoverN;
00113 }


Member Function Documentation

void FeldmanSterile::Add ( FeldmanSterile fs  ) 

Definition at line 636 of file FeldmanSterile.cxx.

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

00636                                           {
00637 
00638   GetHistos();
00639   fs->GetHistos();
00640 
00641   // ND
00642   NDNC_TrueNC   ->Add(fs->NDNC_TrueNC);
00643   NDNC_NuMu     ->Add(fs->NDNC_NuMu);
00644   NDNC_BeamNue  ->Add(fs->NDNC_BeamNue);
00645   NDNC_AppNue   ->Add(fs->NDNC_AppNue);
00646   NDNC_AppNuTau ->Add(fs->NDNC_AppNuTau);
00647   
00648   NDCC_TrueNC   ->Add(fs->NDCC_TrueNC);
00649   NDCC_NuMu     ->Add(fs->NDCC_NuMu);
00650   NDCC_BeamNue  ->Add(fs->NDCC_BeamNue);
00651   NDCC_AppNue   ->Add(fs->NDCC_AppNue);
00652   NDCC_AppNuTau ->Add(fs->NDCC_AppNuTau);
00653     
00654   // FD
00655   FDNC_TrueNC   ->Add(fs->FDNC_TrueNC);
00656   FDNC_NuMu     ->Add(fs->FDNC_NuMu);
00657   FDNC_BeamNue  ->Add(fs->FDNC_BeamNue);
00658   FDNC_AppNue   ->Add(fs->FDNC_AppNue);
00659   FDNC_AppNuTau ->Add(fs->FDNC_AppNuTau);
00660     
00661   FDCC_TrueNC   ->Add(fs->FDCC_TrueNC);
00662   FDCC_NuMu     ->Add(fs->FDCC_NuMu);
00663   FDCC_BeamNue  ->Add(fs->FDCC_BeamNue);
00664   FDCC_AppNue   ->Add(fs->FDCC_AppNue);
00665   FDCC_AppNuTau ->Add(fs->FDCC_AppNuTau);
00666     
00667   std::cout << "Add FeldmanSterile done." << std::endl;
00668 }

void FeldmanSterile::ApplyConstraints ( NuMMParameters  pars  ) 

Definition at line 567 of file FeldmanSterile.cxx.

References NuMMParameters::ConstrainDelta1(), NuMMParameters::ConstrainDelta2(), NuMMParameters::ConstrainDelta3(), NuMMParameters::ConstrainDm243(), NuMMParameters::ConstrainTheta23(), NuMMParameters::ConstrainTheta24(), NuMMParameters::ConstrainTheta34(), MuELoss::e, NuMMParameters::FixAllParameters(), NuMMParameters::FixCCSystematics(), and NuMMParameters::FixNCSystematics().

Referenced by Calculate2DdeltaChi2().

00568 {
00569   // Set some constraints
00570   // The paramateraisation of the PNMS Matrix means all angles should be between 0 -> pi/2
00571   // The sterile analysis requires all CP deltas to be zero - the fit would take too long otherwise.
00572   
00573   pars.FixAllParameters();
00574   pars.FixCCSystematics();
00575   pars.FixNCSystematics();
00576   pars.ConstrainDm243(0, 200);
00577 
00578   Double_t ep = 1e-2;
00579   pars.ConstrainTheta23( 0, TMath::Pi()/2 + ep );
00580   pars.ConstrainTheta34( 0, TMath::Pi()/2 + ep );
00581   pars.ConstrainTheta24( 0, TMath::Pi()/2 + ep );
00582   pars.ConstrainDelta1(  0, 2*TMath::Pi() + ep );
00583   pars.ConstrainDelta2(  0, 2*TMath::Pi() + ep );
00584   pars.ConstrainDelta3(  0, 2*TMath::Pi() + ep );
00585 
00586 }

Double_t FeldmanSterile::Calculate1DdeltaChi2 ( Bool_t  ProfileMassHierarchy  ) 

Definition at line 1216 of file FeldmanSterile.cxx.

01217 {
01218   // I need to do this
01219   return 0.0;
01220 }

Double_t FeldmanSterile::Calculate2DdeltaChi2 ( Bool_t  ProfileMassHierarchy  ) 

Definition at line 1222 of file FeldmanSterile.cxx.

References ApplyConstraints(), NuSystFitter::BatchModeOn(), CalculateChi2Best2D(), CalculateChi2Profile(), Chi2_best, Chi2_profile, FarOverNearFit::CreateFakeHighStatsData(), DeltaChi2, Dm232_best, Dm2Sterile_best, fakedataPars, FarOverNearFit::FD_dataCC, FarOverNearFit::FD_dataNC, FarOverNearFit::FDfakeCC, FarOverNearFit::FDfakeNC, FitThreeFlavourOnly(), FoverN, GetHistos(), FarOverNearFit::MakeFlucuatedRatios(), FarOverNearFit::ND_dataCC, FarOverNearFit::ND_dataNC, FarOverNearFit::NDfakeCC, FarOverNearFit::NDfakeNC, parsfit_IH, parsfit_NH, parsfit_threeIH, parsfit_threeNH, NuMMParameters::PrintStatus(), NuSystFitter::push_back(), NuSystFitter::QuietModeOn(), FarOverNearFit::RdataCC, FarOverNearFit::RdataNC, RFlucCC, FarOverNearFit::RflucCC, FarOverNearFit::RflucNC, RFlucNC, setFluc, SetUpFarOverNearFitClass(), theta23_best, theta24_best, theta34_best, and ThreeFlavourPars().

01223 {
01224   // This Function calculates the delta chi2 for the 2D plane of dm24(1 or 3)vsth24 
01225   std::cout << " " << std::endl;
01226   std::cout << "=======================================================" << std::endl;
01227   std::cout << "                Calculating 2D delta Chi2"               << std::endl;
01228   std::cout << "=======================================================" << std::endl;
01229 
01230   // Load Histograms
01231   GetHistos();
01232 
01233   // Hand these to the NuMMRun Sterile Object "FoverN"
01234   SetUpFarOverNearFitClass();
01235 
01236   // Flucuate data or Get Premade Flucuated Data it from file
01237   if(setFluc){
01238     FoverN->CreateFakeHighStatsData(fakedataPars);
01239     FoverN->ND_dataNC = FoverN->NDfakeNC;
01240     FoverN->ND_dataCC = FoverN->NDfakeCC;
01241     FoverN->FD_dataNC = FoverN->FDfakeNC;
01242     FoverN->FD_dataCC = FoverN->FDfakeCC;
01243     FoverN->RdataCC = RFlucCC;
01244     FoverN->RdataNC = RFlucNC;
01245   }
01246   else{
01247     FoverN->MakeFlucuatedRatios(fakedataPars);
01248     FoverN->ND_dataNC = FoverN->NDfakeNC;
01249     FoverN->ND_dataCC = FoverN->NDfakeCC;
01250     FoverN->FD_dataNC = FoverN->FDfakeNC;
01251     FoverN->FD_dataCC = FoverN->FDfakeCC;
01252     
01253     // These are flucated ones
01254     FoverN->RdataCC = FoverN->RflucCC;
01255     FoverN->RdataNC = FoverN->RflucNC;
01256     
01257     // These are high stats versions
01258     //FoverN->RdataCC = FoverN->RfakeCC;
01259     //FoverN->RdataNC = FoverN->RfakeNC;
01260   }
01261 
01262   std::cout << " " << std::endl;
01263   std::cout << "=======================================================" << std::endl;
01264   std::cout << "===== Fake Data is created using these parameters =====" << std::endl;
01265   fakedataPars.PrintStatus();
01266   std::cout << "=======================================================" << std::endl;
01267   std::cout << " " << std::endl;
01268 
01269   // Create the Fitter
01270   NuSystFitter fitter;
01271   fitter.push_back(FoverN);
01272   fitter.BatchModeOn();
01273   fitter.QuietModeOn();
01274 
01275   // define the three flavour pars (NH and IH)
01276   ThreeFlavourPars();
01277   parsfit_NH = fakedataPars;
01278   parsfit_IH = fakedataPars;
01279 
01280   ApplyConstraints(fakedataPars);
01281   ApplyConstraints(parsfit_threeNH);
01282   ApplyConstraints(parsfit_threeIH);
01283   ApplyConstraints(parsfit_NH);
01284   ApplyConstraints(parsfit_IH);
01285 
01286   if( ProfileMassHierarchy  == true ){
01287 
01288     std::cout << "For this FC process... the mass hierarachy will be profiled." << std::endl;
01289 
01290     // First start with NH
01291     FitThreeFlavourOnly(fitter, parsfit_threeNH);
01292     Double_t Chi2Profile_NH = CalculateChi2Profile(fitter, parsfit_NH);
01293 
01294     // Now work out chi2_bestNH 
01295     Double_t chi2_best_NH = CalculateChi2Best2D(fitter, parsfit_NH, Chi2Profile_NH);
01296 
01297     // Record these best fits
01298     Double_t theta24_best_NH    = theta24_best;
01299     Double_t theta34_best_NH    = theta34_best;
01300     Double_t theta23_best_NH    = theta23_best;
01301     Double_t Dm232_best_NH      = Dm232_best;
01302     Double_t Dm2Sterile_best_NH = Dm2Sterile_best;
01303 
01304     // Now start with IH
01305     FitThreeFlavourOnly(fitter, parsfit_threeIH);
01306     Double_t Chi2Profile_IH = CalculateChi2Profile(fitter, parsfit_IH);
01307 
01308     // Now work out chi2_bestIH
01309     Double_t chi2_best_IH = CalculateChi2Best2D(fitter, parsfit_IH, Chi2Profile_IH);
01310 
01311     // Record these best fits
01312     Double_t theta24_best_IH    = theta24_best;
01313     Double_t theta34_best_IH    = theta34_best;
01314     Double_t theta23_best_IH    = theta23_best;
01315     Double_t Dm232_best_IH      = Dm232_best;
01316     Double_t Dm2Sterile_best_IH = Dm2Sterile_best;
01317 
01318     std::cout << " " << std::endl;
01319     std::cout << "-----------------------------------------------------------------------------------------------" << std::endl;
01320     std::cout << "---------------------- Summary fit results For One Fake Expermentt ----------------------------" << std::endl;
01321     std::cout << "-----------------------------------------------------------------------------------------------" << std::endl;
01322 
01323     std::cout << "chi2_best_NH       = " << chi2_best_NH       << std::endl;
01324     std::cout << "th24 bestfit       = " << theta24_best_NH    << std::endl;
01325     std::cout << "th34 bestfit       = " << theta34_best_NH    << std::endl;
01326     std::cout << "th23 bestfit       = " << theta23_best_NH    << std::endl;
01327     std::cout << "dm232 bestfit      = " << Dm232_best_NH      << std::endl;
01328     std::cout << "dm2sterile bestfit = " << Dm2Sterile_best_NH << std::endl;
01329   
01330     std::cout << " " << std::endl;
01331 
01332     std::cout << "chi2_best_IH       = " << chi2_best_IH       << std::endl;
01333     std::cout << "th24 bestfit       = " << theta24_best_IH    << std::endl;
01334     std::cout << "th34 bestfit       = " << theta34_best_IH    << std::endl;
01335     std::cout << "th23 bestfit       = " << theta23_best_IH    << std::endl;
01336     std::cout << "dm232 bestfit      = " << Dm232_best_IH      << std::endl;
01337     std::cout << "dm2sterile bestfit = " << Dm2Sterile_best_IH << std::endl;
01338 
01339     std::cout << " " << endl;
01340 
01341     std::cout << "chi2_profile_NH = " << Chi2Profile_NH << std::endl;
01342     std::cout << "chi2_profile_IH = " << Chi2Profile_IH << std::endl;
01343 
01344     if(Chi2Profile_NH < Chi2Profile_IH){
01345       Chi2_profile = Chi2Profile_NH;
01346     }
01347     else{
01348       Chi2_profile = Chi2Profile_IH;
01349     }
01350 
01351     if (chi2_best_NH < chi2_best_IH){      
01352       Chi2_best = chi2_best_NH;
01353       theta24_best    = theta24_best_NH;
01354       theta34_best    = theta34_best_NH;
01355       theta23_best    = theta23_best_NH;
01356       Dm232_best      = Dm232_best_NH;
01357       Dm2Sterile_best = Dm2Sterile_best_NH;
01358     }
01359     else{
01360       Chi2_best = chi2_best_IH;
01361       theta24_best    = theta24_best_IH;
01362       theta34_best    = theta34_best_IH;
01363       theta23_best    = theta23_best_IH;
01364       Dm232_best      = Dm232_best_IH;
01365       Dm2Sterile_best = Dm2Sterile_best_IH;
01366     }
01367   }
01368   else{
01369 
01370     // Do inital three flavour fit
01371     FitThreeFlavourOnly(fitter, parsfit_threeNH); 
01372 
01373     // Work out Chi2_profile
01374     Chi2_profile = CalculateChi2Profile(fitter, parsfit_NH);
01375 
01376     // Work out Chi2_best
01377     Chi2_best = CalculateChi2Best2D(fitter, parsfit_NH, Chi2_profile);
01378 
01379   }
01380 
01381   // Work out Delta L
01382   DeltaChi2 = Chi2_profile - Chi2_best;
01383 
01384   std::cout << " " << endl;
01385   std::cout << "Chi2_profile   = " << Chi2_profile   << std::endl;
01386   std::cout << "Chi2_best      = " << Chi2_best      << std::endl;
01387   std::cout << "DeltaChi2      = " << DeltaChi2      << std::endl;
01388 
01389   std::cout << "th24 bestfit       = " << theta24_best    << std::endl;
01390   std::cout << "th34 bestfit       = " << theta34_best    << std::endl;
01391   std::cout << "th23 bestfit       = " << theta23_best    << std::endl;
01392   std::cout << "Dm232 bestfit      = " << Dm232_best      << std::endl;
01393   std::cout << "Dm2sterile bestfit = " << Dm2Sterile_best << std::endl;
01394 
01395   return DeltaChi2;
01396 
01397 }

Double_t FeldmanSterile::CalculateChi2Best1D ( NuSystFitter  fitter,
NuMMParameters  pars 
)

Definition at line 718 of file FeldmanSterile.cxx.

References FarOverNearFit::ComparePredWithData(), NuMMParameters::Dm2(), Dm232_best, NuMMParameters::Dm243(), Dm2Sterile_best, NuMMParameters::FixAllParameters(), NuMMParameters::FixCCSystematics(), NuMMParameters::FixNCSystematics(), FoverN, NuSystFitter::Minimise(), NuMMParameters::PrintStatus(), NuMMParameters::ReleaseDm2(), NuMMParameters::ReleaseTheta23(), NuMMParameters::ReleaseTheta24(), NuMMParameters::ReleaseTheta34(), start_th23_lower, start_th23_upper, NuMMParameters::Theta23(), theta23_best, NuMMParameters::Theta24(), theta24_best, NuMMParameters::Theta34(), and theta34_best.

00719 {
00720   std::cout << " " << std::endl;
00721   std::cout << "=======================================================" << std::endl;
00722   std::cout << "                Calculating Chi2 1D Best          "      << std::endl;
00723   std::cout << "=======================================================" << std::endl;
00724 
00725   // There is no need for a coarse grid search because the 4D surface should be smooth as 
00726   // Dm241 (Dm243) is fixed
00727   Double_t Chi2best = 0.0;
00728 
00729   // Fix everything
00730   pars.FixAllParameters();
00731   pars.FixCCSystematics();
00732   pars.FixNCSystematics();
00733 
00734   pars.ReleaseDm2();
00735   pars.ReleaseTheta23();
00736   pars.ReleaseTheta34();
00737   pars.ReleaseTheta24();
00738 
00739   // Lower octant of th23
00740   if(start_th23_lower > TMath::Pi()/4){ start_th23_lower = 0.65; }
00741   pars.Theta23(start_th23_lower);
00742   NuMMParameters bestfitlower = fitter.Minimise(pars);
00743   Double_t LowerOctant = FoverN->ComparePredWithData(bestfitlower);
00744 
00745   // Upper Octant of th23
00746   if(start_th23_upper <= TMath::Pi()/4){ start_th23_upper = 0.89;}
00747   pars.Theta23(start_th23_upper);
00748   NuMMParameters bestfitupper = fitter.Minimise(pars);
00749   Double_t UpperOctant = FoverN->ComparePredWithData(bestfitupper);
00750 
00751   std::vector<Double_t> vChi2;
00752   vChi2.push_back(LowerOctant);
00753   vChi2.push_back(UpperOctant);
00754 
00755   std::vector<NuMMParameters> vfitPars;
00756   vfitPars.push_back(bestfitlower);
00757   vfitPars.push_back(bestfitupper);
00758 
00759   if( pars.Dm243() >= 0.01){
00760     std::cout << " " << std::endl;
00761     std::cout << "Not checking any degenerate regions... no need to." << std::endl;
00762     std::cout << " " <<std::endl;
00763   }
00764   else{
00765     std::cout << " " <<std::endl;
00766     std::cout << "Checking degenerate region... setting th24 = pi/4, th23 = th34 = pi/2" << std::endl;  
00767     std::cout << " " <<std::endl;
00768     pars.PrintStatus();
00769     pars.Theta24(TMath::Pi()/4);
00770     pars.Theta23(TMath::Pi()/2);
00771     pars.Theta34(TMath::Pi()/2);
00772     pars.PrintStatus();
00773     NuMMParameters degen1 = fitter.Minimise(pars);
00774     Double_t chi2_degen1 = FoverN->ComparePredWithData(degen1);
00775     vChi2.push_back(chi2_degen1);
00776     vfitPars.push_back(degen1);
00777   }
00778 
00779   // These will be the best fit ones
00780   NuMMParameters bestPars;
00781 
00782   std::cout << "List of all Chi2 values: " << std::endl;
00783   std::cout << " " << std::endl;
00784   for(int i = 0; i<(int)vChi2.size(); ++i){
00785     cout << vChi2[i] << endl;
00786   }
00787 
00788   std::cout << " " << std::endl;
00789   
00790   // Now sort in order and keep NuMMParameters with it
00791   Chi2best = vChi2[0];
00792 
00793   for ( Int_t i = 0; i < (Int_t)vChi2.size(); ++i) {
00794     if ( vChi2[i] <= Chi2best ) {
00795       Chi2best = vChi2[i];
00796       bestPars = vfitPars[i];
00797     }
00798   }
00799 
00800   theta24_best    = bestPars.Theta24();
00801   theta34_best    = bestPars.Theta34();
00802   theta23_best    = bestPars.Theta23();
00803   Dm232_best      = bestPars.Dm2();
00804   Dm2Sterile_best = bestPars.Dm243();
00805 
00806   std::cout << "Chi2 Best = " << Chi2best << std::endl;
00807 
00808   return Chi2best;
00809 }

Double_t FeldmanSterile::CalculateChi2Best2D ( NuSystFitter  fitter,
NuMMParameters  pars,
Double_t  Chi2ProfileTest 
)

Definition at line 811 of file FeldmanSterile.cxx.

References FarOverNearFit::ComparePredWithData(), CreateGrid(), NuMMParameters::Dm2(), Dm232_best, NuMMParameters::Dm243(), Dm2Sterile_best, MuELoss::e, NuMMParameters::FixAllParameters(), FoverN, NuSystFitter::Minimise(), parsfit_threeNH, NuMMParameters::PrintStatus(), NuMMParameters::ReleaseDm2(), NuMMParameters::ReleaseDm243(), NuMMParameters::ReleaseTheta23(), NuMMParameters::ReleaseTheta24(), NuMMParameters::ReleaseTheta34(), start_th23_lower, start_th23_upper, startDm232, NuMMParameters::Theta23(), theta23_best, NuMMParameters::Theta24(), theta24_best, NuMMParameters::Theta34(), theta34_best, and UseLowerOctantInGridSearch.

Referenced by Calculate2DdeltaChi2().

00812 {
00813   std::cout << " " << std::endl;
00814   std::cout << "=======================================================" << std::endl;
00815   std::cout << "                Calculating Chi2 2D Best          "      << std::endl;
00816   std::cout << "=======================================================" << std::endl;
00817 
00818   Double_t Chi2best = 0.0;
00819 
00820   // Fix all but theta24 and scan over dm2_sterile
00821   pars.FixAllParameters();
00822   pars.ReleaseTheta24();
00823 
00824   if(pars.Theta24() >= 0.4){
00825     // redfining the starting point
00826     // This ensure i always find the minimum.. if theta24 is any higher... one stops finsing the flucuations at high dm241
00827     std::cout << "Changing starting point of theta24" << std::endl;
00828     pars.Theta24(0.0);
00829   }
00830 
00831   pars.Dm2(startDm232);
00832   //pars.Theta23(0.69); // always start in the lower octant, i doubt it matters very much.
00833   pars.Theta34(0.0); // i cant think of a better value to start with - i check the degenerate region later on (th34 = pi/2)
00834 
00835   //cout << "fakedata_dm232 = " << fakedata_dm232 << endl;
00836   //pars.Dm2(fakedata_dm232);
00837   //pars.Dm2(fakedata_dm232);
00838   //pars.Theta23(0.69);
00839   //pars.Theta34(0.0);
00840   
00841   if( UseLowerOctantInGridSearch == true){
00842     std::cout << "Chi2Profile preferred LO therefore changing th23." << std::endl;
00843     //pars.Theta23(0.69);
00844     pars.Theta23(start_th23_lower);
00845   }
00846   else{
00847     std::cout << "Chi2Profile preferred UO therefore changing th23." <<std::endl;
00848     //pars.Theta23(0.89);
00849     pars.Theta23(start_th23_upper);
00850   }
00851 
00852   TH1D* CoarseGridLO = CreateGrid();
00853   TH1D* CoarseTheta24LO_bestfit = new TH1D(*CoarseGridLO);
00854   TH1D* CoarseGridUO = CreateGrid();
00855   TH1D* CoarseTheta24UO_bestfit = new TH1D(*CoarseGridUO);
00856 
00857   CoarseTheta24LO_bestfit->GetYaxis()->SetTitle("#theta_{24} coarse grid");
00858   CoarseTheta24UO_bestfit->GetYaxis()->SetTitle("#theta_{24} coarse grid");
00859 
00860   //----------------------------------- LOWER OCTANT COARSE GRID SEARCH
00861   std::cout << " " << endl;
00862   std::cout << "Starting inital grid search LO with parameters::" << std::endl;
00863   pars.Theta23(start_th23_lower);
00864   pars.PrintStatus();
00865   std:: cout << " " << std::endl;
00866   for(Int_t i = 1; i <= CoarseGridLO->GetNbinsX(); ++i){
00867     Double_t tmpDm243 = CoarseGridLO->GetBinCenter(i);
00868     pars.Dm243( tmpDm243 );
00869     NuMMParameters bestfit = fitter.Minimise(pars);
00870     Double_t tmpchi2 = FoverN->ComparePredWithData(bestfit);
00871     std::cout << "Bin " << i << ", Dm2_sterile = " << bestfit.Dm243() << "eV^2" << ", chi2 = " << tmpchi2 << std::endl;
00872     CoarseGridLO->SetBinContent(i, tmpchi2);
00873     CoarseTheta24LO_bestfit->SetBinContent(i, bestfit.Theta24());
00874   }
00875   //CoarseGridLO->Write("coearsegriddm241");
00876   //CoarseTheta24LO_bestfit->Write("Coarse_bestfitth24");
00877   // Take lowest bin
00878   Int_t lowBinLO = CoarseGridLO->GetMinimumBin();
00879   Double_t StartingDm2sterileLO = CoarseGridLO->GetBinCenter(lowBinLO);
00880   Double_t StartingTheta24LO = CoarseTheta24LO_bestfit->GetBinContent(lowBinLO);
00881 
00882   std::cout << " " << std::endl;
00883   std::cout << "Dm2_sterileLO starting point for global fit = " << StartingDm2sterileLO 
00884             << "eV^2" << ", chi2 = " << CoarseGridLO->GetBinContent(lowBinLO) << std::endl;
00885 
00886   //------------------------------------ UPPER OCTANT COARSE GRID SEARCH
00887   std::cout << " " << endl;
00888   std::cout << "Starting inital grid search UO with parameters::" << std::endl;
00889   pars.Theta23(start_th23_upper);
00890   pars.PrintStatus();
00891   std:: cout << " " << std::endl;
00892   for(Int_t i = 1; i <= CoarseGridUO->GetNbinsX(); ++i){
00893     Double_t tmpDm243 = CoarseGridUO->GetBinCenter(i);
00894     pars.Dm243( tmpDm243 );
00895     NuMMParameters bestfit = fitter.Minimise(pars);
00896     Double_t tmpchi2 = FoverN->ComparePredWithData(bestfit);
00897     std::cout << "Bin " << i << ", Dm2_sterile = " << bestfit.Dm243() << "eV^2" << ", chi2 = " << tmpchi2 << std::endl;
00898     CoarseGridUO->SetBinContent(i, tmpchi2);
00899     CoarseTheta24UO_bestfit->SetBinContent(i, bestfit.Theta24());
00900   }
00901   //CoarseGridUO->Write("coearsegriddm241UO");
00902   //CoarseTheta24UO_bestfit->Write("Coarse_bestfitth24UO");
00903   // Take lowest bin
00904   Int_t lowBinUO = CoarseGridUO->GetMinimumBin();
00905   Double_t StartingDm2sterileUO = CoarseGridUO->GetBinCenter(lowBinUO);
00906   Double_t StartingTheta24UO = CoarseTheta24UO_bestfit->GetBinContent(lowBinUO);
00907 
00908   std::cout << " " << std::endl;
00909   std::cout << "Dm2_sterileUO starting point for global fit = " << StartingDm2sterileUO
00910             << "eV^2" << ", chi2 = " << CoarseGridUO->GetBinContent(lowBinUO) << std::endl;
00911   // --------------- End of corase grid searches
00912 
00913   Double_t StartingDm2sterile = -999.9;
00914   Double_t StartingTheta24 = -999.9;
00915 
00916   if(lowBinUO < lowBinLO){
00917     StartingDm2sterile = StartingDm2sterileUO;
00918     StartingTheta24 = StartingTheta24UO;
00919   }
00920   else{
00921     StartingDm2sterile = StartingDm2sterileLO;
00922     StartingTheta24 = StartingTheta24LO;
00923   }
00924 
00925   // Now to minmise with this value
00926   // First i need to free the values
00927   pars.ReleaseDm243();
00928   pars.ReleaseTheta23();
00929   pars.ReleaseTheta34();
00930   pars.ReleaseTheta24();
00931   pars.ReleaseDm2();
00932 
00933   // Set starting values
00934   pars.Dm243(StartingDm2sterile);
00935   pars.Theta24(StartingTheta24);
00936 
00937   std::cout << " " << std::endl;
00938   std::cout << "After after grid search... lets use this value of Dm241(3) but now cycle thorugh the octants." << std::endl;
00939 
00940   // Lower octant 
00941   if(start_th23_lower > TMath::Pi()/4){ start_th23_lower = 0.65; }
00942   pars.Theta23(start_th23_lower);
00943   //pars.PrintStatus();
00944   NuMMParameters bestfitlower = fitter.Minimise(pars);
00945   Double_t LowerOctant = FoverN->ComparePredWithData(bestfitlower);
00946 
00947   // Upper octant 
00948   if(start_th23_upper <= TMath::Pi()/4){ start_th23_upper = 0.89;}
00949   //pars.PrintStatus();  
00950   pars.Theta23(start_th23_upper);
00951   NuMMParameters bestfitupper = fitter.Minimise(pars);
00952   Double_t UpperOctant = FoverN->ComparePredWithData(bestfitupper);
00953 
00954   //------------------------------------------------------------ 
00955 
00956   // I also need to check the degenerate regions to make sure the minimum isnt in there.
00957   // there are two main ones, when dm241 = dm232 and dm241 = 2* dm232
00958   pars.Theta24(TMath::Pi()/4);
00959   pars.Theta23(TMath::Pi()/2);
00960   pars.Theta34(TMath::Pi()/2);
00961   pars.Dm243( TMath::Abs(parsfit_threeNH.Dm2()) );
00962   //pars.PrintStatus();
00963   NuMMParameters degen1 = fitter.Minimise(pars);
00964   Double_t chi2_degen1 = FoverN->ComparePredWithData(degen1);
00965 
00966   // check another area
00967   pars.Theta24(TMath::Pi()/4);
00968   pars.Theta23(TMath::Pi()/2);
00969   pars.Theta34(TMath::Pi()/2);
00970   pars.Dm243( TMath::Abs(2*parsfit_threeNH.Dm2()) );
00971   //pars.PrintStatus();
00972   NuMMParameters degen2 = fitter.Minimise(pars);
00973   Double_t chi2_degen2 = FoverN->ComparePredWithData(degen2);
00974 
00975   // one last degen area
00976   pars.Theta24(TMath::Pi()/4);
00977   pars.Theta23(TMath::Pi()/2);
00978   pars.Theta34(TMath::Pi()/2);
00979   pars.Dm243( 2e-4 );
00980   //pars.PrintStatus();
00981   NuMMParameters degen3 = fitter.Minimise(pars);
00982   Double_t chi2_degen3 = FoverN->ComparePredWithData(degen3);
00983 
00984   std::vector<Double_t> vChi2;
00985   vChi2.push_back(LowerOctant);
00986   vChi2.push_back(UpperOctant);
00987   vChi2.push_back(chi2_degen1);
00988   vChi2.push_back(chi2_degen2);
00989   vChi2.push_back(chi2_degen3);
00990 
00991   std::vector<NuMMParameters> vfitPars;
00992   vfitPars.push_back(bestfitlower);
00993   vfitPars.push_back(bestfitupper);
00994   vfitPars.push_back(degen1);
00995   vfitPars.push_back(degen2);
00996   vfitPars.push_back(degen3);
00997 
00998   // These will be the best fit ones
00999   NuMMParameters bestPars;
01000 
01001   std::cout << " " << std::endl;
01002   std::cout << "List of all Chi2 Best values: " << std::endl;
01003   std::cout << " " << std::endl;
01004 
01005   for(int i = 0; i<(int)vChi2.size(); ++i){
01006     cout << vChi2[i] << endl;
01007   }
01008  
01009 
01010   // Now sort in order and keep NuMMParameters with it
01011   Chi2best = vChi2[0];
01012   
01013   for ( Int_t i = 0; i < (Int_t)vChi2.size(); ++i) {
01014     if ( vChi2[i] <= Chi2best ) {
01015       Chi2best = vChi2[i];
01016       bestPars = vfitPars[i];
01017     }
01018   }
01019 
01020   theta24_best    = bestPars.Theta24();
01021   theta34_best    = bestPars.Theta34();
01022   theta23_best    = bestPars.Theta23();
01023   Dm232_best      = bestPars.Dm2();
01024   Dm2Sterile_best = bestPars.Dm243();
01025 
01026   std::cout << "Chi2best = " << Chi2best << std::endl;
01027 
01028   // This was a bad idea, this doesnt work so i suggust never using this block of code
01029   // unless you are debugging or something.
01030   /*
01031   // This is for emergencies only.... there is a chance this might be larger
01032   // than chi2 profile... if so.. one more last ditch attmpet... is to search
01033   // at the exact coordinates i made the fake data with in the first place
01034 
01035   if( Chi2ProfileTest < Chi2best ){
01036     std::cout << " " << std::endl;
01037     std::cout << "OH NO!! Chi2Profile is larger than Chi2best... time for one more quick look." << std::endl;
01038     
01039     NuMMParameters LastTry = Chi2ProfilebestPars; // ashley
01040     LastTry.ReleaseDm243();
01041     LastTry.ReleaseDm232();
01042     LastTry.ReleaseTheta23();
01043     LastTry.ReleaseTheta24();
01044     LastTry.ReleaseTheta34();
01045     LastTry.PrintStatus();
01046 
01047     NuMMParameters LastTryBest = fitter.Minimise(LastTry);
01048     Double_t chi2_lastChance = FoverN->ComparePredWithData(LastTryBest);
01049 
01050     std::cout << "chi2_lastChance = " << chi2_lastChance << endl;
01051 
01052     //    if(chi2_lastChance < Chi2best) Chi2best = chi2_lastChance;
01053   }
01054   */
01055 
01056   return Chi2best;
01057 }

Double_t FeldmanSterile::CalculateChi2Profile ( NuSystFitter  fitter,
NuMMParameters  pars 
)

Definition at line 1059 of file FeldmanSterile.cxx.

References Chi2ProfilebestPars, FarOverNearFit::ComparePredWithData(), NuMMParameters::Dm2(), NuMMParameters::FixAllParameters(), FoverN, GlobalParameterSpace, kdm241vsth24, kdm241vsth34, NuSystFitter::Minimise(), NuMMParameters::PrintStatus(), NuMMParameters::ReleaseDm2(), NuMMParameters::ReleaseTheta23(), NuMMParameters::ReleaseTheta24(), NuMMParameters::ReleaseTheta34(), start_th23_lower, start_th23_upper, startDm232, NuMMParameters::Theta23(), NuMMParameters::Theta24(), NuMMParameters::Theta34(), and UseLowerOctantInGridSearch.

Referenced by Calculate2DdeltaChi2().

01060 {
01061   std::cout << "=======================================================" << std::endl;
01062   std::cout << "                 Calculating Chi2 Profile "              << std::endl;
01063   std::cout << "=======================================================" << std::endl;
01064 
01065   // Release the correct one
01066   pars.FixAllParameters();
01067   pars.ReleaseDm2();
01068 
01069   if(GlobalParameterSpace == kdm241vsth24){
01070     pars.ReleaseTheta23();
01071     pars.ReleaseTheta34();
01072   }
01073   else if(GlobalParameterSpace == kdm241vsth34){
01074     pars.ReleaseTheta23();
01075     pars.ReleaseTheta24();
01076   }
01077 
01078   // Get value from 3 flav fit
01079   pars.Dm2(startDm232);
01080   pars.Theta34(0.0);
01081 
01082   // Lower Octant of Theta23
01083   if(start_th23_lower >= TMath::Pi()/4){ start_th23_lower = 0.69; }
01084   pars.Theta23(start_th23_lower);
01085   NuMMParameters best_lower = fitter.Minimise(pars);
01086   Double_t Chi2_lower = FoverN->ComparePredWithData(best_lower);
01087 
01088   // Upper octant of Theta23
01089   if(start_th23_upper <= TMath::Pi()/4){ start_th23_upper = 0.89; }
01090   pars.Theta23(start_th23_upper);
01091   NuMMParameters best_upper = fitter.Minimise(pars);
01092   Double_t Chi2_upper = FoverN->ComparePredWithData(best_upper);
01093 
01094   start_th23_lower = best_lower.Theta23();
01095   start_th23_upper = best_upper.Theta23();
01096 
01097   NuMMParameters degenpars = pars;
01098   degenpars.FixAllParameters();
01099   degenpars.ReleaseDm2();
01100 
01101   NuMMParameters degenpars2 = pars;
01102   degenpars2.FixAllParameters();
01103   degenpars2.ReleaseDm2();
01104   degenpars2.Dm2(0.00837);
01105 
01106   if(GlobalParameterSpace == kdm241vsth24){
01107     degenpars.ReleaseTheta23();
01108     degenpars.ReleaseTheta34();
01109     degenpars.Theta23(TMath::Pi()/2);
01110     degenpars.Theta34(TMath::Pi()/2);
01111   
01112     degenpars2.ReleaseTheta23();
01113     degenpars2.ReleaseTheta34();
01114     degenpars2.Theta23(TMath::Pi()/2);
01115     degenpars2.Theta34(TMath::Pi()/2);
01116   }
01117   else if(GlobalParameterSpace == kdm241vsth34){
01118     degenpars.ReleaseTheta23();
01119     degenpars.ReleaseTheta24();
01120     degenpars.Theta24(TMath::Pi()/4);
01121     degenpars.Theta23(TMath::Pi()/2);
01122   
01123     degenpars2.ReleaseTheta23();
01124     degenpars2.ReleaseTheta24();
01125     degenpars2.Theta24(TMath::Pi()/4);
01126     degenpars2.Theta23(TMath::Pi()/2);
01127   }
01128 
01129   //cout << "Degen1 starting point" << endl;
01130   //degenpars.PrintStatus();
01131 
01132   NuMMParameters degen = fitter.Minimise(degenpars);
01133   Double_t chi2_degen = FoverN->ComparePredWithData(degen);
01134 
01135   //cout << "Degen2 starting point = " << endl;
01136   //degenpars2.PrintStatus();
01137   NuMMParameters degen2 = fitter.Minimise(degenpars2);
01138   Double_t chi2_degen2 = FoverN->ComparePredWithData(degen2);
01139 
01140   std::vector<Double_t> vChi2;
01141   vChi2.push_back(Chi2_lower);
01142   vChi2.push_back(Chi2_upper);
01143   vChi2.push_back(chi2_degen);
01144   vChi2.push_back(chi2_degen2);
01145 
01146   std::vector<NuMMParameters> vfitPars;
01147   vfitPars.push_back(best_lower);
01148   vfitPars.push_back(best_upper);
01149   vfitPars.push_back(degen);
01150   vfitPars.push_back(degen2);
01151 
01152   std::cout << " " << std::endl;
01153   std::cout << "List of all Chi2 Profile values: " << std::endl;
01154   std::cout << " " << std::endl;
01155 
01156   for(int i = 0; i<(int)vChi2.size(); ++i){
01157     cout << vChi2[i] << endl;
01158   }
01159 
01160   // chi2 best later on will want to do a coarse grid search
01161   // now to save time, i can only choose one octant
01162   // so i choose the smallest chi2 from Chi2_lower or Chi2_upper
01163   // i cant just take the smallest of all chi2s because of the degenerate ones
01164   // if that is the smallest... then my coarse grid search will fix th23 to pi/2 or something 
01165   // silly like that..... so if it is degenerate, i just choose whatever value of chi2 from lower 
01166   // and upper octant is lowest, regardless of how silly the chi2 value.
01167   
01168   if( Chi2_lower <= Chi2_upper ){
01169     // so lets search later on with lower octant
01170     UseLowerOctantInGridSearch = true;
01171   }
01172   else{
01173     UseLowerOctantInGridSearch = false;
01174   }
01175 
01176   std::cout << " " << std::endl;
01177 
01178   // These will be the best fit ones
01179   //NuMMParameters bestPars;
01180   Double_t Chi2profile = vChi2[0];
01181 
01182   for ( Int_t i = 0; i < (Int_t)vChi2.size(); ++i) {
01183     if ( vChi2[i] <= Chi2profile ) {
01184       Chi2profile = vChi2[i];
01185       Chi2ProfilebestPars = vfitPars[i];
01186     }
01187   }
01188 
01189   std::cout << " " << std::endl;
01190   std::cout << "Chi2 Profile fit Results:::" << std::endl;
01191     
01192   std::cout << "Dm232 best                    = " << Chi2ProfilebestPars.Dm2()       << " eV^2" << std::endl;
01193   std::cout << "Theta34 best fit for profile  = " << Chi2ProfilebestPars.Theta34()   << " radians" << std::endl;
01194 
01195   std::cout << "th23 best fit (Lower octant)  = " << start_th23_lower     << " radians" << std::endl;
01196   std::cout << "th23 best fit (Upper octant)  = " << start_th23_upper     << " radians " << std::endl;
01197 
01198   std::cout << "th34 best fit (Lower octant)  = " << Chi2ProfilebestPars.Theta34() << " radians" << std::endl;
01199   std::cout << "th34 best fit (Upper octant)  = " << Chi2ProfilebestPars.Theta34() << " radians " << std::endl;
01200 
01201   std::cout << "th24 best fit (Lower octant)  = " << best_lower.Theta24() << " radians" << std::endl;
01202   std::cout << "th24 best fit (Upper octant)  = " << best_upper.Theta24() << " radians " << std::endl;
01203 
01204   std::cout << "Chi2 (Lower octant)           = " << Chi2_lower << " units." << std::endl;
01205   std::cout << "Chi2 (Upper octant)           = " << Chi2_upper << " units." << std::endl;
01206 
01207   std::cout << "chi2 profile degen            = " << chi2_degen << endl;
01208   std::cout << "Lowest Chi2 profile           = " << Chi2profile << " units." << std::endl;
01209 
01210   std::cout << "Best parameters:: " << std::endl; 
01211   Chi2ProfilebestPars.PrintStatus();
01212 
01213   return Chi2profile;
01214 }

FeldmanSterile::ClassDef ( FeldmanSterile  ,
 
) [private]
TH1D * FeldmanSterile::CreateGrid (  ) 

Definition at line 1399 of file FeldmanSterile.cxx.

References MuELoss::e.

Referenced by CalculateChi2Best2D().

01400 {
01401   // Set the range for the grid
01402   Double_t minVal = 1e-4;
01403   Double_t maxVal = 100;
01404 
01405   //const Int_t Num = 120; //used for real analysis
01406   const Int_t Num = 100; //80
01407   // 120 has been successful
01408   //const Int_t Num = 160; // i tested with more, you see little improvement.
01409   //const Int_t Num = 240;
01410 
01411   // it needs one extra, stupid array when giving it to TH1D constructor!
01412   Double_t binArray[Num+1];
01413 
01414   // This is so its evenly spread over a log_e scale
01415   Double_t increment = TMath::Power(maxVal/minVal, 1.0/Num);
01416 
01417   // Actually fill the array uo
01418   for ( Int_t i=0; i<=Num; ++i ){
01419     binArray[i] = minVal;
01420     minVal *= increment;
01421   }
01422 
01423   // Create the TH1D
01424   TH1D* grid = new TH1D("", "", Num, binArray );
01425   grid->SetStats(false);
01426   grid->GetXaxis()->SetTitle("#Deltam^{2}");
01427   grid->GetXaxis()->SetTitle("#chi^{2}");
01428 
01429   // so its not asscoiated with any currently open TFile
01430   grid->SetDirectory(0);
01431 
01432   return grid;
01433 }

void FeldmanSterile::FitThreeFlavourOnly ( NuSystFitter  fitter,
NuMMParameters  pars 
)

Definition at line 670 of file FeldmanSterile.cxx.

References FarOverNearFit::ComparePredWithData(), NuMMParameters::Dm2(), NuMMParameters::FixAllParameters(), FoverN, NuSystFitter::Minimise(), NuMMParameters::ReleaseDm2(), NuMMParameters::ReleaseTheta23(), start_th23_lower, start_th23_upper, startDm232, and NuMMParameters::Theta23().

Referenced by Calculate2DdeltaChi2().

00671 {
00672   std::cout << " " << std::endl;
00673   std::cout << "Performing Inital 3 Flavour Fit Only." << std::endl;
00674 
00675   // Want th23 and Dm232 free only
00676   pars.FixAllParameters();
00677   pars.ReleaseDm2();
00678   pars.ReleaseTheta23();
00679 
00680   // reset values
00681   startDm232 = -999.0;
00682   start_th23_lower = -999.0;
00683   start_th23_upper = -999.0;
00684 
00685   //cout << "Three flavour fit pars:" << endl;
00686   //pars.PrintStatus();
00687 
00688   // Lower Octant Theta23
00689   pars.Theta23( 0.65 );
00690   NuMMParameters best_lower = fitter.Minimise(pars);
00691   Double_t Chi2_lower = FoverN->ComparePredWithData(best_lower);
00692 
00693   // Upper Octant Theta23
00694   pars.Theta23( 0.89 );
00695   NuMMParameters best_upper = fitter.Minimise(pars);
00696   Double_t Chi2_upper = FoverN->ComparePredWithData(best_upper);
00697   
00698   start_th23_lower = best_lower.Theta23();
00699   start_th23_upper = best_upper.Theta23();
00700 
00701   if (Chi2_lower <= Chi2_upper ){
00702     startDm232 = best_lower.Dm2();
00703   }
00704   else{
00705     startDm232 = best_upper.Dm2();
00706   }
00707 
00708   std::cout << " " << std::endl;
00709   std::cout << "3 flavour fit Results::" << std::endl;
00710   std::cout << "Dm232 best                    = " << startDm232 << " eV^2" << std::endl;
00711   std::cout << "th23 best fit (lower octant)  = " << start_th23_lower << " radians" << std::endl;
00712   std::cout << "th23 best fit (upper octant)  = " << start_th23_upper << " radians " << std::endl;
00713   std::cout << "Chi2 value for lower octant   = " << Chi2_lower << " units." << std::endl;
00714   std::cout << "Chi2 value for upper octant   = " << Chi2_upper << " units." << std::endl;
00715   std::cout << " " << std::endl;
00716 }

Double_t FeldmanSterile::GetChi2Best (  ) 

Definition at line 236 of file FeldmanSterile.cxx.

References Chi2_best.

00237 {
00238   return Chi2_best;
00239 }

Double_t FeldmanSterile::GetChi2Profile (  ) 

Definition at line 206 of file FeldmanSterile.cxx.

References Chi2_profile.

00207 {
00208   return Chi2_profile;
00209 }

Double_t FeldmanSterile::GetDm232_best (  ) 

Definition at line 226 of file FeldmanSterile.cxx.

References Dm232_best.

00227 {
00228   return Dm232_best;
00229 }

Double_t FeldmanSterile::GetDm2Sterile_best (  ) 

Definition at line 231 of file FeldmanSterile.cxx.

References Dm2Sterile_best.

00232 {
00233   return Dm2Sterile_best;
00234 }

void FeldmanSterile::GetHistos (  ) 

Definition at line 288 of file FeldmanSterile.cxx.

References 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, GetMatrices(), got_histos, ND_MC, ND_Nue, ND_NuTau, NDCC_AppNue, NDCC_AppNuTau, NDCC_BeamNue, NDCC_NuMu, NDCC_TrueNC, NDNC_AppNue, NDNC_AppNuTau, NDNC_BeamNue, NDNC_NuMu, and NDNC_TrueNC.

Referenced by Add(), and Calculate2DdeltaChi2().

00289 {
00290   // Only have to do this once
00291   if(got_histos == true) return;
00292 
00293   GetMatrices();
00294 
00295   assert(ND_MC); assert(ND_Nue); assert(ND_NuTau);
00296   assert(FD_MC); assert(FD_Nue); assert(FD_NuTau);
00297 
00298   ND_MC->GetObject("hRecoToTrueNCSelectedTrueNC",      NDNC_TrueNC);   assert(NDNC_TrueNC);
00299   ND_MC->GetObject("hRecoToTrueNCSelectedTrueCCNuMu",  NDNC_NuMu);     assert(NDNC_NuMu);
00300   ND_MC->GetObject("hRecoToTrueNCSelectedTrueBeamNuE",     NDNC_BeamNue);  assert(NDNC_BeamNue);
00301   ND_Nue->GetObject("hRecoToTrueNCSelectedTrueAppearedNuE",   NDNC_AppNue);   assert(NDNC_AppNue);
00302   ND_NuTau->GetObject("hRecoToTrueNCSelectedTrueAppearedTau", NDNC_AppNuTau); assert(NDNC_AppNuTau);
00303 
00304   ND_MC->GetObject("hRecoToTrueCCSelectedTrueNC_All",      NDCC_TrueNC);   assert(NDCC_TrueNC);
00305   ND_MC->GetObject("hRecoToTrueCCSelectedTrueCCNuMu_All",  NDCC_NuMu);     assert(NDCC_NuMu);
00306   ND_MC->GetObject("hRecoToTrueCCSelectedTrueBeamNuE_All",     NDCC_BeamNue);  assert(NDCC_BeamNue);
00307   ND_Nue->GetObject("hRecoToTrueCCSelectedTrueAppearedNuE_All",   NDCC_AppNue);   assert(NDCC_AppNue);
00308   ND_NuTau->GetObject("hRecoToTrueCCSelectedTrueAppearedTau_All", NDCC_AppNuTau); assert(NDCC_AppNuTau);
00309 
00310   FD_MC->GetObject("hRecoToTrueNCSelectedTrueNC",      FDNC_TrueNC);   assert(FDNC_TrueNC);
00311   FD_MC->GetObject("hRecoToTrueNCSelectedTrueCCNuMu",  FDNC_NuMu);     assert(FDNC_NuMu);
00312   FD_MC->GetObject("hRecoToTrueNCSelectedTrueBeamNuE",     FDNC_BeamNue);  assert(FDNC_BeamNue);
00313   FD_Nue->GetObject("hRecoToTrueNCSelectedTrueAppearedNuE",   FDNC_AppNue);   assert(FDNC_AppNue);
00314   FD_NuTau->GetObject("hRecoToTrueNCSelectedTrueAppearedTau", FDNC_AppNuTau); assert(FDNC_AppNuTau);
00315 
00316   FD_MC->GetObject("hRecoToTrueCCSelectedTrueNC_All",      FDCC_TrueNC);   assert(FDCC_TrueNC);
00317   FD_MC->GetObject("hRecoToTrueCCSelectedTrueCCNuMu_All",  FDCC_NuMu);     assert(FDCC_NuMu);
00318   FD_MC->GetObject("hRecoToTrueCCSelectedTrueBeamNuE_All",     FDCC_BeamNue);  assert(FDCC_BeamNue);
00319   FD_Nue->GetObject("hRecoToTrueCCSelectedTrueAppearedNuE_All",   FDCC_AppNue);   assert(FDCC_AppNue);
00320   FD_NuTau->GetObject("hRecoToTrueCCSelectedTrueAppearedTau_All", FDCC_AppNuTau); assert(FDCC_AppNuTau);
00321 
00322   got_histos = true;
00323 }

void FeldmanSterile::GetMatrices (  ) 

Definition at line 241 of file FeldmanSterile.cxx.

References CoVarCC, CoVarCCinvert, CoVarNC, CoVarNCinvert, and matrix.

Referenced by GetHistos().

00242 {
00243   assert(matrix);
00244 
00245   CoVarCCinvert = (TMatrixD*)matrix->Get("TotalInvertCC"); assert(CoVarCCinvert);
00246   CoVarNCinvert = (TMatrixD*)matrix->Get("TotalInvertNC"); assert(CoVarNCinvert);
00247 
00248   CoVarCC = (TMatrixD*)matrix->Get("TotalCCCovar"); assert(CoVarCC);
00249   CoVarNC = (TMatrixD*)matrix->Get("TotalNCCovar"); assert(CoVarNC);
00250 
00251 }

Double_t FeldmanSterile::GetTheta23_best (  ) 

Definition at line 221 of file FeldmanSterile.cxx.

References theta23_best.

00222 {
00223   return theta23_best;
00224 }

Double_t FeldmanSterile::GetTheta24_best (  ) 

Definition at line 211 of file FeldmanSterile.cxx.

References theta24_best.

00212 {
00213   return theta24_best;
00214 }

Double_t FeldmanSterile::GetTheta34_best (  ) 

Definition at line 216 of file FeldmanSterile.cxx.

References theta34_best.

00217 {
00218   return theta34_best;
00219 }

void FeldmanSterile::LoadDataContour ( TFile *  datacontour  ) 

Definition at line 147 of file FeldmanSterile.cxx.

References ChoosePresetDeterimedValues, hDataContour, hDataDm232, hDataTheta23, and hDataTheta34.

00148 {
00149   std::cout << " " << std::endl;
00150   std::cout << "*****************************************************************" << std::endl;
00151   std::cout << "************************** WARNING ******************************" << std::endl;
00152   std::cout << "*****************************************************************" << std::endl;
00153   std::cout << " " << std::endl;
00154 
00155   std::cout << "By Selecting to LoadDataContour... fake data will be generated by the best fit from the TH2D provided!" << std::endl;
00156 
00157   ChoosePresetDeterimedValues = true;
00158 
00159   hDataContour = (TH2D*)datacontour->Get("dm241vsth24"); assert(hDataContour);
00160   hDataTheta23 = (TH2D*)datacontour->Get("Theta23");     assert(hDataTheta23);
00161   hDataTheta34 = (TH2D*)datacontour->Get("Theta34");     assert(hDataTheta34);
00162   hDataDm232   = (TH2D*)datacontour->Get("dm232");       assert(hDataDm232);
00163 
00164   std::cout << "Loaded Real data best fits." << std::endl;
00165 
00166   std::cout << " " << std::endl;
00167   std::cout << "*****************************************************************" << std::endl;
00168   std::cout << "*****************************************************************" << std::endl;
00169   std::cout << " " << std::endl;
00170 }

void FeldmanSterile::SetFDBaseline ( Double_t  baseline  ) 

Definition at line 142 of file FeldmanSterile.cxx.

References FD_baseline.

00143 {
00144   FD_baseline = baseline;
00145 }

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

Definition at line 122 of file FeldmanSterile.cxx.

References FD_MC, FD_Nue, and FD_NuTau.

00123 {
00124   FD_MC    = MC_file;
00125   FD_Nue   = Nue_file;
00126   FD_NuTau = NuTau_file;
00127 }

void FeldmanSterile::SetMatrices ( TFile *  Data_file  ) 

Definition at line 172 of file FeldmanSterile.cxx.

References matrix.

00173 {
00174   matrix = Data_file;
00175 }

void FeldmanSterile::SetNDBaseline ( Double_t  baseline  ) 

Definition at line 137 of file FeldmanSterile.cxx.

References ND_baseline.

00138 {
00139   ND_baseline = baseline;
00140 }

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

Definition at line 115 of file FeldmanSterile.cxx.

References ND_MC, ND_Nue, and ND_NuTau.

00116 {
00117   ND_MC    = MC_file;
00118   ND_Nue   = Nue_file;
00119   ND_NuTau = NuTau_file;
00120 }

void FeldmanSterile::SetParameterSpace ( Int_t  ParameterSpace,
Double_t  massSplitting,
Double_t  theta,
Bool_t  useInvertedHierarchyforFakeData 
)

Definition at line 253 of file FeldmanSterile.cxx.

References GlobalParameterSpace, kdm241vsth24, kdm241vsth34, SetStartingPoint(), startdm2Sterile, starttheta24, and starttheta34.

00254 {
00255   startdm2Sterile = 0.0;
00256   starttheta34    = 0.0;
00257   starttheta24    = 0.0;
00258 
00259   // Assign the GlobalParameterSpace
00260   GlobalParameterSpace = ParameterSpace;
00261 
00262   if(ParameterSpace == FeldmanSterile::kdm241vsth34){
00263     
00264     std::cout << " " << std::endl;
00265     std::cout << "Working in Parameter space Dm241(3) vs Theta 34." << std::endl;
00266     std::cout << " " <<std::endl;
00267     
00268     startdm2Sterile = massSplitting;
00269     starttheta34 = theta;
00270     starttheta24 = 0.0;
00271   }
00272 
00273   if(ParameterSpace == FeldmanSterile::kdm241vsth24){
00274 
00275     std::cout << " " <<std::endl;
00276     std::cout << "Working in Parameter space Dm241(3) vs Theta 24." << std::endl;
00277     std::cout << " " <<std::endl;
00278 
00279     startdm2Sterile = massSplitting;
00280     starttheta34 = 0.0;
00281     starttheta24 = theta;
00282 
00283   }
00284 
00285   SetStartingPoint(startdm2Sterile, theta, useInvertedHierarchyforFakeData);
00286 }

void FeldmanSterile::SetPOT ( Double_t  POT_  ) 

Definition at line 201 of file FeldmanSterile.cxx.

00202 {
00203   POT = POT_;
00204 }

void FeldmanSterile::SetPremadeFakeData ( TH1D *  CC,
TH1D *  NC 
)

Definition at line 129 of file FeldmanSterile.cxx.

References RFlucCC, RFlucNC, and setFluc.

00130 {
00131   RFlucCC = CC; assert(RFlucCC); RFlucCC->SetDirectory(0);
00132   RFlucNC = NC; assert(RFlucNC); RFlucNC->SetDirectory(0);
00133   
00134   setFluc = true;
00135 }

void FeldmanSterile::SetStartingPoint ( Double_t  mass,
Double_t  theta,
Bool_t  useInvertedHierarchyforFakeData 
)

Definition at line 395 of file FeldmanSterile.cxx.

References ChoosePresetDeterimedValues, NuMMParameters::ConstrainDelta1(), NuMMParameters::ConstrainDelta2(), NuMMParameters::ConstrainDelta3(), NuMMParameters::ConstrainDm243(), NuMMParameters::ConstrainTheta23(), NuMMParameters::ConstrainTheta24(), NuMMParameters::ConstrainTheta34(), NuMMParameters::Delta1(), NuMMParameters::Delta2(), NuMMParameters::Delta3(), NuMMParameters::Dm2(), NuMMParameters::Dm221(), NuMMParameters::Dm243(), MuELoss::e, fakedata_degenvalue, fakedata_dm221, fakedata_dm232, fakedata_dmSterile, fakedata_theta12, fakedata_theta13, fakedata_theta14, fakedata_theta23, fakedata_theta24, fakedata_theta34, fakedataPars, NuMMParameters::FixAllParameters(), NuMMParameters::FixCCSystematics(), NuMMParameters::FixNCSystematics(), GlobalParameterSpace, hDataContour, hDataDm232, hDataTheta23, hDataTheta34, kdm241vsth24, kdm241vsth34, NuMMParameters::Theta12(), NuMMParameters::Theta13(), NuMMParameters::Theta14(), NuMMParameters::Theta23(), NuMMParameters::Theta24(), NuMMParameters::Theta34(), varyDm232, varyTheta23, varyTheta24, and varyTheta34.

Referenced by SetParameterSpace().

00396 {
00397   // My fake data needs a bunch of values for the osc pars. This will use default
00398   // or if you provde it with a TH2D of your REAL data contour, it will use those best values
00399   // Great thing about providing a contour is that you "know" when to provide the correct values 
00400   // of Pi/2 etc for th23, th34 etc in the degenerate regions
00401 
00402   // Define some constants
00403   fakedata_theta14 = 0.0;
00404   fakedata_theta13 = 0.149116;
00405   fakedata_theta12 = 0.5540758073;
00406   fakedata_dm221   = 0.0000754;
00407 
00408   fakedata_dmSterile = mass;
00409 
00410   if(ChoosePresetDeterimedValues == true){
00411 
00412     // by selecting this option the values of fakedatapars will be set to the value from the data contour provided.
00413 
00414     Int_t xbin = hDataContour->GetXaxis()->FindFixBin(theta);
00415     Int_t ybin = hDataContour->GetYaxis()->FindFixBin(mass);
00416     
00417     //cout << "xbin = " << xbin << endl;
00418     //cout << "ybin = " << ybin << endl;
00419 
00420     // xbin and y bin are the bins which contain the values i want.
00421     fakedata_theta24 = theta;
00422     fakedata_theta34 = hDataTheta34->GetBinContent(xbin,ybin);
00423     fakedata_theta23 = hDataTheta23->GetBinContent(xbin,ybin);
00424 
00425     if(useInvertedHierarchyforFakeData == false){
00426       // this is NH (+ve value)
00427       fakedata_dm232   = TMath::Abs( hDataDm232->GetBinContent(xbin,ybin) );
00428     }
00429     else{
00430       // This is IH (-ve value)
00431       fakedata_dm232   = -1* TMath::Abs( hDataDm232->GetBinContent(xbin,ybin) );
00432     }
00433 
00434     //cout << "theta24 selected = " << fakedata_theta24 << endl;
00435     //cout << "theta23 selected = " << fakedata_theta23 << endl;
00436     //cout << "theta34 selected = " << fakedata_theta34 << endl;
00437     //cout << "dm232 selected   = " << fakedata_dm232 << endl;
00438 
00439     //cout << "th24 i selected = " << theta << endl;
00440     //std::cout << "Sanity check:: theta24 from hist   = " << hDataContour->GetXaxis()->GetBinCenter(xbin) << std::endl;
00441     //cout << "dmsterile i selected = " << mass << endl;
00442     //std::cout << "Sanity check:: DmSterile from hist = " << hDataContour->GetYaxis()->GetBinCenter(ybin) << std::endl;
00443 
00444     if(fakedata_theta24 == 0.0) fakedata_theta24 = theta;
00445     if(fakedata_theta23 == 0.0) fakedata_theta23 = 0.69;
00446     if(fakedata_theta34 == 0.0) fakedata_theta34 = 0.0;
00447     
00448     if(fakedata_dm232   == 0.0){
00449       if(useInvertedHierarchyforFakeData == false){
00450         fakedata_dm232   = 0.00237;
00451       }
00452       else{
00453         fakedata_dm232   = -0.00237;
00454       }
00455     }
00456 
00457     //cout << "NEW!!!"              << endl;
00458     //cout << "theta24 selected = " << fakedata_theta24 << endl;
00459     //cout << "theta23 selected = " << fakedata_theta23 << endl;
00460     //cout << "theta34 selected = " << fakedata_theta34 << endl;
00461     //cout << "dm232 selected   = " << fakedata_dm232 << endl;
00462 
00463   }
00464   else{
00465     // Random number gen
00466     TRandom3 r;
00467     r.SetSeed(0);
00468     
00469     //----------------- Global pars space -------------------------
00470     if(GlobalParameterSpace == kdm241vsth24){
00471       
00472       // Set thetas
00473       fakedata_theta24 = theta;
00474       if(varyTheta34){
00475         if(fakedata_degenvalue == true){
00476           fakedata_theta34 = r.Gaus( TMath::Pi()/2, 0);
00477         }
00478         else{
00479           fakedata_theta34 = r.Gaus(0, 0);
00480         }
00481       }
00482       else{
00483         if(fakedata_degenvalue == true){
00484           fakedata_theta34 = TMath::Pi()/2;
00485         }
00486         else{
00487         fakedata_theta34 = 0.0;
00488         }
00489       }
00490       
00491     }
00492     else if(GlobalParameterSpace == kdm241vsth34){
00493       
00494       // Set Thetas
00495       fakedata_theta34 = theta;
00496       if(varyTheta24){
00497         fakedata_theta24 = r.Gaus(0, 0);
00498       }
00499       else{
00500         fakedata_theta24 = 0.0;
00501       }
00502     }
00503     //----------------- Global pars space -------------------------  
00504     
00505     Double_t tmpdm232(0.0);
00506     if(useInvertedHierarchyforFakeData == false){ 
00507       tmpdm232 = 2.37e-3; 
00508     }
00509     else{
00510       tmpdm232 = -2.37e-3;
00511     }
00512     
00513     if(varyDm232){
00514       fakedata_dm232 = r.Gaus( tmpdm232, 0.3e-3);
00515     }
00516     else{
00517       fakedata_dm232 = tmpdm232;
00518     }
00519     
00520     if(varyTheta23){ 
00521       if(fakedata_degenvalue == true){
00522         fakedata_theta23 = r.Gaus(TMath::Pi()/2, 0.511);
00523       }
00524       else{
00525       fakedata_theta23 = r.Gaus(0.69490493777, 0.511); 
00526       }
00527     }
00528     else{ 
00529       if(fakedata_degenvalue == true){
00530         fakedata_theta23 = TMath::Pi()/2;
00531       }
00532       else{
00533         fakedata_theta23 = 0.69490493777;
00534       }
00535     }
00536   } // end of else for fake data generation
00537   
00538   fakedataPars.Dm243(fakedata_dmSterile);
00539   fakedataPars.Theta24(fakedata_theta24);
00540   fakedataPars.Dm2(fakedata_dm232);
00541   //fakedataPars.Dm2(0.00237); 
00542   fakedataPars.Theta23(fakedata_theta23);
00543   fakedataPars.Theta34(fakedata_theta34);
00544   fakedataPars.Theta14(fakedata_theta14);
00545   fakedataPars.Theta13(fakedata_theta13);
00546   fakedataPars.Theta12(fakedata_theta12);
00547   fakedataPars.Dm221(fakedata_dm221);
00548 
00549   fakedataPars.Delta1(0.0);
00550   fakedataPars.Delta2(0.0);
00551   fakedataPars.Delta3(0.0);
00552 
00553   fakedataPars.FixAllParameters();
00554   fakedataPars.FixCCSystematics();
00555   fakedataPars.FixNCSystematics();
00556   fakedataPars.ConstrainDm243(0, 200);
00557 
00558   Double_t ep = 1e-2;
00559   fakedataPars.ConstrainTheta23( 0, TMath::Pi()/2 + ep );
00560   fakedataPars.ConstrainTheta34( 0, TMath::Pi()/2 + ep );
00561   fakedataPars.ConstrainTheta24( 0, TMath::Pi()/2 + ep );
00562   fakedataPars.ConstrainDelta1(  0, 2*TMath::Pi() + ep );
00563   fakedataPars.ConstrainDelta2(  0, 2*TMath::Pi() + ep );
00564   fakedataPars.ConstrainDelta3(  0, 2*TMath::Pi() + ep );
00565 }

void FeldmanSterile::SetUpFarOverNearFitClass (  ) 

Definition at line 588 of file FeldmanSterile.cxx.

References CoVarCC, FarOverNearFit::CoVarCC, CoVarCCinvert, FarOverNearFit::CoVarCCinvert, FarOverNearFit::CoVarNC, CoVarNC, FarOverNearFit::CoVarNCinvert, CoVarNCinvert, FD_baseline, FarOverNearFit::FD_baseline, FarOverNearFit::FDCC_AppNue, FDCC_AppNue, FDCC_AppNuTau, FarOverNearFit::FDCC_AppNuTau, FDCC_BeamNue, FarOverNearFit::FDCC_BeamNue, FDCC_NuMu, FarOverNearFit::FDCC_NuMu, FDCC_TrueNC, FarOverNearFit::FDCC_TrueNC, FDNC_AppNue, FarOverNearFit::FDNC_AppNue, FDNC_AppNuTau, FarOverNearFit::FDNC_AppNuTau, FarOverNearFit::FDNC_BeamNue, FDNC_BeamNue, FDNC_NuMu, FarOverNearFit::FDNC_NuMu, FDNC_TrueNC, FarOverNearFit::FDNC_TrueNC, FoverN, FarOverNearFit::got_helpers, FarOverNearFit::got_matrices, FarOverNearFit::Initalise(), FarOverNearFit::ND_baseline, ND_baseline, FarOverNearFit::NDCC_AppNue, NDCC_AppNue, FarOverNearFit::NDCC_AppNuTau, NDCC_AppNuTau, NDCC_BeamNue, FarOverNearFit::NDCC_BeamNue, FarOverNearFit::NDCC_NuMu, NDCC_NuMu, FarOverNearFit::NDCC_TrueNC, NDCC_TrueNC, FarOverNearFit::NDNC_AppNue, NDNC_AppNue, NDNC_AppNuTau, FarOverNearFit::NDNC_AppNuTau, NDNC_BeamNue, FarOverNearFit::NDNC_BeamNue, NDNC_NuMu, FarOverNearFit::NDNC_NuMu, NDNC_TrueNC, FarOverNearFit::NDNC_TrueNC, setup_FakeSterile, and setup_FarOverNearFit.

Referenced by Calculate2DdeltaChi2().

00589 {
00590   // Only have to do this once
00591   if(setup_FarOverNearFit == true) return;
00592 
00593   // Give histograms to the class that actually makes the fake data 
00594   // Hand these to the NuMMRun Sterile Object "FoverN"
00595   FoverN->NDNC_TrueNC = NDNC_TrueNC; 
00596   FoverN->NDNC_NuMu = NDNC_NuMu;
00597   FoverN->NDNC_BeamNue = NDNC_BeamNue;
00598   FoverN->NDNC_AppNue = NDNC_AppNue;
00599   FoverN->NDNC_AppNuTau = NDNC_AppNuTau;
00600   FoverN->NDCC_TrueNC = NDCC_TrueNC;
00601   FoverN->NDCC_NuMu = NDCC_NuMu;
00602   FoverN->NDCC_BeamNue = NDCC_BeamNue;
00603   FoverN->NDCC_AppNue = NDCC_AppNue;
00604   FoverN->NDCC_AppNuTau = NDCC_AppNuTau;
00605   FoverN->FDNC_TrueNC = FDNC_TrueNC;
00606   FoverN->FDNC_NuMu = FDNC_NuMu;
00607   FoverN->FDNC_BeamNue = FDNC_BeamNue;
00608   FoverN->FDNC_AppNue = FDNC_AppNue;
00609   FoverN->FDNC_AppNuTau = FDNC_AppNuTau;
00610   FoverN->FDCC_TrueNC = FDCC_TrueNC;
00611   FoverN->FDCC_NuMu = FDCC_NuMu;
00612   FoverN->FDCC_BeamNue = FDCC_BeamNue;
00613   FoverN->FDCC_AppNue = FDCC_AppNue;
00614   FoverN->FDCC_AppNuTau = FDCC_AppNuTau;
00615 
00616   // Set the Baselines (Very Important)
00617   // Codes defaults to no oscillations if these are set to zero.
00618   FoverN->ND_baseline = ND_baseline;
00619   FoverN->FD_baseline = FD_baseline;
00620 
00621   FoverN->CoVarCCinvert = CoVarCCinvert;
00622   FoverN->CoVarNCinvert = CoVarNCinvert;
00623   FoverN->CoVarCC = CoVarCC;
00624   FoverN->CoVarNC = CoVarNC;
00625 
00626   FoverN->got_matrices = true;
00627   FoverN->got_helpers = true;
00628 
00629   FoverN->Initalise();
00630 
00631   setup_FarOverNearFit = true;
00632   setup_FakeSterile = true;
00633   
00634 }

void FeldmanSterile::ThreeFlavourPars (  ) 

Definition at line 337 of file FeldmanSterile.cxx.

References NuMMParameters::ConstrainDelta1(), NuMMParameters::ConstrainDelta2(), NuMMParameters::ConstrainDelta3(), NuMMParameters::ConstrainDm243(), NuMMParameters::ConstrainTheta23(), NuMMParameters::ConstrainTheta24(), NuMMParameters::ConstrainTheta34(), NuMMParameters::Dm2(), NuMMParameters::Dm221(), NuMMParameters::Dm243(), MuELoss::e, fakedata_dm221, fakedata_theta12, fakedata_theta13, NuMMParameters::FixAllParameters(), NuMMParameters::FixCCSystematics(), NuMMParameters::FixNCSystematics(), parsfit_threeIH, parsfit_threeNH, NuMMParameters::Theta12(), NuMMParameters::Theta13(), NuMMParameters::Theta14(), NuMMParameters::Theta23(), NuMMParameters::Theta24(), and NuMMParameters::Theta34().

Referenced by Calculate2DdeltaChi2().

00338 {
00339   // This doesnt have to be exact i just want good starting points
00340   // also turn all steriles off
00341   parsfit_threeNH.Dm2(0.00237);
00342   parsfit_threeNH.Theta23(0.69490493777);
00343 
00344   parsfit_threeNH.Dm221(fakedata_dm221);
00345   parsfit_threeNH.Theta12(fakedata_theta12);
00346   parsfit_threeNH.Theta13(fakedata_theta13);
00347 
00348   // No steriles
00349   parsfit_threeNH.Dm243(0.0);
00350   parsfit_threeNH.Theta24(0.0);
00351   parsfit_threeNH.Theta34(0.0);
00352   parsfit_threeNH.Theta14(0.0);
00353 
00354   // Now for IH
00355   parsfit_threeIH.Dm2(-0.00237);
00356   parsfit_threeIH.Theta23(0.69490493777);
00357 
00358   parsfit_threeIH.Dm221(fakedata_dm221);
00359   parsfit_threeIH.Theta12(fakedata_theta12);
00360   parsfit_threeIH.Theta13(fakedata_theta13);
00361   
00362   parsfit_threeIH.Dm243(0.0);
00363   parsfit_threeIH.Theta24(0.0);
00364   parsfit_threeIH.Theta34(0.0);
00365   parsfit_threeIH.Theta14(0.0);
00366   
00367   parsfit_threeIH.FixAllParameters();
00368   parsfit_threeIH.FixCCSystematics();
00369   parsfit_threeIH.FixNCSystematics();
00370   parsfit_threeIH.ConstrainDm243(0, 200);
00371   
00372   // ep is just some arbitary number , Minuit gets confsed it you contsrain EXACTLY on this "special boundary""
00373   Double_t ep = 1e-2;
00374   
00375   parsfit_threeIH.ConstrainTheta23( 0, TMath::Pi()/2 + ep );
00376   parsfit_threeIH.ConstrainTheta34( 0, TMath::Pi()/2 + ep );
00377   parsfit_threeIH.ConstrainTheta24( 0, TMath::Pi()/2 + ep );
00378   parsfit_threeIH.ConstrainDelta1(  0, 2*TMath::Pi() + ep );
00379   parsfit_threeIH.ConstrainDelta2(  0, 2*TMath::Pi() + ep );
00380   parsfit_threeIH.ConstrainDelta3(  0, 2*TMath::Pi() + ep );
00381 
00382   parsfit_threeNH.FixAllParameters();
00383   parsfit_threeNH.FixCCSystematics();
00384   parsfit_threeNH.FixNCSystematics();
00385   parsfit_threeNH.ConstrainDm243(0, 200);
00386 
00387   parsfit_threeNH.ConstrainTheta23( 0, TMath::Pi()/2 + ep );
00388   parsfit_threeNH.ConstrainTheta34( 0, TMath::Pi()/2 + ep );
00389   parsfit_threeNH.ConstrainTheta24( 0, TMath::Pi()/2 + ep );
00390   parsfit_threeNH.ConstrainDelta1(  0, 2*TMath::Pi() + ep );
00391   parsfit_threeNH.ConstrainDelta2(  0, 2*TMath::Pi() + ep );
00392   parsfit_threeNH.ConstrainDelta3(  0, 2*TMath::Pi() + ep );
00393 }

void FeldmanSterile::UseDm241 ( bool  YesorNo  ) 

Definition at line 325 of file FeldmanSterile.cxx.

References FoverN, and use41.

00326 {
00327   use41 = YesorNo;
00328   FoverN->FarOverNearFit::UseDm241(use41);
00329 }

void FeldmanSterile::UseFakeDataDegenValues (  ) 

Definition at line 331 of file FeldmanSterile.cxx.

References fakedata_degenvalue.

00332 {
00333   std::cout << "Creating fake data with degenerate values for theta23 and theta34" << std::endl;
00334   fakedata_degenvalue = true;
00335 }

void FeldmanSterile::VaryDm232 (  ) 

Definition at line 177 of file FeldmanSterile.cxx.

References varyDm232.

00178 {
00179   std::cout << "Throwing fake data - varying Dm232" << std::endl;
00180   varyDm232 = true;
00181 }

void FeldmanSterile::VaryTheta23 (  ) 

Definition at line 189 of file FeldmanSterile.cxx.

References varyTheta23.

00190 {
00191   std::cout << "Throwing fake data - varying theta23" << std::endl;
00192   varyTheta23 = true;
00193 }

void FeldmanSterile::VaryTheta24 (  ) 

Definition at line 183 of file FeldmanSterile.cxx.

References varyTheta24.

00184 {
00185   std::cout << "Throwing fake data - varying Theta24" << std::endl;
00186   varyTheta24 = true;
00187 }

void FeldmanSterile::VaryTheta34 (  ) 

Definition at line 195 of file FeldmanSterile.cxx.

References varyTheta34.

00196 {
00197   std::cout << "Throwing fake data - varying theta34" << std::endl;
00198   varyTheta34 = true;
00199 }


Member Data Documentation

Definition at line 125 of file FeldmanSterile.h.

Referenced by Calculate2DdeltaChi2(), and GetChi2Best().

Definition at line 126 of file FeldmanSterile.h.

Referenced by Calculate2DdeltaChi2(), and GetChi2Profile().

Definition at line 115 of file FeldmanSterile.h.

Referenced by CalculateChi2Profile().

Definition at line 145 of file FeldmanSterile.h.

Referenced by LoadDataContour(), and SetStartingPoint().

Definition at line 121 of file FeldmanSterile.h.

Definition at line 58 of file FeldmanSterile.h.

Referenced by GetMatrices(), and SetUpFarOverNearFitClass().

Definition at line 54 of file FeldmanSterile.h.

Referenced by GetMatrices(), and SetUpFarOverNearFitClass().

Definition at line 59 of file FeldmanSterile.h.

Referenced by GetMatrices(), and SetUpFarOverNearFitClass().

Definition at line 55 of file FeldmanSterile.h.

Referenced by GetMatrices(), and SetUpFarOverNearFitClass().

Definition at line 124 of file FeldmanSterile.h.

Referenced by Calculate2DdeltaChi2().

Double_t FeldmanSterile::Dm232_best [private]
Double_t FeldmanSterile::Dm232_profile [private]

Definition at line 188 of file FeldmanSterile.h.

Double_t FeldmanSterile::Dm2Sterile_best [private]

Definition at line 188 of file FeldmanSterile.h.

Definition at line 155 of file FeldmanSterile.h.

Referenced by SetStartingPoint(), and UseFakeDataDegenValues().

Definition at line 130 of file FeldmanSterile.h.

Referenced by SetStartingPoint(), and ThreeFlavourPars().

Definition at line 129 of file FeldmanSterile.h.

Referenced by SetStartingPoint().

Definition at line 131 of file FeldmanSterile.h.

Referenced by SetStartingPoint().

Definition at line 133 of file FeldmanSterile.h.

Referenced by SetStartingPoint(), and ThreeFlavourPars().

Definition at line 134 of file FeldmanSterile.h.

Referenced by SetStartingPoint(), and ThreeFlavourPars().

Definition at line 137 of file FeldmanSterile.h.

Referenced by SetStartingPoint().

Definition at line 132 of file FeldmanSterile.h.

Referenced by SetStartingPoint().

Definition at line 135 of file FeldmanSterile.h.

Referenced by SetStartingPoint().

Definition at line 136 of file FeldmanSterile.h.

Referenced by SetStartingPoint().

Definition at line 109 of file FeldmanSterile.h.

Referenced by Calculate2DdeltaChi2(), and SetStartingPoint().

Definition at line 141 of file FeldmanSterile.h.

Referenced by SetFDBaseline(), and SetUpFarOverNearFitClass().

TFile * FeldmanSterile::FD_data [private]

Definition at line 176 of file FeldmanSterile.h.

TFile* FeldmanSterile::FD_MC [private]

Definition at line 176 of file FeldmanSterile.h.

Referenced by GetHistos(), and SetFDMC().

Definition at line 51 of file FeldmanSterile.h.

TFile * FeldmanSterile::FD_Nue [private]

Definition at line 176 of file FeldmanSterile.h.

Referenced by GetHistos(), and SetFDMC().

Definition at line 51 of file FeldmanSterile.h.

TFile * FeldmanSterile::FD_NuTau [private]

Definition at line 176 of file FeldmanSterile.h.

Referenced by GetHistos(), and SetFDMC().

Definition at line 51 of file FeldmanSterile.h.

Definition at line 41 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 41 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 41 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 41 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 41 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 40 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 40 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 40 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 40 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 40 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 169 of file FeldmanSterile.h.

Referenced by CalculateChi2Profile(), SetParameterSpace(), and SetStartingPoint().

Definition at line 143 of file FeldmanSterile.h.

Referenced by GetHistos().

Definition at line 33 of file FeldmanSterile.h.

Definition at line 44 of file FeldmanSterile.h.

Referenced by LoadDataContour(), and SetStartingPoint().

Definition at line 44 of file FeldmanSterile.h.

Referenced by LoadDataContour(), and SetStartingPoint().

Definition at line 44 of file FeldmanSterile.h.

Referenced by LoadDataContour(), and SetStartingPoint().

Definition at line 44 of file FeldmanSterile.h.

Referenced by LoadDataContour(), and SetStartingPoint().

TFile* FeldmanSterile::matrix [private]

Definition at line 172 of file FeldmanSterile.h.

Referenced by GetMatrices(), and SetMatrices().

Definition at line 140 of file FeldmanSterile.h.

Referenced by SetNDBaseline(), and SetUpFarOverNearFitClass().

TFile * FeldmanSterile::ND_data [private]

Definition at line 175 of file FeldmanSterile.h.

TFile* FeldmanSterile::ND_MC [private]

Definition at line 175 of file FeldmanSterile.h.

Referenced by GetHistos(), and SetNDMC().

Definition at line 50 of file FeldmanSterile.h.

TFile * FeldmanSterile::ND_Nue [private]

Definition at line 175 of file FeldmanSterile.h.

Referenced by GetHistos(), and SetNDMC().

Definition at line 50 of file FeldmanSterile.h.

TFile * FeldmanSterile::ND_NuTau [private]

Definition at line 175 of file FeldmanSterile.h.

Referenced by GetHistos(), and SetNDMC().

Definition at line 50 of file FeldmanSterile.h.

Definition at line 37 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 37 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 37 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 37 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 37 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 36 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 36 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 36 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 36 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 36 of file FeldmanSterile.h.

Referenced by Add(), GetHistos(), and SetUpFarOverNearFitClass().

Definition at line 168 of file FeldmanSterile.h.

Definition at line 113 of file FeldmanSterile.h.

Referenced by Calculate2DdeltaChi2().

Definition at line 112 of file FeldmanSterile.h.

Referenced by Calculate2DdeltaChi2().

Definition at line 111 of file FeldmanSterile.h.

Referenced by Calculate2DdeltaChi2(), and ThreeFlavourPars().

Definition at line 110 of file FeldmanSterile.h.

Referenced by Calculate2DdeltaChi2(), CalculateChi2Best2D(), and ThreeFlavourPars().

Double_t FeldmanSterile::POT [private]

Definition at line 160 of file FeldmanSterile.h.

Definition at line 47 of file FeldmanSterile.h.

Referenced by Calculate2DdeltaChi2(), and SetPremadeFakeData().

Definition at line 47 of file FeldmanSterile.h.

Referenced by Calculate2DdeltaChi2(), and SetPremadeFakeData().

Definition at line 148 of file FeldmanSterile.h.

Referenced by Calculate2DdeltaChi2(), and SetPremadeFakeData().

Definition at line 149 of file FeldmanSterile.h.

Referenced by SetUpFarOverNearFitClass().

Definition at line 144 of file FeldmanSterile.h.

Referenced by SetUpFarOverNearFitClass().

Double_t FeldmanSterile::startdm2Sterile [private]

Definition at line 163 of file FeldmanSterile.h.

Referenced by SetParameterSpace().

Double_t FeldmanSterile::starttheta24 [private]

Definition at line 164 of file FeldmanSterile.h.

Referenced by SetParameterSpace().

Double_t FeldmanSterile::starttheta34 [private]

Definition at line 165 of file FeldmanSterile.h.

Referenced by SetParameterSpace().

Double_t FeldmanSterile::theta23_best [private]
Double_t FeldmanSterile::theta23_profile [private]

Definition at line 187 of file FeldmanSterile.h.

Double_t FeldmanSterile::theta24_best [private]
Double_t FeldmanSterile::theta24_profile [private]

Definition at line 187 of file FeldmanSterile.h.

Double_t FeldmanSterile::theta34_best [private]
Double_t FeldmanSterile::theta34_profile [private]

Definition at line 187 of file FeldmanSterile.h.

Definition at line 147 of file FeldmanSterile.h.

Referenced by UseDm241().

Definition at line 154 of file FeldmanSterile.h.

Definition at line 146 of file FeldmanSterile.h.

Referenced by CalculateChi2Best2D(), and CalculateChi2Profile().

Definition at line 150 of file FeldmanSterile.h.

Referenced by SetStartingPoint(), and VaryDm232().

Definition at line 151 of file FeldmanSterile.h.

Referenced by SetStartingPoint(), and VaryTheta23().

Definition at line 153 of file FeldmanSterile.h.

Referenced by SetStartingPoint(), and VaryTheta24().

Definition at line 152 of file FeldmanSterile.h.

Referenced by SetStartingPoint(), and VaryTheta34().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1