Belle II Software
release-08-01-10
|
Class to represent the CDC NDFinder. More...
#include <NDFinder.h>
Classes | |
struct | ndparameters |
Struct of ndFinder parameters. More... | |
Public Member Functions | |
NDFinder () | |
Default constructor. | |
virtual | ~NDFinder () |
Default destructor. | |
void | init (int minweight, int minpts, bool diagonal, int minhits, int minhits_axial, double thresh, double minassign, int mincells, bool verbose, std::string &axialFile, std::string &stereoFile) |
initialization More... | |
void | initBins () |
Initialize the binnings and reserve the arrays. More... | |
void | loadArray (const std::string &filename, ndbinning bins, c5array &hitsToTracks) |
Load an NDFinder array of hit representations in track phase space. More... | |
void | restoreZeros (ndbinning zerobins, ndbinning compbins, c5array &expArray, const c5array &compArray) |
Restore non-zero suppressed hit curves. More... | |
void | squeezeOne (c5array &writeArray, c5array &readArray, int outparcels, int inparcels, c5index ihit, c5index iprio, c5index itheta, c5elem nomega) |
Squeeze phi-axis in a 2D (omega,phi) plane. More... | |
void | squeezeAll (ndbinning writebins, c5array &writeArray, c5array &readArray, int outparcels, int inparcels) |
Loop over all hits and theta bins and squeeze all 2D (omega,phi) planes. | |
void | initHitModAxSt (c2array &hitMod) |
Initialize hit modulo mappings. | |
void | reset () |
NDFinder reset data structure to process next event. | |
void | printParams () |
Debug: print configured parameters. | |
void | addHit (unsigned short hitId, unsigned short hitPrioPos) |
fill hit info of the event | |
void | findTracks () |
main function for track finding More... | |
std::vector< NDFinderTrack > * | getFinderTracks () |
retreive the results | |
void | printArray3D (c3array &hitsToTracks, ndbinning bins, ushort, ushort, ushort, ushort) |
Debug Tool: Print part of the houghmap. | |
Public Attributes | |
std::vector< std::vector< float > > | m_acceptRanges |
std::vector< float > | m_slotsizes |
Protected Member Functions | |
void | getCM () |
NDFinder internal functions for track finding. More... | |
void | addLookup (unsigned short ihit) |
Add a single axial or stereo hit to the houghmap. More... | |
void | addC3Comp (ushort hitr, ushort prio, const c5array &hitsToTracks, short Dstart, ndbinning bins) |
In place array addition to houghmap Comp: A = A + B. | |
std::vector< std::vector< unsigned short > > | getHitsVsClusters (std::vector< SimpleCluster > &clusters) |
Create hits to clusters confusion matrix. | |
cell_index | getMax (const std::vector< cell_index > &) |
Peak cell in cluster. | |
ushort | hitContrib (cell_index peak, ushort ihit) |
Determine weight contribution of a single hit to a single cell. More... | |
std::vector< SimpleCluster > | relateHitsToClusters (std::vector< std::vector< unsigned short >> &hitsVsClusters, std::vector< SimpleCluster > &clusters) |
Use confusion matrix to related hits to clusters. More... | |
int | hitToCluster (std::vector< std::vector< unsigned short >> &hitsVsClusters, unsigned short hit) |
Determine the best cluster for a single hit, given hitsVsClusters confusion matrix. | |
std::vector< cellweight > | getHighWeight (std::vector< cell_index > entries, float cutoff) |
Candidate cells as seed for the clustering. More... | |
std::vector< double > | getWeightedMean (std::vector< cellweight >) |
Calculate the weighted center of a cluster. | |
std::vector< double > | getBinToVal (std::vector< double >) |
Scale the weighted center to track parameter values. | |
double | cdc_track_radius (double pt) |
Transverse momentum to radius. | |
float | transformVar (float estVal, int idx) |
Calculate physical units. | |
std::vector< double > | transform (std::vector< double > estimate) |
Private Attributes | |
boost::array< c5index, 5 > | m_pc5shapeax |
NDFinder. More... | |
boost::array< c5index, 5 > | m_pc5shapest |
boost::array< c3index, 3 > | m_pc3shape |
boost::array< c2index, 2 > | m_pc2shapeHitMod |
boost::array< c5index, 5 > | m_pc5shapeCompAx |
boost::array< c5index, 5 > | m_pc5shapeCompSt |
boost::array< c5index, 5 > | m_pc5shapeExpAx |
boost::array< c5index, 5 > | m_pc5shapeExpSt |
c5array * | m_parrayAxial = nullptr |
Array pointers to the hit patterns. | |
c5array * | m_parrayStereo = nullptr |
c3array * | m_phoughPlane = nullptr |
c2array * | m_parrayHitMod = nullptr |
c5array * | m_pcompAxial = nullptr |
c5array * | m_pcompStereo = nullptr |
c5array * | m_parrayAxialExp = nullptr |
c5array * | m_parrayStereoExp = nullptr |
std::vector< int > | m_nWires |
Number of first priority wires in each super layer (TS per SL) | |
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_prioPos |
Priority positon within the TS in the current event elements basf2: [0,3] first, left, right, no hit elements stored: 3 - basf2prio. | |
std::vector< unsigned short > | m_hitOrients |
Orients TS-Ids of the hits in the current event elements: [0,2335] for 2336 TS in total. | |
std::vector< short > | m_vecDstart |
Phi-start of 7/32 hit representation in full track parameter space. More... | |
unsigned short | m_nHits {0} |
Counter for the number of hits in the current event. | |
ndparameters | m_params |
Configuration parameters of the 3DFinder. | |
ndbinning | m_axbins |
Binnings in different hit pattern arrays. | |
ndbinning | m_stbins |
ndbinning | m_fullbins |
ndbinning | m_compaxbins |
ndbinning | m_compstbins |
ndbinning | m_expaxbins |
ndbinning | m_expstbins |
clusterer_params | m_clusterer_params |
Configuration of the clustering module. | |
std::vector< ushort > | m_planeShape |
unsigned short | m_nPhiFull {0} |
Default bins. | |
unsigned short | m_nPhiOne {0} |
unsigned short | m_nPhiComp {0} |
unsigned short | m_nPhiExp {0} |
unsigned short | m_nPhiUse {0} |
unsigned short | m_nOmega {0} |
unsigned short | m_nTheta {0} |
unsigned short | m_nSL {0} |
unsigned short | m_nTS {0} |
unsigned short | m_nAx {0} |
unsigned short | m_nSt {0} |
unsigned short | m_nPrio {0} |
Belle2::Clusterizend | m_clusterer |
Clustering module. | |
bool | m_verbose {false} |
Print Hough planes and verbose output. | |
Class to represent the CDC NDFinder.
Definition at line 90 of file NDFinder.h.
|
protected |
Add a single axial or stereo hit to the houghmap.
orient: {1 : axial, 0 : stereo}
Determines the phi window of the hit in the full houghmap (Dstart, Dend). Uses: m_arrayHitMod Fills: m_vecDstart, m_hitOrients
Definition at line 331 of file NDFinder.cc.
void findTracks | ( | ) |
main function for track finding
Build the Houghplane by summing up all single hit contributions
Definition at line 388 of file NDFinder.cc.
|
protected |
NDFinder internal functions for track finding.
Core track finding logic in the constructed houghmap
pt, phiRad, cotTheta, cluster
Definition at line 485 of file NDFinder.cc.
|
protected |
Candidate cells as seed for the clustering.
Selects all cells with weight > minweight
Definition at line 624 of file NDFinder.cc.
|
protected |
Determine weight contribution of a single hit to a single cell.
Used to create the hitsVsClusters confusion matrix.
Definition at line 641 of file NDFinder.cc.
void init | ( | int | minweight, |
int | minpts, | ||
bool | diagonal, | ||
int | minhits, | ||
int | minhits_axial, | ||
double | thresh, | ||
double | minassign, | ||
int | mincells, | ||
bool | verbose, | ||
std::string & | axialFile, | ||
std::string & | stereoFile | ||
) |
initialization
Set parameters
minweight | minimum weight of cluster member cells |
minpts | minimum neighboring cells with minweight for core cells |
diagonal | consider diagonal neighbor cells in the clustering |
minhits | minimum number of hits per cluster |
minhits_axial | minimum number of axial hits per cluster |
thresh | selection of cells for weighted mean track estimation |
minassign | hit to cluster assigment critical limit |
mincells | minumum number of cells per cluster |
verbose | print Hough planes and verbose output |
axialFile | axial hit data |
stereoFile | stereo hit data |
Load the axial and stereo track to hit relations from file.
Unpack zero suppresed track to hit relations.
Definition at line 25 of file NDFinder.cc.
void initBins | ( | ) |
Initialize the binnings and reserve the arrays.
Create the arrays of the track to hit relations for axial and stereo hits.
Since the CDC wire pattern is repeated 32 times, the hit ids are stored for 1/32 of the CDC only. The total number of 2336 TS corresponds to (41 axial + 32 stereo) * 32.
The number of track bins (full phi) is: (omega, phi, theta) = (40, 384, 9)
compressed phi: phi_start, phi_width, phi_0, ..., phi_12
use phi bins: 84 = 7 * (384/32)
expanded phi: 132 = 11 * (384/32)
Acceptance Ranges
Definition at line 72 of file NDFinder.cc.
void loadArray | ( | const std::string & | filename, |
ndbinning | bins, | ||
c5array & | hitsToTracks | ||
) |
Load an NDFinder array of hit representations in track phase space.
Used to load axial and stereo hit arrays. Represented in a 7/32 phi sector of the CDC.
Definition at line 159 of file NDFinder.cc.
|
protected |
Use confusion matrix to related hits to clusters.
Remove small clusters with less than minhits related hits.
hit assignment
Definition at line 422 of file NDFinder.cc.
void restoreZeros | ( | ndbinning | zerobins, |
ndbinning | compbins, | ||
c5array & | expArray, | ||
const c5array & | compArray | ||
) |
Restore non-zero suppressed hit curves.
will make m_params.arrayAxialFile and m_params.arrayStereoFile obsolete
Definition at line 258 of file NDFinder.cc.
void squeezeOne | ( | c5array & | writeArray, |
c5array & | readArray, | ||
int | outparcels, | ||
int | inparcels, | ||
c5index | ihit, | ||
c5index | iprio, | ||
c5index | itheta, | ||
c5elem | nomega | ||
) |
Squeeze phi-axis in a 2D (omega,phi) plane.
inparcels | number of 1/32 sectors in input plane |
outparcels | number of 1/32 sectors in output plane |
Definition at line 223 of file NDFinder.cc.
|
private |
|
private |
Phi-start of 7/32 hit representation in full track parameter space.
Used to get the weight contribution of a hit to a cluster.
Definition at line 326 of file NDFinder.h.