OscFit::TemplateGrid Class Reference

#include <TemplateGrid.h>

List of all members.

Public Member Functions

void BuildGrid ()
void PrintGrid ()
void PrintGridPoints ()
void PrintReport ()
void WriteGrid (const char *filename)
void ReadGrid (const char *filename)
Bool_t InsideGrid (Double_t dmsq)
Bool_t InsideGrid (Double_t dmsq, Double_t sinsq23, Double_t sinsq13, Double_t deltaCP)
Bool_t TouchGrid ()
Bool_t UsingDmsq ()
Bool_t UsingSinsq23 ()
Bool_t UsingSinsq13 ()
Bool_t UsingDeltaCP ()
Int_t GetDmsqBins ()
Int_t GetSinsq23Bins ()
Int_t GetSinsq13Bins ()
Int_t GetDeltaCPBins ()
Double_t GetDmsqMin ()
Double_t GetDmsqMax ()
Double_t GetSinsq23Min ()
Double_t GetSinsq23Max ()
Double_t GetSinsq13Min ()
Double_t GetSinsq13Max ()
Double_t GetDeltaCPMin ()
Double_t GetDeltaCPMax ()
Double_t GetDmsq (Int_t idmsq)
Double_t GetSinsq23 (Int_t isinsq23)
Double_t GetSinsq13 (Int_t isinsq13)
Double_t GetDeltaCP (Int_t ideltaCP)
Int_t FindBinDmsq (Double_t dmsq)
Int_t FindBinSinsq23 (Double_t sinsq23)
Int_t FindBinSinsq13 (Double_t sinsq13)
Int_t FindBinDeltaCP (Double_t deltaCP)
Double_t FindInterpolatedBinDmsq (Double_t dmsq)
Double_t FindInterpolatedBinSinsq23 (Double_t sinsq23)
Double_t FindInterpolatedBinSinsq13 (Double_t sinsq13)
Double_t FindInterpolatedBinDeltaCP (Double_t deltaCP)
void SetDmsqBasis (OscFit::DmsqBasis_t basis)
OscFit::DmsqBasis_t GetDmsqBasis ()
void SetDefaultDmsq (Double_t dmsq)
void SetDefaultSinsq23 (Double_t sinsq23)
void SetDefaultSinsq13 (Double_t sinsq13)
void SetDefaultDeltaCP (Double_t deltaCP)
void BuildGridDmsq (Double_t p)
void BuildGridSinsq23 (Double_t p)
void BuildGridSinsq13 (Double_t p)
void BuildGridDeltaCP (Double_t p)
void BuildGridDmsq (Int_t n, Double_t min, Double_t max)
void BuildGridSinsq23 (Int_t n, Double_t min, Double_t max)
void BuildGridSinsq13 (Int_t n, Double_t min, Double_t max)
void BuildGridDeltaCP (Int_t n, Double_t min, Double_t max)
void UseTwoFlavours ()
void UseThreeFlavours ()
void PseudoThreeFlavours ()
void DoNormalHierarchyOnly (Bool_t yesno=1)
Bool_t UsingTwoFlavours ()
Bool_t UsingThreeFlavours ()
Int_t GetNumGridPoints ()
Int_t GetNumTemplates ()
TString GetLabel (Int_t n)
GridPointGetGridPoint (Int_t n)
TemplateMapGetTemplate (Int_t n)
TemplateMapMakeTemplate (Int_t n)
TemplateMapGetTemplate (Int_t nDmsq, Int_t nSinsq23, Int_t nSinsq13, Int_t nDeltaCP, Int_t nHierarchy)
TemplateMapMakeTemplate (Int_t nDmsq, Int_t nSinsq23, Int_t nSinsq13, Int_t nDeltaCP, Int_t nHierarchy)
Bool_t TouchTemplate (Int_t nDmsq, Int_t nSinsq23, Int_t nSinsq13, Int_t nDeltaCP, Int_t normalHierarchy)
Bool_t TouchTemplate (Int_t n)
Bool_t TouchAtmosData ()
Bool_t TouchBeamData ()
Bool_t TouchData ()
Bool_t TouchMC ()
Bool_t TouchBeamNueMC ()
Bool_t TouchAtmosRockMC ()
Bool_t TouchSystematics ()
Bool_t TouchSystematic (Source_t source, Systematic_t systematic)
Bool_t TouchSystematic (Source_t source, Sample_t sample, Systematic_t systematic)
void PrintTemplates ()
void SetDebug (Bool_t yesno=1)
void UnloadTemplates ()
void DeleteTemplates ()
void DeleteGrid ()
void ResetTemplates ()
void Reset ()
Int_t GridID (Int_t nDmsq, Int_t nSinsq23, Int_t nSinsq13, Int_t nDeltaCP, Int_t nHierarchy)
void InvertGridID (Int_t id, Int_t &nDmsq, Int_t &nSinsq23, Int_t &nSinsq13, Int_t &nDeltaCP, Int_t &nHierarchy)

Static Public Member Functions

static TemplateGridInstance ()

Private Member Functions

 TemplateGrid ()
virtual ~TemplateGrid ()
TemplateMapGet (Int_t id)
GridPointGetGridPointTwoFlavours (Int_t n)
GridPointGetGridPointThreeFlavours (Int_t n)
void DefaultsForTwoFlavours ()
void DefaultsForThreeFlavours ()
void Load (Int_t id, TemplateMap *temp)
void BuildTemplate (Int_t nDmsq, Int_t nSinsq23, Int_t nSinsq13, Int_t nDeltaCP, Int_t nHierarchy)

Private Attributes

std::map< Int_t, TemplateMap * > fTemplateGrid
TemplateMapfTemplateMap
GridPointfGridPoint
Int_t fDmsqBins
Double_t fDmsqMin
Double_t fDmsqMax
Double_t * fDmsq
Double_t * fDmsqEdges
Double_t fDeltaDmsq
Double_t fDefaultDmsq
Int_t fSinsq23Bins
Double_t fSinsq23Min
Double_t fSinsq23Max
Double_t * fSinsq23
Double_t * fSinsq23Edges
Double_t fDeltaSinsq23
Double_t fDefaultSinsq23
Int_t fSinsq13Bins
Double_t fSinsq13Min
Double_t fSinsq13Max
Double_t * fSinsq13
Double_t * fSinsq13Edges
Double_t fDeltaSinsq13
Double_t fDefaultSinsq13
Int_t fDeltaCPBins
Double_t fDeltaCPMin
Double_t fDeltaCPMax
Double_t * fDeltaCP
Double_t * fDeltaCPEdges
Double_t fDeltaDeltaCP
Double_t fDefaultDeltaCP
Double_t fDefaultSinsq12
Double_t fDefaultDmsq12
Bool_t fUsingNormalHierarchy
Bool_t fPseudoThreeFlavours
Bool_t fUsingTwoFlavours
Bool_t fGridIsLoaded
Bool_t fDebug
OscFit::DmsqBasis_t fDmsqBasis

Detailed Description

Definition at line 13 of file TemplateGrid.h.


Constructor & Destructor Documentation

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

Definition at line 75 of file TemplateGrid.cxx.

References fGridPoint, and Reset().

00076 {
00077   Reset();
00078 
00079   delete fGridPoint;
00080 }


Member Function Documentation

void TemplateGrid::BuildGrid (  ) 
void TemplateGrid::BuildGridDeltaCP ( Int_t  n,
Double_t  min,
Double_t  max 
)

Definition at line 310 of file TemplateGrid.cxx.

References BuildGrid(), fDebug, fDeltaCP, fDeltaCPBins, fDeltaCPEdges, fDeltaCPMax, fDeltaCPMin, and fDeltaDeltaCP.

00311 { 
00312   if( fDebug ){
00313     std::cout << " --- BuildGridDeltaCP (" << n << "," << min << "," << max << ") " << std::endl;
00314   }
00315 
00316   if( fDeltaCP ) delete [] fDeltaCP;
00317   if( fDeltaCPEdges ) delete [] fDeltaCPEdges;
00318 
00319   assert( n>=1 && min>=0 && max>=min ); // sanity check
00320 
00321   if( n>1 ){
00322     fDeltaCPBins = n;
00323     fDeltaCPMin = min;
00324     fDeltaCPMax = max;
00325   }
00326   else{
00327     fDeltaCPBins = 1;
00328 
00329     if( min>0.0 ){
00330       fDeltaCPMin = min;
00331       fDeltaCPMax = 2.0*min;
00332     }
00333     else if( min<0.0 ){
00334       fDeltaCPMin = min;
00335       fDeltaCPMax = 0.5*min;
00336     }
00337     else{
00338       fDeltaCPMin = 0.0;
00339       fDeltaCPMax = 1.0;
00340     }
00341   }
00342 
00343   if( fDeltaCPBins>1 ){
00344     fDeltaDeltaCP = (fDeltaCPMax-fDeltaCPMin)/(fDeltaCPBins-1.0);
00345   }
00346   else {
00347     fDeltaDeltaCP = (fDeltaCPMax-fDeltaCPMin);
00348   }
00349 
00350   fDeltaCP = new Double_t[fDeltaCPBins];
00351   fDeltaCPEdges = new Double_t[fDeltaCPBins+1];
00352 
00353   for( Int_t i=0; i<fDeltaCPBins; i++ ){
00354     fDeltaCP[i] = fDeltaCPMin + fDeltaDeltaCP*(double)i;
00355   }
00356 
00357   for( Int_t i=0; i<fDeltaCPBins+1; i++ ){
00358     fDeltaCPEdges[i] = fDeltaCPMin + fDeltaDeltaCP*(double)(i-0.5);
00359   }
00360 
00361   // Build Rest of Grid
00362   BuildGrid();
00363 
00364   return;
00365 }

void OscFit::TemplateGrid::BuildGridDeltaCP ( Double_t  p  )  [inline]

Definition at line 82 of file TemplateGrid.h.

References BuildGridDeltaCP().

Referenced by BuildGrid(), BuildGridDeltaCP(), DefaultsForTwoFlavours(), and ReadGrid().

