PandaRoot
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 ()
 

Detailed Description

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

Definition at line 52 of file StepLimits.h.

Constructor & Destructor Documentation

◆ StepLimits()

genfit::StepLimits::StepLimits ( )
inline

Definition at line 55 of file StepLimits.h.

References operator=().

55 : limits_(ENUM_NR_ITEMS, maxLimit_), stepSign_(1) { ; }

Member Function Documentation

◆ getLimit()

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 60 of file StepLimits.h.

Referenced by getLimitSigned().

60 { return limits_[type]; }

◆ getLimitSigned()

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

Definition at line 61 of file StepLimits.h.

References getLimit(), getLowestLimit(), and getLowestLimitVal().

61 { return stepSign_ * getLimit(type); }
double getLimit(StepLimitType type) const
Get limit of type. If that limit has not yet been set, return max double value.
Definition: StepLimits.h:60

◆ getLowestLimit()

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

Referenced by getLimitSigned().

◆ getLowestLimitSignedVal()

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 75 of file StepLimits.h.

References getLowestLimitVal().

75 { return getLowestLimitVal(margin) * stepSign_; }
double getLowestLimitVal(double margin=1.E-3) const
Get the unsigned numerical value of the lowest limit.

◆ getLowestLimitVal()

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

Get the unsigned numerical value of the lowest limit.

Referenced by getLimitSigned(), and getLowestLimitSignedVal().

◆ getStepSign()

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

Definition at line 77 of file StepLimits.h.

References reduceLimit().

77 { return stepSign_; } // +- 1

◆ operator=()

StepLimits& genfit::StepLimits::operator= ( const StepLimits other)

Referenced by StepLimits().

◆ Print()

void genfit::StepLimits::Print ( )

Referenced by removeLimit().

◆ reduceLimit()

void genfit::StepLimits::reduceLimit ( StepLimitType  type,
double  value 
)

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

Referenced by getStepSign().

◆ removeLimit()

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

Definition at line 88 of file StepLimits.h.

References Print(), and reset().

88 { limits_[type] = maxLimit_; }

◆ reset()

void genfit::StepLimits::reset ( )

Referenced by removeLimit().

◆ setLimit()

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 82 of file StepLimits.h.

References fabs(), and setStepSign().

82 { limits_[type] = fabs(value); }
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:46

◆ setStepSign() [1/2]

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

sets #stepSign_ to sign of signedVal

Referenced by setLimit().

◆ setStepSign() [2/2]

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

sets #stepSign_ to sign of signedVal


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