![]() |
Belle II Software development
|
Class to represent the CDC NDFinder. More...
#include <NDFinder.h>
Classes | |
struct | ContributionInfo |
Collection of the hit contribution information needed for the hit to cluster relations. More... | |
struct | SectorBinning |
Data type to collect a binning. More... | |
struct | WireInfo |
Collection of the hit information needed for the hit representations. More... | |
Public Member Functions | |
void | init (const NDFinderParameters &ndFinderParameters) |
Initialization of the NDFinder (parameters and lookup tables) | |
void | reset () |
Reset the NDFinder data structure to process next event. | |
void | addHit (const HitInfo &hitInfo) |
Add the hit info of a single track segment to the NDFinder. | |
void | findTracks () |
Main function for track finding. | |
std::vector< NDFinderTrack > * | getFinderTracks () |
Retreive the results. | |
Protected Member Functions | |
void | initLookUpArrays () |
Initialize the arrays LUT arrays. | |
void | initHitToSectorMap () |
Fills the m_hitToSectorIDs (see below) array with the hit to orientation/sectorWire/sectorID relations. | |
void | loadCompressedHitReps (const std::string &fileName, const SectorBinning &compBins, c5array &compHitsToWeights) |
Fills the m_compAxialHitReps/m_compStereoHitReps (see below) arrays with the hit representations (hits to weights) | |
void | fillExpandedHitReps (const SectorBinning &compBins, const c5array &compHitsToWeights, c5array &expHitsToWeights) |
Fills the m_expAxialHitReps/m_expStereoHitReps (see below) arrays with the expanded hit representations (hits to weights) | |
void | processHitForHoughSpace (const unsigned short hitIdx) |
Process a single axial or stereo hit for the Hough space. | |
void | writeHitToHoughSpace (const WireInfo &hitInfo, const c5array &expHitsToWeights) |
Write (add) a single hit (Hough curve) to the Hough space. | |
void | runTrackFinding () |
Core track finding logic in the constructed Hough space. | |
std::vector< SimpleCluster > | relateHitsToClusters (std::vector< SimpleCluster > &clusters) |
Relate the hits in the peak of the cluster to the cluster. Applies a cut on the clusters. | |
std::vector< std::vector< unsigned short > > | getHitsVsClustersTable (const std::vector< SimpleCluster > &clusters) |
Create hits to clusters confusion matrix. | |
unsigned short | getHitContribution (const cell_index &peakCell, const unsigned short hitIdx) |
Returns the hit contribution of a TS at a certain cluster cell (= peak/maximum cell) | |
std::vector< ContributionInfo > | extractContributionInfos (const std::vector< unsigned short > &clusterHits) |
Extract relevant hit information (hitIdx, contribution, super layer, drift time) | |
int | getMaximumHitInSuperLayer (const std::vector< ContributionInfo > &contributionInfos, unsigned short superLayer) |
Find the hit with the maximum contribution in a given super layer. | |
bool | checkHitSuperLayers (const SimpleCluster &cluster) |
Cut on the number of hit axial/stereo super layers. | |
std::array< double, 3 > | calculateCenterOfGravity (const SimpleCluster &cluster) |
Calculate the center of gravity (weighted mean) for the track parameters. | |
std::array< double, 3 > | getTrackParameterEstimate (const std::array< double, 3 > ¢erOfGravity) |
Transform the center of gravity (cells) into the estimated track parameters. | |
std::array< double, 3 > | transformTrackParameters (const std::array< double, 3 > &estimatedParameters) |
Transform to physical units. | |
Static Protected Member Functions | |
static double | getTrackRadius (double transverseMomentum) |
Transverse momentum (which is 1/omega, in GeV/c) to radius (in cm) | |
Private Attributes | |
std::vector< NDFinderTrack > | m_ndFinderTracks |
Result: Vector of the found tracks. | |
std::vector< unsigned short > | m_hitIDs |
TS-IDs of the hits in the current event: Elements = [0,2335] for 2336 TS in total. | |
std::vector< unsigned short > | m_hitSLIDs |
SL-IDs of the hits in the current event: Elements = Super layer number in [0,1,...,8]. | |
std::vector< unsigned short > | m_priorityWirePos |
Priority positon within the TS. Elements basf2: [0,3] first, left, right, no hit. | |
std::vector< short > | m_priorityWireTime |
Drift time of the priority wire. | |
unsigned short | m_nHits {0} |
Counter for the number of hits in the current event. | |
NDFinderParameters | m_ndFinderParams |
Configuration parameters of the 3DFinder. | |
Clusterizend | m_clusterer |
Clustering module. | |
c2array * | m_hitToSectorIDs = nullptr |
m_hitToSectorIDs: 2D array mapping TS-ID ([0, 2335]) to: | |
c5array * | m_compAxialHitReps = nullptr |
m_compAxialHitReps/m_compStereoHitReps (~ Compressed in phi (width, start, values)) 5D array mapping: | |
c5array * | m_compStereoHitReps = nullptr |
c5array * | m_expAxialHitReps = nullptr |
m_expAxialHitReps/m_expStereoHitReps (~ expansion of the compressed representations) 5D array mapping: | |
c5array * | m_expStereoHitReps = nullptr |
c3array * | m_houghSpace = nullptr |
The complete Hough space with the size [m_nOmega, m_nPhi, m_nCot]. | |
Static Private Attributes | |
static constexpr unsigned short | m_nTS = 2336 |
Number of track segments. | |
static constexpr unsigned short | m_nSL = 9 |
Number of super layers. | |
static constexpr unsigned short | m_nAxial = 41 |
Number of unique axial track segments. | |
static constexpr unsigned short | m_nStereo = 32 |
Number of unique stereo track segments. | |
static constexpr unsigned short | m_nPrio = 3 |
Number of priority wires. | |
static constexpr unsigned short | m_nOmega = 40 |
Bins in the phi dimension. | |
static constexpr unsigned short | m_nPhi = 384 |
Bins in the omega dimension. | |
static constexpr unsigned short | m_nCot = 9 |
Bins in the cot dimension. | |
static constexpr unsigned short | m_phiGeo = 32 |
Repetition of the wire pattern. | |
static constexpr unsigned short | m_nPhiSector = m_nPhi / m_phiGeo |
Bins of one phi sector (12) | |
static constexpr unsigned short | m_nPhiComp = 15 |
Bins of compressed phi: phi_start, phi_width, phi_0, ..., phi_12. | |
static constexpr SectorBinning | m_compAxialBins = {m_nOmega, m_nPhiComp, 1, m_nAxial, m_nPrio} |
40, 15, 1, 41, 3 | |
static constexpr SectorBinning | m_compStereoBins = {m_nOmega, m_nPhiComp, m_nCot, m_nStereo, m_nPrio} |
40, 15, 9, 32, 3 | |
static constexpr std::array< double, 2 > | m_omegaRange = {-4., 4.} |
1/4 = 0.25 GeV (minimum transverse momentum) | |
static constexpr std::array< double, 2 > | m_phiRange = {0., 11.25} |
One phi sector (360/32) | |
static constexpr std::array< double, 2 > | m_cotRange = {2.3849627654510415, -1.0061730449796316} |
=> theta in [22.75, 135.18] | |
static constexpr double | m_binSizeOmega = (m_omegaRange[1] - m_omegaRange[0]) / m_nOmega |
0.2 | |
static constexpr double | m_binSizePhi = (m_phiRange[1] - m_phiRange[0]) / m_nPhiSector |
0.9375 | |
static constexpr double | m_binSizeCot = (m_cotRange[1] - m_cotRange[0]) / m_nCot |
-0.377 | |
static constexpr std::array< std::array< double, 2 >, 3 > | m_acceptanceRanges = {m_omegaRange, m_phiRange, m_cotRange} |
static constexpr std::array< double, 3 > | m_binSizes = {m_binSizeOmega, m_binSizePhi, m_binSizeCot} |
Class to represent the CDC NDFinder.
Definition at line 99 of file NDFinder.h.
|
inlinevirtual |
Definition at line 129 of file NDFinder.h.
void addHit | ( | const HitInfo & | hitInfo | ) |
Add the hit info of a single track segment to the NDFinder.
Definition at line 59 of file NDFinder.cc.
|
protected |
Calculate the center of gravity (weighted mean) for the track parameters.
Definition at line 430 of file NDFinder.cc.
|
protected |
Cut on the number of hit axial/stereo super layers.
Definition at line 410 of file NDFinder.cc.
|
protected |
Extract relevant hit information (hitIdx, contribution, super layer, drift time)
Definition at line 363 of file NDFinder.cc.
|
protected |
Fills the m_expAxialHitReps/m_expStereoHitReps (see below) arrays with the expanded hit representations (hits to weights)
Definition at line 159 of file NDFinder.cc.
void findTracks | ( | ) |
Main function for track finding.
Definition at line 204 of file NDFinder.cc.
|
inline |
|
protected |
Returns the hit contribution of a TS at a certain cluster cell (= peak/maximum cell)
Definition at line 336 of file NDFinder.cc.
|
protected |
Create hits to clusters confusion matrix.
Definition at line 318 of file NDFinder.cc.
|
protected |
Find the hit with the maximum contribution in a given super layer.
Definition at line 382 of file NDFinder.cc.
|
protected |
Transform the center of gravity (cells) into the estimated track parameters.
Definition at line 465 of file NDFinder.cc.
|
inlinestaticprotected |
Transverse momentum (which is 1/omega, in GeV/c) to radius (in cm)
Definition at line 185 of file NDFinder.h.
void init | ( | const NDFinderParameters & | ndFinderParameters | ) |
Initialization of the NDFinder (parameters and lookup tables)
Definition at line 27 of file NDFinder.cc.
|
protected |
Fills the m_hitToSectorIDs (see below) array with the hit to orientation/sectorWire/sectorID relations.
Definition at line 91 of file NDFinder.cc.
|
protected |
Initialize the arrays LUT arrays.
Definition at line 72 of file NDFinder.cc.
|
protected |
Fills the m_compAxialHitReps/m_compStereoHitReps (see below) arrays with the hit representations (hits to weights)
Definition at line 126 of file NDFinder.cc.
|
protected |
Process a single axial or stereo hit for the Hough space.
Definition at line 214 of file NDFinder.cc.
|
protected |
Relate the hits in the peak of the cluster to the cluster. Applies a cut on the clusters.
Definition at line 296 of file NDFinder.cc.
void reset | ( | ) |
Reset the NDFinder data structure to process next event.
Definition at line 185 of file NDFinder.cc.
|
protected |
Core track finding logic in the constructed Hough space.
Definition at line 247 of file NDFinder.cc.
|
protected |
Transform to physical units.
Definition at line 476 of file NDFinder.cc.
Write (add) a single hit (Hough curve) to the Hough space.
Definition at line 232 of file NDFinder.cc.
|
staticconstexprprivate |
Definition at line 244 of file NDFinder.h.
|
staticconstexprprivate |
-0.377
Definition at line 243 of file NDFinder.h.
|
staticconstexprprivate |
0.2
Definition at line 241 of file NDFinder.h.
|
staticconstexprprivate |
0.9375
Definition at line 242 of file NDFinder.h.
|
staticconstexprprivate |
Definition at line 245 of file NDFinder.h.
|
private |
Clustering module.
Definition at line 204 of file NDFinder.h.
|
staticconstexprprivate |
40, 15, 1, 41, 3
Definition at line 233 of file NDFinder.h.
|
private |
m_compAxialHitReps/m_compStereoHitReps (~ Compressed in phi (width, start, values)) 5D array mapping:
to the Hough space weight contribution at the corresponding bin (int, [0, 7])
Definition at line 267 of file NDFinder.h.
|
staticconstexprprivate |
40, 15, 9, 32, 3
Definition at line 234 of file NDFinder.h.
|
private |
Definition at line 268 of file NDFinder.h.
|
staticconstexprprivate |
=> theta in [22.75, 135.18]
Definition at line 240 of file NDFinder.h.
|
private |
m_expAxialHitReps/m_expStereoHitReps (~ expansion of the compressed representations) 5D array mapping:
to the Hough space weight contribution at the corresponding bin (int, [0, 7])
Definition at line 280 of file NDFinder.h.
|
private |
Definition at line 281 of file NDFinder.h.
|
private |
TS-IDs of the hits in the current event: Elements = [0,2335] for 2336 TS in total.
Definition at line 192 of file NDFinder.h.
|
private |
SL-IDs of the hits in the current event: Elements = Super layer number in [0,1,...,8].
Definition at line 194 of file NDFinder.h.
|
private |
m_hitToSectorIDs: 2D array mapping TS-ID ([0, 2335]) to:
Definition at line 255 of file NDFinder.h.
|
private |
The complete Hough space with the size [m_nOmega, m_nPhi, m_nCot].
Definition at line 283 of file NDFinder.h.
|
staticconstexprprivate |
Number of unique axial track segments.
Definition at line 216 of file NDFinder.h.
|
staticconstexprprivate |
Bins in the cot dimension.
Definition at line 223 of file NDFinder.h.
|
private |
Configuration parameters of the 3DFinder.
Definition at line 202 of file NDFinder.h.
|
private |
Result: Vector of the found tracks.
Definition at line 190 of file NDFinder.h.
|
private |
Counter for the number of hits in the current event.
Definition at line 200 of file NDFinder.h.
|
staticconstexprprivate |
Bins in the phi dimension.
Definition at line 221 of file NDFinder.h.
|
staticconstexprprivate |
Bins in the omega dimension.
Definition at line 222 of file NDFinder.h.
|
staticconstexprprivate |
Bins of compressed phi: phi_start, phi_width, phi_0, ..., phi_12.
Definition at line 232 of file NDFinder.h.
Bins of one phi sector (12)
Definition at line 229 of file NDFinder.h.
|
staticconstexprprivate |
Number of priority wires.
Definition at line 218 of file NDFinder.h.
|
staticconstexprprivate |
Number of super layers.
Definition at line 215 of file NDFinder.h.
|
staticconstexprprivate |
Number of unique stereo track segments.
Definition at line 217 of file NDFinder.h.
|
staticconstexprprivate |
Number of track segments.
Definition at line 214 of file NDFinder.h.
|
staticconstexprprivate |
1/4 = 0.25 GeV (minimum transverse momentum)
Definition at line 237 of file NDFinder.h.
|
staticconstexprprivate |
Repetition of the wire pattern.
Definition at line 226 of file NDFinder.h.
|
staticconstexprprivate |
|
private |
Priority positon within the TS. Elements basf2: [0,3] first, left, right, no hit.
Definition at line 196 of file NDFinder.h.
|
private |
Drift time of the priority wire.
Definition at line 198 of file NDFinder.h.