Pottu
Public Member Functions | Public Attributes | List of all members
pottu::Gate1D< T > Struct Template Reference

Simple 1D gate object for the continous range [low,high[. More...

#include <Gate1D.hpp>

Public Member Functions

bool operator() (const DetectorEvent &det) const noexcept
 Tests gate with detector energy. DEPRECATED!
 
bool operator() (T e) const noexcept
 
int cmp (T e) const noexcept
 Compares with three results, smaller, ingate, bigger. More...
 
bool isInside (T value) const noexcept
 
width () const noexcept
 Returns the width of the gate. More...
 

Public Attributes

low
 
high
 

Detailed Description

template<class T = double>
struct pottu::Gate1D< T >

Simple 1D gate object for the continous range [low,high[.

Member Function Documentation

◆ cmp()

template<class T = double>
int pottu::Gate1D< T >::cmp ( e) const
inlinenoexcept

Compares with three results, smaller, ingate, bigger.

Returns
-1 if e < low, 0 if e >= low && e < high, +1 if e >= high

◆ width()

template<class T = double>
T pottu::Gate1D< T >::width ( ) const
inlinenoexcept

Returns the width of the gate.

Returns
Width of the gate.

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