OscFitInterface Class Reference

#include <OscFitInterface.h>

List of all members.

Public Member Functions

void LoadData (const char *inputpath)
void LoadDataFromCambridge ()
void LoadDataFromFermilab ()
void SetMockData ()
void SetMockDataWithFluctuations ()
void FitCorrelatedSystematics ()
void UseAllData ()
void UseCCData ()
void UseNuBarData ()
void UseRHCData ()
void ForceCPT ()
void PenaltyTermsOff ()
void RelaxPhysicalBoundary ()
void BuildExpt ()
void SetOscillations (Double_t dmsq, Double_t sinsq, Double_t dmsqbar, Double_t sinsqbar)
void SetSystematics (Double_t norm, Double_t ncbkg, Double_t shwen, Double_t trken)
Double_t GetLikelihood (Double_t dmsq, Double_t sinsq, Double_t dmsqbar, Double_t sinsqbar)
Double_t GetLikelihood (Double_t dmsq, Double_t sinsq, Double_t dmsqbar, Double_t sinsqbar, Double_t norm, Double_t ncbkg, Double_t shwen, Double_t trken)
void SetGrid ()
void RunFit ()

Static Public Member Functions

static OscFitInterfaceInstance ()

Private Member Functions

 OscFitInterface ()
virtual ~OscFitInterface ()
void Initialize ()

Private Attributes

Bool_t fFitCorrelatedSystematics
Bool_t fUseCCData
Bool_t fUseNuBarData
Bool_t fUseRHCData
Bool_t fDataIsLoaded
Bool_t fOnGrid

Detailed Description

Definition at line 6 of file OscFitInterface.h.


Constructor & Destructor Documentation

OscFitInterface::OscFitInterface (  )  [private]

Definition at line 22 of file OscFitInterface.cxx.

References fDataIsLoaded, fFitCorrelatedSystematics, fOnGrid, fUseCCData, fUseNuBarData, fUseRHCData, and Initialize().

00023 {
00024   fDataIsLoaded = 0;
00025   fOnGrid       = 0;
00026 
00027   fFitCorrelatedSystematics = 0;
00028 
00029   fUseCCData    = 0;
00030   fUseNuBarData = 0;
00031   fUseRHCData   = 0;
00032 
00033   Initialize();
00034 }

OscFitInterface::~OscFitInterface (  )  [private, virtual]

Definition at line 36 of file OscFitInterface.cxx.

00037 {
00038 
00039 }


Member Function Documentation

void OscFitInterface::BuildExpt (  ) 

Definition at line 194 of file OscFitInterface.cxx.

References BuildExpt(), fDataIsLoaded, fUseCCData, fUseNuBarData, fUseRHCData, and Instance().

Referenced by BuildExpt().

00195 {
00196   std::cout << " ----- OscFitInterface::BuildExpt() ----- " << std::endl;
00197 
00198   assert( fDataIsLoaded );
00199 
00200   assert( fUseCCData || fUseNuBarData || fUseRHCData );
00201   
00202   OscFit::Fitter::Instance()->PrintSettings();
00203 
00204   OscFit::Fitter::Instance()->BuildExpt();
00205 
00206   OscFit::Fitter::Instance()->SetSeedParameters();
00207 
00208   std::cout << " ----- OscFitInterface::BuildExpt() DONE! ----- " << std::endl;
00209 }

void OscFitInterface::FitCorrelatedSystematics (  ) 

Definition at line 136 of file OscFitInterface.cxx.

References fFitCorrelatedSystematics, and Instance().

00137 {
00138   fFitCorrelatedSystematics = 1;
00139   OscFit::Fitter::Instance()->SwitchOffFluctuationsOnSystematics();
00140 }

void OscFitInterface::ForceCPT (  ) 

Definition at line 179 of file OscFitInterface.cxx.

References ForceCPT(), and Instance().

Referenced by ForceCPT().

00180 {
00181   OscFit::Fitter::Instance()->ForceCPT();
00182 }

