Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

NC::CoordinateConverter Class Reference

Convert from CoordNDim to SystPars and OscPars. More...

#include <NCCoordinateConverter.h>

List of all members.

Public Member Functions

 CoordinateConverter ()
virtual ~CoordinateConverter ()
void Prepare (const Registry &r, bool hush=false)
SystPars SystParsFromCoordNDim (const Fitter::CoordNDim &coord) const
 Translates between fitter's coordinates and systematic parameters.
OscProb::OscParsOscParsFromCoordNDim (const Fitter::CoordNDim &coords) const
 Translates between fitter's coordinates and oscillation parameters.
Fitter::CoordNDim CoordNDimFromOscPars (const OscProb::OscPars *pars) const
 Translates between oscillation parameters and fitter's coordinates.
int FitterIndex (NCType::EFitParam par) const
NCParameter ParameterForFitterIndex (int idx) const
NCParameter ParameterForFitParam (NCType::EFitParam par) const
bool IsFit (NCType::EFitParam par) const
int NumParameters () const
bool IsSystematic (NCType::EFitParam par) const
TH1 * AxesForParameter (TString name, TString title, NCType::EFitParam x, TString yAx) const
TH1 * AxesForParameter (TString name, TString title, int x, TString yAx) const
TH2 * AxesForParameters (TString name, TString title, int x, int y) const
TH2 * AxesForParameters (TString name, TString title, NCType::EFitParam x, NCType::EFitParam y) const
std::vector< double > VectorFromSystPars (const NC::SystPars &s) const

Static Public Member Functions

const RegistryDefaultConfig ()

Public Attributes

std::vector< NCParameterfFitParams
 List of details of parameters used in the fit.

Private Member Functions

int AddParameter (std::string shortName, std::string latexName, double min, double max, double prec, bool limit)
 Add an NCParameter with this description to fFitParams and return its index.
int AddSystematicParameter (NCType::EFitParam)
 Look up the systematic parameter and then forward to AddParameter.
void TryAddSystematic (const Registry &r, NCType::EFitParam p)
 Add systematic p to fFitParams if r thinks we should.
void PrepareSystematics (const Registry &r)
 Adds the systematics requested in r to fFitParams.
void PrepareOscillations (const Registry &r)
 Adds the systematics required for fOscillationModel to fFitParams.
double ChooseValue (NCType::EFitParam param, const NC::Fitter::CoordNDim &coords) const
 Return fixed value of param if not fit, else value from coords.

Private Attributes

int fLoc [NCType::kNumParameters]
 Mapping from EFitParam constants to fitter coordinate indices.
double fFixedVals [NCType::kNumParameters]
 Mapping from EFitParam constants to fixed value, if the parameter is not fit.
NCType::EOscModel fOscillationModel
double fPrecScale


Detailed Description

Convert from CoordNDim to SystPars and OscPars.

Definition at line 68 of file NCCoordinateConverter.h.


Constructor & Destructor Documentation

NC::CoordinateConverter::CoordinateConverter  ) 
 

Definition at line 98 of file NCCoordinateConverter.cxx.

References fFixedVals, and fLoc.

00099 {
00100   for(int n = 0; n < kNumParameters; ++n){
00101     fLoc[n] = -1;
00102     fFixedVals[n] = -9999;
00103   }
00104 }

virtual NC::CoordinateConverter::~CoordinateConverter  )  [inline, virtual]
 

Definition at line 72 of file NCCoordinateConverter.h.

00072 {}


Member Function Documentation

int NC::CoordinateConverter::AddParameter std::string  shortName,
std::string  latexName,
double  min,
double  max,
double  prec,
bool  limit
[private]
 

Add an NCParameter with this description to fFitParams and return its index.

Definition at line 621 of file NCCoordinateConverter.cxx.

References fFitParams, fPrecScale, max, and min.

Referenced by AddSystematicParameter(), and PrepareOscillations().

00627 {
00628   assert(fPrecScale > 0);
00629 
00630   const double defaultPrec = .01;
00631   if(prec < 0) prec = TMath::Abs((max - min)*defaultPrec);
00632 
00633   fFitParams.push_back(NCParameter(shortName, latexName, min, max,
00634                                    prec/fPrecScale, limit));
00635   return fFitParams.size()-1;
00636 }

