EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/sPHENIX/Core/include/Acts/Utilities/BinningData.hpp>
Public Member Functions | |
BinningData (BinningValue bValue, float bMin, float bMax) | |
m_totalBins (1) | |
m_totalBoundaries (std::vector< float >()) | |
m_functionPtr | option (bOption) |
m_functionPtr | binvalue (bValue) |
m_functionPtr | min (bMin) |
m_functionPtr | max (bMax) |
m_functionPtr | step ((bMax-bMin)/bBins) |
m_functionPtr | zdim (bBins==1?true:false) |
m_functionPtr | subBinningData (std::move(sBinData)) |
m_functionPtr | subBinningAdditive (sBinAdditive) |
m_functionPtr | m_bins (bBins) |
m_functionPtr | m_boundaries (std::vector< float >()) |
m_functionPtr | m_totalBins (bBins) |
m_functionPtr | m_totalBoundaries (std::vector< float >()) |
m_functionPtr | m_functionPtr (nullptr) |
BinningData (BinningOption bOption, BinningValue bValue, const std::vector< float > &bBoundaries, std::unique_ptr< const BinningData > sBinData=nullptr) | |
BinningData (const BinningData &bdata) | |
BinningData & | operator= (const BinningData &bdata) |
~BinningData ()=default | |
Destructor. | |
size_t | bins () const |
Return the number of bins - including sub bins. | |
bool | decrement (size_t &bin) const |
bool | increment (size_t &bin) const |
const std::vector< float > & | boundaries () const |
float | value (const Vector2D &lposition) const |
float | value (const Vector3D &position) const |
float | center (size_t bin) const |
bool | inside (const Vector3D &position) const |
bool | inside (const Vector2D &lposition) const |
size_t | searchLocal (const Vector2D &lposition) const |
size_t | searchGlobal (const Vector3D &position) const |
size_t | search (float value) const |
size_t | searchWithSubStructure (float value) const |
int | nextDirection (const Vector3D &position, const Vector3D &dir) const |
float | centerValue (size_t bin) const |
std::vector< size_t > | neighbourRange (size_t bin) const |
Public Attributes | |
BinningType | type |
binning type: equidistant, arbitrary | |
BinningOption | option |
binning option: open, closed | |
BinningValue | binvalue |
binning value: binX, binY, binZ, binR ... | |
float | min |
minimum value | |
float | max |
maximum value | |
float | step |
binning step | |
bool | zdim |
zero dimensional binning : direct access | |
std::unique_ptr< const BinningData > | subBinningData |
sub structure: describe some sub binning | |
bool | subBinningAdditive |
sub structure: additive or multipicative | |
m_functionPtr | searchEquidistantWithBoundary |
Private Member Functions | |
void | checkSubStructure () |
function pointer | |
Static Private Member Functions | |
static size_t | searchEquidistantWithBoundary (float value, const BinningData &bData) |
static size_t | searchInVectorWithBoundary (float value, const BinningData &bData) |
static size_t | binarySearchWithBoundary (float value, const BinningData &bData) |
Private Attributes | |
size_t | m_bins |
number of bins | |
std::vector< float > | m_boundaries |
vector of holding the bin boundaries | |
size_t | m_totalBins |
including potential substructure | |
std::vector< float > | m_totalBoundaries |
including potential substructure | |
size_t(* | m_functionPtr )(float, const BinningData &) |
This class holds all the data necessary for the bin calculation
phi has a very particular behaviour:
structure is equidistant additive : sub structure replaces one bin (and one bin only)
Definition at line 41 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 41 of file BinningData.hpp
|
inline |
Constructor for 0D binning
bValue | is the binning value: binX, binY, etc. |
bMin | is the minum value |
bMax | is the maxmimum value |
Definition at line 61 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 61 of file BinningData.hpp
|
inline |
Constructor for equidistant binning
bOption | is the binning option : open / closed |
bValue | is the binning value : binX, binY, etc. |
bBoundaries | are the bin boundaries |
sBinData | is (optional) sub structure |
Definition at line 123 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 123 of file BinningData.hpp
References binarySearchWithBoundary(), checkSubStructure(), m_bins, m_boundaries, m_functionPtr, max, min, searchInVectorWithBoundary(), and throw_assert.
|
inline |
Copy constructor
bdata | is the source object |
Definition at line 154 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 154 of file BinningData.hpp
References binarySearchWithBoundary(), Acts::equidistant, m_bins, m_functionPtr, searchEquidistantWithBoundary, searchInVectorWithBoundary(), subBinningData, and type.
|
default |
Destructor.
|
inlinestaticprivate |
Definition at line 561 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 561 of file BinningData.hpp
References Acts::closed, m_bins, m_boundaries, max, and option.
Referenced by BinningData(), and operator=().
|
inline |
Return the number of bins - including sub bins.
Definition at line 220 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 220 of file BinningData.hpp
References m_totalBins.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
m_functionPtr Acts::BinningData::binvalue | ( | bValue | ) |
|
inline |
Return the boundaries - including sub boundaries
Definition at line 244 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 244 of file BinningData.hpp
References m_boundaries, m_totalBoundaries, and subBinningData.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), and center().
|
inline |
Get the center value of a bin
bin | is the bin for which the center value is requested |
Definition at line 299 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 299 of file BinningData.hpp
References boundaries(), and value().
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
inline |
access to the center value this uses the bin boundary vector, it also works with sub structure
bin | is the bin for which the value is requested, if bin > nbins it is set to max |
Definition at line 423 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 423 of file BinningData.hpp
References m_boundaries, max, min, and zdim.
|
inlineprivate |
function pointer
helper method to set the sub structure
Definition at line 464 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 464 of file BinningData.hpp
References kdfinder::abs(), Acts::UnitConstants::e, m_bins, m_boundaries, m_totalBins, m_totalBoundaries, min, offset, step, subBinningAdditive, and subBinningData.
Referenced by BinningData(), and m_functionPtr().
|
inline |
Decrement the bin
bin | is the bin to be decremented |
Definition at line 226 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 226 of file BinningData.hpp
References m_bins, Acts::open, and option.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), and neighbourRange().
|
inline |
Increment the bin
bin | the bin to be incremented |
Definition at line 236 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 236 of file BinningData.hpp
References m_bins, Acts::open, and option.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), and neighbourRange().
|
inline |
Check if bin is inside from Vector3D
position | is the search position in global coordinated |
Definition at line 311 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 311 of file BinningData.hpp
References Acts::closed, max, min, option, and value().
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), and Acts::BinUtility::inside().
|
inline |
Check if bin is inside from Vector2D
lposition | is the search position in global coordinated |
Definition at line 327 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 327 of file BinningData.hpp
References Acts::closed, max, min, option, and value().
m_functionPtr Acts::BinningData::m_bins | ( | bBins | ) |
m_functionPtr Acts::BinningData::m_boundaries | ( | std::vector< float > | () | ) |
|
inline |
Definition at line 105 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 105 of file BinningData.hpp
References checkSubStructure(), m_bins, m_boundaries, m_functionPtr, min, searchEquidistantWithBoundary, and step.
Acts::BinningData::m_totalBins | ( | 1 | ) |
m_functionPtr Acts::BinningData::m_totalBins | ( | bBins | ) |
Acts::BinningData::m_totalBoundaries | ( | std::vector< float > | () | ) |
m_functionPtr Acts::BinningData::m_totalBoundaries | ( | std::vector< float > | () | ) |
m_functionPtr Acts::BinningData::max | ( | bMax | ) |
m_functionPtr Acts::BinningData::min | ( | bMin | ) |
|
inline |
access to lower/higher bins
takes a bin entry and returns the lower/higher bound respecting open/closed
Definition at line 437 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 437 of file BinningData.hpp
References decrement(), and increment().
|
inline |
Layer next direction is needed
position | is the start search position |
dir | is the direction |
Definition at line 406 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 406 of file BinningData.hpp
|
inline |
Assignment operator
bdata | is the source object |
Definition at line 187 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 187 of file BinningData.hpp
References binarySearchWithBoundary(), binvalue, Acts::equidistant, m_bins, m_boundaries, m_functionPtr, m_totalBins, m_totalBoundaries, max, min, option, searchEquidistantWithBoundary, searchInVectorWithBoundary(), step, subBinningAdditive, subBinningData, type, and zdim.
m_functionPtr Acts::BinningData::option | ( | bOption | ) |
|
inline |
Generic search - forwards to correct function pointer
value | is the searchvalue as float |
Definition at line 367 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 367 of file BinningData.hpp
References m_functionPtr, searchWithSubStructure(), subBinningData, value(), and zdim.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), searchGlobal(), and searchLocal().
|
inlinestaticprivate |
Definition at line 515 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 515 of file BinningData.hpp
References Acts::closed, m_bins, max, min, Acts::open, option, and step.
|
inline |
Generic search from a 3D position – corresponds to global coordinate schema
position | is the search position in global coordinated |
Definition at line 355 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 355 of file BinningData.hpp
References search(), value(), and zdim.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
inlinestaticprivate |
Definition at line 538 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 538 of file BinningData.hpp
References Acts::closed, m_bins, m_boundaries, max, option, and value().
Referenced by BinningData(), and operator=().
|
inline |
Generic search from a 2D position – corresponds to local coordinate schema
lposition | is the search position in local coordinated |
Definition at line 343 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 343 of file BinningData.hpp
References search(), value(), and zdim.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
inline |
Generic search with sub structure
value | is the searchvalue as float |
Definition at line 382 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 382 of file BinningData.hpp
References subBinningAdditive, subBinningData, and value().
Referenced by search().
m_functionPtr Acts::BinningData::step | ( | (bMax-bMin)/ | bBins | ) |
m_functionPtr Acts::BinningData::subBinningAdditive | ( | sBinAdditive | ) |
m_functionPtr Acts::BinningData::subBinningData | ( | std:: | movesBinData | ) |
|
inline |
Take the right float value
lposition | assumes the correct local position expression |
Definition at line 256 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 256 of file BinningData.hpp
References Acts::binH, Acts::binPhi, Acts::binR, Acts::binRPhi, binvalue, and Acts::binX.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), center(), inside(), nextDirection(), search(), searchGlobal(), searchInVectorWithBoundary(), searchLocal(), and searchWithSubStructure().
|
inline |
Take the right float value
position | is the global position |
Definition at line 273 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 273 of file BinningData.hpp
References Acts::binEta, Acts::binH, Acts::binR, Acts::binRPhi, binvalue, Acts::VectorHelpers::eta(), Acts::VectorHelpers::perp(), Acts::VectorHelpers::phi(), and phi.
m_functionPtr Acts::BinningData::zdim | ( | bBins | = = 1 ? true : false | ) |
BinningValue Acts::BinningData::binvalue |
binning value: binX, binY, binZ, binR ...
Definition at line 45 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 45 of file BinningData.hpp
Referenced by operator=(), and value().
|
private |
number of bins
Definition at line 456 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 456 of file BinningData.hpp
Referenced by binarySearchWithBoundary(), BinningData(), checkSubStructure(), decrement(), increment(), m_functionPtr(), operator=(), searchEquidistantWithBoundary(), and searchInVectorWithBoundary().
|
private |
vector of holding the bin boundaries
Definition at line 457 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 457 of file BinningData.hpp
Referenced by binarySearchWithBoundary(), BinningData(), boundaries(), centerValue(), checkSubStructure(), m_functionPtr(), operator=(), and searchInVectorWithBoundary().
|
private |
Definition at line 461 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 461 of file BinningData.hpp
Referenced by BinningData(), m_functionPtr(), operator=(), and search().
|
private |
including potential substructure
Definition at line 458 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 458 of file BinningData.hpp
Referenced by bins(), checkSubStructure(), and operator=().
|
private |
including potential substructure
Definition at line 459 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 459 of file BinningData.hpp
Referenced by boundaries(), checkSubStructure(), and operator=().
float Acts::BinningData::max |
maximum value
Definition at line 47 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 47 of file BinningData.hpp
Referenced by binarySearchWithBoundary(), BinningData(), centerValue(), inside(), operator=(), searchEquidistantWithBoundary(), and searchInVectorWithBoundary().
float Acts::BinningData::min |
minimum value
Definition at line 46 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 46 of file BinningData.hpp
Referenced by BinningData(), centerValue(), checkSubStructure(), inside(), m_functionPtr(), operator=(), and searchEquidistantWithBoundary().
BinningOption Acts::BinningData::option |
binning option: open, closed
Definition at line 44 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 44 of file BinningData.hpp
Referenced by binarySearchWithBoundary(), decrement(), increment(), inside(), operator=(), searchEquidistantWithBoundary(), and searchInVectorWithBoundary().
m_functionPtr Acts::BinningData::searchEquidistantWithBoundary |
Definition at line 75 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 75 of file BinningData.hpp
Referenced by BinningData(), m_functionPtr(), and operator=().
float Acts::BinningData::step |
binning step
Definition at line 48 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 48 of file BinningData.hpp
Referenced by checkSubStructure(), m_functionPtr(), operator=(), and searchEquidistantWithBoundary().
bool Acts::BinningData::subBinningAdditive |
sub structure: additive or multipicative
Definition at line 54 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 54 of file BinningData.hpp
Referenced by checkSubStructure(), operator=(), and searchWithSubStructure().
std::unique_ptr<const BinningData> Acts::BinningData::subBinningData |
sub structure: describe some sub binning
Definition at line 52 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 52 of file BinningData.hpp
Referenced by BinningData(), boundaries(), checkSubStructure(), operator=(), search(), and searchWithSubStructure().
BinningType Acts::BinningData::type |
binning type: equidistant, arbitrary
Definition at line 43 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 43 of file BinningData.hpp
Referenced by BinningData(), and operator=().
bool Acts::BinningData::zdim |
zero dimensional binning : direct access
Definition at line 49 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 49 of file BinningData.hpp
Referenced by centerValue(), nextDirection(), operator=(), search(), searchGlobal(), and searchLocal().