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

NCParameter Class Reference

Description of a parameter in the oscillation fit. More...

#include <NCParameter.h>

Inheritance diagram for NCParameter:

NCSystParameter List of all members.

Public Member Functions

 NCParameter ()
 NCParameter (std::string shortName, std::string latexName, double min, double max, double prec, bool useLimits, bool logScale=false)
double ValFromStep (int step) const
double ValFromStep (double step) const
 for translation of contour points
int StepFromVal (double val) const
std::string ShortName () const
std::string LatexName () const
double Min () const
double Max () const
double Precision () const
int Steps () const
bool UseLimits () const
void Rename (std::string shortName, std::string latexName)
void SetRange (double min, double max)
void SetPrecision (double prec)

Protected Attributes

std::string fShortName
std::string fLatexName
double fMin
double fMax
int fSteps
double fPrec
bool fUseLimits
bool fLogScale
 Are steps in this parameter distributed logarithmically?
double fLogMin
 If fLogScale then these are log(fMin) and log(fMax).
double fLogMax
 If fLogScale then these are log(fMin) and log(fMax).

Detailed Description

Description of a parameter in the oscillation fit.

Definition at line 15 of file NCParameter.h.


Constructor & Destructor Documentation

NCParameter::NCParameter  )  [inline]
 

Definition at line 18 of file NCParameter.h.

00018 {}

NCParameter::NCParameter std::string  shortName,
std::string  latexName,
double  min,
double  max,
double  prec,
bool  useLimits,
bool  logScale = false
 

Definition at line 16 of file NCParameter.cxx.

References max, min, SetPrecision(), and SetRange().

00023   : fShortName(shortName),
00024     fLatexName(latexName),
00025     fPrec(prec),
00026     fUseLimits(limits),
00027     fLogScale(logScale)
00028 {
00029   SetRange(min, max);
00030   SetPrecision(prec);
00031 }


Member Function Documentation

std::string NCParameter::LatexName  )  const [inline]
 

Definition at line 32 of file NCParameter.h.

Referenced by AxesForNCParameter(), AxesForNCParameters(), NC::Fitter::ConvertGrid(), NC::Fitter::Make2DSlices(), operator<<(), and NC::FitMaster::Run().

00032 {return fLatexName;}

double NCParameter::Max void   )  const [inline]
 

Definition at line 34 of file NCParameter.h.

Referenced by AxesForNCParameter(), AxesForNCParameters(), NC::Fitter::CreateOneDimProjection(), NC::Fitter::Make2DSlices(), and operator<<().

00034 {return fMax;}

double NCParameter::Min void   )  const [inline]
 

Definition at line 33 of file NCParameter.h.

Referenced by AxesForNCParameter(), AxesForNCParameters(), NC::Fitter::CreateOneDimProjection(), NC::Fitter::Make2DSlices(), and operator<<().

00033 {return fMin;}

double NCParameter::Precision  )  const [inline]
 

Definition at line 35 of file NCParameter.h.

Referenced by NC::Fitter::CreateOneDimProjection(), and NC::Fitter::Make2DSlices().

00035 {return fPrec;}

void NCParameter::Rename std::string  shortName,
std::string  latexName
 

Definition at line 56 of file NCParameter.cxx.

References fLatexName, and fShortName.

00057 {
00058   fShortName = shortName;
00059   fLatexName = latexName;
00060 }

void NCParameter::SetPrecision double  prec  ) 
 

Definition at line 74 of file NCParameter.cxx.

References fMax, fMin, fPrec, and fSteps.

Referenced by NCParameter().

00075 {
00076   fPrec = prec;
00077 
00078   // TODO - what about log scales?
00079   fSteps = int((fMax-fMin)/fPrec+.5);
00080 }

void NCParameter::SetRange double  min,
double  max
 

Definition at line 63 of file NCParameter.cxx.

References fLogMax, fLogMin, fMax, and fMin.

Referenced by NCParameter().

00064 {
00065   fMin = min;
00066   fMax = max;
00067 
00068   if(fLogScale){
00069     fLogMin = log(fMin);
00070     fLogMax = log(fMax);
00071   }
00072 }

std::string NCParameter::ShortName  )  const [inline]
 

Definition at line 31 of file NCParameter.h.

Referenced by AxesForNCParameter(), AxesForNCParameters(), NC::Fitter::CreateOneDimProjection(), NC::FitMaster::DrawAndWriteContourGraphs(), NC::FitMaster::GetBestFitPointAsRegistry(), NC::Fitter::Make2DSlices(), operator<<(), and NC::FitMaster::Run().

00031 {return fShortName;}

int NCParameter::StepFromVal double  val  )  const
 

Definition at line 48 of file NCParameter.cxx.

References fLogMax, fLogMin, fMax, fMin, and fSteps.

00049 {
00050   if(fLogScale) return int(.5+fSteps*(log(val)-fLogMin)/(fLogMax-fLogMin));
00051 
00052   return int(.5+fSteps*(val-fMin)/(fMax-fMin));
00053 }

int NCParameter::Steps  )  const [inline]
 

Definition at line 36 of file NCParameter.h.

Referenced by operator<<().

00036 {return fSteps;}

bool NCParameter::UseLimits  )  const [inline]
 

Definition at line 38 of file NCParameter.h.

00038 {return fUseLimits;}

double NCParameter::ValFromStep double  step  )  const
 

for translation of contour points

Definition at line 40 of file NCParameter.cxx.

00041 {
00042   if(fLogScale) return exp(fLogMin+step/fSteps*(fLogMax-fLogMin));
00043 
00044   return fMin+step*fPrec;
00045 }

double NCParameter::ValFromStep int  step  )  const
 

Definition at line 34 of file NCParameter.cxx.

Referenced by NC::Fitter::ConvertGrid().

00035 {
00036   return ValFromStep(double(step));
00037 }


Member Data Documentation

std::string NCParameter::fLatexName [protected]
 

Definition at line 46 of file NCParameter.h.

Referenced by Rename().

double NCParameter::fLogMax [protected]
 

If fLogScale then these are log(fMin) and log(fMax).

Definition at line 58 of file NCParameter.h.

Referenced by SetRange(), and StepFromVal().

double NCParameter::fLogMin [protected]
 

If fLogScale then these are log(fMin) and log(fMax).

Definition at line 58 of file NCParameter.h.

Referenced by SetRange(), and StepFromVal().

bool NCParameter::fLogScale [protected]
 

Are steps in this parameter distributed logarithmically?

Definition at line 56 of file NCParameter.h.

double NCParameter::fMax [protected]
 

Definition at line 49 of file NCParameter.h.

Referenced by SetPrecision(), SetRange(), and StepFromVal().

double NCParameter::fMin [protected]
 

Definition at line 48 of file NCParameter.h.

Referenced by SetPrecision(), SetRange(), and StepFromVal().

double NCParameter::fPrec [protected]
 

Definition at line 52 of file NCParameter.h.

Referenced by SetPrecision().

std::string NCParameter::fShortName [protected]
 

Definition at line 45 of file NCParameter.h.

Referenced by Rename().

int NCParameter::fSteps [protected]
 

Definition at line 51 of file NCParameter.h.

Referenced by SetPrecision(), and StepFromVal().

bool NCParameter::fUseLimits [protected]
 

Definition at line 53 of file NCParameter.h.


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