int NC::CoordinateConverter::AddSystematicParameter NCType::EFitParam   )  [private]
 

Look up the systematic parameter and then forward to AddParameter.

Definition at line 639 of file NCCoordinateConverter.cxx.

References AddParameter(), NCType::kParams, NCType::ParamDef::latexName, and NCType::ParamDef::sigma.

Referenced by TryAddSystematic().

00640 {
00641   const double sigma = kParams[p].sigma;
00642   return AddParameter(kParams[p].name.Data(), kParams[p].latexName.Data(),
00643                       -sigma, sigma, -1, false);
00644 }

TH1 * NC::CoordinateConverter::AxesForParameter TString  name,
TString  title,
int  x,
TString  yAx
const
 

Definition at line 674 of file NCCoordinateConverter.cxx.

References AxesForNCParameter(), and ParameterForFitterIndex().

00678 {
00679   const NCParameter xp = ParameterForFitterIndex(x);
00680 
00681   return AxesForNCParameter(name, title, xp, yLabel);
00682 }

TH1 * NC::CoordinateConverter::AxesForParameter TString  name,
TString  title,
NCType::EFitParam  x,
TString  yAx
const
 

Definition at line 663 of file NCCoordinateConverter.cxx.

References AxesForNCParameter(), and ParameterForFitParam().

00667 {
00668   const NCParameter xp = ParameterForFitParam(x);
00669 
00670   return AxesForNCParameter(name, title, xp, yLabel);
00671 }

TH2 * NC::CoordinateConverter::AxesForParameters TString  name,
TString  title,
NCType::EFitParam  x,
NCType::EFitParam  y
const
 

Definition at line 703 of file NCCoordinateConverter.cxx.

References AxesForNCParameters(), and ParameterForFitParam().

00707 {
00708   const NCParameter xp = ParameterForFitParam(x);
00709   const NCParameter yp = ParameterForFitParam(y);
00710 
00711   return AxesForNCParameters(name, title, xp, yp);
00712 }

TH2 * NC::CoordinateConverter::AxesForParameters TString  name,
TString  title,
int  x,
int  y
const
 

Definition at line 715 of file NCCoordinateConverter.cxx.

References AxesForNCParameters(), and ParameterForFitterIndex().

Referenced by NC::FitMaster::DrawAndWriteContourGraphs().

00718 {
00719   const NCParameter xp = ParameterForFitterIndex(x);
00720   const NCParameter yp = ParameterForFitterIndex(y);
00721 
00722   return AxesForNCParameters(name, title, xp, yp);
00723 }

double NC::CoordinateConverter::ChooseValue NCType::EFitParam  param,
const NC::Fitter::CoordNDim coords
const [private]
 

Return fixed value of param if not fit, else value from coords.

Definition at line 335 of file NCCoordinateConverter.cxx.

References NC::Fitter::CoordNDim, fFixedVals, fLoc, and IsFit().

00336 {
00337   if(IsFit(param))
00338     return coords.at(fLoc[param]);
00339   else
00340     return fFixedVals[param];
00341 }

CoordNDim NC::CoordinateConverter::CoordNDimFromOscPars const OscProb::OscPars pars  )  const
 

Translates between oscillation parameters and fitter's coordinates.

pars must be the same model as fOscillationModel

Todo:
Doesn't handle systematic parameters, so care must be taken when using the returned coordinate.
See also:
OscParsFromCoordNDim

Definition at line 550 of file NCCoordinateConverter.cxx.

References NC::Fitter::CoordNDim, NCType::EFitParam, FitterIndex(), NC::OscProb::OscPars::GetParameterValue(), IsFit(), IsSystematic(), NCType::kDeltaMSqr, NCType::kDeltaMSqr12, NCType::kDeltaMSqr31, NCType::kDeltaMSqr32, NCType::kDeltaMSqr41, and NC::OscProb::OscPars::OscillationModel().

Referenced by NC::FitMaster::Run().