00082 { BuildGridDeltaCP( 1, p, p ); } 

void TemplateGrid::BuildGridDmsq ( Int_t  n,
Double_t  min,
Double_t  max 
)

Definition at line 139 of file TemplateGrid.cxx.

References BuildGrid(), fDebug, fDeltaDmsq, fDmsq, fDmsqBins, fDmsqEdges, fDmsqMax, and fDmsqMin.

00140 {
00141   if( fDebug ){
00142     std::cout << " --- BuildGridDmsq (" << n << "," << min << "," << max << ") " << std::endl;
00143   }
00144 
00145   if( fDmsq ) delete [] fDmsq;
00146   if( fDmsqEdges ) delete [] fDmsqEdges;
00147 
00148   assert( n>=1 && min>=0 && max>=min ); // sanity check
00149 
00150   if( n>1 ){
00151     fDmsqBins = n;
00152     fDmsqMin = min;
00153     fDmsqMax = max;
00154   }
00155   else{
00156     fDmsqBins = 1;
00157 
00158     if( min>0.0 ){
00159       fDmsqMin = min;
00160       fDmsqMax = 2.0*min;
00161     }
00162     else if( min<0.0 ){
00163       fDmsqMin = min;
00164       fDmsqMax = 0.5*min;
00165     }
00166     else{
00167       fDmsqMin = 0.0;
00168       fDmsqMax = 1.0;
00169     }
00170   }
00171 
00172   if( fDmsqBins>1 ){
00173     fDeltaDmsq = (fDmsqMax-fDmsqMin)/(fDmsqBins-1.0);
00174   }
00175   else {
00176     fDeltaDmsq = (fDmsqMax-fDmsqMin);
00177   }
00178 
00179   fDmsq = new Double_t[fDmsqBins];
00180   fDmsqEdges = new Double_t[fDmsqBins+1];
00181 
00182   for( Int_t i=0; i<fDmsqBins; i++ ){
00183     fDmsq[i] = fDmsqMin + fDeltaDmsq*(double)i;
00184   }
00185 
00186   for( Int_t i=0; i<fDmsqBins+1; i++ ){
00187     fDmsqEdges[i] = fDmsqMin + fDeltaDmsq*(double)(i-0.5);
00188   }
00189 
00190   // Build Rest of Grid
00191   BuildGrid();
00192 
00193   return;
00194 }

void OscFit::TemplateGrid::BuildGridDmsq ( Double_t  p  )  [inline]

Definition at line 79 of file TemplateGrid.h.

References BuildGridDmsq().

Referenced by BuildGrid(), BuildGridDmsq(), and ReadGrid().

00079 { BuildGridDmsq( 1, p, p );    }

void TemplateGrid::BuildGridSinsq13 ( Int_t  n,
Double_t  min,
Double_t  max 
)

Definition at line 253 of file TemplateGrid.cxx.

References BuildGrid(), fDebug, fDeltaSinsq13, fSinsq13, fSinsq13Bins, fSinsq13Edges, fSinsq13Max, and fSinsq13Min.

00254 { 
00255   if( fDebug ){
00256     std::cout << " --- BuildGridSinsq13 (" << n << "," << min << "," << max << ") " << std::endl;
00257   }
00258 
00259   if( fSinsq13 ) delete [] fSinsq13;
00260   if( fSinsq13Edges ) delete [] fSinsq13Edges;
00261 
00262   assert( n>=1 && min>=0 && max>=min ); // sanity check
00263 
00264   if( n>1 ){
00265     fSinsq13Bins = n;
00266     fSinsq13Min = min;
00267     fSinsq13Max = max;
00268   }
00269   else{
00270     fSinsq13Bins = 1;
00271 
00272     if( min>0.0 ){
00273       fSinsq13Min = min;
00274       fSinsq13Max = 2.0*min;
00275     }
00276     else if( min<0.0 ){
00277       fSinsq13Min = min;
00278       fSinsq13Max = 0.5*min;
00279     }
00280     else{
00281       fSinsq13Min = 0.0;
00282       fSinsq13Max = 1.0;
00283     }
00284   }
00285 
00286   if( fSinsq13Bins>1 ){
00287     fDeltaSinsq13 = (fSinsq13Max-fSinsq13Min)/(fSinsq13Bins-1.0);
00288   }
00289   else {
00290     fDeltaSinsq13 = (fSinsq13Max-fSinsq13Min);
00291   }
00292 
00293   fSinsq13 = new Double_t[fSinsq13Bins];
00294   fSinsq13Edges = new Double_t[fSinsq13Bins+1];
00295 
00296   for( Int_t i=0; i<fSinsq13Bins; i++ ){
00297     fSinsq13[i] = fSinsq13Min + fDeltaSinsq13*(double)i;
00298   }
00299 
00300   for( Int_t i=0; i<fSinsq13Bins+1; i++ ){
00301     fSinsq13Edges[i] = fSinsq13Min + fDeltaSinsq13*(double)(i-0.5);
00302   }
00303 
00304   // Build Rest of Grid
00305   BuildGrid();
00306 
00307   return;
00308 }

void OscFit::TemplateGrid::BuildGridSinsq13 ( Double_t  p  )  [inline]

Definition at line 81 of file TemplateGrid.h.

References BuildGridSinsq13().

Referenced by BuildGrid(), BuildGridSinsq13(), DefaultsForTwoFlavours(), and ReadGrid().

00081 { BuildGridSinsq13( 1, p, p ); }

void TemplateGrid::BuildGridSinsq23 ( Int_t  n,
Double_t  min,
Double_t  max 
)

Definition at line 196 of file TemplateGrid.cxx.

References BuildGrid(), fDebug, fDeltaSinsq23, fSinsq23, fSinsq23Bins, fSinsq23Edges, fSinsq23Max, and fSinsq23Min.

00197 {
00198   if( fDebug ){
00199     std::cout << " --- BuildGridSinsq23 (" << n << "," << min << "," << max << ") " << std::endl;
00200   }
00201 
00202   if( fSinsq23 ) delete [] fSinsq23;
00203   if( fSinsq23Edges ) delete [] fSinsq23Edges;
00204 
00205   assert( n>=1 && min>=0 && max>=min ); // sanity check
00206 
00207   if( n>1 ){
00208     fSinsq23Bins = n;
00209     fSinsq23Min = min;
00210     fSinsq23Max = max;
00211   }
00212   else{
00213     fSinsq23Bins = 1;
00214 
00215     if( min>0.0 ){
00216       fSinsq23Min = min;
00217       fSinsq23Max = 2.0*min;
00218     }
00219     else if( min<0.0 ){
00220       fSinsq23Min = min;
00221       fSinsq23Max = 0.5*min;
00222     }
00223     else{
00224       fSinsq23Min = 0.0;
00225       fSinsq23Max = 1.0;
00226     }
00227   }
00228 
00229   if( fSinsq23Bins>1 ){
00230     fDeltaSinsq23 = (fSinsq23Max-fSinsq23Min)/(fSinsq23Bins-1.0);
00231   }
00232   else {
00233     fDeltaSinsq23 = (fSinsq23Max-fSinsq23Min);
00234   }
00235 
00236   fSinsq23 = new Double_t[fSinsq23Bins];
00237   fSinsq23Edges = new Double_t[fSinsq23Bins+1];
00238 
00239   for( Int_t i=0; i<fSinsq23Bins; i++ ){
00240     fSinsq23[i] = fSinsq23Min + fDeltaSinsq23*(double)i;
00241   }
00242 
00243   for( Int_t i=0; i<fSinsq23Bins+1; i++ ){
00244     fSinsq23Edges[i] = fSinsq23Min + fDeltaSinsq23*(double)(i-0.5);
00245   }
00246 
00247   // Build Rest of Grid
00248   BuildGrid();
00249 
00250   return;
00251 }

void OscFit::TemplateGrid::BuildGridSinsq23 ( Double_t  p  )  [inline]

Definition at line 80 of file TemplateGrid.h.

References BuildGridSinsq23().

Referenced by BuildGrid(), BuildGridSinsq23(), DefaultsForTwoFlavours(), and ReadGrid().

00080 { BuildGridSinsq23( 1, p, p ); }

void TemplateGrid::BuildTemplate ( Int_t  nDmsq,
Int_t  nSinsq23,
Int_t  nSinsq13,
Int_t  nDeltaCP,
Int_t  nHierarchy 
) [private]

Definition at line 1011 of file TemplateGrid.cxx.

References fTemplateMap, Get(), GridID(), and Load().

Referenced by MakeTemplate().

01012 {
01013   Int_t id = GridID( nDmsq, nSinsq23, nSinsq13, nDeltaCP, nHierarchy );
01014 
01015   if( id>=0 ){ 
01016     fTemplateMap = Get( id );  
01017 
01018     if( fTemplateMap==0 ){
01019       fTemplateMap = new TemplateMap();
01020       Load( id, fTemplateMap );
01021     }
01022   }
01023 
01024   return;
01025 
01026 }

void TemplateGrid::DefaultsForThreeFlavours (  )  [private]

Definition at line 123 of file TemplateGrid.cxx.

References OscFit::DeltaCP(), OscFit::DMSq12(), OscFit::DMSq23(), fDefaultDeltaCP, fDefaultDmsq, fDefaultDmsq12, fDefaultSinsq12, fDefaultSinsq13, fDefaultSinsq23, OscFit::Sinsq12(), OscFit::Sinsq13(), and OscFit::Sinsq23().

Referenced by UseThreeFlavours().

00124 {
00125   fDefaultDmsq    = OscFit::DMSq23();
00126   fDefaultSinsq23 = OscFit::Sinsq23();
00127   fDefaultSinsq13 = OscFit::Sinsq13();
00128   fDefaultDeltaCP = OscFit::DeltaCP();
00129   fDefaultDmsq12  = OscFit::DMSq12();
00130   fDefaultSinsq12 = OscFit::Sinsq12();
00131 
00132   /*
00133   BuildGridSinsq23( fDefaultSinsq23 );
00134   BuildGridSinsq13( fDefaultSinsq13 );
00135   BuildGridDeltaCP( fDefaultDeltaCP );
00136   */
00137 }

