FairRoot/PandaRoot
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
genfit::StepLimits Class Reference

Helper to store different limits on the stepsize for the RKTRackRep. More...

#include <StepLimits.h>

Public Member Functions

 StepLimits ()
 
StepLimitsoperator= (const StepLimits &other)
 
double getLimit (StepLimitType type) const
 Get limit of type. If that limit has not yet been set, return max double value. More...
 
double getLimitSigned (StepLimitType type) const
 
std::pair< StepLimitType, double > getLowestLimit (double margin=1.E-3) const
 Get the lowest limit. More...
 
double getLowestLimitVal (double margin=1.E-3) const
 Get the unsigned numerical value of the lowest limit. More...
 
double getLowestLimitSignedVal (double margin=1.E-3) const
 Get the numerical value of the lowest limit, signed with stepSign_. More...
 
char getStepSign () const
 
void reduceLimit (StepLimitType type, double value)
 absolute of value will be taken! If limit is already lower, it will stay. More...
 
void setLimit (StepLimitType type, double value)
 absolute of value will be taken! If limit is already lower, it will be set to value anyway. More...
 
void setStepSign (char signedVal)
 sets stepSign_ to sign of signedVal More...
 
void setStepSign (double signedVal)
 sets stepSign_ to sign of signedVal More...
 
void removeLimit (StepLimitType type)
 
void reset ()
 
void Print ()
 

Private Attributes

std::vector< double > limits_
 
signed char stepSign_
 

Static Private Attributes

static const double maxLimit_
 

Detailed Description

Helper to store different limits on the stepsize for the RKTRackRep.

Definition at line 54 of file StepLimits.h.

Constructor & Destructor Documentation

genfit::StepLimits::StepLimits ( )
inline

Definition at line 57 of file StepLimits.h.

std::vector< double > limits_
Definition: StepLimits.h:101
signed char stepSign_
Definition: StepLimits.h:102
static const double maxLimit_
Definition: StepLimits.h:103

Member Function Documentation

double genfit::StepLimits::getLimit ( StepLimitType  type) const
inline

Get limit of type. If that limit has not yet been set, return max double value.

Definition at line 63 of file StepLimits.h.

References limits_.

Referenced by getLimitSigned().

63 {return limits_[type];}
std::vector< double > limits_
Definition: StepLimits.h:101
double genfit::StepLimits::getLimitSigned ( StepLimitType  type) const
inline

Definition at line 64 of file StepLimits.h.

References getLimit(), and stepSign_.

64  {
65  return stepSign_*getLimit(type);
66  }
double getLimit(StepLimitType type) const
Get limit of type. If that limit has not yet been set, return max double value.
Definition: StepLimits.h:63
signed char stepSign_
Definition: StepLimits.h:102
std::pair<StepLimitType, double> genfit::StepLimits::getLowestLimit ( double  margin = 1.E-3) const

Get the lowest limit.

If hard limits are there, medium limits can be exceeded by up to margin (default margin is 0.1, i.e. medium limits can be exceeded by up to 10%). If no limit has been set yet, return std::pair<stp_noLimit, std::numeric_limits<double>::max>.

double genfit::StepLimits::getLowestLimitSignedVal ( double  margin = 1.E-3) const
inline

Get the numerical value of the lowest limit, signed with stepSign_.

Definition at line 80 of file StepLimits.h.

References getLowestLimitVal(), and stepSign_.

80  {
81  return getLowestLimitVal(margin) * stepSign_;
82  }
double getLowestLimitVal(double margin=1.E-3) const
Get the unsigned numerical value of the lowest limit.
signed char stepSign_
Definition: StepLimits.h:102
double genfit::StepLimits::getLowestLimitVal ( double  margin = 1.E-3) const

Get the unsigned numerical value of the lowest limit.

Referenced by getLowestLimitSignedVal().

char genfit::StepLimits::getStepSign ( ) const
inline

Definition at line 84 of file StepLimits.h.

References stepSign_.

84 {return stepSign_;} // +- 1
signed char stepSign_
Definition: StepLimits.h:102
StepLimits& genfit::StepLimits::operator= ( const StepLimits other)
void genfit::StepLimits::Print ( )
void genfit::StepLimits::reduceLimit ( StepLimitType  type,
double  value 
)

absolute of value will be taken! If limit is already lower, it will stay.

void genfit::StepLimits::removeLimit ( StepLimitType  type)
inline

Definition at line 95 of file StepLimits.h.

References limits_, and maxLimit_.

95 {limits_[type] = maxLimit_;}
std::vector< double > limits_
Definition: StepLimits.h:101
static const double maxLimit_
Definition: StepLimits.h:103
void genfit::StepLimits::reset ( )
void genfit::StepLimits::setLimit ( StepLimitType  type,
double  value 
)
inline

absolute of value will be taken! If limit is already lower, it will be set to value anyway.

Definition at line 89 of file StepLimits.h.

References fabs(), and limits_.

89 {limits_[type] = fabs(value);}
std::vector< double > limits_
Definition: StepLimits.h:101
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
void genfit::StepLimits::setStepSign ( char  signedVal)

sets stepSign_ to sign of signedVal

void genfit::StepLimits::setStepSign ( double  signedVal)

sets stepSign_ to sign of signedVal

Member Data Documentation

std::vector<double> genfit::StepLimits::limits_
private

Definition at line 101 of file StepLimits.h.

Referenced by getLimit(), removeLimit(), and setLimit().

const double genfit::StepLimits::maxLimit_
staticprivate

Definition at line 103 of file StepLimits.h.

Referenced by removeLimit().

signed char genfit::StepLimits::stepSign_
private

Definition at line 102 of file StepLimits.h.

Referenced by getLimitSigned(), getLowestLimitSignedVal(), and getStepSign().


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