00551 {
00552   assert(pars->OscillationModel() == fOscillationModel);
00553 
00554   CoordNDim ret;
00555 
00556   using namespace NCType;
00557 
00558   for(int n = 0; n < kNumParameters; ++n){
00559     const EFitParam par = EFitParam(n);
00560     if(IsFit(par) && !IsSystematic(par)){
00561       const unsigned int loc = FitterIndex(par);
00562       if(ret.size() <= loc) ret.resize(loc+1);
00563       double parval = pars->GetParameterValue(par);
00564       // Have to undo 1e3 factor in deltam values. TODO better
00565       if(par == kDeltaMSqr || par == kDeltaMSqr12 || par == kDeltaMSqr31 ||
00566          par == kDeltaMSqr32 || par == kDeltaMSqr41 || par == kDeltaMSqr43)
00567         parval *= 1e3;
00568       ret[loc] = parval;
00569     }
00570   }
00571 
00572   return ret;
00573 }

const Registry & NC::CoordinateConverter::DefaultConfig  )  [static]
 

Definition at line 107 of file NCCoordinateConverter.cxx.

References Registry::LockValues(), Registry::Set(), and Registry::UnLockValues().

00108 {
00109   static Registry r;
00110 
00111   r.UnLockValues();
00112 
00113   r.Set("PrecScale",         1.0);
00114 
00115   r.Set("DeltaCP3FlavorVal", 0.0);
00116 
00117   // Whether to fit particular parameters
00118   r.Set("FitUE3Sqr",            false);
00119   r.Set("FitTheta13",           false);
00120   r.Set("FitDelta1",            false);
00121   r.Set("FitDelta2",            false);
00122 
00123   r.Set("FitTheta14",           true);
00124   r.Set("FitTheta24",           true);
00125   r.Set("FitTheta23",           true);
00126 
00127   // Fixed values to use for the parameters if not fitting them
00128   r.Set("UE3SqrVal",            0.);
00129   r.Set("Theta13Val",           0.);
00130   r.Set("Delta1Val",            0.);
00131   r.Set("Delta2Val",            0.);
00132 
00133   r.Set("Theta14Val",           0.);
00134   r.Set("Theta24Val",           0.);
00135   r.Set("Theta23Val",           0.);
00136 
00137 
00138   r.LockValues();
00139   return r;
00140 }

int NC::CoordinateConverter::FitterIndex NCType::EFitParam  par  )  const
 

Definition at line 576 of file NCCoordinateConverter.cxx.

References fLoc, and NCType::kNumParameters.

Referenced by CoordNDimFromOscPars(), NC::FitMaster::DrawAndWriteContourGraphs(), NC::FitMaster::GetContourMinuit(), ParameterForFitParam(), and NC::FitMaster::Run().

00577 {
00578   assert(int(par) >= 0 && par < kNumParameters);
00579   assert(fLoc[par] != -1);
00580   return fLoc[par];
00581 }

bool NC::CoordinateConverter::IsFit NCType::EFitParam  par  )  const
 

Definition at line 599 of file NCCoordinateConverter.cxx.

References fLoc.

Referenced by ChooseValue(), CoordNDimFromOscPars(), NCExtrapolationFarNear::FindSpectraForPars(), NCExtrapolationModule::GetListOfShifts(), NumParameters(), and VectorFromSystPars().

00600 {
00601   return fLoc[par] != -1;
00602 }

bool NC::CoordinateConverter::IsSystematic NCType::EFitParam  par  )  const
 

Definition at line 614 of file NCCoordinateConverter.cxx.

Referenced by CoordNDimFromOscPars(), and VectorFromSystPars().

00615 {
00616   assert(par < NCType::kNumParameters);
00617   return par < NCType::kNumSystematicParameters;
00618 }

int NC::CoordinateConverter::NumParameters  )  const
 

Definition at line 605 of file NCCoordinateConverter.cxx.

References IsFit().

00606 {
00607   int fit = 0;
00608   for(int n = 0; n < NCType::kNumParameters; ++n)
00609     if(IsFit(NCType::EFitParam(n))) ++fit;
00610   return fit;
00611 }

OscProb::OscPars* NC::CoordinateConverter::OscParsFromCoordNDim const Fitter::CoordNDim coords  )  const
 

Translates between fitter's coordinates and oscillation parameters.

Caller is responsible for deleting the returned parameters

See also:
CoordNDimFromOscPars

Referenced by NC::GetChiSqrFromDerived::EvalAtEx(), NCExtrapolation::GetBestFitOscPars(), and NCExtrapolation::SetBestFitCoordNDim().

