Class BinningData¶
Defined in File BinningData.hpp
Class Documentation¶
-
class
Acts
::
BinningData
¶ This class holds all the data necessary for the bin calculation.
phi has a very particular behaviour:
there’s the change around +/- PI
it can be multiplicative or additive multiplicative : each major bin has the same sub structure i.e. first binnning
structure is equidistant additive : sub structure replaces one bin (and one bin only)
Public Functions
-
BinningData
(BinningValue bValue, float bMin, float bMax)¶ Constructor for 0D binning.
- Parameters
bValue
: is the binning value: binX, binY, etc.bMin
: is the minum valuebMax
: is the maxmimum value
-
BinningData
(BinningOption bOption, BinningValue bValue, size_t bBins, float bMin, float bMax, std::unique_ptr<const BinningData> sBinData = nullptr, bool sBinAdditive = false)¶ Constructor for equidistant binning and optional sub structure can be mulitplicative or additive.
- Parameters
bOption
: is the binning option : open, closedbValue
: is the binning value: binX, binY, etc.bBins
: is number of equidistant binsbMin
: is the minum valuebMax
: is the maxmimum valuesBinData
: is (optional) sub structuresBinAdditive
: is the prescription for the sub structure
-
BinningData
(BinningOption bOption, BinningValue bValue, const std::vector<float> &bBoundaries, std::unique_ptr<const BinningData> sBinData = nullptr)¶ Constructor for equidistant binning.
- Parameters
bOption
: is the binning option : open / closedbValue
: is the binning value : binX, binY, etc.bBoundaries
: are the bin boundariessBinData
: is (optional) sub structure
-
BinningData
(const BinningData &bdata)¶ Copy constructor.
- Parameters
bdata
: is the source object
-
~BinningData
() = default¶ Destructor.
-
size_t
bins
() const¶ Return the number of bins - including sub bins.
-
const std::vector<float> &
boundaries
() const¶ Return the boundaries - including sub boundaries.
- Return
vector of floats indicating the boundary values
-
float
center
(size_t bin) const¶ Get the center value of a bin.
- Return
float value according to the bin center
- Parameters
bin
: is the bin for which the center value is requested
-
float
centerValue
(size_t bin) const¶ access to the center value this uses the bin boundary vector, it also works with sub structure
- Return
the center value of the bin is given
- Parameters
bin
: is the bin for which the value is requested, if bin > nbins it is set to max
-
bool
decrement
(size_t &bin) const¶ Decrement the bin.
boolean indicates if decrement actually worked
- Parameters
bin
: is the bin to be decremented
-
bool
increment
(size_t &bin) const¶ Increment the bin.
boolean indicates if decrement actually worked
- Parameters
bin
: the bin to be incremented
-
bool
inside
(const Vector3 &position) const¶ Check if bin is inside from Vector3.
- Return
boolen if this is inside() method is true
- Parameters
position
: is the search position in global coordinated
-
bool
inside
(const Vector2 &lposition) const¶ Check if bin is inside from Vector2.
- Return
boolen if this is inside() method is true
- Parameters
lposition
: is the search position in global coordinated
-
std::vector<size_t>
neighbourRange
(size_t bin) const¶ access to lower/higher bins
takes a bin entry and returns the lower/higher bound respecting open/closed
- Return
low/high bounds
-
int
nextDirection
(const Vector3 &position, const Vector3 &dir) const¶ Layer next direction is needed.
- Parameters
position
: is the start search positiondir
: is the direction
- Return
integer that indicates which direction to move
-
BinningData &
operator=
(const BinningData &bdata)¶ Assignment operator.
- Parameters
bdata
: is the source object
-
size_t
search
(float value) const¶ Generic search - forwards to correct function pointer.
- Return
bin according tot this
- Parameters
value
: is the searchvalue as float
-
size_t
searchGlobal
(const Vector3 &position) const¶ Generic search from a 3D position corresponds to global coordinate schema.
- Return
bin according tot this
- Parameters
position
: is the search position in global coordinated
-
size_t
searchLocal
(const Vector2 &lposition) const¶ Generic search from a 2D position corresponds to local coordinate schema.
- Return
bin according tot this
- Parameters
lposition
: is the search position in local coordinated
-
size_t
searchWithSubStructure
(float value) const¶ Generic search with sub structure.
forwards to correct function pointer
- Return
bin according tot this
- Parameters
value
: is the searchvalue as float
Public Members
-
BinningValue
binvalue
¶ binning value: binX, binY, binZ, binR …
-
float
max
¶ maximum value
-
float
min
¶ minimum value
-
BinningOption
option
¶ binning option: open, closed
-
float
step
¶ binning step
-
bool
subBinningAdditive
¶ sub structure: additive or multipicative
-
std::unique_ptr<const BinningData>
subBinningData
¶ sub structure: describe some sub binning
-
BinningType
type
¶ binning type: equidistant, arbitrary
-
bool
zdim
¶ zero dimensional binning : direct access