Double_t OscFitInterface::GetLikelihood ( Double_t  dmsq,
Double_t  sinsq,
Double_t  dmsqbar,
Double_t  sinsqbar,
Double_t  norm,
Double_t  ncbkg,
Double_t  shwen,
Double_t  trken 
)

Definition at line 235 of file OscFitInterface.cxx.

References Instance(), and OscFit::Fitter::Instance().

00236 {
00237   assert( OscFit::Fitter::Instance()->TouchExpt() );
00238 
00239   Double_t LnL = 0.0;
00240 
00241   OscFit::Fitter::Instance()->GetLnL( dmsq,    sinsq,
00242                                       dmsqbar, sinsqbar,
00243                                       norm,    ncbkg,
00244                                       shwen,   trken,
00245                                       LnL );  
00246   return LnL;
00247 }

Double_t OscFitInterface::GetLikelihood ( Double_t  dmsq,
Double_t  sinsq,
Double_t  dmsqbar,
Double_t  sinsqbar 
)

Definition at line 211 of file OscFitInterface.cxx.

References Instance(), OscFit::Fitter::Instance(), and RunFit().

00212 {
00213   assert( OscFit::Fitter::Instance()->TouchExpt() );
00214     
00215   Double_t norm  = 0.0;
00216   Double_t ncbkg = 0.0;
00217   Double_t shwen = 0.0;  
00218   Double_t trken = 0.0; 
00219   Double_t dm    = 0.0;     
00220   Double_t ds    = 0.0;
00221   Double_t dmbar = 0.0;
00222   Double_t dsbar = 0.0;
00223   Double_t LnL   = 0.0;
00224 
00225   OscFit::Fitter::Instance()->RunFit( dmsq,    sinsq,
00226                                       dmsqbar, sinsqbar,
00227                                       norm,    ncbkg,
00228                                       shwen,   trken,  
00229                                       dm,      ds,
00230                                       dmbar,   dsbar,
00231                                       LnL );
00232   return LnL;
00233 }

void OscFitInterface::Initialize (  )  [private]

Definition at line 41 of file OscFitInterface.cxx.

References MuELoss::e, and Instance().

Referenced by OscFitInterface().

00042 {
00043   std::cout << " ----- OscFitInterface::Initialize() ----- " << std::endl;
00044 
00045   // Default Seed Parameters
00046   OscFit::Fitter::Instance()->SetSeedSystematics( 0.0, 0.0, 0.0, 0.0 );
00047   OscFit::Fitter::Instance()->SetSeedOscillations( 2.32e-3, 1.0, 2.32e-3, 1.0 );
00048 
00049   // Default Input Parameters
00050   OscFit::Fitter::Instance()->SetInputSystematics( 0.0, 0.0, 0.0, 0.0 );
00051   OscFit::Fitter::Instance()->SetInputOscillations( 2.32e-3, 1.0, 2.32e-3, 1.0 );
00052 
00053   // Configure Fitter
00054   OscFit::Fitter::Instance()->ResetAnalysis();
00055   OscFit::Fitter::Instance()->ViolateCPT();
00056   OscFit::Fitter::Instance()->FitSystematics();
00057   OscFit::Fitter::Instance()->SeedSystematicsFromBestFit();
00058 
00059   std::cout << " ----- OscFitInterface::Initialize() DONE! ----- " << std::endl;
00060 }

OscFitInterface * OscFitInterface::Instance (  )  [static]
void OscFitInterface::LoadData ( const char *  inputpath  ) 

Definition at line 62 of file OscFitInterface.cxx.

References fDataIsLoaded, and Instance().