NCParameter NC::CoordinateConverter::ParameterForFitParam NCType::EFitParam  par  )  const
 

Definition at line 593 of file NCCoordinateConverter.cxx.

References FitterIndex(), and ParameterForFitterIndex().

Referenced by AxesForParameter(), AxesForParameters(), NC::FitMaster::DrawAndWriteContourGraphs(), and NC::FitMaster::Run().

00594 {
00595   return ParameterForFitterIndex(FitterIndex(par));
00596 }

NCParameter NC::CoordinateConverter::ParameterForFitterIndex int  idx  )  const
 

Definition at line 584 of file NCCoordinateConverter.cxx.

References fFitParams.

Referenced by AxesForParameter(), AxesForParameters(), NC::FitMaster::GetBestFitPointAsRegistry(), ParameterForFitParam(), and NC::FitMaster::Run().

00585 {
00586   assert(idx >= 0 && idx < int(fFitParams.size()));
00587 
00588   return fFitParams[idx];
00589 }

void NC::CoordinateConverter::Prepare const Registry r,
bool  hush = false
 

Definition at line 344 of file NCCoordinateConverter.cxx.

References NCType::EOscModel, fFitParams, fFixedVals, fOscillationModel, fPrecScale, Registry::Get(), MSG, PrepareOscillations(), and PrepareSystematics().

Referenced by NCExtrapolationModule::GetListOfShifts(), NC::FitMaster::Prepare(), and NCExtrapolation::Prepare().

00345 {
00346   int    tmpi;
00347   double tmpd;
00348 
00349   if(r.Get("DeltaCP3FlavorVal", tmpd)) fFixedVals[kDelta13]    = tmpd;
00350   if(r.Get("UE3SqrVal",         tmpd)) fFixedVals[kUE3Sqr]     = tmpd;
00351   if(r.Get("Theta13Val",        tmpd)) fFixedVals[kTheta13]    = tmpd;
00352   if(r.Get("Delta1Val",         tmpd)) fFixedVals[kDelta1]     = tmpd;
00353   if(r.Get("Delta2Val",         tmpd)) fFixedVals[kDelta2]     = tmpd;
00354   if(r.Get("Theta14Val",        tmpd)) fFixedVals[kTheta14]    = tmpd;
00355   if(r.Get("Theta24Val",        tmpd)) fFixedVals[kTheta24]    = tmpd;
00356   if(r.Get("Theta23Val",        tmpd)) fFixedVals[kTheta23]    = tmpd;
00357 
00358 
00359   if(r.Get("PrecScale",         tmpd)) fPrecScale         = tmpd;
00360 
00361   if(r.Get("OscillationModel",  tmpi)) fOscillationModel  = NCType::EOscModel(tmpi);
00362 
00363   PrepareOscillations(r);
00364   PrepareSystematics(r);
00365 
00366   if(!hush){
00367     MSG("NCCoordConv", Msg::kInfo) << "parameter names, labels, etc:" << endl;
00368 
00369     for(unsigned int i = 0; i < fFitParams.size(); ++i)
00370       MSG("NCCoordConv", Msg::kInfo) << fFitParams[i].ShortName() << "\t"
00371                                      << fFitParams[i].LatexName() << "\t"
00372                                      << fFitParams[i].Min() << " to "
00373                                      << fFitParams[i].Max() << " in "
00374                                      << fFitParams[i].Precision() << " with "
00375                                      << (fFitParams[i].UseLimits() ?
00376                                          "binding" : "non-binding")
00377                                      << " limits" << endl;
00378   }
00379 }

void NC::CoordinateConverter::PrepareOscillations const Registry r  )  [private]
 

Adds the systematics required for fOscillationModel to fFitParams.

Definition at line 164 of file NCCoordinateConverter.cxx.

References AddParameter(), fLoc, fOscillationModel, Registry::Get(), NCType::kDecay, NCType::kDecoherence, NCType::kFourFlavorDelta41Is0, NCType::kFourFlavorDelta43Is0, NCType::kFourFlavorDelta43IsBig, NCType::kFourFlavorGeneral, NCType::kNoOscillations, NCType::kSterileFraction, NCType::kSterileFractionTauNorm, and NCType::kThreeFlavor.