void TemplateGrid::DefaultsForTwoFlavours (  )  [private]
void TemplateGrid::DeleteGrid (  ) 

Definition at line 733 of file TemplateGrid.cxx.

References DeleteTemplates(), OscFit::DeltaCP(), OscFit::DMSq12(), OscFit::DMSq23(), fDefaultDeltaCP, fDefaultDmsq, fDefaultDmsq12, fDefaultSinsq12, fDefaultSinsq13, fDefaultSinsq23, fDeltaCP, fDeltaCPBins, fDeltaCPEdges, fDeltaCPMax, fDeltaCPMin, fDmsq, fDmsqBins, fDmsqEdges, fDmsqMax, fDmsqMin, fGridIsLoaded, fSinsq13, fSinsq13Bins, fSinsq13Edges, fSinsq13Max, fSinsq13Min, fSinsq23, fSinsq23Bins, fSinsq23Edges, fSinsq23Max, fSinsq23Min, fUsingNormalHierarchy, fUsingTwoFlavours, OscFit::Sinsq12(), OscFit::Sinsq13(), and OscFit::Sinsq23().

Referenced by Reset().

00734 {
00735   DeleteTemplates();
00736 
00737   if( fGridIsLoaded ){
00738     std::cout << " *** TemplateGrid::Delete() *** " << std::endl;
00739     std::cout << "  Deleting Grid... " << std::endl;
00740   }
00741 
00742   if( fDmsq )         delete [] fDmsq;
00743   if( fDmsqEdges )    delete [] fDmsqEdges; 
00744 
00745   if( fSinsq23 )      delete [] fSinsq23;
00746   if( fSinsq23Edges ) delete [] fSinsq23Edges;
00747 
00748   if( fSinsq13 )      delete [] fSinsq13;
00749   if( fSinsq13Edges ) delete [] fSinsq13Edges; 
00750 
00751   if( fDeltaCP )      delete [] fDeltaCP;
00752   if( fDeltaCPEdges ) delete [] fDeltaCPEdges;
00753 
00754   fDmsqBins = 0;
00755   fDmsqMin = 0.0;
00756   fDmsqMax = 0.0;
00757   fDmsq = 0;
00758   fDmsqEdges = 0;
00759 
00760   fSinsq23Bins = 0;
00761   fSinsq23Min = 0.0;
00762   fSinsq23Max = 0.0;
00763   fSinsq23 = 0;
00764   fSinsq23Edges = 0;  
00765 
00766   fSinsq13Bins = 0;
00767   fSinsq13Min = 0.0;
00768   fSinsq13Max = 0.0;
00769   fSinsq13 = 0;
00770   fSinsq13Edges = 0;
00771 
00772   fDeltaCPBins = 0;
00773   fDeltaCPMin = 0.0;
00774   fDeltaCPMax = 0.0;
00775   fDeltaCP = 0;
00776   fDeltaCPEdges = 0;
00777 
00778   fGridIsLoaded = 0;
00779 
00780   fUsingTwoFlavours = 0;
00781   fUsingNormalHierarchy = 0;
00782 
00783   fDefaultDmsq    = OscFit::DMSq23();
00784   fDefaultSinsq23 = OscFit::Sinsq23();
00785   fDefaultSinsq13 = OscFit::Sinsq13();
00786   fDefaultDeltaCP = OscFit::DeltaCP();
00787   fDefaultDmsq12  = OscFit::DMSq12();
00788   fDefaultSinsq12 = OscFit::Sinsq12();
00789 
00790   return;
00791 }

void TemplateGrid::DeleteTemplates (  ) 

Definition at line 716 of file TemplateGrid.cxx.

References fGridIsLoaded, and fTemplateGrid.

Referenced by DeleteGrid(), and ResetTemplates().

00717 {
00718   if( fGridIsLoaded ){
00719     std::cout << " *** TemplateGrid::Delete() *** " << std::endl;
00720     std::cout << "  Deleting Templates... " << std::endl;
00721   }
00722 
00723   std::map<Int_t,TemplateMap*>::iterator myIter = fTemplateGrid.begin();
00724 
00725   for( ; myIter!=fTemplateGrid.end(); myIter++ ){
00726     TemplateMap* temp = myIter->second;
00727     if( temp ) delete temp;
00728   }
00729 
00730   fTemplateGrid.clear();
00731 }

void OscFit::TemplateGrid::DoNormalHierarchyOnly ( Bool_t  yesno = 1  )  [inline]

Definition at line 93 of file TemplateGrid.h.

References fUsingNormalHierarchy.

Referenced by ReadGrid().

00093                                                    { 
00094       fUsingNormalHierarchy = yesno; 
00095     }

Int_t TemplateGrid::FindBinDeltaCP ( Double_t  deltaCP  ) 

Definition at line 554 of file TemplateGrid.cxx.

References FindInterpolatedBinDeltaCP().

00555 {
00556   return (Int_t)(TMath::Floor(FindInterpolatedBinDeltaCP(deltaCP)));
00557 }

Int_t TemplateGrid::FindBinDmsq ( Double_t  dmsq  ) 

Definition at line 506 of file TemplateGrid.cxx.

References FindInterpolatedBinDmsq().

00507 {
00508   return (Int_t)(TMath::Floor(FindInterpolatedBinDmsq(dmsq)));
00509 }

Int_t TemplateGrid::FindBinSinsq13 ( Double_t  sinsq13  ) 

Definition at line 538 of file TemplateGrid.cxx.

References FindInterpolatedBinSinsq13().

00539 {
00540   return (Int_t)(TMath::Floor(FindInterpolatedBinSinsq13(sinsq13))); 
00541 }

Int_t TemplateGrid::FindBinSinsq23 ( Double_t  sinsq23  ) 

Definition at line 522 of file TemplateGrid.cxx.

References FindInterpolatedBinSinsq23().

00523 {
00524   return (Int_t)(TMath::Floor(FindInterpolatedBinSinsq23(sinsq23)));
00525 }

Double_t TemplateGrid::FindInterpolatedBinDeltaCP ( Double_t  deltaCP  ) 

Definition at line 543 of file TemplateGrid.cxx.

References fDeltaCPBins, fDeltaCPMax, and fDeltaCPMin.

Referenced by FindBinDeltaCP().

00544 {
00545   //
00546   // if( deltaCP==0 && deltaCP<fDeltaCPMin ) return 0.0;
00547   //
00548 
00549   if( fDeltaCPBins<=1 ) return 1.0;
00550 
00551   return 1.0 + (fDeltaCPBins-1.0)*(deltaCP-fDeltaCPMin)/(fDeltaCPMax-fDeltaCPMin);
00552 }

Double_t TemplateGrid::FindInterpolatedBinDmsq ( Double_t  dmsq  ) 

Definition at line 496 of file TemplateGrid.cxx.

References fDmsqBins, fDmsqMax, and fDmsqMin.

Referenced by FindBinDmsq().

00497 {
00498   // note: zero dmsq is taken as no oscillations!
00499   if( dmsq==0 && dmsq<fDmsqMin ) return 0.0;
00500 
00501   if( fDmsqBins<=1 ) return 1;
00502 
00503   return 1.0 + (fDmsqBins-1.0)*(dmsq-fDmsqMin)/(fDmsqMax-fDmsqMin);   
00504 }

Double_t TemplateGrid::FindInterpolatedBinSinsq13 ( Double_t  sinsq13  ) 

Definition at line 527 of file TemplateGrid.cxx.

References fSinsq13Bins, fSinsq13Max, and fSinsq13Min.

Referenced by FindBinSinsq13().

00528 {
00529   //
00530   // if( sinsq13==0 && sinsq13<fSinsq13Min ) return 0.0;
00531   //
00532 
00533   if( fSinsq13Bins<=1 ) return 1.0;
00534 
00535   return 1.0 + (fSinsq13Bins-1.0)*(sinsq13-fSinsq13Min)/(fSinsq13Max-fSinsq13Min);
00536 }

Double_t TemplateGrid::FindInterpolatedBinSinsq23 ( Double_t  sinsq23  ) 

Definition at line 511 of file TemplateGrid.cxx.

References fSinsq23Bins, fSinsq23Max, and fSinsq23Min.

Referenced by FindBinSinsq23().

00512 {  
00513   //
00514   // if( sinsq23==0 && sinsq23<fSinsq23Min ) return 0.0;
00515   //
00516 
00517   if( fSinsq23Bins<=1 ) return 1.0;
00518 
00519   return 1.0 + (fSinsq23Bins-1.0)*(sinsq23-fSinsq23Min)/(fSinsq23Max-fSinsq23Min);  
00520 }

TemplateMap * TemplateGrid::Get ( Int_t  id  )  [private]

Definition at line 806 of file TemplateGrid.cxx.

References fTemplateGrid.

Referenced by BuildTemplate(), and GetTemplate().

00807 {
00808   TemplateMap* temp = 0;
00809 
00810   std::map<Int_t,TemplateMap*>::iterator myEntry = fTemplateGrid.find(id);
00811 
00812   if( myEntry != fTemplateGrid.end() ){
00813     temp = myEntry->second;
00814   }
00815 
00816   return temp;
00817 } 

Double_t TemplateGrid::GetDeltaCP ( Int_t  ideltaCP  ) 

Definition at line 487 of file TemplateGrid.cxx.

References fDeltaCP, and fDeltaCPBins.

Referenced by GetGridPointThreeFlavours().

00488 {
00489   if( ideltaCP<=0 ) return 0.0;
00490 
00491   else if( ideltaCP<=fDeltaCPBins ) return fDeltaCP[ideltaCP-1];
00492 
00493   else return -99999.9;
00494 }

Int_t OscFit::TemplateGrid::GetDeltaCPBins (  )  [inline]

Definition at line 42 of file TemplateGrid.h.

References fDeltaCPBins.

