ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::Experimental::HoughAccumulatorSection Class Reference

helper class for adaptive traversal of HT space More...

#include <Acts/Seeding2/HoughAccumulatorSection.hpp>

Public Types

enum class  Decision { Discard , Accept , Drill , DrillAndExpand }
 Defines the fate of section during traversal.

Public Member Functions

 HoughAccumulatorSection (float xw, float yw, float xBegin, float yBegin, int div=0, const std::vector< std::uint32_t > &indices={}, const std::vector< float > &history={})
 Construct the section.
HoughAccumulatorSection bottom (bool copyIndices=false) const
 create bottom section that is result of splitting this one into 2
HoughAccumulatorSection bottomLeft (bool copyIndices=false) const
 create section that is result of splitting this one into 4
HoughAccumulatorSection bottomRight (bool copyIndices=false) const
 create section that is result of splitting this one into 4
std::size_t count () const
 number of lines in the section
Decision decision () const
 decision designated for this section in next traversal step
std::uint32_t divisionLevel () const
 number of divisions that lead to this section
void expand (float xs, float ys)
 keep indices and update parameters of the box by scalling
float history (std::uint32_t index) const
 retrieve history info
std::vector< std::uint32_t > & indices ()
 mutable version of
const std::vector< std::uint32_t > & indices () const
 indices of measurements that result in lines in this section
template<typename F>
requires std::invocable<F, float>
bool isCrossingInside (F &&line1, F &&line2) const &
 check if the lines cross inside the section
template<typename F>
requires std::invocable<F, float>
bool isLineInside (F &&function) const &
 true if the line defined by given parameters passes the section
HoughAccumulatorSection left (bool copyIndices=false) const
 create left section that is result of splitting this one into 2
HoughAccumulatorSection right (bool copyIndices=false) const
 create right section that is result of splitting this one into 2
void setHistory (std::size_t index, float value)
 store additional (arbitrary) info in indexed array
HoughAccumulatorSection top (bool copyIndices=false) const
 create top section that is result of splitting this one into 2
HoughAccumulatorSection topLeft (bool copyIndices=false) const
 create section that is result of splitting this one into 4
HoughAccumulatorSection topRight (bool copyIndices=false) const
 create section that is result of splitting this one into 4
Decision updateDecision (Decision d)
 updates decision designated for this step If this is not set specifically the default is to split (called Drill)
void updateDimensions (float xw, float yw, float xBegin, float yBegin)
 keep indices and update parameters of the box This method is useful when changing direction of the search
float xBegin () const
 location accessor
float xSize () const
 size accessor
float yBegin () const
 location accessor
float ySize () const
 size accessor

Detailed Description

helper class for adaptive traversal of HT space

Constructor & Destructor Documentation

◆ HoughAccumulatorSection()

Acts::Experimental::HoughAccumulatorSection::HoughAccumulatorSection ( float xw,
float yw,
float xBegin,
float yBegin,
int div = 0,
const std::vector< std::uint32_t > & indices = {},
const std::vector< float > & history = {} )

Construct the section.

Parameters
xw- width in x direction
yw- widths in y direction
xBegin- location of left side of the section
yBegin- location of bottom side of the section
div- division level (will be incremented during each division)
indices- indices of measurements that generate lines passing this section
history- storage for arbitrary information related to the section

Member Function Documentation

◆ bottom()

HoughAccumulatorSection Acts::Experimental::HoughAccumulatorSection::bottom ( bool copyIndices = false) const

create bottom section that is result of splitting this one into 2

Parameters
copyIndices- copies indices from the parent if true +---—+ | | +---—+ | <|– this part +---—+
Returns
- new section

◆ bottomLeft()

HoughAccumulatorSection Acts::Experimental::HoughAccumulatorSection::bottomLeft ( bool copyIndices = false) const

create section that is result of splitting this one into 4

Parameters
copyIndices- copies indices from the parent
See also
bottomRight
Returns
new accumulator section (with new dimensions and location)

◆ bottomRight()

HoughAccumulatorSection Acts::Experimental::HoughAccumulatorSection::bottomRight ( bool copyIndices = false) const

create section that is result of splitting this one into 4

  • copyIndices - copies indices from the parent create section that is bottom left corner of this this one by default the section is divided into 4 quadrants, if parameters are provided the quadrants size can be adjusted +—+—+ | | | +—+—+ | | <|– this part +—+—+
    Returns
    new accumulator section (with new dimensions and location)
    Parameters
    copyIndices- copies indices from the parent if true

◆ count()

std::size_t Acts::Experimental::HoughAccumulatorSection::count ( ) const

number of lines in the section

Returns
number of lines

◆ decision()