Referenced by Prepare().

00165 {
00166   const int    kNumUMu3SqrBins     = 100;
00167   const double kUMu3SqrStart       = 1e-3;
00168   const double kUMu3SqrEnd         = 1;
00169   const double kDeltaUMu3Sqr       = (kUMu3SqrEnd-kUMu3SqrStart)/kNumUMu3SqrBins;
00170 
00171   const int    kNumDeltaMSqrBins   = 300;
00172   const double kDeltaMSqrStart     = 1.5;
00173   const double kDeltaMSqrEnd       = 4.5;
00174   const double kDeltaDeltaMSqr     = (kDeltaMSqrEnd-kDeltaMSqrStart)/kNumDeltaMSqrBins;
00175 
00176   int tmpb;
00177 
00178   switch(fOscillationModel){
00179   case kThreeFlavor:
00180     fLoc[kDeltaMSqr32] = AddParameter("dmsq_32", "#Deltam^{2}_{32} (10^{-3} eV^{2})",
00181                                       kDeltaMSqrStart,
00182                                       kDeltaMSqrEnd,
00183                                       kDeltaDeltaMSqr, true);
00184 
00185     if(r.Get("FitUE3Sqr", tmpb) && tmpb){
00186       fLoc[kTheta13] = AddParameter("theta13", "#theta_{13}",
00187                                     0, TMath::Pi()*2, -1, true);
00188     }
00189 
00190     if(r.Get("FitTheta23", tmpb) && tmpb){
00191       fLoc[kTheta23] = AddParameter("theta23", "#theta_{23}",
00192                                     0, TMath::Pi()*2, -1, true);
00193     }
00194 
00195     return;
00196 
00197   case kNoOscillations:
00198     return;
00199 
00200   case kFourFlavorGeneral:
00201   case kFourFlavorDelta43IsBig:
00202   case kFourFlavorDelta43Is0:
00203   case kFourFlavorDelta41Is0:
00204 
00205     if(r.Get("FitTheta13", tmpb) && tmpb){
00206       fLoc[kTheta13] = AddParameter("theta13", "#theta_{13}",
00207                                     0, TMath::Pi()*2, -1, true);
00208     }
00209 
00210     if(r.Get("FitTheta23", tmpb) && tmpb){
00211       fLoc[kTheta23] = AddParameter("theta23", "#theta_{23}",
00212                                     0, TMath::Pi()/2, -1, true);
00213     }
00214 
00215     if(fOscillationModel != kFourFlavorDelta41Is0){
00216 
00217       if(r.Get("FitTheta14", tmpb) && tmpb){
00218         fLoc[kTheta14] = AddParameter("theta14", "#theta_{14}",
00219                                       0, TMath::Pi()*2, -1, true);
00220       }
00221 
00222       if(r.Get("FitTheta24", tmpb) && tmpb){
00223         fLoc[kTheta24] = AddParameter("theta24", "#theta_{24}",
00224                                       0, TMath::Pi()/3, -1, true);
00225       }
00226 
00227       if(r.Get("FitDelta1", tmpb) && tmpb){
00228         fLoc[kDelta1] = AddParameter("delta1", "#delta_{1}",
00229                                      0, TMath::Pi()*2, -1, true);
00230       }
00231       
00232       if(fOscillationModel != kFourFlavorDelta43Is0){
00233         if(r.Get("FitDelta2", tmpb) && tmpb){
00234           fLoc[kDelta2] = AddParameter("delta2", "#delta_{2}",
00235                                        0, TMath::Pi()*2, -1, true);
00236         }
00237       }
00238     } // end if not Delta41=0
00239 
00240     if(fOscillationModel != kFourFlavorDelta43Is0){
00241       fLoc[kTheta34] = AddParameter("theta34", "#theta_{34}",
00242                                     0, TMath::Pi()/3, -1, true);
00243     }
00244 
00245 
00246     // TODO - How big should the ranges on all these mass scales be?
00247     fLoc[kDeltaMSqr31] = AddParameter("dmsq_31", "#Deltam^{2}_{31} (10^{-3} eV^{2})",
00248                                       kDeltaMSqrStart,
00249                                       kDeltaMSqrEnd,
00250                                       kDeltaDeltaMSqr, true);
00251 
00252     if(fOscillationModel != kFourFlavorDelta43IsBig &&
00253        fOscillationModel != kFourFlavorDelta43Is0 &&
00254        fOscillationModel != kFourFlavorDelta41Is0){
00255 
00256       fLoc[kDeltaMSqr41] = AddParameter("dmsq_41", "#Deltam^{2}_{41} (10^{-3} eV^{2})",
00257                                         kDeltaMSqrStart,
00258                                         kDeltaMSqrEnd,
00259                                         kDeltaDeltaMSqr, true);
00260 
00261       fLoc[kDeltaMSqr43] = AddParameter("dmsq_43", "#Deltam^{2}_{43} (10^{-3} eV^{2})",
00262                                         kDeltaMSqrStart,
00263                                         kDeltaMSqrEnd,
00264                                         kDeltaDeltaMSqr, true);
00265     }
00266 
00267     return;
00268 
00269   case kSterileFraction:
00270     fLoc[kFs] = AddParameter("fs", "f_{s}", 0, 1, -1, true);
00271 
00272     fLoc[kUMu3Sqr] = AddParameter("umu3", "|U_{#mu3}|^{2}",
00273                                   kUMu3SqrStart,
00274                                   kUMu3SqrEnd,
00275                                   kDeltaUMu3Sqr, true);
00276 
00277     fLoc[kDeltaMSqr32] = AddParameter("dmsq",
00278                                       "#Deltam^{2}_{32} (10^{-3} eV^{2})",
00279                                       kDeltaMSqrStart,
00280                                       kDeltaMSqrEnd,
00281                                       kDeltaDeltaMSqr, true);
00282 
00283     if(r.Get("FitUE3Sqr", tmpb) && tmpb){
00284       fLoc[kUE3Sqr] = AddParameter("ue3", "|U_{e3}|^{2}", 0, 1, -1, true);
00285     }
00286 
00287     return;
00288 
00289   case kSterileFractionTauNorm:
00290     //fLoc[kFs] = AddParameter("fs", "f_{s}", 0, 1, -1, true);
00291 
00292     fLoc[kUMu3Sqr] = AddParameter("umu3", "|U_{#mu3}|^{2}",
00293                                   kUMu3SqrStart,
00294                                   kUMu3SqrEnd,
00295                                   kDeltaUMu3Sqr, true);
00296     fLoc[kTauScale] = AddParameter("tauscale", "A_{#tau}",
00297                                   -0.1,
00298                                   2,
00299                                   0.01, true);
00300     fLoc[kDeltaMSqr32] = AddParameter("dmsq",
00301                                       "#Deltam^{2}_{32} (10^{-3} eV^{2})",
00302                                       kDeltaMSqrStart,
00303                                       kDeltaMSqrEnd,
00304                                       kDeltaDeltaMSqr, true);
00305     
00306     if(r.Get("FitUE3Sqr", tmpb) && tmpb){
00307       fLoc[kUE3Sqr] = AddParameter("ue3", "|U_{e3}|^{2}", 0, 1, -1, true);
00308     }
00309     return;
00310 
00311   case kDecay:
00312     fLoc[kTheta] = AddParameter("theta", "#theta", 0, TMath::Pi()/2, -1, true);
00313 
00314     fLoc[kAlpha] = AddParameter("alpha", "#alpha (GeV/km)", 0, 8e-3, -1, true);
00315 
00316     // Using a lower limit of zero gets us the pure-decay dchisq
00317     fLoc[kDeltaMSqr] = AddParameter("dmsq_32", "#Deltam^{2} (10^{-3} eV^{2})",0, 4.5, -1, true);
00318 
00319     return;
00320 
00321   case kDecoherence:
00322     fLoc[kTheta] = AddParameter("theta", "#theta", 0, TMath::Pi()/2, -1, true);
00323 
00324     // TODO - range?
00325     fLoc[kMu] = AddParameter("mu", "#mu", 0, 0.2, -1, true);
00326 
00327     return;
00328   }
00329 
00330   assert(0 && "Unknown oscillation model");
00331 }