00042 { return fDeltaCPBins+1; }

Double_t OscFit::TemplateGrid::GetDeltaCPMax (  )  [inline]

Definition at line 54 of file TemplateGrid.h.

References fDeltaCPMax.

00054 { return fDeltaCPMax;  }

Double_t OscFit::TemplateGrid::GetDeltaCPMin (  )  [inline]

Definition at line 53 of file TemplateGrid.h.

References fDeltaCPMin.

00053 { return fDeltaCPMin;  }

Double_t TemplateGrid::GetDmsq ( Int_t  idmsq  ) 

Definition at line 460 of file TemplateGrid.cxx.

References fDmsq, and fDmsqBins.

Referenced by GetGridPointThreeFlavours(), and GetGridPointTwoFlavours().

00461 {
00462   if( idmsq<=0 ) return 0.0;
00463 
00464   else if( idmsq<=fDmsqBins ) return fDmsq[idmsq-1];
00465 
00466   else return -99999.9;
00467 }

OscFit::DmsqBasis_t OscFit::TemplateGrid::GetDmsqBasis (  )  [inline]

Definition at line 72 of file TemplateGrid.h.

References fDmsqBasis.

Referenced by OscFit::NueData::GetLikelihood().

00072 { return fDmsqBasis; }

Int_t OscFit::TemplateGrid::GetDmsqBins (  )  [inline]

Definition at line 39 of file TemplateGrid.h.

References fDmsqBins.

00039 { return fDmsqBins+1; }

Double_t OscFit::TemplateGrid::GetDmsqMax (  )  [inline]

Definition at line 45 of file TemplateGrid.h.

References fDmsqMax.

00045 { return fDmsqMax;  }

Double_t OscFit::TemplateGrid::GetDmsqMin (  )  [inline]

Definition at line 44 of file TemplateGrid.h.

References fDmsqMin.

00044 { return fDmsqMin;  }

GridPoint * TemplateGrid::GetGridPoint ( Int_t  n  ) 

Definition at line 1128 of file TemplateGrid.cxx.

References fUsingTwoFlavours, GetGridPointThreeFlavours(), and GetGridPointTwoFlavours().

Referenced by PrintGridPoints(), and PrintTemplates().

01129 {
01130   if( fUsingTwoFlavours ) 
01131     return GetGridPointTwoFlavours( n );
01132   else 
01133     return GetGridPointThreeFlavours( n );
01134 }

GridPoint * TemplateGrid::GetGridPointThreeFlavours ( Int_t  n  )  [private]

Definition at line 1152 of file TemplateGrid.cxx.

References fDefaultDmsq12, fDefaultSinsq12, fDmsqBasis, fGridPoint, GetDeltaCP(), GetDmsq(), GetNumGridPoints(), GetSinsq13(), GetSinsq23(), InvertGridID(), OscFit::kDmsq31, OscFit::kDmsq32, OscFit::kDmsqAve, OscFit::kSimple, and OscFit::GridPoint::SetParams().

Referenced by GetGridPoint().

01153 {
01154   //
01155   // Dmsq Conventions
01156   // ================
01157   // 
01158   // (0) kSimple: 
01159   //
01160   //   Set dmsq32 = +/- dmsq for normal/inverted hierarchy
01161   //
01162   // (1) kDmsq31
01163   //
01164   //   Define: dmsq = dmsq31 = dmsq32 + dmsq21
01165   //
01166   //   Normal Hierarchy:   dmsq32 = dmsq31 - dmsq21
01167   //
01168   //   Inverted Hierarchy: dmsq32 = -dmsq32 - dmsq21;
01169   //
01170   // (2) kDmsq32 
01171   //
01172   //   Define: dmsq = dmsq32
01173   //
01174   //   Normal Hierarchy:   dmsq32 = +dmsq
01175   //
01176   //   Inverted Hierarchy: dmsq32 = -dmsq
01177   //
01178   // (3) kDmsqAve
01179   // 
01180   //   Define: dmsq = (1/2) * ( dmsq32 + dmsq31 )
01181   //
01182   //   Substituting: dmsq31 = dmsq32 + dmsq21
01183   //       =>  dmsq = (1/2) * ( 2*dmsq32 + dmsq21 ) = dmsq32 + (1/2) * dmsq21
01184   //
01185   //   Hence: dmsq32 = dmsq - (1/2) * dmsq21
01186   //
01187 
01188   if( n<0 || n>=GetNumGridPoints() ) return 0;
01189 
01190   Int_t nDmsq      = -1;
01191   Int_t nSinsq23   = -1;
01192   Int_t nSinsq13   = -1;
01193   Int_t nDeltaCP   = -1;
01194   Int_t nHierarchy = -1;
01195 
01196   InvertGridID( n, nDmsq, nSinsq23, nSinsq13, nDeltaCP, nHierarchy );
01197 
01198   if( nDmsq<0 || nSinsq23<0 || nSinsq13<0 || nDeltaCP<0 || nHierarchy<0 ) return 0;
01199 
01200   Double_t dmsq  = GetDmsq( nDmsq );
01201 
01202   Double_t dmsq23  = dmsq;
01203   Double_t sinsq23 = GetSinsq23( nSinsq23 );
01204   Double_t sinsq13 = GetSinsq13( nSinsq13 );
01205   Double_t deltaCP = GetDeltaCP( nDeltaCP );
01206 
01207   Double_t dmsq12  = fDefaultDmsq12;
01208   Double_t sinsq12 = fDefaultSinsq12;
01209 
01210   if( nDmsq==0 && nSinsq23==0 
01211    && nSinsq13==0 && nDeltaCP==0 ){
01212     dmsq12 = 0.0; sinsq12 = 0.0;
01213   }
01214 
01215   if( fDmsqBasis==OscFit::kDmsqAve ){
01216     if( nHierarchy==1 ) dmsq23 = +fabs(dmsq) - 0.5*dmsq12;  // normal
01217     if( nHierarchy==2 ) dmsq23 = -fabs(dmsq) - 0.5*dmsq12;  // inverted
01218   }
01219 
01220   else if( fDmsqBasis==OscFit::kDmsq31 ){
01221     if( nHierarchy==1 ) dmsq23 = +fabs(dmsq) - dmsq12;  // normal
01222     if( nHierarchy==2 ) dmsq23 = -fabs(dmsq) - dmsq12;  // inverted
01223   }
01224 
01225   else if( fDmsqBasis==OscFit::kDmsq32 
01226         || fDmsqBasis==OscFit::kSimple ){
01227     if( nHierarchy==1 ) dmsq23 = +fabs(dmsq);  // normal
01228     if( nHierarchy==2 ) dmsq23 = -fabs(dmsq);  // inverted
01229   }
01230 
01231   else{
01232     assert(0); // bail out
01233   }
01234 
01235   Double_t theta23 = asin(sqrt(sinsq23));
01236   Double_t theta13 = asin(sqrt(sinsq13));
01237   Double_t theta12 = asin(sqrt(sinsq12));
01238 
01239   fGridPoint->SetParams( dmsq12, dmsq23, 
01240                          theta12, theta23, theta13, deltaCP);
01241 
01242   return fGridPoint;
01243 }  

GridPoint * TemplateGrid::GetGridPointTwoFlavours ( Int_t  n  )  [private]

Definition at line 1136 of file TemplateGrid.cxx.

References fGridPoint, GetDmsq(), GetNumGridPoints(), and OscFit::GridPoint::SetParams().

Referenced by GetGridPoint().

01137 {
01138   if( n<0 || n>=GetNumGridPoints() ) return 0;
01139 
01140   Double_t dmsq = GetDmsq( n );
01141   Double_t th23 = 45.0*(M_PI/180.0);
01142  
01143   if( n==0 ) th23 = 0.0;
01144 
01145   fGridPoint->SetParams( 0.0, dmsq,    // dmsq12, dmsq23 
01146                          0.0, th23,    // th12, th23
01147                          0.0, 0.0 );   // th13, dcp
01148 
01149   return fGridPoint;
01150 }

TString TemplateGrid::GetLabel ( Int_t  n  ) 

Definition at line 1245 of file TemplateGrid.cxx.

References fDeltaCPBins, fSinsq13Bins, fSinsq23Bins, and InvertGridID().

01246 {
01247   TString label = "";
01248 
01249   Int_t nDmsq      = -1;
01250   Int_t nSinsq23   = -1;
01251   Int_t nSinsq13   = -1;
01252   Int_t nDeltaCP   = -1;
01253   Int_t nHierarchy = -1;
01254 
01255   InvertGridID( n, 
01256                 nDmsq, nSinsq23, nSinsq13, nDeltaCP, nHierarchy );
01257 
01258   if( nHierarchy<=1 )  label.Append("");          // normal
01259   if( nHierarchy>=2 )  label.Append("inverted."); // inverted
01260 
01261   if( nDmsq<100 )      label.Append("0");
01262   if( nDmsq<10 )       label.Append("0");
01263   label += nDmsq;
01264 
01265   if( fSinsq23Bins>1 
01266    || fSinsq13Bins>1
01267    || fDeltaCPBins>1 ){
01268 
01269     label.Append(".");
01270     if( nSinsq23<100 ) label.Append("0");
01271     if( nSinsq23<10 )  label.Append("0");
01272     label += nSinsq23;
01273 
01274     label.Append(".");
01275     if( nSinsq13<100 ) label.Append("0");
01276     if( nSinsq13<10 )  label.Append("0");
01277     label += nSinsq13;
01278 
01279     label.Append(".");
01280     if( nDeltaCP<100 ) label.Append("0");
01281     if( nDeltaCP<10 )  label.Append("0");
01282     label += nDeltaCP;
01283   }
01284 
01285   return label;
01286 }

Int_t TemplateGrid::GetNumGridPoints (  ) 
Int_t TemplateGrid::GetNumTemplates (  ) 

Definition at line 1028 of file TemplateGrid.cxx.

References fTemplateGrid.

Referenced by PrintReport().

01029 {
01030   return fTemplateGrid.size();
01031 }

