LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "PMAlgVertexing.h"
Classes | |
struct | Config |
Public Member Functions | |
PMAlgVertexing (const Config &config) | |
void | reconfigure (const Config &config) |
PMAlgVertexing (const fhicl::ParameterSet &pset) | |
virtual | ~PMAlgVertexing (void) |
void | reset (void) |
size_t | run (pma::TrkCandidateColl &trk_input) |
size_t | run (pma::TrkCandidateColl &trk_input, const std::vector< TVector3 > &vtx_input) |
std::vector< std::pair< TVector3, std::vector< std::pair< size_t, bool > > > > | getVertices (const pma::TrkCandidateColl &tracks, bool onlyBranching=false) const |
std::vector< std::pair< TVector3, size_t > > | getKinks (const pma::TrkCandidateColl &tracks) const |
Private Member Functions | |
bool | has (const std::vector< size_t > &v, size_t idx) const |
std::vector< pma::VtxCandidate > | firstPassCandidates (void) |
std::vector< pma::VtxCandidate > | secondPassCandidates (void) |
size_t | makeVertices (std::vector< pma::VtxCandidate > &candidates) |
std::vector< std::pair< double, double > > | getdQdx (const pma::Track3D &trk) const |
Get dQ/dx sequence to detect various features. More... | |
double | convolute (size_t idx, size_t len, double *adc, double const *shape) const |
Get convolution value. More... | |
bool | isSingleParticle (pma::Track3D *trk1, pma::Track3D *trk2) const |
Check if colinear in 3D and dQ/dx with no significant step. More... | |
void | mergeBrokenTracks (pma::TrkCandidateColl &trk_input) const |
void | splitMergedTracks (pma::TrkCandidateColl &trk_input) const |
Split track and add vertex and reoptimize when dQ/dx step detected. More... | |
void | findKinksOnTracks (pma::TrkCandidateColl &trk_input) const |
Remove penalty on the angle if kink detected and reopt track. More... | |
void | cleanTracks (void) |
void | sortTracks (const pma::TrkCandidateColl &trk_input) |
void | collectTracks (pma::TrkCandidateColl &result) |
Private Attributes | |
pma::TrkCandidateColl | fOutTracks |
pma::TrkCandidateColl | fShortTracks |
pma::TrkCandidateColl | fEmTracks |
pma::TrkCandidateColl | fExcludedTracks |
double | fMinTrackLength |
bool | fFindKinks |
double | fKinkMinDeg |
double | fKinkMinStd |
Definition at line 29 of file PMAlgVertexing.h.
pma::PMAlgVertexing::PMAlgVertexing | ( | const Config & | config | ) |
Definition at line 14 of file PMAlgVertexing.cxx.
References reconfigure().
|
inline |
Definition at line 61 of file PMAlgVertexing.h.
References ~PMAlgVertexing().
|
virtual |
Definition at line 29 of file PMAlgVertexing.cxx.
References cleanTracks().
Referenced by PMAlgVertexing().
|
private |
Definition at line 35 of file PMAlgVertexing.cxx.
References pma::TrkCandidateColl::clear(), fEmTracks, fExcludedTracks, fOutTracks, fShortTracks, and pma::TrkCandidateColl::tracks().
Referenced by reset(), sortTracks(), and ~PMAlgVertexing().
|
private |
Definition at line 51 of file PMAlgVertexing.cxx.
References pma::TrkCandidateColl::clear(), fEmTracks, fExcludedTracks, fOutTracks, fShortTracks, pma::TrkCandidateColl::push_back(), pma::TrkCandidateColl::size(), and pma::TrkCandidateColl::tracks().
Referenced by run().
|
private |
Get convolution value.
Definition at line 379 of file PMAlgVertexing.cxx.
References pmtana::mean().
Referenced by has(), and isSingleParticle().
|
private |
Remove penalty on the angle if kink detected and reopt track.
Definition at line 523 of file PMAlgVertexing.cxx.
References e, fKinkMinDeg, fKinkMinStd, has(), pmtana::mean(), min, n, pma::Track3D::Nodes(), pma::Track3D::Optimize(), and pma::TrkCandidateColl::size().
Referenced by has(), and run().
|
private |
Definition at line 110 of file PMAlgVertexing.cxx.
References pma::VtxCandidate::Add(), fOutTracks, pma::VtxCandidate::Mse(), and pma::TrkCandidateColl::size().
Referenced by has(), and run().
|
private |
Get dQ/dx sequence to detect various features.
Definition at line 341 of file PMAlgVertexing.cxx.
References pma::Track3D::GetRawdEdxSequence(), geo::kU, geo::kV, geo::kZ, max, pma::Track3D::NHits(), and pma::Track3D::size().
Referenced by has(), and isSingleParticle().
std::vector< std::pair< TVector3, size_t > > pma::PMAlgVertexing::getKinks | ( | const pma::TrkCandidateColl & | tracks | ) | const |
Definition at line 634 of file PMAlgVertexing.cxx.
References pma::Node3D::IsBranching(), pma::Node3D::IsVertex(), n, pma::Track3D::Nodes(), pma::Node3D::Point3D(), and pma::TrkCandidateColl::size().
Referenced by pma::PMAlgTrackingBase::getKinks(), and reset().
std::vector< std::pair< TVector3, std::vector< std::pair< size_t, bool > > > > pma::PMAlgVertexing::getVertices | ( | const pma::TrkCandidateColl & | tracks, |
bool | onlyBranching = false |
||
) | const |
Definition at line 591 of file PMAlgVertexing.cxx.
References pma::Track3D::front(), pma::Node3D::IsBranching(), n, pma::Track3D::Nodes(), pma::Hit3D::Point3D(), pma::TrkCandidateColl::size(), and lar::dump::vector().
Referenced by pma::PMAlgTrackingBase::getVertices(), and reset().
|
inlineprivate |
Definition at line 89 of file PMAlgVertexing.h.
References convolute(), findKinksOnTracks(), firstPassCandidates(), getdQdx(), isSingleParticle(), makeVertices(), mergeBrokenTracks(), secondPassCandidates(), and splitMergedTracks().
Referenced by findKinksOnTracks().
|
private |
Check if colinear in 3D and dQ/dx with no significant step.
Definition at line 399 of file PMAlgVertexing.cxx.
References convolute(), getdQdx(), and pma::Track3D::Segments().
Referenced by has(), and mergeBrokenTracks().
|
private |
Definition at line 153 of file PMAlgVertexing.cxx.
References d, pma::Dist2(), fEmTracks, fMinTrackLength, fOutTracks, and s.
Referenced by has(), and run().
|
private |
Find elastic scattering vertices on tracks, merge back tracks that were split during vertex finding. 3D angle between two tracks and dQ/dx is checked.
Definition at line 458 of file PMAlgVertexing.cxx.
References isSingleParticle(), n, pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), pma::Track3D::Nodes(), pma::Segment3D::Parent(), pma::SortedObjectBase::Prev(), pma::Track3D::Segments(), and pma::TrkCandidateColl::size().
Referenced by has(), and run().
void pma::PMAlgVertexing::reconfigure | ( | const Config & | config | ) |
Definition at line 19 of file PMAlgVertexing.cxx.
References fFindKinks, pma::PMAlgVertexing::Config::FindKinks, fKinkMinDeg, fKinkMinStd, fMinTrackLength, pma::PMAlgVertexing::Config::KinkMinDeg, pma::PMAlgVertexing::Config::KinkMinStd, and pma::PMAlgVertexing::Config::MinTrackLength.
Referenced by PMAlgVertexing().
|
inline |
Definition at line 67 of file PMAlgVertexing.h.
References cleanTracks(), getKinks(), getVertices(), and run().
size_t pma::PMAlgVertexing::run | ( | pma::TrkCandidateColl & | trk_input | ) |
Copy input tracks, find 3D vertices, connect tracks, break them or flip if needed, reoptimize track structures. Result is returned as a collection of new tracks, that replaces content of trk_input (old tracks are deleted). Vertices can be accessed with getVertices function.
Definition at line 265 of file PMAlgVertexing.cxx.
References collectTracks(), fEmTracks, fFindKinks, findKinksOnTracks(), firstPassCandidates(), fOutTracks, makeVertices(), mergeBrokenTracks(), secondPassCandidates(), pma::TrkCandidateColl::size(), and sortTracks().
Referenced by pma::PMAlgFitter::build(), pma::PMAlgTracker::build(), and reset().
size_t pma::PMAlgVertexing::run | ( | pma::TrkCandidateColl & | trk_input, |
const std::vector< TVector3 > & | vtx_input | ||
) |
Copy input tracks, use provided 3D vertices to connect tracks, break tracks or flip if needed, reoptimize track structures. Result is returned as a collection of new tracks, that replaces content of trk_input (old tracks are deleted). Input vertices that were actually associated to tracks are copied to the output collection (use getVertices function).
Definition at line 327 of file PMAlgVertexing.cxx.
References sortTracks().
|
private |
Definition at line 131 of file PMAlgVertexing.cxx.
References pma::VtxCandidate::Add(), fEmTracks, fMinTrackLength, fOutTracks, pma::VtxCandidate::Mse(), and pma::TrkCandidateColl::size().
Referenced by has(), and run().
|
private |
Definition at line 75 of file PMAlgVertexing.cxx.
References cleanTracks(), fEmTracks, fExcludedTracks, fMinTrackLength, fOutTracks, pma::Track3D::kCosmic, pma::Track3D::kEmLike, pma::TrkCandidateColl::size(), and pma::TrkCandidateColl::tracks().
Referenced by run().
|
private |
Split track and add vertex and reoptimize when dQ/dx step detected.
Definition at line 509 of file PMAlgVertexing.cxx.
References pma::TrkCandidateColl::size().
Referenced by has().
|
private |
Definition at line 118 of file PMAlgVertexing.h.
Referenced by cleanTracks(), collectTracks(), makeVertices(), run(), secondPassCandidates(), and sortTracks().
|
private |
Definition at line 119 of file PMAlgVertexing.h.
Referenced by cleanTracks(), collectTracks(), and sortTracks().
|
private |
Definition at line 129 of file PMAlgVertexing.h.
Referenced by reconfigure(), and run().
|
private |
Definition at line 130 of file PMAlgVertexing.h.
Referenced by findKinksOnTracks(), and reconfigure().
|
private |
Definition at line 131 of file PMAlgVertexing.h.
Referenced by findKinksOnTracks(), and reconfigure().
|
private |
Definition at line 127 of file PMAlgVertexing.h.
Referenced by makeVertices(), reconfigure(), secondPassCandidates(), and sortTracks().
|
private |
Definition at line 118 of file PMAlgVertexing.h.
Referenced by cleanTracks(), collectTracks(), firstPassCandidates(), makeVertices(), run(), secondPassCandidates(), and sortTracks().
|
private |
Definition at line 118 of file PMAlgVertexing.h.
Referenced by cleanTracks(), and collectTracks().