LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "PMAlgVertexing.h"
Classes | |
struct | Config |
Public Member Functions | |
PMAlgVertexing (const Config &config) | |
PMAlgVertexing (const fhicl::ParameterSet &pset) | |
~PMAlgVertexing () | |
void | reset () |
size_t | run (const detinfo::DetectorPropertiesData &detProp, 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 () const |
std::vector< pma::VtxCandidate > | secondPassCandidates () const |
size_t | makeVertices (detinfo::DetectorPropertiesData const &detProp, 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 (const detinfo::DetectorPropertiesData &detProp, pma::TrkCandidateColl &trk_input) const |
Remove penalty on the angle if kink detected and reopt track. More... | |
void | cleanTracks () |
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 36 of file PMAlgVertexing.h.
pma::PMAlgVertexing::PMAlgVertexing | ( | const Config & | config | ) |
Definition at line 15 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.
|
inline |
Definition at line 58 of file PMAlgVertexing.h.
pma::PMAlgVertexing::~PMAlgVertexing | ( | ) |
|
private |
Definition at line 31 of file PMAlgVertexing.cxx.
References pma::TrkCandidateColl::clear(), fEmTracks, fExcludedTracks, fOutTracks, fShortTracks, and pma::TrkCandidateColl::tracks().
Referenced by 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 381 of file PMAlgVertexing.cxx.
References pmtana::mean(), and sum.
Referenced by isSingleParticle().
|
private |
Remove penalty on the angle if kink detected and reopt track.
Definition at line 532 of file PMAlgVertexing.cxx.
References e, fKinkMinDeg, fKinkMinStd, has(), pmtana::mean(), n, pma::Track3D::Nodes(), pma::Track3D::Optimize(), and pma::TrkCandidateColl::size().
Referenced by run().
|
private |
Definition at line 123 of file PMAlgVertexing.cxx.
References pma::VtxCandidate::Add(), fOutTracks, pma::VtxCandidate::Mse(), and pma::TrkCandidateColl::size().
Referenced by 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, pma::Track3D::NHits(), and pma::Track3D::size().
Referenced by isSingleParticle().
std::vector< std::pair< TVector3, size_t > > pma::PMAlgVertexing::getKinks | ( | const pma::TrkCandidateColl & | tracks | ) | const |
Definition at line 641 of file PMAlgVertexing.cxx.
References pma::Node3D::IsBranching(), pma::Node3D::IsVertex(), n, pma::Track3D::Nodes(), pma::Node3D::Point3D(), and pma::TrkCandidateColl::size().
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 601 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().
|
inlineprivate |
Definition at line 85 of file PMAlgVertexing.h.
Referenced by findKinksOnTracks().
|
private |
Check if colinear in 3D and dQ/dx with no significant step.
Definition at line 404 of file PMAlgVertexing.cxx.
References convolute(), getdQdx(), and pma::Track3D::Segments().
Referenced by mergeBrokenTracks().
|
private |
Definition at line 161 of file PMAlgVertexing.cxx.
References d, pma::Dist2(), fEmTracks, fMinTrackLength, and fOutTracks.
Referenced by 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 470 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 run().
|
inline |
Definition at line 63 of file PMAlgVertexing.h.
size_t pma::PMAlgVertexing::run | ( | const detinfo::DetectorPropertiesData & | detProp, |
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 269 of file PMAlgVertexing.cxx.
References collectTracks(), fEmTracks, fFindKinks, findKinksOnTracks(), firstPassCandidates(), fOutTracks, makeVertices(), mergeBrokenTracks(), secondPassCandidates(), pma::TrkCandidateColl::size(), and sortTracks().
Referenced by pma::PMAlgFitter::build(), and pma::PMAlgTracker::build().
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 328 of file PMAlgVertexing.cxx.
References sortTracks().
|
private |
Definition at line 142 of file PMAlgVertexing.cxx.
References pma::VtxCandidate::Add(), fEmTracks, fMinTrackLength, fOutTracks, pma::VtxCandidate::Mse(), and pma::TrkCandidateColl::size().
Referenced by run().
|
private |
Definition at line 83 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 519 of file PMAlgVertexing.cxx.
References pma::TrkCandidateColl::size().
|
private |
Definition at line 117 of file PMAlgVertexing.h.
Referenced by cleanTracks(), collectTracks(), makeVertices(), run(), secondPassCandidates(), and sortTracks().
|
private |
Definition at line 118 of file PMAlgVertexing.h.
Referenced by cleanTracks(), collectTracks(), and sortTracks().
|
private |
Definition at line 129 of file PMAlgVertexing.h.
Referenced by PMAlgVertexing(), and run().
|
private |
Definition at line 131 of file PMAlgVertexing.h.
Referenced by findKinksOnTracks(), and PMAlgVertexing().
|
private |
Definition at line 132 of file PMAlgVertexing.h.
Referenced by findKinksOnTracks(), and PMAlgVertexing().
|
private |
Definition at line 126 of file PMAlgVertexing.h.
Referenced by makeVertices(), PMAlgVertexing(), secondPassCandidates(), and sortTracks().
|
private |
Definition at line 117 of file PMAlgVertexing.h.
Referenced by cleanTracks(), collectTracks(), firstPassCandidates(), makeVertices(), run(), secondPassCandidates(), and sortTracks().
|
private |
Definition at line 117 of file PMAlgVertexing.h.
Referenced by cleanTracks(), and collectTracks().