OscFit::NueData Class Reference

#include <NueData.h>

Inheritance diagram for OscFit::NueData:
OscFit::ExternalData

List of all members.

Public Member Functions

 NueData ()
 ~NueData ()
void LoadData (const char *filename)
Double_t GetLikelihood (Double_t dmsq, Double_t sinsq23, Double_t sinsq13, Double_t deltaCP)

Detailed Description

Definition at line 8 of file GhostFitter/HEAD/NueData.h.


Constructor & Destructor Documentation

NueData::NueData (  ) 

Definition at line 17 of file GhostFitter/HEAD/NueData.cxx.

00017                  : ExternalData()
00018 { 
00019  
00020 }

NueData::~NueData (  ) 

Definition at line 22 of file GhostFitter/HEAD/NueData.cxx.

00023 {
00024   
00025 }


Member Function Documentation

Double_t NueData::GetLikelihood ( Double_t  dmsq,
Double_t  sinsq23,
Double_t  sinsq13,
Double_t  deltaCP 
) [virtual]

Reimplemented from OscFit::ExternalData.

Definition at line 89 of file GhostFitter/HEAD/NueData.cxx.

References OscFit::TemplateGrid::GetDmsqBasis(), OscFit::TemplateGrid::Instance(), OscFit::kDmsq31, OscFit::kDmsq32, OscFit::kDmsqAve, and OscFit::kSimple.

00090 {
00091   Double_t dmsq23 = dmsq;
00092   Double_t dmsq12  = 7.54e-5;
00093 
00094   OscFit::DmsqBasis_t fDmsqBasis = TemplateGrid::Instance()->GetDmsqBasis();
00095 
00096   if( fDmsqBasis==OscFit::kDmsqAve ){
00097     dmsq23 = dmsq - 0.5*dmsq12; 
00098   }
00099 
00100   else if( fDmsqBasis==OscFit::kDmsq31 ){
00101     dmsq23 = dmsq - dmsq12;
00102   }
00103 
00104   else if( fDmsqBasis==OscFit::kDmsq32 
00105         || fDmsqBasis==OscFit::kSimple ){
00106     dmsq23 = dmsq;
00107   }
00108 
00109   else{
00110     assert(0); // bail out...
00111   }
00112 
00113   return ExternalData::GetLikelihood( dmsq23, sinsq23, sinsq13, deltaCP );
00114 }

void NueData::LoadData ( const char *  filename  )  [virtual]

Reimplemented from OscFit::ExternalData.

Definition at line 27 of file GhostFitter/HEAD/NueData.cxx.

References OscFit::ExternalData::BuildGrid(), OscFit::ExternalData::CheckData(), MuELoss::e, OscFit::ExternalData::FindBinDeltaCP(), OscFit::ExternalData::FindBinDmsq(), OscFit::ExternalData::FindBinSinsq13(), OscFit::ExternalData::FindBinSinsq23(), gSystem(), OscFit::ExternalData::LoadGridPoint(), n, and OscFit::ExternalData::Reset().

00028 {
00029   Reset(); // Reset before loading grid
00030 
00031   std::cout << " *** NueData::LoadData() *** " << std::endl
00032             << "   Loading: " << filename << std::endl;
00033 
00034   if( gSystem->AccessPathName( filename ) ) { // returns kTrue if non-existent
00035     std::cout << "  warning: failed to find " << filename << std::endl;
00036     return;
00037   }
00038 
00039 
00040  
00041   this->BuildGrid( 7,  2.10e-3, 2.70e-3,
00042                    8,  0.30,    0.72,
00043                    7,  0.0167,  0.0317, 
00044                    33, 0.0,     2.0*TMath::Pi() );
00045 
00046 
00047 
00048   Int_t hierarchy;
00049   Double_t dmsq32;
00050   Double_t sinsq23;
00051   Double_t sinsq13;
00052   Double_t deltaCP;
00053   Double_t LnL;
00054 
00055   TDirectory* tmpd = gDirectory;
00056   TFile* file = TFile::Open(filename);
00057   TTree* tree = (TTree*)(file->Get("NueData"));
00058   tree->SetBranchAddress("hierarchy",&hierarchy);
00059   tree->SetBranchAddress("dmsq32",&dmsq32);
00060   tree->SetBranchAddress("sinsq23",&sinsq23);
00061   tree->SetBranchAddress("sinsq13",&sinsq13);
00062   tree->SetBranchAddress("deltaCP",&deltaCP);
00063   tree->SetBranchAddress("LnL",&LnL);
00064  
00065   for ( Int_t n=0; n<tree->GetEntries(); n++ ){
00066     tree->GetEntry(n);
00067 
00068     Int_t iHierarchy = (hierarchy>0)?0:1;
00069     Int_t iDmsq      = this->FindBinDmsq(dmsq32);
00070     Int_t iSinsq23   = this->FindBinSinsq23(sinsq23);
00071     Int_t iSinsq13   = this->FindBinSinsq13(sinsq13);
00072     Int_t iDeltaCP   = this->FindBinDeltaCP(deltaCP);
00073 
00074     //
00075     // std::cout << " [" << n << "] " << "(" << hierarchy << "," << dmsq32 << "," << sinsq23 << "," << sinsq13 << "," << deltaCP << ") (" << iHierarchy << "," << iDmsq << "," << iSinsq23 << "," << iSinsq13 << "," << iDeltaCP << ")" << std::endl;
00076     //
00077 
00078     this->LoadGridPoint( iHierarchy, iDmsq, iSinsq23, iSinsq13, iDeltaCP, LnL );
00079   }
00080 
00081   file->Close();
00082   tmpd->cd();
00083 
00084   assert( CheckData() );
00085 
00086   return;
00087 }


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

Generated on 19 Jan 2018 for loon by  doxygen 1.6.1