void NC::CoordinateConverter::PrepareSystematics const Registry r  )  [private]
 

Adds the systematics requested in r to fFitParams.

Definition at line 152 of file NCCoordinateConverter.cxx.

References NCType::kAbsoluteHadronicCalibration, NCType::kCCBackground, NCType::kNCBackground, NCType::kNCNearClean, NCType::kNormalization, NCType::kRelativeHadronicCalibration, NCType::kTrackEnergy, and TryAddSystematic().

Referenced by Prepare().

00153 {
00154   TryAddSystematic(r, kNormalization);
00155   TryAddSystematic(r, kRelativeHadronicCalibration);
00156   TryAddSystematic(r, kAbsoluteHadronicCalibration);
00157   TryAddSystematic(r, kTrackEnergy);
00158   TryAddSystematic(r, kNCBackground);
00159   TryAddSystematic(r, kCCBackground);
00160   TryAddSystematic(r, kNCNearClean);
00161 }

SystPars NC::CoordinateConverter::SystParsFromCoordNDim const Fitter::CoordNDim coord  )  const
 

Translates between fitter's coordinates and systematic parameters.

Referenced by NC::GetChiSqrFromDerived::EvalAtEx(), NCExtrapolation::GetBestFitSysts(), and NCExtrapolation::SetBestFitCoordNDim().