Double_t TemplateGrid::GetSinsq13 ( Int_t  isinsq13  ) 

Definition at line 478 of file TemplateGrid.cxx.

References fSinsq13, and fSinsq13Bins.

Referenced by GetGridPointThreeFlavours().

00479 {
00480   if( isinsq13<=0 ) return 0.0;
00481 
00482   else if( isinsq13<=fSinsq13Bins ) return fSinsq13[isinsq13-1];
00483 
00484   else return -99999.9;
00485 }

Int_t OscFit::TemplateGrid::GetSinsq13Bins (  )  [inline]

Definition at line 41 of file TemplateGrid.h.

References fSinsq13Bins.

00041 { return fSinsq13Bins+1; }

Double_t OscFit::TemplateGrid::GetSinsq13Max (  )  [inline]

Definition at line 51 of file TemplateGrid.h.

References fSinsq13Max.

00051 { return fSinsq13Max;  }

Double_t OscFit::TemplateGrid::GetSinsq13Min (  )  [inline]

Definition at line 50 of file TemplateGrid.h.

References fSinsq13Min.

00050 { return fSinsq13Min;  }

Double_t TemplateGrid::GetSinsq23 ( Int_t  isinsq23  ) 

Definition at line 469 of file TemplateGrid.cxx.

References fSinsq23, and fSinsq23Bins.

Referenced by GetGridPointThreeFlavours().

00470 {
00471   if( isinsq23<=0 ) return 0.0;
00472 
00473   else if( isinsq23<=fSinsq23Bins ) return fSinsq23[isinsq23-1];
00474 
00475   else return -99999.9;
00476 }

Int_t OscFit::TemplateGrid::GetSinsq23Bins (  )  [inline]

Definition at line 40 of file TemplateGrid.h.

References fSinsq23Bins.

00040 { return fSinsq23Bins+1; }

Double_t OscFit::TemplateGrid::GetSinsq23Max (  )  [inline]

Definition at line 48 of file TemplateGrid.h.

References fSinsq23Max.

00048 { return fSinsq23Max;  }

Double_t OscFit::TemplateGrid::GetSinsq23Min (  )  [inline]

Definition at line 47 of file TemplateGrid.h.

References fSinsq23Min.

00047 { return fSinsq23Min;  }

TemplateMap * TemplateGrid::GetTemplate ( Int_t  nDmsq,
Int_t  nSinsq23,
Int_t  nSinsq13,
Int_t  nDeltaCP,
Int_t  nHierarchy 
)

Definition at line 845 of file TemplateGrid.cxx.

References Get(), and GridID().

00846 {
00847   TemplateMap* temp = 0;
00848 
00849   Int_t id = GridID( nDmsq, nSinsq23, nSinsq13, nDeltaCP, nHierarchy );
00850 
00851   if( id>=0 ) temp = Get( id );
00852     
00853   return temp;
00854 }

TemplateMap * TemplateGrid::GetTemplate ( Int_t  n  ) 

Definition at line 819 of file TemplateGrid.cxx.

References InvertGridID().

Referenced by MakeTemplate(), PrintTemplates(), TouchAtmosData(), TouchAtmosRockMC(), TouchBeamData(), TouchBeamNueMC(), TouchData(), TouchMC(), TouchSystematic(), TouchSystematics(), and TouchTemplate().

00820 {
00821   Int_t nDmsq      = -1;
00822   Int_t nSinsq23   = -1;
00823   Int_t nSinsq13   = -1;
00824   Int_t nDeltaCP   = -1;
00825   Int_t nHierarchy = -1;
00826 
00827   InvertGridID( nOsc, nDmsq, nSinsq23, nSinsq13, nDeltaCP, nHierarchy );
00828 
00829   return GetTemplate( nDmsq, nSinsq23, nSinsq13, nDeltaCP, nHierarchy );
00830 }

Int_t TemplateGrid::GridID ( Int_t  nDmsq,
Int_t  nSinsq23,
Int_t  nSinsq13,
Int_t  nDeltaCP,
Int_t  nHierarchy 
)

Definition at line 1053 of file TemplateGrid.cxx.

References fDeltaCPBins, fDmsqBins, fSinsq13Bins, and fSinsq23Bins.

Referenced by BuildTemplate(), and GetTemplate().

01054 {
01055   if( nDmsq==0 && nSinsq23==0 
01056    && nSinsq13==0 && nDeltaCP==0 
01057    && nHierarchy==0 ){
01058     return 0;
01059   }
01060 
01061   if( nDmsq<=0 || nSinsq23<=0 || nSinsq13<=0 || nDeltaCP<=0 
01062    || nDmsq>fDmsqBins || nSinsq23>fSinsq23Bins
01063    || nSinsq13>fSinsq13Bins || nDeltaCP>fDeltaCPBins
01064    || nHierarchy<=0 || nHierarchy>2 ){
01065     return -1;
01066   }
01067  
01068   return 1 + (nDmsq-1)
01069            + (nSinsq23-1)*(fDmsqBins) 
01070            + (nSinsq13-1)*(fDmsqBins)*(fSinsq23Bins) 
01071            + (nDeltaCP-1)*(fDmsqBins)*(fSinsq23Bins)*(fSinsq13Bins)
01072            + (nHierarchy-1)*(fDmsqBins)*(fSinsq23Bins)*(fSinsq13Bins)*(fDeltaCPBins);
01073 }

Bool_t TemplateGrid::InsideGrid ( Double_t  dmsq,
Double_t  sinsq23,
Double_t  sinsq13,
Double_t  deltaCP 
)

Definition at line 1001 of file TemplateGrid.cxx.

References fDeltaCPMax, fDeltaCPMin, fDmsqMax, fDmsqMin, fSinsq13Max, fSinsq13Min, fSinsq23Max, and fSinsq23Min.

01002 {
01003   if( fabs(dmsq)>=fDmsqMin && fabs(dmsq)<=fDmsqMax
01004    && sinsq23>=fSinsq23Min && sinsq23<=fSinsq23Max
01005    && sinsq13>=fSinsq13Min && sinsq13<=fSinsq13Max
01006    && deltaCP>=fDeltaCPMin && deltaCP<=fDeltaCPMax ) 
01007        return 1;
01008   else return 0;
01009 }

Bool_t TemplateGrid::InsideGrid ( Double_t  dmsq  ) 

Definition at line 994 of file TemplateGrid.cxx.

References fDmsqMax, and fDmsqMin.

00995 {
00996   if( fabs(dmsq)>=fDmsqMin && fabs(dmsq)<=fDmsqMax ) 
00997        return 1;
00998   else return 0;
00999 }

TemplateGrid * TemplateGrid::Instance (  )  [static]
void TemplateGrid::InvertGridID ( Int_t  id,
Int_t &  nDmsq,
Int_t &  nSinsq23,
Int_t &  nSinsq13,
Int_t &  nDeltaCP,
Int_t &  nHierarchy 
)

Definition at line 1075 of file TemplateGrid.cxx.

References fDeltaCPBins, fDmsqBins, fSinsq13Bins, fSinsq23Bins, and total().

Referenced by GetGridPointThreeFlavours(), GetLabel(), GetTemplate(), MakeTemplate(), and PrintTemplates().

01076 {
01077   // Null
01078   nDmsq      = -1;
01079   nSinsq23   = -1;
01080   nSinsq13   = -1;
01081   nDeltaCP   = -1;
01082   nHierarchy = -1;
01083 
01084   if( id<0 ) return;
01085 
01086   if( fDmsqBins>0 && fSinsq23Bins>0 && fSinsq13Bins>0 && fDeltaCPBins>0
01087    && id>2*(fDmsqBins)*(fSinsq23Bins)*(fSinsq13Bins)*(fDeltaCPBins) ) return;
01088 
01089   // No Oscillations
01090   nDmsq      = 0;
01091   nSinsq23   = 0;
01092   nSinsq13   = 0;
01093   nDeltaCP   = 0;
01094   nHierarchy = 0;
01095   
01096   if( id==0 ) return;
01097 
01098   // Three Flavours
01099   Double_t total = (double)id - 1.0;
01100 
01101   nHierarchy = 1 + (Int_t)(total/((fDmsqBins)*(fSinsq23Bins)*(fSinsq13Bins)*(fDeltaCPBins)));
01102   total -= (nHierarchy-1)*(fDmsqBins)*(fSinsq23Bins)*(fSinsq13Bins)*(fDeltaCPBins);
01103 
01104   nDeltaCP = 1 + (Int_t)(total/((fDmsqBins)*(fSinsq23Bins)*(fSinsq13Bins)));
01105   total -= (nDeltaCP-1)*(fDmsqBins)*(fSinsq23Bins)*(fSinsq13Bins);
01106 
01107   nSinsq13 = 1 + (Int_t)(total/((fDmsqBins)*(fSinsq23Bins)));
01108   total -= (nSinsq13-1)*(fDmsqBins)*(fSinsq23Bins);
01109 
01110   nSinsq23 = 1 + (Int_t)(total/(fDmsqBins));
01111   total -= (nSinsq23-1)*(fDmsqBins);
01112 
01113   nDmsq = 1 + (Int_t)(total);
01114 
01115   return;
01116 }

void TemplateGrid::Load ( Int_t  id,
TemplateMap temp 
) [private]

Definition at line 793 of file TemplateGrid.cxx.

References fTemplateGrid.

Referenced by BuildTemplate().

00794 {
00795   if( temp==0 ) return;
00796 
00797   std::map<Int_t,TemplateMap*>::iterator myEntry = fTemplateGrid.find(id);
00798   
00799   if( myEntry==fTemplateGrid.end() ){
00800     fTemplateGrid.insert( std::pair<Int_t,TemplateMap*>(id,temp) );
00801   }
00802 
00803   return;
00804 }

TemplateMap * TemplateGrid::MakeTemplate ( Int_t  nDmsq,
Int_t  nSinsq23,
Int_t  nSinsq13,
Int_t  nDeltaCP,
Int_t  nHierarchy 
)

