Hough transform based on 2-point combinations. More...
Public Member Functions | |
MultiHough2P (geo::View_t v, double rhosz, double thetasz, int rhosm, int thetasm, double rsqr, double pco, int loops, double rmdist) | |
Construct the 2-point Hough transform. More... | |
~MultiHough2P () | |
TH2F * | MapToTH2F () const |
void | Map (const rb::HitList &h) |
void | MultiMap (rb::HitList h) |
Public Attributes | |
geo::View_t | fView |
Which detector view? More... | |
double | fRhoSz |
Size of rho bins (cm) More... | |
double | fThetaSz |
Size of theta bins (degrees) More... | |
int | fXwinSz |
Smoothing size (bins) in x. More... | |
int | fYwinSz |
Smoothing size (bins) in y. More... | |
double | fSigma |
Assumed location error on points (cm) More... | |
double | fRsqr |
Distance^2 cut on points (cm^2) More... | |
double | fPco |
Number of sigma abouve average peak height to use as cutoff. More... | |
int | fLoops |
Max number of Multi-Hough loops. More... | |
double | fRmDst |
Distance cut for removing points from a Hough line. More... | |
LiteTH2 * | fHspaceW |
Hough transform. More... | |
rb::HoughResult | fH |
Results of Hough transformation;. More... | |
Private Member Functions | |
void | BuildMap (double xlo, double xhi, double ylo, double yhi) |
void | RhoTheta (double x1, double y1, double x2, double y2, double *rho, double *theta, double *sigmarho, double *sigmatheta) |
void | SmoothMap () |
void | RefinePeak (double &rho, double &theta, int xp, int yp) |
void | ReweightHits (double rho, double theta, rb::HitList &h) |
Hough transform based on 2-point combinations.
Definition at line 21 of file MultiHough2P.h.
hough::MultiHough2P::MultiHough2P | ( | geo::View_t | v, |
double | rhosz, | ||
double | thetasz, | ||
int | rhosm, | ||
int | thetasm, | ||
double | rsqr, | ||
double | pco, | ||
int | loops, | ||
double | rmdist | ||
) |
Construct the 2-point Hough transform.
The transform proceeds by considering all paris of points that occur within a cut off distance (rsqr) of each other. For each pair an ellipse is filled in Hough space weighted by the quality of the line fit to the two spatial points. The algorithm is largely derived from
"Real-time line detection through an improved Hough transform voting scheme", L.A.F. Fernandes, M.M. Oliveira / Pattern Recognition 41 (2008) 299-314
v | - Which detector view? geo::kX or geo::kY |
rhosz | - Size of rho bins (cm) |
thetasz | - Size of theta bins (degrees) |
rhosm | - Number of bins to use in smoothing rho |
thetasm | - Number of bins to use in smoothing theta |
rsqr | - Cut on distance between two points |
pco | - Number of sigma above average peak height for threshold (peak cut-off) |
loops | - Max number of multi-Hough loops |
Definition at line 109 of file MultiHough2P.cxx.
hough::MultiHough2P::~MultiHough2P | ( | ) |
|
private |
Definition at line 175 of file MultiHough2P.cxx.
References fHspaceW, fRhoSz, fThetaSz, makeTrainCVSamples::int, M_PI, util::pythag(), and r().
Referenced by Map().
void hough::MultiHough2P::Map | ( | const rb::HitList & | h | ) |
Make the Hough map for the hit list h.
h | - The list of hits (can be mixed X and Y view hits) |
Definition at line 225 of file MultiHough2P.cxx.
References abs(), hough::LiteTH2::AddBinContent(), BuildMap(), fH, fHspaceW, hough::LiteTH2::FindBinX(), hough::LiteTH2::FindBinY(), fRsqr, rb::HoughResult::fTNShi, rb::HoughResult::fTNSlo, fView, fXwinSz, rb::HoughResult::fXY0, fYwinSz, rb::HoughResult::fZ0, hough::Gaus(), hough::LiteTH2::GetBinCenterX(), hough::LiteTH2::GetBinCenterY(), hough::LiteTH2::GetNbinsX(), hough::LiteTH2::GetNbinsY(), MECModelEnuComparisons::i, calib::j, RhoTheta(), SmoothMap(), util::sqr(), chisquared::theta, w, submit_syst::x, xhi, make_syst_table_plots::xlo, submit_syst::y, yhi, and ylo.
Referenced by MultiMap().
TH2F * hough::MultiHough2P::MapToTH2F | ( | ) | const |
Definition at line 196 of file MultiHough2P.cxx.
References fHspaceW, fView, geo::kX, geo::kY, runNovaSAM::ret, and hough::LiteTH2::ToTH2F().
Referenced by hough::MultiHoughT::WriteHoughHistos().
void hough::MultiHough2P::MultiMap | ( | rb::HitList | h | ) |
Definition at line 329 of file MultiHough2P.cxx.
References a, b, stan::math::fabs(), fH, fHspaceW, fLoops, fPco, rb::HoughResult::fPeak, hough::LiteTH2::GetBinContent(), hough::LiteTH2::GetNbinsX(), hough::LiteTH2::GetNbinsY(), MECModelEnuComparisons::i, Map(), genie::units::nb, r(), RefinePeak(), ReweightHits(), rb::HoughResult::SortPeaks(), std::sqrt(), sr, and chisquared::theta.
Referenced by hough::MultiHoughT::produce().
Definition at line 532 of file MultiHough2P.cxx.
References dist, stan::math::fabs(), fHspaceW, hough::LiteTH2::GetBinCenterX(), hough::LiteTH2::GetBinCenterY(), hough::LiteTH2::GetBinContent(), hough::LiteTH2::GetNbinsX(), hough::LiteTH2::GetNbinsY(), and util::pythag().
Referenced by MultiMap().
|
private |
Definition at line 579 of file MultiHough2P.cxx.
References a, b, plot_validation_datamc::c, std::cos(), d, geo::DsqrToLine(), fH, fRmDst, fView, rb::HoughResult::fXY0, rb::HoughResult::fZ0, MECModelEnuComparisons::i, calib::j, m, std::sin(), std::sqrt(), and make_true_q0q3_plots::zmax.
Referenced by MultiMap().
|
private |
Definition at line 134 of file MultiHough2P.cxx.
References std::atan2(), std::cos(), d, fSigma, M_PI, util::pythag(), std::sin(), submit_syst::x2, and submit_syst::y2.
Referenced by Map().
|
private |
Definition at line 471 of file MultiHough2P.cxx.
References a, b, fHspaceW, fXwinSz, fYwinSz, hough::Gaus(), hough::LiteTH2::GetBinContent(), hough::LiteTH2::GetNbinsX(), hough::LiteTH2::GetNbinsY(), MECModelEnuComparisons::i, calib::j, m, getGoodRuns4SAM::n, hough::LiteTH2::SetBinContent(), sum, and w.
Referenced by Map().
rb::HoughResult hough::MultiHough2P::fH |
Results of Hough transformation;.
Definition at line 91 of file MultiHough2P.h.
Referenced by Map(), MultiMap(), hough::MultiHoughT::produce(), and ReweightHits().
LiteTH2* hough::MultiHough2P::fHspaceW |
Hough transform.
Definition at line 90 of file MultiHough2P.h.
Referenced by BuildMap(), Map(), MapToTH2F(), MultiMap(), RefinePeak(), SmoothMap(), and ~MultiHough2P().
int hough::MultiHough2P::fLoops |
Max number of Multi-Hough loops.
Definition at line 86 of file MultiHough2P.h.
Referenced by MultiMap().
double hough::MultiHough2P::fPco |
Number of sigma abouve average peak height to use as cutoff.
Definition at line 85 of file MultiHough2P.h.
Referenced by MultiMap().
double hough::MultiHough2P::fRhoSz |
double hough::MultiHough2P::fRmDst |
Distance cut for removing points from a Hough line.
Definition at line 87 of file MultiHough2P.h.
Referenced by ReweightHits().
double hough::MultiHough2P::fRsqr |
double hough::MultiHough2P::fSigma |
Assumed location error on points (cm)
Definition at line 83 of file MultiHough2P.h.
Referenced by RhoTheta().
double hough::MultiHough2P::fThetaSz |
Size of theta bins (degrees)
Definition at line 80 of file MultiHough2P.h.
Referenced by BuildMap().
geo::View_t hough::MultiHough2P::fView |
Which detector view?
Definition at line 78 of file MultiHough2P.h.
Referenced by Map(), MapToTH2F(), and ReweightHits().
int hough::MultiHough2P::fXwinSz |
Smoothing size (bins) in x.
Definition at line 81 of file MultiHough2P.h.
Referenced by Map(), and SmoothMap().
int hough::MultiHough2P::fYwinSz |
Smoothing size (bins) in y.
Definition at line 82 of file MultiHough2P.h.
Referenced by Map(), and SmoothMap().