#include <HoughBaseAlg.h>
Classes | |
struct | ChargeInfo_t |
Data structure collecting charge information to be filled in cluster. More... | |
Public Member Functions | |
HoughBaseAlg (fhicl::ParameterSet const &pset) | |
virtual | ~HoughBaseAlg ()=default |
size_t | FastTransform (const std::vector< art::Ptr< recob::Cluster >> &clusIn, std::vector< recob::Cluster > &ccol, std::vector< art::PtrVector< recob::Hit >> &clusHitsOut, CLHEP::HepRandomEngine &engine, art::Event const &evt, std::string const &label) |
size_t | Transform (const detinfo::DetectorClocksData &clockData, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> const &hits, CLHEP::HepRandomEngine &engine, std::vector< unsigned int > *fpointId_to_clusterId, unsigned int clusterId, unsigned int *nClusters, std::vector< protoTrack > *protoTracks) |
size_t | FastTransform (detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> const &clusIn, std::vector< art::PtrVector< recob::Hit >> &clusHitsOut, CLHEP::HepRandomEngine &engine) |
size_t | FastTransform (detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> const &clusIn, std::vector< art::PtrVector< recob::Hit >> &clusHitsOut, CLHEP::HepRandomEngine &engine, std::vector< double > &slope, std::vector< ChargeInfo_t > &totalQ) |
size_t | Transform (std::vector< art::Ptr< recob::Hit >> const &hits) |
size_t | Transform (detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> const &hits, double &slope, double &intercept) |
Private Member Functions | |
void | HLSSaveBMPFile (char const *, unsigned char *, int, int) |
Private Attributes | |
int | fMaxLines |
Max number of lines that can be found. More... | |
int | fMinHits |
int | fSaveAccumulator |
Save bitmap image of accumulator for debugging? More... | |
int | fNumAngleCells |
that fall into the "correct" bin will be small and consistent with noise. More... | |
float | fMaxDistance |
Max distance that a hit can be from a line to be considered part of that line. More... | |
float | fMaxSlope |
Max slope a line can have. More... | |
int | fRhoZeroOutRange |
Range in rho over which to zero out area around previously found lines in the accumulator. More... | |
int | fThetaZeroOutRange |
Range in theta over which to zero out area around previously found lines in the accumulator. More... | |
float | fRhoResolutionFactor |
Factor determining the resolution in rho. More... | |
int | fPerCluster |
int | fMissedHits |
float | fMissedHitsDistance |
Distance between hits in a hough line before a hit is considered missed. More... | |
float | fMissedHitsToLineSize |
Ratio of missed hits to line size for a line to be considered a fake. More... | |
Friends | |
class | HoughTransformClus |
Definition at line 472 of file HoughBaseAlg.h.
|
explicit |
Definition at line 261 of file HoughBaseAlg.cxx.
|
virtualdefault |
size_t cluster::HoughBaseAlg::FastTransform | ( | const std::vector< art::Ptr< recob::Cluster >> & | clusIn, |
std::vector< recob::Cluster > & | ccol, | ||
std::vector< art::PtrVector< recob::Hit >> & | clusHitsOut, | ||
CLHEP::HepRandomEngine & | engine, | ||
art::Event const & | evt, | ||
std::string const & | label | ||
) |
Definition at line 886 of file HoughBaseAlg.cxx.
size_t cluster::HoughBaseAlg::FastTransform | ( | detinfo::DetectorClocksData const & | clockData, |
detinfo::DetectorPropertiesData const & | detProp, | ||
std::vector< art::Ptr< recob::Hit >> const & | clusIn, | ||
std::vector< art::PtrVector< recob::Hit >> & | clusHitsOut, | ||
CLHEP::HepRandomEngine & | engine | ||
) |
Definition at line 1016 of file HoughBaseAlg.cxx.
size_t cluster::HoughBaseAlg::FastTransform | ( | detinfo::DetectorClocksData const & | clockData, |
detinfo::DetectorPropertiesData const & | detProp, | ||
std::vector< art::Ptr< recob::Hit >> const & | clusIn, | ||
std::vector< art::PtrVector< recob::Hit >> & | clusHitsOut, | ||
CLHEP::HepRandomEngine & | engine, | ||
std::vector< double > & | slope, | ||
std::vector< ChargeInfo_t > & | totalQ | ||
) |
Definition at line 1029 of file HoughBaseAlg.cxx.
|
private |
Definition at line 851 of file HoughBaseAlg.cxx.
size_t cluster::HoughBaseAlg::Transform | ( | const detinfo::DetectorClocksData & | clockData, |
detinfo::DetectorPropertiesData const & | detProp, | ||
std::vector< art::Ptr< recob::Hit >> const & | hits, | ||
CLHEP::HepRandomEngine & | engine, | ||
std::vector< unsigned int > * | fpointId_to_clusterId, | ||
unsigned int | clusterId, | ||
unsigned int * | nClusters, | ||
std::vector< protoTrack > * | protoTracks | ||
) |
characteristic hit width of induction and collection plane
LOOP over hits, picking a random one Enter the point into the accumulator IF it is already in the accumulator or part of a line, skip it Store it in a vector of points that have been chosen
Find max value in accumulator; IF above threshold, create a line Subtract points in line from accumulator
END LOOP over hits, picking a random one
Init specifies the size of the two-dimensional accumulator (based on the arguments, number of wires and number of time samples).
Adds all of the hits to the accumulator
count is how many points are left to randomly insert
The random hit we are examining unsigned int randInd = rand() % hits.size();
If the point isn't in the current fuzzy cluster, skip it
Skip if it's already in a line
If we have already accumulated the point, skip it
zeroes out the neighborhood of all previous lines
end loop over size of listxmax
Find the weightiest cell in the accumulator.
Add the randomly selected point to the accumulator
Find the center of mass of the 3x3 cell system (with maxCell at the center).
fill the list of cells that have already been found
end iterator over hits
Subtract points from the accumulator that have already been used
end if !std::isnan
end loop over hits
Definition at line 280 of file HoughBaseAlg.cxx.
size_t cluster::HoughBaseAlg::Transform | ( | std::vector< art::Ptr< recob::Hit >> const & | hits | ) |
size_t cluster::HoughBaseAlg::Transform | ( | detinfo::DetectorPropertiesData const & | detProp, |
std::vector< art::Ptr< recob::Hit >> const & | hits, | ||
double & | slope, | ||
double & | intercept | ||
) |
Definition at line 1375 of file HoughBaseAlg.cxx.
|
friend |
Definition at line 531 of file HoughBaseAlg.h.
|
private |
Max distance that a hit can be from a line to be considered part of that line.
Definition at line 545 of file HoughBaseAlg.h.
|
private |
Max number of lines that can be found.
Definition at line 536 of file HoughBaseAlg.h.
|
private |
Max slope a line can have.
Definition at line 546 of file HoughBaseAlg.h.
|
private |
Min number of hits in the accumulator to consider (number of hits required to be considered a line).
Definition at line 537 of file HoughBaseAlg.h.
|
private |
Number of wires that are allowed to be missed before a line is broken up into segments
Definition at line 556 of file HoughBaseAlg.h.
|
private |
Distance between hits in a hough line before a hit is considered missed.
Definition at line 559 of file HoughBaseAlg.h.
|
private |
Ratio of missed hits to line size for a line to be considered a fake.
Definition at line 561 of file HoughBaseAlg.h.
|
private |
that fall into the "correct" bin will be small and consistent with noise.
Number of angle cells in the accumulator (a measure of the angular resolution of the line finder). If this number is too large than the number of votes
Definition at line 540 of file HoughBaseAlg.h.
|
private |
Tells the original Hough algorithm to look at clusters individually, or all hits at once
Definition at line 553 of file HoughBaseAlg.h.
|
private |
Factor determining the resolution in rho.
Definition at line 551 of file HoughBaseAlg.h.
|
private |
Range in rho over which to zero out area around previously found lines in the accumulator.
Definition at line 548 of file HoughBaseAlg.h.
|
private |
Save bitmap image of accumulator for debugging?
Definition at line 539 of file HoughBaseAlg.h.
|
private |
Range in theta over which to zero out area around previously found lines in the accumulator.
Definition at line 550 of file HoughBaseAlg.h.