Definition at line 856 of file TemplateGrid.cxx.

References BuildTemplate(), GetTemplate(), and TouchTemplate().

00857 {
00858   if( TouchTemplate( nDmsq, nSinsq23, nSinsq13, nDeltaCP, nHierarchy )==0 ){
00859     BuildTemplate( nDmsq, nSinsq23, nSinsq13, nDeltaCP, nHierarchy );
00860   }
00861 
00862   return GetTemplate( nDmsq, nSinsq23, nSinsq13, nDeltaCP, nHierarchy );
00863 }

TemplateMap * TemplateGrid::MakeTemplate ( Int_t  n  ) 

Definition at line 832 of file TemplateGrid.cxx.

References InvertGridID().

00833 {
00834   Int_t nDmsq      = -1;
00835   Int_t nSinsq23   = -1;
00836   Int_t nSinsq13   = -1;
00837   Int_t nDeltaCP   = -1;
00838   Int_t nHierarchy = -1;
00839 
00840   InvertGridID( nOsc, nDmsq, nSinsq23, nSinsq13, nDeltaCP, nHierarchy );
00841 
00842   return MakeTemplate( nDmsq, nSinsq23, nSinsq13, nDeltaCP, nHierarchy );
00843 }

void TemplateGrid::PrintGrid (  ) 

Definition at line 377 of file TemplateGrid.cxx.

References fDeltaCP, fDeltaCPBins, fDeltaCPEdges, fDeltaCPMax, fDeltaCPMin, fDmsq, fDmsqBins, fDmsqEdges, fDmsqMax, fDmsqMin, fSinsq13, fSinsq13Bins, fSinsq13Edges, fSinsq13Max, fSinsq13Min, fSinsq23, fSinsq23Bins, fSinsq23Edges, fSinsq23Max, fSinsq23Min, fUsingNormalHierarchy, fUsingTwoFlavours, and TouchGrid().

Referenced by ReadGrid().

00378 {
00379   std::cout << " *** TemplateGrid::PrintGrid() *** " << std::endl;
00380 
00381   if( TouchGrid()==0 ){
00382     std::cout << " --- NO GRID LOADED --- " << std::endl; return;
00383   }
00384 
00385   if( fUsingTwoFlavours ){
00386     std::cout << "  Using Two Flavours " << std::endl;
00387   }
00388   else{
00389     std::cout << "  Using Three Flavours " << std::endl;
00390     if( fUsingNormalHierarchy ){
00391        std::cout << "  Normal Hierarchy Only " << std::endl;
00392     }
00393   }
00394 
00395   // Print Grid for Dmsq
00396   if( fDmsqBins>0 ){
00397     std::cout << " *** TemplateGrid::PrintGridDmsq(...) *** " << std::endl;
00398     std::cout << "  bins=" << fDmsqBins << " (min=" << fDmsqMin << ", max=" << fDmsqMax << ") " << std::endl;
00399 
00400     for( Int_t i=0; i<fDmsqBins; i++ ){
00401       std::cout << " [" << i+1 << "] " << fDmsq[i] << " (" << fDmsqEdges[i] << "->" << fDmsqEdges[i+1] << ") " << std::endl;
00402     }
00403   }
00404 
00405   // Print Grid for Sinsq23
00406   if( fSinsq23Bins>0 ){
00407     std::cout << " *** TemplateGrid::PrintGridSinsq23(...) *** " << std::endl;
00408     std::cout << "  bins=" << fSinsq23Bins << " (min=" << fSinsq23Min << ", max=" << fSinsq23Max << ") " << std::endl;
00409 
00410     for( Int_t i=0; i<fSinsq23Bins; i++ ){
00411       std::cout << " [" << i+1 << "] " << fSinsq23[i] << " (" << fSinsq23Edges[i] << "->" << fSinsq23Edges[i+1] << ") " << std::endl;
00412     }
00413   }
00414 
00415   // Print Grid for Sinsq13
00416   if( fSinsq13Bins>0 ){
00417     std::cout << " *** TemplateGrid::PrintGridSinsq13(...) *** " << std::endl;
00418     std::cout << "  bins=" << fSinsq13Bins << " (min=" << fSinsq13Min << ", max=" << fSinsq13Max << ") " << std::endl;
00419 
00420     for( Int_t i=0; i<fSinsq13Bins; i++ ){
00421       std::cout << " [" << i+1 << "] " << fSinsq13[i] << " (" << fSinsq13Edges[i] << "->" << fSinsq13Edges[i+1] << ") " << std::endl;
00422     }
00423   }
00424 
00425   // Print Grid for DeltaCP
00426   if( fDeltaCPBins>0 ){
00427     std::cout << " *** TemplateGrid::PrintGridDeltaCP(...) *** " << std::endl;
00428     std::cout << "  bins=" << fDeltaCPBins << " (min=" << fDeltaCPMin << ", max=" << fDeltaCPMax << ") " << std::endl;
00429 
00430     for( Int_t i=0; i<fDeltaCPBins; i++ ){
00431       std::cout << " [" << i+1 << "] " << fDeltaCP[i] << " (" << fDeltaCPEdges[i] << "->" << fDeltaCPEdges[i+1] << ") " << std::endl;
00432     }
00433   }
00434 
00435   return;
00436 }

void TemplateGrid::PrintGridPoints (  ) 

Definition at line 438 of file TemplateGrid.cxx.

References GetGridPoint(), GetNumGridPoints(), n, and OscFit::GridPoint::PrintParams().

00439 {
00440   std::cout << " *** TemplateGrid::PrintGridPoints() *** " << std::endl;
00441 
00442   for( Int_t n=0; n<GetNumGridPoints(); n++ ){
00443     GridPoint* thisPoint = GetGridPoint(n);
00444     if( thisPoint==0 ){
00445       std::cout << "  <warning> Missing Grid Point! [" << n << "]" << std::endl;
00446       assert( thisPoint );
00447     }
00448     else { 
00449       std::cout << " [" << n << "]"; thisPoint->PrintParams();
00450     }
00451   }
00452 }

void TemplateGrid::PrintReport (  ) 

Definition at line 454 of file TemplateGrid.cxx.

References GetNumTemplates().

00455 {
00456   std::cout << " *** TemplateGrid::PrintReport() *** " << std::endl;
00457   std::cout << "   NumTemplates = " << GetNumTemplates() << std::endl;
00458 }

void TemplateGrid::PrintTemplates (  ) 

Definition at line 1033 of file TemplateGrid.cxx.

References GetGridPoint(), GetNumGridPoints(), GetTemplate(), InvertGridID(), n, OscFit::GridPoint::PrintParams(), and OscFit::TemplateMap::PrintTemplates().

01034 {
01035   for( Int_t n=0; n<GetNumGridPoints(); n++ ){
01036     Int_t nDmsq      = -1; 
01037     Int_t nSinsq23   = -1;
01038     Int_t nSinsq13   = -1;
01039     Int_t nDeltaCP   = -1; 
01040     Int_t nHierarchy = -1;
01041 
01042     InvertGridID( n, nDmsq, nSinsq23, nSinsq13, nDeltaCP, nHierarchy );
01043 
01044     std::cout << " *** Print Grid Point [" << n << "] (" << nDmsq << "," << nSinsq23 << "," << nSinsq13 << "," << nDeltaCP << ") "; if( nHierarchy==0 ) std::cout << "(NoOsc)"; else if( nHierarchy==1 ) std::cout << "(Normal)"; else if( nHierarchy==2 ) std::cout << "(Inverted)"; std::cout << " *** " << std::endl;
01045 
01046     GridPoint* thisPoint = GetGridPoint(n);
01047     if( thisPoint ) thisPoint->PrintParams();
01048     TemplateMap* tempMap = GetTemplate(n);
01049     if( tempMap ) tempMap->PrintTemplates();
01050   }
01051 }

void TemplateGrid::PseudoThreeFlavours (  ) 

Definition at line 100 of file TemplateGrid.cxx.

References DefaultsForTwoFlavours(), fUsingTwoFlavours, and Instance().

00101 {
00102   fUsingTwoFlavours = 0;  
00103 
00104   DefaultsForTwoFlavours();
00105 
00106   Oscillation::Instance()->ThreeFlavours();
00107 }

void TemplateGrid::ReadGrid ( const char *  filename  ) 

Definition at line 559 of file TemplateGrid.cxx.

References BuildGridDeltaCP(), BuildGridDmsq(), BuildGridSinsq13(), BuildGridSinsq23(), DoNormalHierarchyOnly(), fDefaultDeltaCP, fDefaultDmsq, fDefaultDmsq12, fDefaultSinsq12, fDefaultSinsq13, fDefaultSinsq23, gSystem(), max, min, n, PrintGrid(), Reset(), UseThreeFlavours(), and UseTwoFlavours().

