#include <GeneralBinFinderInR.h>
Public Types | |
typedef RBorderFinder::Det | Det |
Public Member Functions | |
virtual int | binIndex (T R) const |
virtual int | binIndex (int i) const |
Returns an index in the valid range. | |
virtual T | binPosition (int ind) const |
The middle of the bin. | |
GeneralBinFinderInR (const RBorderFinder &bf) | |
Construct from an already initialized RBorderFinder. | |
GeneralBinFinderInR () | |
GeneralBinFinderInR (std::vector< Det * >::const_iterator first, std::vector< Det * >::const_iterator last) | |
Construct from the list of Det*. | |
Private Attributes | |
std::vector< T > | theBins |
std::vector< T > | theBorders |
int | theNbins |
A R binfinder for a non-periodic group of detectors.
A R binfinder for a non-periodic group of detectors.
Definition at line 19 of file GeneralBinFinderInR.h.
typedef RBorderFinder::Det GeneralBinFinderInR< T >::Det |
Definition at line 23 of file GeneralBinFinderInR.h.
GeneralBinFinderInR< T >::GeneralBinFinderInR | ( | ) | [inline] |
Definition at line 25 of file GeneralBinFinderInR.h.
{
GeneralBinFinderInR< T >::GeneralBinFinderInR | ( | const RBorderFinder & | bf | ) | [inline] |
Construct from an already initialized RBorderFinder.
Definition at line 28 of file GeneralBinFinderInR.h.
GeneralBinFinderInR< T >::GeneralBinFinderInR | ( | std::vector< Det * >::const_iterator | first, |
std::vector< Det * >::const_iterator | last | ||
) | [inline] |
Construct from the list of Det*.
Definition at line 35 of file GeneralBinFinderInR.h.
References RBorderFinder::RBins(), RBorderFinder::RBorders(), GeneralBinFinderInR< T >::theBins, GeneralBinFinderInR< T >::theBorders, and GeneralBinFinderInR< T >::theNbins.
: theNbins( last-first) { std::vector<Det*> dets(first,last); RBorderFinder bf(dets); theBorders=bf.RBorders(); theBins=bf.RBins(); theNbins=theBins.size(); }
virtual int GeneralBinFinderInR< T >::binIndex | ( | T | R | ) | const [inline, virtual] |
Returns an index in the valid range for the bin that contains AND is closest to R
Implements BaseBinFinder< T >.
Definition at line 49 of file GeneralBinFinderInR.h.
References GeneralBinFinderInR< T >::theBorders.
{ if (R < theBorders[i]){ break; } } return binIndex(i-1); }
virtual int GeneralBinFinderInR< T >::binIndex | ( | int | i | ) | const [inline, virtual] |
Returns an index in the valid range.
Implements BaseBinFinder< T >.
Definition at line 60 of file GeneralBinFinderInR.h.
{
virtual T GeneralBinFinderInR< T >::binPosition | ( | int | ind | ) | const [inline, virtual] |
The middle of the bin.
Implements BaseBinFinder< T >.
Definition at line 65 of file GeneralBinFinderInR.h.
: int theNbins;
std::vector<T> GeneralBinFinderInR< T >::theBins [private] |
Definition at line 73 of file GeneralBinFinderInR.h.
Referenced by GeneralBinFinderInR< T >::GeneralBinFinderInR().
std::vector<T> GeneralBinFinderInR< T >::theBorders [private] |
Definition at line 72 of file GeneralBinFinderInR.h.
Referenced by GeneralBinFinderInR< T >::binIndex(), and GeneralBinFinderInR< T >::GeneralBinFinderInR().
int GeneralBinFinderInR< T >::theNbins [private] |
Definition at line 71 of file GeneralBinFinderInR.h.
Referenced by GeneralBinFinderInR< T >::GeneralBinFinderInR().