00063 {
00064   if( fDataIsLoaded ) return;
00065   
00066   std::cout << " ----- OscFitInterface::LoadData() ----- " << std::endl;
00067    
00068   TString filepath = inputpath;
00069 
00070   // File Names
00071   TString GridFile = filepath+"/grid.root";
00072   TString DataFile = filepath+"/hist.root";
00073 
00074   // Read in Data
00075   OscFit::TemplateMap::Instance()->ReadGrid( GridFile.Data() );
00076   OscFit::TemplateMap::Instance()->ReadTemplates( DataFile.Data() );
00077 
00078   fDataIsLoaded = 1;
00079 
00080   std::cout << " ----- OscFitInterface::LoadData() DONE! ----- " << std::endl;
00081 }

void OscFitInterface::LoadDataFromCambridge (  ) 

Definition at line 83 of file OscFitInterface.cxx.

References fDataIsLoaded, and Instance().

00084 {
00085   if( fDataIsLoaded ) return;
00086   
00087   std::cout << " ----- OscFitInterface::LoadDataFromCambridge() ----- " << std::endl;
00088    
00089   TString filepath = "/minos/oscfit/Histograms/";
00090 
00091   // File Names
00092   TString GridFile = filepath+"grid.root";
00093   TString DataFile = filepath+"hist.root";
00094 
00095   // Read in Data
00096   OscFit::TemplateMap::Instance()->ReadGrid( GridFile.Data() );
00097   OscFit::TemplateMap::Instance()->ReadTemplates( DataFile.Data() );
00098 
00099   fDataIsLoaded = 1;
00100 
00101   std::cout << " ----- OscFitInterface::LoadDataFromCambridge() DONE! ----- " << std::endl;
00102 }

void OscFitInterface::LoadDataFromFermilab (  ) 

Definition at line 104 of file OscFitInterface.cxx.

References fDataIsLoaded, fOnGrid, and Instance().

00105 {
00106   if( fDataIsLoaded ) return;
00107   
00108   std::cout << " ----- OscFitInterface::LoadDataFromFermilab() ----- " << std::endl;
00109 
00110   TString filepath = "/minos/app/blake/beamfit/Combined/Histograms/";
00111   if(fOnGrid) filepath = "./input_beam/"; // input path when files are copied to the grid
00112 
00113   // File Names
00114   TString GridFile = filepath+"grid.root";
00115   TString DataFile = filepath+"hist.root";
00116 
00117   // Read in Data
00118   OscFit::TemplateMap::Instance()->ReadGrid( GridFile.Data() );
00119   OscFit::TemplateMap::Instance()->ReadTemplates( DataFile.Data() );
00120 
00121   fDataIsLoaded = 1;
00122 
00123   std::cout << " ----- OscFitInterface::LoadDataFromFermilab() DONE! ----- " << std::endl;
00124 }

void OscFitInterface::PenaltyTermsOff (  ) 

Definition at line 184 of file OscFitInterface.cxx.

References Instance(), and PenaltyTermsOff().

Referenced by PenaltyTermsOff().

00185 {
00186   OscFit::Fitter::Instance()->PenaltyTermsOff();
00187 }

void OscFitInterface::RelaxPhysicalBoundary (  ) 

Definition at line 189 of file OscFitInterface.cxx.

References Instance(), and RelaxPhysicalBoundary().

Referenced by RelaxPhysicalBoundary().

00190 {
00191   OscFit::Fitter::Instance()->RelaxPhysicalBoundary();
00192 }

void OscFitInterface::RunFit (  ) 

Definition at line 249 of file OscFitInterface.cxx.

References fDataIsLoaded, fUseCCData, fUseNuBarData, fUseRHCData, Instance(), and RunFit().

Referenced by GetLikelihood(), and RunFit().

00250 {
00251   std::cout << " ----- OscFitInterface::RunFit() ----- " << std::endl;
00252   
00253   assert( fDataIsLoaded );
00254 
00255   assert( fUseCCData || fUseNuBarData || fUseRHCData );
00256 
00257   OscFit::Fitter::Instance()->FitOscillations();
00258   OscFit::Fitter::Instance()->RunFit();
00259 
00260   std::cout << " ----- OscFitInterface::RunFit() DONE! ----- " << std::endl;
00261 }