00560 {
00561   Reset(); // Reset before loading grid
00562 
00563   std::cout << " *** TemplateGrid::ReadGrid() *** " << std::endl
00564             << "  filename = " << filename << std::endl;
00565 
00566   if( gSystem->AccessPathName( filename ) ) { // returns kTrue if non-existent
00567     std::cout << "  warning: failed to find " << filename << std::endl;
00568     return;
00569   }
00570 
00571   TDirectory* tmpd = gDirectory;
00572   TFile* file = TFile::Open(filename);
00573 
00574   TH1D* hConfig   = (TH1D*)(file->Get("hConfig"));;
00575   TH1D* hDmsq     = (TH1D*)(file->Get("hDmsq"));;
00576   TH1D* hSinsq23  = (TH1D*)(file->Get("hSinsq23"));;
00577   TH1D* hSinsq13  = (TH1D*)(file->Get("hSinsq13"));;
00578   TH1D* hDeltaCP  = (TH1D*)(file->Get("hDeltaCP"));;
00579   TH1D* hDefaults = (TH1D*)(file->Get("hDefaults"));
00580 
00581   if( hConfig ){
00582          if( hConfig->GetBinContent(1)==2 ) { UseTwoFlavours(); }
00583     else if( hConfig->GetBinContent(1)==3 ) { UseThreeFlavours(); }
00584     else if( hConfig->GetBinContent(1)==4 ) { UseThreeFlavours(); DoNormalHierarchyOnly(); }
00585   }
00586 
00587   if( hDmsq ){
00588     Int_t n = hDmsq->GetNbinsX();
00589     Double_t min = hDmsq->GetBinCenter(1);
00590     Double_t max = hDmsq->GetBinCenter(n);
00591 
00592     this->BuildGridDmsq( n, min, max );
00593   }
00594 
00595   if( hSinsq23 ){
00596     Int_t n = hSinsq23->GetNbinsX();
00597     Double_t min = hSinsq23->GetBinCenter(1);
00598     Double_t max = hSinsq23->GetBinCenter(n);
00599 
00600     this->BuildGridSinsq23( n, min, max );
00601   }
00602 
00603   if( hSinsq13 ){
00604     Int_t n = hSinsq13->GetNbinsX();
00605     Double_t min = hSinsq13->GetBinCenter(1);
00606     Double_t max = hSinsq13->GetBinCenter(n);
00607 
00608     this->BuildGridSinsq13( n, min, max );
00609   }
00610 
00611   if( hDeltaCP ){
00612     Int_t n = hDeltaCP->GetNbinsX();
00613     Double_t min = hDeltaCP->GetBinCenter(1);
00614     Double_t max = hDeltaCP->GetBinCenter(n);
00615 
00616     this->BuildGridDeltaCP( n, min, max );
00617   }
00618 
00619   if( hDefaults ){
00620     fDefaultDmsq    = hDefaults->GetBinContent(1);
00621     fDefaultSinsq23 = hDefaults->GetBinContent(2);
00622     fDefaultSinsq13 = hDefaults->GetBinContent(3);
00623     fDefaultDeltaCP = hDefaults->GetBinContent(4);
00624     fDefaultDmsq12  = hDefaults->GetBinContent(5);
00625     fDefaultSinsq12 = hDefaults->GetBinContent(6);
00626   }
00627 
00628   file->Close();
00629   tmpd->cd();
00630 
00631   PrintGrid();
00632 
00633   return;
00634 }

void TemplateGrid::Reset (  ) 

Definition at line 689 of file TemplateGrid.cxx.

References DeleteGrid().

Referenced by ReadGrid(), TemplateGrid(), and ~TemplateGrid().

00690 {
00691   DeleteGrid();
00692 }

void TemplateGrid::ResetTemplates (  ) 

Definition at line 684 of file TemplateGrid.cxx.

References DeleteTemplates().

00685 {
00686   DeleteTemplates();
00687 }

void OscFit::TemplateGrid::SetDebug ( Bool_t  yesno = 1  )  [inline]

Definition at line 142 of file TemplateGrid.h.

References fDebug.

00142 { fDebug = yesno; }

void OscFit::TemplateGrid::SetDefaultDeltaCP ( Double_t  deltaCP  )  [inline]

Definition at line 77 of file TemplateGrid.h.

References fDefaultDeltaCP.

00077 { fDefaultDeltaCP = deltaCP; }

void OscFit::TemplateGrid::SetDefaultDmsq ( Double_t  dmsq  )  [inline]

Definition at line 74 of file TemplateGrid.h.

References fDefaultDmsq.

00074 { fDefaultDmsq    = dmsq;    }

void OscFit::TemplateGrid::SetDefaultSinsq13 ( Double_t  sinsq13  )  [inline]

Definition at line 76 of file TemplateGrid.h.

References fDefaultSinsq13.

00076 { fDefaultSinsq13 = sinsq13; }

void OscFit::TemplateGrid::SetDefaultSinsq23 ( Double_t  sinsq23  )  [inline]

Definition at line 75 of file TemplateGrid.h.

References fDefaultSinsq23.

00075 { fDefaultSinsq23 = sinsq23; }

void OscFit::TemplateGrid::SetDmsqBasis ( OscFit::DmsqBasis_t  basis  )  [inline]

Definition at line 71 of file TemplateGrid.h.

References fDmsqBasis.

00071 { fDmsqBasis = basis; }

Bool_t TemplateGrid::TouchAtmosData (  ) 

Definition at line 875 of file TemplateGrid.cxx.

References GetNumGridPoints(), GetTemplate(), Instance(), n, and OscFit::TemplateMap::TouchAtmosData().

00876 {
00877   for( Int_t n=0; n<TemplateGrid::Instance()->GetNumGridPoints(); n++ ){
00878     TemplateMap* tempMap = TemplateGrid::Instance()->GetTemplate(n);
00879     if( tempMap && tempMap->TouchAtmosData() ) return 1; 
00880   }
00881 
00882   return 0;
00883 }

Bool_t TemplateGrid::TouchAtmosRockMC (  ) 

Definition at line 934 of file TemplateGrid.cxx.

References GetTemplate(), Instance(), and OscFit::TemplateMap::TouchAtmosRockMC().

00935 {
00936   //
00937   // check first grid point only
00938   //
00939 
00940   TemplateMap* tempMap = TemplateGrid::Instance()->GetTemplate(0);
00941 
00942   if( tempMap && tempMap->TouchAtmosRockMC() ) return 1; 
00943   
00944   return 0;
00945 }

Bool_t TemplateGrid::TouchBeamData (  ) 

Definition at line 885 of file TemplateGrid.cxx.

References GetNumGridPoints(), GetTemplate(), Instance(), n, and OscFit::TemplateMap::TouchBeamData().

00886 {
00887   for( Int_t n=0; n<TemplateGrid::Instance()->GetNumGridPoints(); n++ ){
00888     TemplateMap* tempMap = TemplateGrid::Instance()->GetTemplate(n);
00889     if( tempMap && tempMap->TouchBeamData() ) return 1; 
00890   }
00891 
00892   return 0;
00893 }

Bool_t TemplateGrid::TouchBeamNueMC (  ) 

Definition at line 921 of file TemplateGrid.cxx.

References GetTemplate(), Instance(), and OscFit::TemplateMap::TouchBeamNueMC().

00922 {
00923   //
00924   // check first grid point only
00925   //
00926 
00927   TemplateMap* tempMap = TemplateGrid::Instance()->GetTemplate(0);
00928 
00929   if( tempMap && tempMap->TouchBeamNueMC() ) return 1; 
00930   
00931   return 0;
00932 }

Bool_t TemplateGrid::TouchData (  ) 

Definition at line 895 of file TemplateGrid.cxx.

References GetNumGridPoints(), GetTemplate(), Instance(), n, and OscFit::TemplateMap::TouchData().

00896 {
00897   // Should only need to check the first point
00898   // -----------------------------------------
00899   // TemplateMap* tempMap = GetTemplate( 0, 0, 0, 0, 0 );
00900   // if( tempMap && tempMap->TouchData() ) return 1; else return 0;
00901 
00902   for( Int_t n=0; n<TemplateGrid::Instance()->GetNumGridPoints(); n++ ){
00903     TemplateMap* tempMap = TemplateGrid::Instance()->GetTemplate(n);
00904     if( tempMap && tempMap->TouchData() ) return 1; 
00905   }
00906 
00907   return 0;
00908 }

Bool_t OscFit::TemplateGrid::TouchGrid (  )  [inline]

Definition at line 32 of file TemplateGrid.h.

References fGridIsLoaded.

Referenced by PrintGrid(), and WriteGrid().

00032 { return fGridIsLoaded; }

Bool_t TemplateGrid::TouchMC (  ) 

Definition at line 910 of file TemplateGrid.cxx.

References GetNumGridPoints(), GetTemplate(), Instance(), n, OscFit::TemplateMap::PrintTemplates(), and OscFit::TemplateMap::TouchMC().

00911 {
00912   for( Int_t n=0; n<TemplateGrid::Instance()->GetNumGridPoints(); n++ ){
00913     TemplateMap* tempMap = TemplateGrid::Instance()->GetTemplate(n);
00914     tempMap->PrintTemplates();
00915     if( tempMap && tempMap->TouchMC() ) return 1; 
00916   }
00917 
00918   return 0;
00919 }

Bool_t TemplateGrid::TouchSystematic ( Source_t  source,
Sample_t  sample,
Systematic_t  systematic 
)

Definition at line 957 of file TemplateGrid.cxx.

References GetTemplate(), Instance(), and OscFit::TemplateMap::TouchSystematic().

00958 {
00959   //
00960   // only check first grid point for now
00961   //
00962 
00963   TemplateMap* tempMap = TemplateGrid::Instance()->GetTemplate(0);
00964 
00965   if( tempMap && tempMap->TouchSystematic( source, sample, systematic ) ) return 1;
00966 
00967   return 0;
00968 }

Bool_t TemplateGrid::TouchSystematic ( Source_t  source,
Systematic_t  systematic 
)

Definition at line 947 of file TemplateGrid.cxx.

References OscFit::kCV, and OscFit::kRock.

00948 {
00949   //
00950   // only check CV or Rock for now
00951   //
00952 
00953   return ( TouchSystematic( source, OscFit::kCV, systematic )
00954         || TouchSystematic( source, OscFit::kRock, systematic ) );
00955 }

Bool_t TemplateGrid::TouchSystematics (  ) 

Definition at line 970 of file TemplateGrid.cxx.

References GetNumGridPoints(), GetTemplate(), Instance(), n, and OscFit::TemplateMap::TouchSystematics().

00971 {
00972   Bool_t foundThem = 0;
00973 
00974   for( Int_t n=0; n<TemplateGrid::Instance()->GetNumGridPoints(); n++ ){
00975     TemplateMap* tempMap = TemplateGrid::Instance()->GetTemplate(n);
00976     if( tempMap ){
00977       if( foundThem==0 
00978        && tempMap->TouchSystematics()==1 ){
00979         foundThem = 1;
00980       }
00981       else 
00982       if( foundThem==1 
00983        && tempMap->TouchSystematics()==0 ){
00984         foundThem = 0;
00985         std::cout << "  Warning: systematics not fully loaded " << std::endl;
00986         return 0; // return 'false'
00987       }
00988     }
00989   }
00990     
00991   return foundThem;
00992 }