Decision Acts::Experimental::HoughAccumulatorSection::decision ( ) const

decision designated for this section in next traversal step

Returns
currently set decision

◆ divisionLevel()

std::uint32_t Acts::Experimental::HoughAccumulatorSection::divisionLevel ( ) const

number of divisions that lead to this section

Returns
integer > 0

◆ expand()

void Acts::Experimental::HoughAccumulatorSection::expand ( float xs,
float ys )

keep indices and update parameters of the box by scalling

Parameters
xs- scale in x direction, if bigger than 1 the size increases
ys- scale in y direction The box is recentred

◆ history()

float Acts::Experimental::HoughAccumulatorSection::history ( std::uint32_t index) const

retrieve history info

Parameters
index- item index
Returns
value stored by
See also
setHistory

◆ indices() [1/2]

std::vector< std::uint32_t > & Acts::Experimental::HoughAccumulatorSection::indices ( )

mutable version of

See also
indices
Returns
mutable access to indices

◆ indices() [2/2]

const std::vector< std::uint32_t > & Acts::Experimental::HoughAccumulatorSection::indices ( ) const

indices of measurements that result in lines in this section

Returns
reference to the vector of indices

◆ isCrossingInside()

template<typename F>
requires std::invocable<F, float>
bool Acts::Experimental::HoughAccumulatorSection::isCrossingInside ( F && line1,
F && line2 ) const &

check if the lines cross inside the section

Parameters
line1- functional form of line 1
line2- functional form of line 2
Warning
note that this function is assuming that these are lines and the derivative is positive.
Returns
true if the two lines cross in the section

◆ isLineInside()

template<typename F>
requires std::invocable<F, float>
bool Acts::Experimental::HoughAccumulatorSection::isLineInside ( F && function) const &

true if the line defined by given parameters passes the section

Parameters
functionis callable used to check crossing at the edges
Returns
true if the line passes the section

◆ left()

HoughAccumulatorSection Acts::Experimental::HoughAccumulatorSection::left ( bool copyIndices = false) const

create left section that is result of splitting this one into 2

Parameters
copyIndices- copies indices from the parent if true +—+—+ | <|—|– this part +—+—+
Returns
- new section

◆ right()

HoughAccumulatorSection Acts::Experimental::HoughAccumulatorSection::right ( bool copyIndices = false) const

create right section that is result of splitting this one into 2

Parameters
copyIndices- copies indices from the parent if true +—+—+ | | <|– this part +—+—+
Returns
- new section

◆ setHistory()

void Acts::Experimental::HoughAccumulatorSection::setHistory ( std::size_t index,
float value )

store additional (arbitrary) info in indexed array

Parameters
index- identifier
value- value to store

◆ top()

HoughAccumulatorSection Acts::Experimental::HoughAccumulatorSection::top ( bool copyIndices = false) const

create top section that is result of splitting this one into 2

Parameters
copyIndices- copies indices from the parent if true +---—+ | <|– this part +---—+ | | +---—+
Returns
- new section

◆ topLeft()

HoughAccumulatorSection Acts::Experimental::HoughAccumulatorSection::topLeft ( bool copyIndices = false) const

create section that is result of splitting this one into 4

Parameters
copyIndices- copies indices from the parent
See also
bottomRight
Returns
new accumulator section (with new dimensions and location)

◆ topRight()

HoughAccumulatorSection Acts::Experimental::HoughAccumulatorSection::topRight ( bool copyIndices = false) const

create section that is result of splitting this one into 4

Parameters
copyIndices- copies indices from the parent
See also
bottomRight
Returns
new accumulator section (with new dimensions and location)

◆ updateDecision()

Decision Acts::Experimental::HoughAccumulatorSection::updateDecision ( Decision d)

updates decision designated for this step If this is not set specifically the default is to split (called Drill)

Parameters
d- new decision for the section
Returns
value of the decision set

◆ updateDimensions()

void Acts::Experimental::HoughAccumulatorSection::updateDimensions ( float xw,
float yw,
float xBegin,
float yBegin )

keep indices and update parameters of the box This method is useful when changing direction of the search

Parameters
xw- new x width
yw- new x width
xBegin- new left side
yBegin- new bottom side

◆ xBegin()

float Acts::Experimental::HoughAccumulatorSection::xBegin ( ) const

location accessor

Returns
left side position

◆ xSize()

float Acts::Experimental::HoughAccumulatorSection::xSize ( ) const

size accessor

Returns
size in x direction

◆ yBegin()

float Acts::Experimental::HoughAccumulatorSection::yBegin ( ) const

location accessor

Returns
bottom side position

◆ ySize()

float Acts::Experimental::HoughAccumulatorSection::ySize ( ) const

size accessor

Returns
size in x direction