void OscFitInterface::SetGrid (  )  [inline]

Definition at line 48 of file OscFitInterface.h.

References fOnGrid.

00048 { fOnGrid = 1; }

void OscFitInterface::SetMockData (  ) 

Definition at line 126 of file OscFitInterface.cxx.

References Instance(), and SetMockData().

Referenced by SetMockData().

00127 {
00128   OscFit::Fitter::Instance()->SetMockData();
00129 }

void OscFitInterface::SetMockDataWithFluctuations (  ) 

Definition at line 131 of file OscFitInterface.cxx.

References Instance(), and SetMockDataWithFluctuations().

Referenced by SetMockDataWithFluctuations().

void OscFitInterface::SetOscillations ( Double_t  dmsq,
Double_t  sinsq,
Double_t  dmsqbar,
Double_t  sinsqbar 
)

Definition at line 142 of file OscFitInterface.cxx.

References Instance().

00143 {
00144   OscFit::Fitter::Instance()->SetSeedOscillations( dmsq, sinsq, dmsqbar, sinsqbar );
00145   OscFit::Fitter::Instance()->SetInputOscillations( dmsq, sinsq, dmsqbar, sinsqbar );
00146 }

void OscFitInterface::SetSystematics ( Double_t  norm,
Double_t  ncbkg,
Double_t  shwen,
Double_t  trken 
)

Definition at line 148 of file OscFitInterface.cxx.

References Instance().

00149 {
00150   OscFit::Fitter::Instance()->SetSeedSystematics( 0.0, 0.0, 0.0, 0.0 );
00151   OscFit::Fitter::Instance()->SetInputSystematics( norm, ncbkg, shwen, trken );
00152 }

void OscFitInterface::UseAllData (  ) 

Definition at line 154 of file OscFitInterface.cxx.

References UseCCData(), UseNuBarData(), and UseRHCData().

00155 {
00156   UseCCData();
00157   UseNuBarData();
00158   UseRHCData();
00159 }

void OscFitInterface::UseCCData (  ) 

Definition at line 161 of file OscFitInterface.cxx.

References fUseCCData, Instance(), and UseCCData().

Referenced by UseAllData(), and UseCCData().

00162 {
00163   OscFit::Fitter::Instance()->UseCCData(); 
00164   fUseCCData = 1;
00165 }

void OscFitInterface::UseNuBarData (  ) 

Definition at line 167 of file OscFitInterface.cxx.

References fUseNuBarData, Instance(), and UseNuBarData().

Referenced by UseAllData(), and UseNuBarData().

00168 {
00169   OscFit::Fitter::Instance()->UseNuBarData();
00170   fUseNuBarData = 1;
00171 }

void OscFitInterface::UseRHCData (  ) 

Definition at line 173 of file OscFitInterface.cxx.

References fUseRHCData, Instance(), and UseRHCData().

Referenced by UseAllData(), and UseRHCData().

00174 {
00175   OscFit::Fitter::Instance()->UseRHCData();
00176   fUseRHCData = 1;
00177 }


Member Data Documentation

Definition at line 59 of file OscFitInterface.h.

Referenced by FitCorrelatedSystematics(), and OscFitInterface().

Bool_t OscFitInterface::fOnGrid [private]

Definition at line 66 of file OscFitInterface.h.

Referenced by LoadDataFromFermilab(), OscFitInterface(), and SetGrid().

Bool_t OscFitInterface::fUseCCData [private]

Definition at line 61 of file OscFitInterface.h.

Referenced by BuildExpt(), OscFitInterface(), RunFit(), and UseCCData().

Definition at line 62 of file OscFitInterface.h.

Referenced by BuildExpt(), OscFitInterface(), RunFit(), and UseNuBarData().

Bool_t OscFitInterface::fUseRHCData [private]

Definition at line 63 of file OscFitInterface.h.

Referenced by BuildExpt(), OscFitInterface(), RunFit(), and UseRHCData().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1