Bool_t TemplateGrid::TouchTemplate ( Int_t  n  ) 

Definition at line 870 of file TemplateGrid.cxx.

References GetTemplate().

00871 {
00872   if( GetTemplate( n ) ) return 1; else return 0;
00873 }

Bool_t TemplateGrid::TouchTemplate ( Int_t  nDmsq,
Int_t  nSinsq23,
Int_t  nSinsq13,
Int_t  nDeltaCP,
Int_t  normalHierarchy 
)

Definition at line 865 of file TemplateGrid.cxx.

References GetTemplate().

Referenced by MakeTemplate().

00866 {
00867   if( GetTemplate( nDmsq, nSinsq23, nSinsq13, nDeltaCP, nHierarchy ) ) return 1; else return 0;
00868 }

void TemplateGrid::UnloadTemplates (  ) 

Definition at line 694 of file TemplateGrid.cxx.

References fGridIsLoaded, and fTemplateGrid.

00695 {
00696   // --- print warning message ---
00697   if( fGridIsLoaded ){
00698      // std::cout << " *** TemplateGrid::Unload() *** " << std::endl;
00699      std::cout << " *** Unloading Templates *** " << std::endl;
00700   }
00701 
00702   std::map<Int_t,TemplateMap*>::iterator myIter = fTemplateGrid.begin();
00703 
00704   for( ; myIter!=fTemplateGrid.end(); myIter++ ){
00705     Int_t        nOsc = myIter->first;
00706     TemplateMap* temp = myIter->second;
00707     if( nOsc==0 ) continue; // keep the first grid point
00708 
00709     if( temp ) delete temp;
00710     fTemplateGrid.erase(myIter);
00711   }
00712 
00713   return;
00714 }

void TemplateGrid::UseThreeFlavours (  ) 

Definition at line 91 of file TemplateGrid.cxx.

References DefaultsForThreeFlavours(), fUsingTwoFlavours, and Instance().

Referenced by ReadGrid().

00092 {
00093   fUsingTwoFlavours = 0;  
00094 
00095   DefaultsForThreeFlavours();
00096 
00097   Oscillation::Instance()->ThreeFlavours();
00098 }

void TemplateGrid::UseTwoFlavours (  ) 

Definition at line 82 of file TemplateGrid.cxx.

References DefaultsForTwoFlavours(), fUsingTwoFlavours, and Instance().

Referenced by ReadGrid().

00083 {
00084   fUsingTwoFlavours = 1;
00085 
00086   DefaultsForTwoFlavours();
00087 
00088   Oscillation::Instance()->TwoFlavours();
00089 }

Bool_t OscFit::TemplateGrid::UsingDeltaCP (  )  [inline]

Definition at line 37 of file TemplateGrid.h.

References fDeltaCPBins.

00037 { if( fDeltaCPBins>1 ) return 1; else return 0; }

Bool_t OscFit::TemplateGrid::UsingDmsq (  )  [inline]

Definition at line 34 of file TemplateGrid.h.

References fDmsqBins.

00034 { if( fDmsqBins>1 )    return 1; else return 0; }

Bool_t OscFit::TemplateGrid::UsingSinsq13 (  )  [inline]

Definition at line 36 of file TemplateGrid.h.

References fSinsq13Bins.

00036 { if( fSinsq13Bins>1 ) return 1; else return 0; }

Bool_t OscFit::TemplateGrid::UsingSinsq23 (  )  [inline]

Definition at line 35 of file TemplateGrid.h.

References fSinsq23Bins.

00035 { if( fSinsq23Bins>1 ) return 1; else return 0; }

Bool_t OscFit::TemplateGrid::UsingThreeFlavours (  )  [inline]

Definition at line 98 of file TemplateGrid.h.

References fUsingTwoFlavours.

00098 { return !fUsingTwoFlavours; }

Bool_t OscFit::TemplateGrid::UsingTwoFlavours (  )  [inline]

Definition at line 97 of file TemplateGrid.h.

References fUsingTwoFlavours.

00097 { return  fUsingTwoFlavours; }

void TemplateGrid::WriteGrid ( const char *  filename  ) 

Definition at line 636 of file TemplateGrid.cxx.

References fDefaultDeltaCP, fDefaultDmsq, fDefaultDmsq12, fDefaultSinsq12, fDefaultSinsq13, fDefaultSinsq23, fDeltaCPBins, fDeltaCPEdges, fDmsqBins, fDmsqEdges, fSinsq13Bins, fSinsq13Edges, fSinsq23Bins, fSinsq23Edges, fUsingNormalHierarchy, fUsingTwoFlavours, and TouchGrid().

00637 {
00638   if( TouchGrid()==0 ) return;
00639 
00640   std::cout << " *** TemplateGrid::WriteGrid() *** " << std::endl
00641             << "  filename = " << filename << std::endl;
00642 
00643   TH1D* hConfig  = new TH1D("hConfig","",1,0,1);
00644   if( fUsingTwoFlavours )           hConfig->SetBinContent(1,2); // two flavours
00645   else if( !fUsingNormalHierarchy ) hConfig->SetBinContent(1,3); // three flavours
00646   else                              hConfig->SetBinContent(1,4); // three flavours (NH ONLY)
00647 
00648   TH1D* hDmsq    = new TH1D("hDmsq","",fDmsqBins,fDmsqEdges);
00649   TH1D* hSinsq23 = new TH1D("hSinsq23","",fSinsq23Bins,fSinsq23Edges);
00650   TH1D* hSinsq13 = new TH1D("hSinsq13","",fSinsq13Bins,fSinsq13Edges);
00651   TH1D* hDeltaCP = new TH1D("hDeltaCP","",fDeltaCPBins,fDeltaCPEdges);
00652 
00653   TH1D* hDefaults = new TH1D("hDefaults","",6,0.5,6.5);
00654   hDefaults->SetBinContent(1,fDefaultDmsq);
00655   hDefaults->SetBinContent(2,fDefaultSinsq23);
00656   hDefaults->SetBinContent(3,fDefaultSinsq13);
00657   hDefaults->SetBinContent(4,fDefaultDeltaCP);
00658   hDefaults->SetBinContent(5,fDefaultDmsq12);
00659   hDefaults->SetBinContent(6,fDefaultSinsq12);
00660 
00661   TDirectory* tmpd = gDirectory;
00662   TFile* file = new TFile(filename,"RECREATE");
00663 
00664   hConfig->SetDirectory(file);
00665   hDmsq->SetDirectory(file);
00666   hSinsq23->SetDirectory(file);
00667   hSinsq13->SetDirectory(file);
00668   hDeltaCP->SetDirectory(file);
00669   hDefaults->SetDirectory(file);
00670 
00671   hConfig->Write();
00672   hDmsq->Write();
00673   hSinsq23->Write();
00674   hSinsq13->Write();
00675   hDeltaCP->Write();
00676   hDefaults->Write();
00677 
00678   file->Close();
00679   tmpd->cd();
00680 
00681   return;
00682 }


Member Data Documentation

Bool_t OscFit::TemplateGrid::fDebug [private]
Double_t* OscFit::TemplateGrid::fDeltaCP [private]

Definition at line 218 of file TemplateGrid.h.

Referenced by BuildGridDeltaCP(), DeleteGrid(), GetDeltaCP(), PrintGrid(), and TemplateGrid().

Definition at line 219 of file TemplateGrid.h.

Referenced by BuildGridDeltaCP(), DeleteGrid(), PrintGrid(), TemplateGrid(), and WriteGrid().

Definition at line 220 of file TemplateGrid.h.

Referenced by BuildGridDeltaCP(), and TemplateGrid().

Definition at line 193 of file TemplateGrid.h.

Referenced by BuildGridDmsq(), and TemplateGrid().

Definition at line 211 of file TemplateGrid.h.

Referenced by BuildGridSinsq13(), and TemplateGrid().

Definition at line 202 of file TemplateGrid.h.

Referenced by BuildGridSinsq23(), and TemplateGrid().

Double_t* OscFit::TemplateGrid::fDmsq [private]

Definition at line 191 of file TemplateGrid.h.

Referenced by BuildGridDmsq(), DeleteGrid(), GetDmsq(), PrintGrid(), and TemplateGrid().

Double_t* OscFit::TemplateGrid::fDmsqEdges [private]

Definition at line 192 of file TemplateGrid.h.

Referenced by BuildGridDmsq(), DeleteGrid(), PrintGrid(), TemplateGrid(), and WriteGrid().

Double_t OscFit::TemplateGrid::fDmsqMax [private]
Double_t OscFit::TemplateGrid::fDmsqMin [private]

Definition at line 229 of file TemplateGrid.h.

Double_t* OscFit::TemplateGrid::fSinsq13 [private]

Definition at line 209 of file TemplateGrid.h.

Referenced by BuildGridSinsq13(), DeleteGrid(), GetSinsq13(), PrintGrid(), and TemplateGrid().

Definition at line 210 of file TemplateGrid.h.

Referenced by BuildGridSinsq13(), DeleteGrid(), PrintGrid(), TemplateGrid(), and WriteGrid().

Double_t* OscFit::TemplateGrid::fSinsq23 [private]

Definition at line 200 of file TemplateGrid.h.

Referenced by BuildGridSinsq23(), DeleteGrid(), GetSinsq23(), PrintGrid(), and TemplateGrid().

Definition at line 201 of file TemplateGrid.h.

Referenced by BuildGridSinsq23(), DeleteGrid(), PrintGrid(), TemplateGrid(), and WriteGrid().

Definition at line 181 of file TemplateGrid.h.

Referenced by DeleteTemplates(), Get(), GetNumTemplates(), Load(), and UnloadTemplates().

Definition at line 183 of file TemplateGrid.h.

Referenced by BuildTemplate(), and TemplateGrid().


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

Generated on 15 Jul 2018 for loon by  doxygen 1.6.1