CbmRoot
Loading...
Searching...
No Matches
cbm::algo::ca::GridArea Class Reference

Class for accessing objects in the 2D area that are stored in ca::Grid. More...

#include <CaGridArea.h>

Collaboration diagram for cbm::algo::ca::GridArea:
[legend]

Public Member Functions

 GridArea (const ca::Grid &grid, fscal x, fscal y, fscal dx, fscal dy)
 Constructor.
 
bool GetNextGridEntry (ca::HitIndex_t &ind)
 look up the next grid entry in the requested area
 
bool GetNextObjectId (ca::HitIndex_t &objectId)
 look up the next object id in the requested area
 
void DoLoopOverEntireGrid ()
 debug mode: loop over the entire GetEntries() vector ignoring the search area
 

Private Attributes

const ca::GridfGrid
 
int fAreaLastBinY {0}
 
int fAreaNbinsX {0}
 
int fAreaFirstBin {0}
 
int fAreaCurrentBinY {0}
 
ca::HitIndex_t fCurentEntry {0}
 
ca::HitIndex_t fEntriesXend {0}
 
int fGridNbinsX {0}
 

Detailed Description

Class for accessing objects in the 2D area that are stored in ca::Grid.

Definition at line 17 of file CaGridArea.h.

Constructor & Destructor Documentation

◆ GridArea()

cbm::algo::ca::GridArea::GridArea ( const ca::Grid & grid,
fscal x,
fscal y,
fscal dx,
fscal dy )
inline

Constructor.

Parameters
grid- the grid to work with
x- X coordinate of the center of the area
y- Y coordinate of the center of the area
dx- half-width of the area in X
dy- half-width of the area in Y

Definition at line 53 of file CaGridArea.h.

References fAreaCurrentBinY, fAreaFirstBin, fAreaLastBinY, fAreaNbinsX, fCurentEntry, fEntriesXend, fGrid, fGridNbinsX, cbm::algo::ca::Grid::GetBinX(), cbm::algo::ca::Grid::GetBinY(), cbm::algo::ca::Grid::GetFirstBinEntryIndex(), x, and y.

Member Function Documentation

◆ DoLoopOverEntireGrid()

void cbm::algo::ca::GridArea::DoLoopOverEntireGrid ( )
inline

debug mode: loop over the entire GetEntries() vector ignoring the search area

Definition at line 103 of file CaGridArea.h.

References fAreaCurrentBinY, fAreaFirstBin, fAreaLastBinY, fAreaNbinsX, fCurentEntry, fEntriesXend, fGrid, and cbm::algo::ca::Grid::GetEntries().

Referenced by cbm::algo::ca::TripletConstructor::CollectHits(), and cbm::algo::ca::TrackExtender::FindMoreHits().

◆ GetNextGridEntry()

bool cbm::algo::ca::GridArea::GetNextGridEntry ( ca::HitIndex_t & ind)
inline

look up the next grid entry in the requested area

Returns
ind - the entry index in the grid.GetEntries() vector
true if the entry is found, false if there are no more entries in the area

Definition at line 72 of file CaGridArea.h.

References fAreaCurrentBinY, fAreaFirstBin, fAreaLastBinY, fAreaNbinsX, fCurentEntry, fEntriesXend, fGrid, fGridNbinsX, cbm::algo::ca::Grid::GetFirstBinEntryIndex(), and cbm::algo::kf::utils::IsUnlikely().

Referenced by GetNextObjectId().

◆ GetNextObjectId()

bool cbm::algo::ca::GridArea::GetNextObjectId ( ca::HitIndex_t & objectId)
inline

look up the next object id in the requested area

Returns
objectId - the id of the object
true if the object is found, false if there are no more pbjects in the area

Definition at line 92 of file CaGridArea.h.

References fGrid, cbm::algo::ca::Grid::GetEntries(), and GetNextGridEntry().

Referenced by cbm::algo::ca::TripletConstructor::CollectHits(), and cbm::algo::ca::TrackExtender::FindMoreHits().

Member Data Documentation

◆ fAreaCurrentBinY

int cbm::algo::ca::GridArea::fAreaCurrentBinY {0}
private

Definition at line 47 of file CaGridArea.h.

Referenced by DoLoopOverEntireGrid(), GetNextGridEntry(), and GridArea().

◆ fAreaFirstBin

int cbm::algo::ca::GridArea::fAreaFirstBin {0}
private

Definition at line 46 of file CaGridArea.h.

Referenced by DoLoopOverEntireGrid(), GetNextGridEntry(), and GridArea().

◆ fAreaLastBinY

int cbm::algo::ca::GridArea::fAreaLastBinY {0}
private

Definition at line 44 of file CaGridArea.h.

Referenced by DoLoopOverEntireGrid(), GetNextGridEntry(), and GridArea().

◆ fAreaNbinsX

int cbm::algo::ca::GridArea::fAreaNbinsX {0}
private

Definition at line 45 of file CaGridArea.h.

Referenced by DoLoopOverEntireGrid(), GetNextGridEntry(), and GridArea().

◆ fCurentEntry

ca::HitIndex_t cbm::algo::ca::GridArea::fCurentEntry {0}
private

Definition at line 48 of file CaGridArea.h.

Referenced by DoLoopOverEntireGrid(), GetNextGridEntry(), and GridArea().

◆ fEntriesXend

ca::HitIndex_t cbm::algo::ca::GridArea::fEntriesXend {0}
private

Definition at line 49 of file CaGridArea.h.

Referenced by DoLoopOverEntireGrid(), GetNextGridEntry(), and GridArea().

◆ fGrid

const ca::Grid& cbm::algo::ca::GridArea::fGrid
private

Definition at line 42 of file CaGridArea.h.

Referenced by DoLoopOverEntireGrid(), GetNextGridEntry(), GetNextObjectId(), and GridArea().

◆ fGridNbinsX

int cbm::algo::ca::GridArea::fGridNbinsX {0}
private

Definition at line 50 of file CaGridArea.h.

Referenced by GetNextGridEntry(), and GridArea().


The documentation for this class was generated from the following file: