AliPhysics  v5-07-18-02 (20ec537)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
EMCalTriggerPtAnalysis::AliCutValueRange< t > Class Template Reference

Class containing a range for a value to cut on. More...

#include <AliCutValueRange.h>

Inheritance diagram for EMCalTriggerPtAnalysis::AliCutValueRange< t >:

Public Member Functions

 AliCutValueRange ()
 
 AliCutValueRange (t min, t max)
 
 AliCutValueRange (t limit, bool isUpper)
 
virtual ~AliCutValueRange ()
 
void SetLimits (t min, t max)
 
void UnsetLimits ()
 
void SetLimit (t value, bool isUpper)
 
void UnsetLimit (bool isUpper)
 
void Negate ()
 
void SetPositive ()
 
void SetUseLargerEqual (Bool_t doUse=true)
 
void SetUseSmallerEqual (Bool_t doUse=true)
 
bool IsInRange (t value) const
 

Private Attributes

fLimits [2]
 Specifies the limit in either of the direction (not used unless fHasLimit of that direction is true) More...
 
bool fHasLimit [2]
 Specifies whether limit in any of the two directions is set. More...
 
bool fNegate
 Defines whether result should be inverted. More...
 
bool fUseSmallerEqual
 Use smaller equal for upper bound (true by default) More...
 
bool fUseLargerEqual
 Use larger equal for lower bound (true by default) More...
 

Detailed Description

template<typename t>
class EMCalTriggerPtAnalysis::AliCutValueRange< t >

Class containing a range for a value to cut on.

Class defining a range in which a value to be checked is valid. Can be used as a cut. In case a negative comparison (value valid only outside this range) is desired, this is handled when setting the object to negate (function Negate()). The class is a template, expecting the comparison operators to be overloaded.

Definition at line 35 of file AliCutValueRange.h.

Constructor & Destructor Documentation

Dummy constructor, producing a range open to both sides

Definition at line 27 of file AliCutValueRange.cxx.

template<typename t>
EMCalTriggerPtAnalysis::AliCutValueRange< t >::AliCutValueRange ( min,
max 
)

Constructor, producing a range closed to both sides

Parameters
minlower limit
maxupper limit

Definition at line 42 of file AliCutValueRange.cxx.

template<typename t>
EMCalTriggerPtAnalysis::AliCutValueRange< t >::AliCutValueRange ( limit,
bool  isUpper 
)

Constructor, producing a range closed to both sides

Parameters
limitthe limit to be set
isUpperdefining whether the limit is the upper (case true) or lower limit

Definition at line 59 of file AliCutValueRange.cxx.

template<typename t>
virtual EMCalTriggerPtAnalysis::AliCutValueRange< t >::~AliCutValueRange ( )
inlinevirtual

Destructor, nothing to do

Definition at line 43 of file AliCutValueRange.h.

Member Function Documentation

template<typename t>
bool EMCalTriggerPtAnalysis::AliCutValueRange< t >::IsInRange ( value) const

Check whether value is within a given range

Parameters
valuevalue to be checked
Returns
comparison result

Definition at line 82 of file AliCutValueRange.cxx.

Referenced by EMCalTriggerPtAnalysis::AliEMCalTriggerEventSelection::IsEventSelected(), EMCalTriggerPtAnalysis::AliEMCalTriggerClusterAnalysisComponent::Process(), and EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger::Run().

template<typename t>
void EMCalTriggerPtAnalysis::AliCutValueRange< t >::Negate ( )
inline

Define that the decision should be negated

Definition at line 72 of file AliCutValueRange.h.

template<typename t>
void EMCalTriggerPtAnalysis::AliCutValueRange< t >::SetLimit ( value,
bool  isUpper 
)
inline

Set a limit

Parameters
valueValue of the limit
isUpperIndicator for upper (true) or lower (false) limit

Definition at line 56 of file AliCutValueRange.h.

template<typename t>
void EMCalTriggerPtAnalysis::AliCutValueRange< t >::SetPositive ( )
inline

Define that decision should not be negated

Definition at line 76 of file AliCutValueRange.h.

template<typename t>
void EMCalTriggerPtAnalysis::AliCutValueRange< t >::SetUseLargerEqual ( Bool_t  doUse = true)
inline

Define whether we use larger equal instead of larger

Parameters
doUse

Definition at line 81 of file AliCutValueRange.h.

template<typename t>
void EMCalTriggerPtAnalysis::AliCutValueRange< t >::SetUseSmallerEqual ( Bool_t  doUse = true)
inline

Define whether we use smaller equal instead of smaller

Parameters
doUseif true we use smaller equal, otherwise smaller

Definition at line 86 of file AliCutValueRange.h.

template<typename t>
void EMCalTriggerPtAnalysis::AliCutValueRange< t >::UnsetLimit ( bool  isUpper)
inline

Make cut range open in one direction

Parameters
isUpperIndictator for upper (true) or lower (false)

Definition at line 65 of file AliCutValueRange.h.

template<typename t>
void EMCalTriggerPtAnalysis::AliCutValueRange< t >::UnsetLimits ( )
inline

Definition at line 50 of file AliCutValueRange.h.

Member Data Documentation

template<typename t>
t EMCalTriggerPtAnalysis::AliCutValueRange< t >::fLimits[2]
private

Specifies the limit in either of the direction (not used unless fHasLimit of that direction is true)

Definition at line 90 of file AliCutValueRange.h.

Referenced by EMCalTriggerPtAnalysis::AliCutValueRange< t >::AliCutValueRange(), EMCalTriggerPtAnalysis::AliCutValueRange< double >::SetLimit(), and EMCalTriggerPtAnalysis::AliCutValueRange< double >::SetLimits().

template<typename t>
bool EMCalTriggerPtAnalysis::AliCutValueRange< t >::fNegate
private
template<typename t>
bool EMCalTriggerPtAnalysis::AliCutValueRange< t >::fUseLargerEqual
private

Use larger equal for lower bound (true by default)

Definition at line 94 of file AliCutValueRange.h.

Referenced by EMCalTriggerPtAnalysis::AliCutValueRange< double >::SetUseLargerEqual().

template<typename t>
bool EMCalTriggerPtAnalysis::AliCutValueRange< t >::fUseSmallerEqual
private

Use smaller equal for upper bound (true by default)

Definition at line 93 of file AliCutValueRange.h.

Referenced by EMCalTriggerPtAnalysis::AliCutValueRange< double >::SetUseSmallerEqual().


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