void NC::CoordinateConverter::TryAddSystematic const Registry r,
NCType::EFitParam  p
[private]
 

Add systematic p to fFitParams if r thinks we should.

Definition at line 143 of file NCCoordinateConverter.cxx.

References AddSystematicParameter(), fLoc, and Registry::Get().

Referenced by PrepareSystematics().

00145 {
00146   int tmpb;
00147   TString key = "Fit"+NCType::kParams[p].name;
00148   if(r.Get(key, tmpb) && tmpb) fLoc[p] = AddSystematicParameter(p);
00149 }

vector< double > NC::CoordinateConverter::VectorFromSystPars const NC::SystPars s  )  const
 

Definition at line 727 of file NCCoordinateConverter.cxx.

References NCType::EFitParam, NC::SystPars::fShifts, IsFit(), IsSystematic(), NCType::kParams, s(), and NCType::ParamDef::sigma.

Referenced by NCExtrapolationPID::FindSpectraForPars(), NCExtrapolationFarNear::FindSpectraForPars(), NCExtrapolationBeamMatrix::FindSpectraForPars(), NCExtrapolationBeamMatrix::WriteResources(), and NCExtrapolationPID::WriteSpectra().

00728 {
00729   vector<double> shift;
00730 
00731   for(int n = 0; n < kNumParameters; ++n){
00732     if(!IsSystematic(EFitParam(n))) continue;
00733 
00734     if(IsFit(EFitParam(n))) shift.push_back(s.fShifts[n]/kParams[n].sigma);
00735   }
00736 
00737   return shift;
00738 }


Member Data Documentation

std::vector<NCParameter> NC::CoordinateConverter::fFitParams
 

List of details of parameters used in the fit.

in the same order as fitter coordinates.

Definition at line 165 of file NCCoordinateConverter.h.

Referenced by AddParameter(), ParameterForFitterIndex(), Prepare(), and NC::FitMaster::Run().

double NC::CoordinateConverter::fFixedVals[NCType::kNumParameters] [private]
 

Mapping from EFitParam constants to fixed value, if the parameter is not fit.

Defaults to -9999

Definition at line 154 of file NCCoordinateConverter.h.

Referenced by ChooseValue(), CoordinateConverter(), and Prepare().

int NC::CoordinateConverter::fLoc[NCType::kNumParameters] [private]
 

Mapping from EFitParam constants to fitter coordinate indices.

-1 means the parameter isn't used in the fit

Definition at line 148 of file NCCoordinateConverter.h.

Referenced by ChooseValue(), CoordinateConverter(), FitterIndex(), IsFit(), PrepareOscillations(), and TryAddSystematic().

NCType::EOscModel NC::CoordinateConverter::fOscillationModel [private]
 

Definition at line 156 of file NCCoordinateConverter.h.

Referenced by Prepare(), and PrepareOscillations().

double NC::CoordinateConverter::fPrecScale [private]
 

Definition at line 158 of file NCCoordinateConverter.h.

Referenced by AddParameter(), and Prepare().


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:10:38 2010 for loon by  doxygen 1.3.9.1