XeRange Class Reference

General class to handle range of points It is described by nBins bins and isn't optimised for special cases of bin widths. More...

#include <XeMath.h>

Inheritance diagram for XeRange:
XeMath XeObject XeCore XeCore GeneralRange LinearRange LogRange PRLMassRange SchwenkYRange ErRange EventRange S1Range tValueRange VEscRange YRange MassRange SigmaRange

List of all members.

Public Member Functions

double centerOfBin (int index)
 return center of "bin" between indexAndNextOne
void completeRange ()
 Fill internal members, especially the vector of values.
virtual double computeValue (int index)=0
 compute value corresponding to index
virtual double computeValue (double fractIndex)=0
 compute value corresponding to partial bin number
XeRangefindDefaultRange ()
 check whether this range is equal to an already defined default (log or lin)
int getClosestIndex (double test)
 get the index of the value closest to a test valie
virtual int getIndex (double x)=0
 return index corresponding to a value
pair< double, double > getInterval (int i)
 return limits of a given interval
double getMax ()
 return the highest value
double getMin ()
 return the lowest value
int getMode ()
 get the mode
int getNBins ()
 Get the number of bins.
double getNextValue (int index)
 return x-value for a index after given index
int getNPoints ()
 Get the number of points.
int getReferenceIndex ()
 return the index of the value closest to default
double getStep ()
 return the (logarithmic) step, whenever defined
vector< double > * getTheValues ()
 return vector of the x-values
double getValue (int index)
 return x-value for a given index
double * getValues ()
 return x-values
bool isGeneral ()
 Is it general?
bool isLinear ()
 Is it linear?
bool isLogarithmic ()
 Is it logarithmic?
bool operator== (const XeRange &other)
 Comparison operator.
bool printIt (int level=1)
 print it, as requested because it's an XeObject
void setReferenceIndex (double def)
 set the index of the value closest to reference
 XeRange ()
 Empty constructor for ROOT.
 XeRange (string what, int n, double a, double b, int mode)
 Constructor.
virtual ~XeRange ()
 Destructor.

Static Public Member Functions

static ErRangegetDefaultErRange ()
 Get the default ERecoil XeRange, instantiate it if necessary.
static EventRangegetDefaultEventRange ()
 Get the default Number of event XeRange, instantiate it if necessary.
static MassRangegetDefaultMassRange ()
 Get the default Mass XeRange, instantiate it if necessary.
static S1RangegetDefaultS1Range ()
 Get the default S1 XeRange, instantiate it if necessary.
static SigmaRangegetDefaultSigmaRange ()
 Get the default Sigma XeRange, instantiate it if necessary.
static tValueRangegetDefaultTValueRange ()
 Get the default t-value XeRange, instantiate it if necessary.
static VEscRangegetDefaultVEscRange ()
 Get the default V-escape XeRange, instantiate it if necessary.
static YRangegetDefaultYRange ()
 Get the default Y XeRange, instantiate it if necessary.
static string getTheName (string name, int n, double v0, double v1)
 Compute the name of the range.

Protected Attributes

double highest
double lowest
int mode
int nBins
int nPoints
int referenceIndex
double step
vector< double > xs

Static Protected Attributes

static ErRangedefaultErRange
static EventRangedefaultEventRange
static MassRangedefaultMassRange
static S1RangedefaultS1Range
static SigmaRangedefaultSigmaRange
static tValueRangedefaultTValueRange
static VEscRangedefaultVEscRange
static YRangedefaultYRange

Detailed Description

General class to handle range of points It is described by nBins bins and isn't optimised for special cases of bin widths.


Constructor & Destructor Documentation

XeRange::XeRange ( string  what,
int  n,
double  a,
double  b,
int  mode 
)

Constructor.

Parameters:
what name of the quantity
n number of points
a lowest value
b hightest value
mode either LINEAR, LOG, or GENERAL

Member Function Documentation

virtual double XeRange::computeValue ( int  index  )  [pure virtual]

compute value corresponding to index

Parameters:
index index

Implemented in GeneralRange, LogRange, and LinearRange.

virtual double XeRange::computeValue ( double  fractIndex  )  [pure virtual]

compute value corresponding to partial bin number

Parameters:
fractIndex fractional index

Implemented in GeneralRange, LogRange, and LinearRange.

XeRange* XeRange::findDefaultRange (  ) 

check whether this range is equal to an already defined default (log or lin)

Returns:
The default range if found, NULL if not
int XeRange::getClosestIndex ( double  test  ) 

get the index of the value closest to a test valie

Parameters:
test the test value
virtual int XeRange::getIndex ( double  x  )  [pure virtual]

return index corresponding to a value

Parameters:
x input value

Implemented in GeneralRange, LogRange, and LinearRange.

pair<double,double> XeRange::getInterval ( int  i  ) 

return limits of a given interval

Returns:
pair of double
int XeRange::getMode (  ) 

get the mode

Returns:
LINEAR, LOG, or GENERAL
vector<double>* XeRange::getTheValues (  ) 

return vector of the x-values

Returns:
pointer to the vector of x-values
double* XeRange::getValues (  ) 

return x-values

Returns:
pointer to the x-values

Member Data Documentation

ErRange* XeRange::defaultErRange [static, protected]

default ERecoil XeRange

EventRange* XeRange::defaultEventRange [static, protected]

default nEventsXeRange

MassRange* XeRange::defaultMassRange [static, protected]

default Mass XeRange

S1Range* XeRange::defaultS1Range [static, protected]

default S1(p.e.p) XeRange

SigmaRange* XeRange::defaultSigmaRange [static, protected]

default Sigma XeRange

default t-value XeRange

VEscRange* XeRange::defaultVEscRange [static, protected]

default V-escape XeRange

YRange* XeRange::defaultYRange [static, protected]

default Y XeRange

double XeRange::highest [protected]

largest value

double XeRange::lowest [protected]

smallest value

int XeRange::mode [protected]

either LINEAR, LOG, or GENERAL

int XeRange::nBins [protected]

number of "bins" = nPoints-1

int XeRange::nPoints [protected]

number of points

int XeRange::referenceIndex [protected]

index of value closest to default value

double XeRange::step [protected]

step, whenever defined

vector<double> XeRange::xs [protected]

all values


The documentation for this class was generated from the following file:
 All Classes Functions Variables

Generated on 10 Apr 2015 for Xephyr by  doxygen 1.6.1