AliPhysics  97344c9 (97344c9)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
 
GetMinimum () const
 
GetMaximum () const
 
void PrintStream (std::ostream &stream) 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...
 

Friends

std::ostream & operator<< (std::ostream &stream, const AliCutValueRange< t > &val)
 

Detailed Description

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

Class containing a range for a value to cut on.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Lawrence Berkeley National Laboratory
Since
Dec 12, 2014

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 12 of file AliCutValueRange.h.

Constructor & Destructor Documentation

Dummy constructor, producing a range open to both sides

Definition at line 25 of file AliCutValueRange.cxx.

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

Constructor, producing a range closed to both sides

Parameters
[in]minlower limit
[in]maxupper limit

Definition at line 34 of file AliCutValueRange.cxx.

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

Constructor, producing a range closed to both sides

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

Definition at line 45 of file AliCutValueRange.cxx.

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

Destructor, nothing to do

Definition at line 54 of file AliCutValueRange.h.

Member Function Documentation

template<typename t>
t EMCalTriggerPtAnalysis::AliCutValueRange< t >::GetMaximum ( ) const
inline

Get the maximum value of the cut range

Returns
maximum value of the cut range

Definition at line 116 of file AliCutValueRange.h.

template<typename t>
t EMCalTriggerPtAnalysis::AliCutValueRange< t >::GetMinimum ( ) const
inline

Get the minimum value of the cut range

Returns
minimum value of the cut range

Definition at line 111 of file AliCutValueRange.h.

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

Define that the decision should be negated

Definition at line 85 of file AliCutValueRange.h.

template<typename t >
void EMCalTriggerPtAnalysis::AliCutValueRange< t >::PrintStream ( std::ostream &  stream) const

Print cut values to the ostream

Parameters
[in]streamstream used for printout

Definition at line 86 of file AliCutValueRange.cxx.

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

Set a limit

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

Definition at line 69 of file AliCutValueRange.h.

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

Definition at line 58 of file AliCutValueRange.h.

Referenced by EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger::AliAnalysisTaskPtEMCalTrigger(), EMCalTriggerPtAnalysis::AliEMCalTriggerClusterAnalysisComponent::AliEMCalTriggerClusterAnalysisComponent(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalPatchesRef::SetCentralityRange(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClustersRef::SetCentralityRange(), EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger::SetClusterEnergyRange(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClusterMatched::SetClusterTimeRange(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClustersRef::SetClusterTimeRange(), EMCalTriggerPtAnalysis::AliEMCalTriggerClusterAnalysisComponent::SetEnergyRange(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesMCTriggerMimic::SetEtaCMSCut(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesRef::SetEtaCMSCut(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesMCTriggerMimic::SetEtaLabCut(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesRef::SetEtaLabCut(), EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger::SetEtaRange(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalTriggerEmulation::SetEtaRange(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalTriggerEmulation::SetPhiRange(), EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger::SetPtRange(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesMCTriggerMimic::SetTrackPhiCut(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesRef::SetTrackPhiCut(), EMCalTriggerPtAnalysis::AliEMCalTriggerEventSelection::SetVertexCut(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalTriggerBase::SetVertexCut(), and EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger::SetVertexRange().

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

Define that decision should not be negated

Definition at line 89 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
[in]doUseif true we use larger equal, otherwise larger

Definition at line 94 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
[in]doUseif true we use smaller equal, otherwise smaller

Definition at line 99 of file AliCutValueRange.h.

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

Make cut range open in one direction

Parameters
[in]isUpperIndictator for upper (true) or lower (false)

Definition at line 78 of file AliCutValueRange.h.

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

Definition at line 63 of file AliCutValueRange.h.

Friends And Related Function Documentation

template<typename t>
std::ostream& operator<< ( std::ostream &  stream,
const AliCutValueRange< t > &  val 
)
friend

Definition at line 91 of file AliCutValueRange.cxx.

Member Data Documentation

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 129 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 128 of file AliCutValueRange.h.

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


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