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

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 
)

Member Function Documentation

std::string NCParameter::LatexName (  )  const [inline]
double NCParameter::Max ( void   )  const [inline]

Definition at line 34 of file NCParameter.h.

References fMax.

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

00034 {return fMax;}

double NCParameter::Min ( void   )  const [inline]

Definition at line 33 of file NCParameter.h.

References fMin.

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

00033 {return fMin;}

double NCParameter::Precision (  )  const [inline]

Definition at line 35 of file NCParameter.h.

References fPrec.

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

00035 {return fPrec;}

void NCParameter::Rename ( std::string  shortName,
std::string  latexName 
)
void NCParameter::SetPrecision ( double  prec  ) 

Definition at line 74 of file NCParameter.cxx.

References fMax, fMin, fPrec, and fSteps.

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, fLogScale, fMax, and fMin.

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]
int NCParameter::StepFromVal ( double  val  )  const

Definition at line 48 of file NCParameter.cxx.

References fLogMax, fLogMin, fLogScale, 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.

References fSteps.

Referenced by operator<<().

00036 {return fSteps;}

bool NCParameter::UseLimits (  )  const [inline]

Definition at line 38 of file NCParameter.h.

References fUseLimits.

00038 {return fUseLimits;}

double NCParameter::ValFromStep ( double  step  )  const

for translation of contour points

< 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.

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 LatexName().

double NCParameter::fLogMax [protected]

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.

Referenced by SetRange(), and StepFromVal().

double NCParameter::fMax [protected]

Definition at line 49 of file NCParameter.h.

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

double NCParameter::fMin [protected]

Definition at line 48 of file NCParameter.h.

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

double NCParameter::fPrec [protected]

Definition at line 52 of file NCParameter.h.

Referenced by Precision(), and SetPrecision().

std::string NCParameter::fShortName [protected]

Definition at line 45 of file NCParameter.h.

Referenced by ShortName().

int NCParameter::fSteps [protected]

Definition at line 51 of file NCParameter.h.

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

bool NCParameter::fUseLimits [protected]

Definition at line 53 of file NCParameter.h.

Referenced by UseLimits().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1