Analysis Software
Documentation for sPHENIX simulation software
|
#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 >()) |
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 | |
~BinningData ()=default | |
bool | operator== (const BinningData &bData) const |
size_t | bins () const |
Return the number of bins - including sub bins. | |
const std::vector< float > & | boundaries () const |
float | value (const Vector2 &lposition) const |
float | value (const Vector3 &position) const |
float | center (size_t bin) const |
float | width (size_t bin) const |
bool | inside (const Vector3 &position) const |
bool | inside (const Vector2 &lposition) const |
size_t | searchLocal (const Vector2 &lposition) const |
size_t | searchGlobal (const Vector3 &position) const |
size_t | search (float value) const |
size_t | searchWithSubStructure (float value) const |
int | nextDirection (const Vector3 &position, const Vector3 &dir) const |
float | centerValue (size_t bin) const |
std::string | toString (const std::string &indent) 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) |
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 minimum value |
bMax | is the maximum 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 non-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 121 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 121 of file BinningData.hpp
References checkSubStructure(), m_boundaries, m_functionPtr, max, min, searchInVectorWithBoundary(), and throw_assert.
|
inline |
Copy constructor
bdata | is the source object |
Definition at line 147 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 147 of file BinningData.hpp
References Acts::equidistant, m_functionPtr, searchEquidistantWithBoundary, searchInVectorWithBoundary(), subBinningData, and type.
|
default |
|
default |
|
inline |
Return the number of bins - including sub bins.
Definition at line 225 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 225 of file BinningData.hpp
References m_totalBins.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::to_json(), and toString().
m_functionPtr Acts::BinningData::binvalue | ( | bValue | ) |
|
inline |
Return the boundaries - including sub boundaries
Definition at line 229 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 229 of file BinningData.hpp
References m_boundaries, m_totalBoundaries, and subBinningData.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), center(), Acts::isEqual(), ActsExamples::Digitization::Uniform::operator()(), ActsExamples::Digitization::Digital::operator()(), Acts::to_json(), toString(), and width().
|
inline |
Get the center value of a bin
bin | is the bin for which the center value is requested |
Definition at line 284 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 284 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 421 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 421 of file BinningData.hpp
References m_boundaries, max, min, and zdim.
|
inlineprivate |
function pointer
helper method to set the sub structure
Definition at line 439 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 439 of file BinningData.hpp
References Acts::UnitConstants::e, add_histos_bX::ib, m_bins, m_boundaries, m_totalBins, m_totalBoundaries, min, offset, Acts::Experimental::detail::BlueprintHelper::sort(), step, subBinningAdditive, and subBinningData.
Referenced by BinningData(), and m_totalBoundaries().
|
inline |
Check if bin is inside from Vector3
position | is the search position in global coordinated |
Definition at line 309 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 309 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 Vector2
lposition | is the search position in global coordinated |
Definition at line 325 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 325 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 > | () | ) |
Acts::BinningData::m_totalBins | ( | 1 | ) |
m_functionPtr Acts::BinningData::m_totalBins | ( | bBins | ) |
Acts::BinningData::m_totalBoundaries | ( | std::vector< float > | () | ) |
|
inline |
Definition at line 103 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 103 of file BinningData.hpp
References checkSubStructure(), add_histos_bX::ib, m_bins, m_boundaries, m_functionPtr, min, searchEquidistantWithBoundary, and step.
m_functionPtr Acts::BinningData::max | ( | bMax | ) |
m_functionPtr Acts::BinningData::min | ( | bMin | ) |
Layer next direction is needed
position | is the start search position |
dir | is the direction |
Definition at line 404 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 404 of file BinningData.hpp
|
inline |
Assignment operator
bdata | is the source object |
Definition at line 178 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 178 of file BinningData.hpp
References binvalue, Acts::equidistant, m_bins, m_boundaries, m_functionPtr, m_totalBins, m_totalBoundaries, max, min, option, searchEquidistantWithBoundary, searchInVectorWithBoundary(), step, subBinningAdditive, subBinningData, type, and zdim.
|
inline |
Equality operator
bData | is the binning data to be checked against |
Definition at line 214 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 214 of file BinningData.hpp
References binvalue, max, min, option, 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 365 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 365 of file BinningData.hpp
References assert, m_functionPtr, searchWithSubStructure(), subBinningData, value(), and zdim.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), ActsExamples::Digitization::Uniform::operator()(), ActsExamples::Digitization::Digital::operator()(), searchGlobal(), and searchLocal().
|
inlinestaticprivate |
Definition at line 490 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 490 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 353 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 353 of file BinningData.hpp
References search(), value(), and zdim.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
inlinestaticprivate |
Definition at line 512 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 512 of file BinningData.hpp
References Acts::closed, distance(), 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 341 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 341 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 380 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 380 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 |
String screen output method
indent | the current indentation |
Definition at line 533 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 533 of file BinningData.hpp
References KFPMath::b, bins(), binvalue, boundaries(), Acts::equidistant, max, min, option, step, and type.
|
inline |
Take the right float value
lposition | assumes the correct local position expression |
Definition at line 241 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 241 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(), searchWithSubStructure(), and width().
|
inline |
Take the right float value
position | is the global position |
Definition at line 258 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 258 of file BinningData.hpp
References Acts::binEta, Acts::binH, Acts::binR, Acts::binRPhi, binvalue, eta, Acts::VectorHelpers::eta(), Acts::VectorHelpers::perp(), ActsTests::PropagationDatasets::phi, and Acts::VectorHelpers::phi().
|
inline |
Get the width of a bin
bin | is the bin for which the width is requested |
Definition at line 297 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 297 of file BinningData.hpp
References boundaries(), and value().
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 Acts::isEqual(), operator=(), operator==(), Acts::to_json(), toString(), and value().
|
private |
number of bins
Definition at line 431 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 431 of file BinningData.hpp
Referenced by checkSubStructure(), m_totalBoundaries(), operator=(), searchEquidistantWithBoundary(), and searchInVectorWithBoundary().
|
private |
vector of holding the bin boundaries
Definition at line 432 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 432 of file BinningData.hpp
Referenced by BinningData(), boundaries(), centerValue(), checkSubStructure(), m_totalBoundaries(), operator=(), and searchInVectorWithBoundary().
|
inlineprivate |
Definition at line 436 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 436 of file BinningData.hpp
Referenced by BinningData(), m_totalBoundaries(), operator=(), and search().
|
private |
including potential substructure
Definition at line 433 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 433 of file BinningData.hpp
Referenced by bins(), checkSubStructure(), and operator=().
|
private |
including potential substructure
Definition at line 434 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 434 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 BinningData(), centerValue(), inside(), Acts::isEqual(), ActsExamples::Digitization::Uniform::operator()(), ActsExamples::Digitization::Digital::operator()(), operator=(), operator==(), searchEquidistantWithBoundary(), searchInVectorWithBoundary(), Acts::to_json(), and toString().
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(), Acts::isEqual(), m_totalBoundaries(), ActsExamples::Digitization::Uniform::operator()(), ActsExamples::Digitization::Digital::operator()(), operator=(), operator==(), searchEquidistantWithBoundary(), Acts::to_json(), and toString().
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 inside(), Acts::isEqual(), operator=(), operator==(), searchEquidistantWithBoundary(), searchInVectorWithBoundary(), Acts::to_json(), and toString().
m_functionPtr Acts::BinningData::searchEquidistantWithBoundary |
Definition at line 74 of file BinningData.hpp.
View newest version in sPHENIX GitHub at line 74 of file BinningData.hpp
Referenced by BinningData(), m_totalBoundaries(), 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(), Acts::isEqual(), m_totalBoundaries(), operator=(), operator==(), searchEquidistantWithBoundary(), and toString().
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(), Acts::isEqual(), operator=(), operator==(), searchWithSubStructure(), and Acts::to_json().
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(), Acts::isEqual(), operator=(), operator==(), search(), searchWithSubStructure(), and Acts::to_json().
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 cpp.ast.Parameter::__str__(), BinningData(), Acts::isEqual(), operator=(), operator==(), Acts::to_json(), cpp.ast.VariableDeclaration::ToString(), and toString().
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(), Acts::isEqual(), nextDirection(), operator=(), operator==(), search(), searchGlobal(), and searchLocal().