LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "PmaTrack3D.h"
Public Types | |
enum | ETrackEnd { kBegin = -1, kEnd = 1 } |
enum | EDirection { kForward = -1, kBackward = 1 } |
enum | ETag { kNotTagged = 0, kTrackLike = 0, kEmLike = 1, kStopping = 2, kCosmic = 4, kGeometry_YY = 0x000100, kGeometry_YZ = 0x000200, kGeometry_ZZ = 0x000300, kGeometry_XX = 0x000400, kGeometry_XY = 0x000500, kGeometry_XZ = 0x000600, kGeometry_Y = 0x001000, kGeometry_Z = 0x002000, kGeometry_X = 0x003000, kOutsideDrift_Partial = 0x010000, kOutsideDrift_Complete = 0x020000, kBeamIncompatible = 0x030000 } |
Public Member Functions | |
ETag | GetTag (void) const |
bool | HasTagFlag (ETag value) const |
void | SetTagFlag (ETag value) |
void | SetTag (ETag value) |
Track3D (void) | |
Track3D (const Track3D &src) | |
~Track3D (void) | |
bool | Initialize (float initEndSegW=0.05F) |
pma::Hit3D * | release_at (size_t index) |
void | push_back (pma::Hit3D *hit) |
bool | push_back (const art::Ptr< recob::Hit > &hit) |
bool | erase (const art::Ptr< recob::Hit > &hit) |
pma::Hit3D *& | operator[] (size_t index) |
pma::Hit3D *const & | operator[] (size_t index) const |
pma::Hit3D *& | front () |
pma::Hit3D *const & | front () const |
pma::Hit3D *& | back () |
pma::Hit3D *const & | back () const |
size_t | size () const |
int | index_of (const pma::Hit3D *hit) const |
int | index_of (const pma::Node3D *n) const |
double | Length (size_t step=1) const |
double | Length (size_t start, size_t stop, size_t step=1) const |
double | Dist2 (const TVector2 &p2d, unsigned int view, unsigned int tpc, unsigned int cryo) const |
double | Dist2 (const TVector3 &p3d) const |
pma::Vector3D | GetDirection3D (size_t index) const |
Get trajectory direction at given hit index. More... | |
void | AddHits (const std::vector< art::Ptr< recob::Hit > > &hits) |
void | RemoveHits (const std::vector< art::Ptr< recob::Hit > > &hits) |
Remove hits; removes also hit->node/seg assignments. More... | |
unsigned int | NHits (unsigned int view) const |
unsigned int | NEnabledHits (unsigned int view=geo::kUnknown) const |
bool | HasTwoViews (size_t nmin=1) const |
std::vector< unsigned int > | TPCs (void) const |
std::vector< unsigned int > | Cryos (void) const |
unsigned int | FrontTPC (void) const |
unsigned int | FrontCryo (void) const |
unsigned int | BackTPC (void) const |
unsigned int | BackCryo (void) const |
bool | HasTPC (int tpc) const |
std::pair< TVector2, TVector2 > | WireDriftRange (unsigned int view, unsigned int tpc, unsigned int cryo) const |
bool | Flip (std::vector< pma::Track3D * > &allTracks) |
void | Flip (void) |
bool | CanFlip (void) const |
Check if the track can be flipped without breaking any other track. More... | |
void | AutoFlip (pma::Track3D::EDirection dir, double thr=0.0, unsigned int n=0) |
bool | AutoFlip (std::vector< pma::Track3D * > &allTracks, pma::Track3D::EDirection dir, double thr=0.0, unsigned int n=0) |
double | TestHitsMse (const std::vector< art::Ptr< recob::Hit > > &hits, bool normalized=true) const |
MSE of 2D hits. More... | |
unsigned int | TestHits (const std::vector< art::Ptr< recob::Hit > > &hits, double dist=0.4) const |
Count close 2D hits. More... | |
int | NextHit (int index, unsigned int view=geo::kZ, bool inclDisabled=false) const |
int | PrevHit (int index, unsigned int view=geo::kZ, bool inclDisabled=false) const |
double | HitDxByView (size_t index, unsigned int view) const |
double | GetRawdEdxSequence (std::map< size_t, std::vector< double > > &dedx, unsigned int view=geo::kZ, unsigned int skip=0, bool inclDisabled=false) const |
std::vector< float > | DriftsOfWireIntersection (unsigned int wire, unsigned int view) const |
size_t | CompleteMissingWires (unsigned int view) |
void | AddRefPoint (const TVector3 &p) |
void | AddRefPoint (double x, double y, double z) |
bool | HasRefPoint (TVector3 *p) const |
double | GetMse (unsigned int view=geo::kUnknown) const |
MSE of hits weighted with hit amplidudes and wire plane coefficients. More... | |
double | GetObjFunction (float penaltyFactor=1.0F) const |
Objective function optimized in track reconstruction. More... | |
double | Optimize (int nNodes=-1, double eps=0.01, bool selAllHits=true, bool setAllNodes=true, size_t selSegHits=0, size_t selVtxHits=0) |
Main optimization method. More... | |
void | SortHitsInTree (bool skipFirst=false) |
void | MakeProjectionInTree (bool skipFirst=false) |
bool | UpdateParamsInTree (bool skipFirst=false) |
double | GetObjFnInTree (bool skipFirst=false) |
double | TuneSinglePass (bool skipFirst=false) |
double | TuneFullTree (double eps=0.001, double gmax=50.0) |
void | ApplyDriftShiftInTree (double dx, bool skipFirst=false) |
Adjust track tree position in the drift direction (when T0 is being corrected). More... | |
void | SetT0FromDx (double dx) |
Function to convert dx into dT0. More... | |
double | GetT0 (void) const |
bool | HasT0 (void) const |
void | CleanupTails (void) |
Cut out tails with no hits assigned. More... | |
bool | ShiftEndsToHits (void) |
std::vector< pma::Segment3D * > const & | Segments (void) const |
pma::Segment3D * | NextSegment (pma::Node3D *vtx) const |
pma::Segment3D * | PrevSegment (pma::Node3D *vtx) const |
std::vector< pma::Node3D * > const & | Nodes (void) const |
pma::Node3D * | FirstElement (void) const |
pma::Node3D * | LastElement (void) const |
void | AddNode (pma::Node3D *node) |
void | AddNode (TVector3 const &p3d, unsigned int tpc, unsigned int cryo) |
bool | AddNode (void) |
void | InsertNode (TVector3 const &p3d, size_t at_idx, unsigned int tpc, unsigned int cryo) |
bool | RemoveNode (size_t idx) |
pma::Track3D * | Split (size_t idx, bool try_start_at_idx=true) |
bool | AttachTo (pma::Node3D *vStart, bool noFlip=false) |
bool | AttachBackTo (pma::Node3D *vStart) |
bool | IsAttachedTo (pma::Track3D const *trk) const |
void | ExtendWith (pma::Track3D *src) |
Extend the track with everything from src, delete the src;. More... | |
pma::Track3D * | GetRoot (void) |
bool | GetBranches (std::vector< pma::Track3D const * > &branches, bool skipFirst=false) const |
void | MakeProjection (void) |
void | UpdateProjection (void) |
void | SortHits (void) |
unsigned int | DisableSingleViewEnds (void) |
bool | SelectHits (float fraction=1.0F) |
bool | SelectRndHits (size_t segmax, size_t vtxmax) |
bool | SelectAllHits (void) |
float | GetEndSegWeight (void) const |
void | SetEndSegWeight (float value) |
float | GetPenalty (void) const |
void | SetPenalty (float value) |
unsigned int | GetMaxHitsPerSeg (void) const |
void | SetMaxHitsPerSeg (unsigned int value) |
Private Member Functions | |
void | ClearNodes (void) |
void | MakeFastProjection (void) |
bool | AttachToSameTPC (pma::Node3D *vStart) |
bool | AttachToOtherTPC (pma::Node3D *vStart) |
bool | AttachBackToSameTPC (pma::Node3D *vStart) |
bool | AttachBackToOtherTPC (pma::Node3D *vStart) |
void | InternalFlip (std::vector< pma::Track3D * > &toSort) |
void | UpdateHitsRadius (void) |
double | AverageDist2 (void) const |
bool | InitFromHits (int tpc, int cryo, float initEndSegW=0.05F) |
bool | InitFromRefPoints (int tpc, int cryo) |
void | InitFromMiddle (int tpc, int cryo) |
pma::Track3D * | GetNearestTrkInTree (const TVector3 &p3d_cm, double &dist, bool skipFirst=false) |
pma::Track3D * | GetNearestTrkInTree (const TVector2 &p2d_cm, unsigned int view, unsigned int tpc, unsigned int cryo, double &dist, bool skipFirst=false) |
void | ReassignHitsInTree (pma::Track3D *plRoot=0) |
double | HitDxByView (size_t index, unsigned int view, Track3D::EDirection dir, bool secondDir=false) const |
bool | GetUnconstrainedProj3D (art::Ptr< recob::Hit > hit, TVector3 &p3d, double &dist2) const |
void | DeleteSegments (void) |
void | RebuildSegments (void) |
bool | SwapVertices (size_t v0, size_t v1) |
bool | UpdateParams (void) |
bool | CheckEndSegment (pma::Track3D::ETrackEnd endCode) |
pma::Element3D * | GetNearestElement (const TVector2 &p2d, unsigned int view, int tpc=-1, bool skipFrontVtx=false, bool skipBackVtx=false) const |
pma::Element3D * | GetNearestElement (const TVector3 &p3d) const |
Private Attributes | |
std::vector< pma::Hit3D * > | fHits |
std::vector< TVector3 * > | fAssignedPoints |
std::vector< pma::Node3D * > | fNodes |
std::vector< pma::Segment3D * > | fSegments |
unsigned int | fMaxHitsPerSeg |
float | fPenaltyFactor |
float | fMaxSegStopFactor |
unsigned int | fSegStopValue |
unsigned int | fMinSegStop |
unsigned int | fMaxSegStop |
float | fSegStopFactor |
float | fPenaltyValue |
float | fEndSegWeight |
float | fHitsRadius |
double | fT0 |
bool | fT0Flag |
ETag | fTag |
Definition at line 29 of file PmaTrack3D.h.
Enumerator | |
---|---|
kForward | |
kBackward |
Definition at line 33 of file PmaTrack3D.h.
enum pma::Track3D::ETag |
Definition at line 34 of file PmaTrack3D.h.
Enumerator | |
---|---|
kBegin | |
kEnd |
Definition at line 32 of file PmaTrack3D.h.
pma::Track3D::Track3D | ( | void | ) |
pma::Track3D::Track3D | ( | const Track3D & | src | ) |
Definition at line 39 of file PmaTrack3D.cxx.
References fAssignedPoints, fHits, fNodes, pma::Hit3D::fParent, MakeProjection(), and RebuildSegments().
pma::Track3D::~Track3D | ( | void | ) |
Definition at line 74 of file PmaTrack3D.cxx.
References fAssignedPoints, fHits, fNodes, and fSegments.
Referenced by SetTag().
void pma::Track3D::AddHits | ( | const std::vector< art::Ptr< recob::Hit > > & | hits | ) |
Add hits; does not update hit->node/seg assignments nor hit projection to track, so MakeProjection() and SortHits() should be called as needed.
Definition at line 393 of file PmaTrack3D.cxx.
References fHits, hits(), and push_back().
Referenced by pma::ProjectionMatchingAlg::buildSegment(), pma::ProjectionMatchingAlg::buildTrack(), pma::ProjectionMatchingAlg::extendTrack(), Length(), and pma::PMAlgTracker::reassignHits_2().
void pma::Track3D::AddNode | ( | pma::Node3D * | node | ) |
Definition at line 1203 of file PmaTrack3D.cxx.
References fNodes, and RebuildSegments().
Referenced by pma::ProjectionMatchingAlg::mergeTracks().
|
inline |
Definition at line 237 of file PmaTrack3D.h.
References AddNode(), AttachBackTo(), AttachTo(), DisableSingleViewEnds(), ExtendWith(), fNodes, GetBranches(), GetRoot(), InsertNode(), IsAttachedTo(), MakeProjection(), RemoveNode(), SelectAllHits(), SelectHits(), SelectRndHits(), SortHits(), Split(), and UpdateProjection().
bool pma::Track3D::AddNode | ( | void | ) |
Definition at line 1209 of file PmaTrack3D.cxx.
References pma::SortedObjectBase::AddNext(), pma::Hit3D::Cryo(), fNodes, fSegments, pma::Element3D::Hit(), pma::Hit3D::IsEnabled(), pma::Element3D::IsFrozen(), geo::kU, geo::kV, geo::kZ, pma::Element3D::Length(), n, pma::Element3D::NEnabledHits(), NHits(), pma::Hit3D::Point3D(), pma::Segment3D::SetProjection(), pma::Element3D::SortHits(), pma::Hit3D::TPC(), and pma::Hit3D::View2D().
Referenced by AddNode(), InitFromHits(), InitFromMiddle(), InitFromRefPoints(), LastElement(), and Optimize().
|
inline |
Definition at line 189 of file PmaTrack3D.h.
References fAssignedPoints.
Referenced by pma::ProjectionMatchingAlg::addEndpointRef().
|
inline |
Definition at line 190 of file PmaTrack3D.h.
References ApplyDriftShiftInTree(), fAssignedPoints, GetMse(), GetObjFnInTree(), GetObjFunction(), HasRefPoint(), geo::kUnknown, MakeProjectionInTree(), Optimize(), SetT0FromDx(), SortHitsInTree(), TuneFullTree(), TuneSinglePass(), and UpdateParamsInTree().
void pma::Track3D::ApplyDriftShiftInTree | ( | double | dx, |
bool | skipFirst = false |
||
) |
Adjust track tree position in the drift direction (when T0 is being corrected).
Definition at line 2271 of file PmaTrack3D.cxx.
References pma::Node3D::ApplyDriftShift(), ApplyDriftShiftInTree(), fAssignedPoints, fHits, fNodes, pma::Node3D::fPoint3D, pma::SortedObjectBase::Next(), pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), pma::Segment3D::Parent(), and SetT0FromDx().
Referenced by AddRefPoint(), ApplyDriftShiftInTree(), pma::PMAlgTracker::mergeCoLinear(), and pma::PMAlgStitching::StitchTracks().
bool pma::Track3D::AttachBackTo | ( | pma::Node3D * | vStart | ) |
Definition at line 1587 of file PmaTrack3D.cxx.
References AttachBackToOtherTPC(), AttachBackToSameTPC(), fNodes, GetRoot(), IsAttachedTo(), n, pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), pma::SortedObjectBase::Prev(), and pma::Element3D::TPC().
Referenced by AddNode(), and pma::VtxCandidate::JoinTracks().
|
private |
Definition at line 1624 of file PmaTrack3D.cxx.
References fNodes, fSegments, and pma::SortedObjectBase::Prev().
Referenced by AttachBackTo(), and SetMaxHitsPerSeg().
|
private |
Definition at line 1638 of file PmaTrack3D.cxx.
References pma::SortedBranchBase::AddNext(), CanFlip(), Flip(), fNodes, fSegments, pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), pma::Segment3D::Parent(), pma::SortedObjectBase::Prev(), and pma::SortedBranchBase::RemoveNext().
Referenced by AttachBackTo(), and SetMaxHitsPerSeg().
bool pma::Track3D::AttachTo | ( | pma::Node3D * | vStart, |
bool | noFlip = false |
||
) |
Definition at line 1456 of file PmaTrack3D.cxx.
References AttachToOtherTPC(), AttachToSameTPC(), CanFlip(), pma::Dist2(), Flip(), fNodes, GetRoot(), IsAttachedTo(), n, pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), pma::Node3D::Point3D(), pma::SortedObjectBase::Prev(), and pma::Element3D::TPC().
Referenced by AddNode(), pma::TrkCandidateColl::getTreeCopy(), pma::VtxCandidate::JoinTracks(), and Split().
|
private |
Definition at line 1502 of file PmaTrack3D.cxx.
References fNodes, and fSegments.
Referenced by AttachTo(), and SetMaxHitsPerSeg().
|
private |
Definition at line 1515 of file PmaTrack3D.cxx.
References pma::SortedObjectBase::AddNext(), pma::SortedBranchBase::AddNext(), CanFlip(), Flip(), fNodes, pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), pma::Segment3D::Parent(), pma::SortedObjectBase::Prev(), and pma::SortedBranchBase::RemoveNext().
Referenced by AttachTo(), and SetMaxHitsPerSeg().
void pma::Track3D::AutoFlip | ( | pma::Track3D::EDirection | dir, |
double | thr = 0.0 , |
||
unsigned int | n = 0 |
||
) |
Definition at line 630 of file PmaTrack3D.cxx.
References evd::details::end(), Flip(), GetRawdEdxSequence(), kBackward, kForward, n, and size().
Referenced by pma::ProjectionMatchingAlg::autoFlip(), pma::TrkCandidateColl::flipTreesByDQdx(), and HasTPC().
bool pma::Track3D::AutoFlip | ( | std::vector< pma::Track3D * > & | allTracks, |
pma::Track3D::EDirection | dir, | ||
double | thr = 0.0 , |
||
unsigned int | n = 0 |
||
) |
Definition at line 708 of file PmaTrack3D.cxx.
References evd::details::end(), Flip(), GetRawdEdxSequence(), kBackward, kForward, n, and size().
|
private |
Definition at line 3087 of file PmaTrack3D.cxx.
References fNodes, fSegments, n, and s.
Referenced by SetMaxHitsPerSeg(), and UpdateParams().
|
inline |
Definition at line 74 of file PmaTrack3D.h.
References fHits.
Referenced by pma::ProjectionMatchingAlg::alignTracks(), pma::PMAlgTracker::areCoLinear(), pma::ProjectionMatchingAlg::buildMultiTPCTrack(), pma::ProjectionMatchingAlg::buildSegment(), ems::EMShower3D::ConvertFrom(), ems::EMShower3D::ConvertFrom2(), pma::TrkCandidateColl::flipTreesToCoordinate(), pma::ProjectionMatchingAlg::isContained(), Length(), ems::EMShower3D::Make3DSeg(), pma::PMAlgTracker::mergeCoLinear(), pma::bTrack3DLonger::operator()(), ems::EMShower3D::Reoptimize(), ShiftEndsToHits(), and ems::EMShower3D::Validate().
|
inline |
|
inline |
Definition at line 108 of file PmaTrack3D.h.
References fNodes.
Referenced by pma::ProjectionMatchingAlg::guideEndpoints(), pma::ProjectionMatchingAlg::mergeTracks(), pma::PMAlgStitching::StitchTracks(), and ems::EMShower3D::Validate().
|
inline |
Definition at line 107 of file PmaTrack3D.h.
References fNodes.
Referenced by pma::ProjectionMatchingAlg::guideEndpoints(), pma::ProjectionMatchingAlg::mergeTracks(), pma::PMAlgStitching::StitchTracks(), and ems::EMShower3D::Validate().
bool pma::Track3D::CanFlip | ( | void | ) | const |
Check if the track can be flipped without breaking any other track.
Definition at line 615 of file PmaTrack3D.cxx.
References CanFlip(), fNodes, n, NextSegment(), pma::Segment3D::Parent(), pma::SortedObjectBase::Prev(), and s.
Referenced by AttachBackToSameTPC(), AttachTo(), AttachToSameTPC(), CanFlip(), pma::TrkCandidateColl::flipTreesByDQdx(), HasTPC(), pma::VtxCandidate::JoinTracks(), and Split().
|
private |
Definition at line 3180 of file PmaTrack3D.cxx.
References fNodes, fSegments, GetObjFunction(), kBegin, kEnd, MakeProjection(), RebuildSegments(), and SwapVertices().
Referenced by Optimize(), and SetMaxHitsPerSeg().
void pma::Track3D::CleanupTails | ( | void | ) |
Cut out tails with no hits assigned.
Definition at line 2376 of file PmaTrack3D.cxx.
References fNodes, fSegments, MakeProjection(), pma::SortedBranchBase::NextCount(), NextSegment(), pma::Element3D::NHits(), and PrevSegment().
Referenced by HasT0(), pma::PMAlgTracker::reassignHits_1(), and pma::PMAlgTracker::reassignHits_2().
|
private |
Definition at line 120 of file PmaTrack3D.cxx.
References fNodes.
Referenced by InitFromHits(), InitFromMiddle(), InitFromRefPoints(), and SetMaxHitsPerSeg().
size_t pma::Track3D::CompleteMissingWires | ( | unsigned int | view | ) |
Definition at line 1118 of file PmaTrack3D.cxx.
References pma::Hit3D::Cryo(), d, DriftsOfWireIntersection(), fHits, MakeProjection(), NextHit(), pma::Hit3D::PeakTime(), push_back(), size(), SortHits(), pma::Hit3D::TPC(), pma::Hit3D::View2D(), w, and pma::Hit3D::Wire().
Referenced by HasTPC(), trkf::PMAlgTrajFitter::produce(), and trkf::PMAlgTrackMaker::produce().
std::vector< unsigned int > pma::Track3D::Cryos | ( | void | ) | const |
Definition at line 453 of file PmaTrack3D.cxx.
Referenced by Initialize(), Length(), pma::ProjectionMatchingAlg::validate(), pma::ProjectionMatchingAlg::validate_on_adc(), and pma::ProjectionMatchingAlg::validate_on_adc_test().
|
private |
Definition at line 2359 of file PmaTrack3D.cxx.
References fSegments.
Referenced by ExtendWith(), RebuildSegments(), and SetMaxHitsPerSeg().
unsigned int pma::Track3D::DisableSingleViewEnds | ( | void | ) |
Definition at line 2711 of file PmaTrack3D.cxx.
References fHits, fNodes, pma::Element3D::Hit(), index_of(), pma::Hit3D::IsEnabled(), MakeProjection(), NextSegment(), pma::Element3D::NHits(), pma::Element3D::NPoints(), PrevSegment(), RebuildSegments(), pma::Hit3D::SetEnabled(), size(), SortHits(), and pma::Hit3D::View2D().
Referenced by AddNode(), pma::PMAlgTracker::reassignSingleViewEnds_1(), pma::PMAlgTracker::reassignSingleViewEnds_2(), and pma::ProjectionMatchingAlg::twoViewFraction().
double pma::Track3D::Dist2 | ( | const TVector2 & | p2d, |
unsigned int | view, | ||
unsigned int | tpc, | ||
unsigned int | cryo | ||
) | const |
Definition at line 2535 of file PmaTrack3D.cxx.
References fNodes, fSegments, and s.
Referenced by GetNearestTrkInTree(), Length(), Split(), TestHitsMse(), pma::ProjectionMatchingAlg::validate(), and pma::ProjectionMatchingAlg::validate_on_adc_test().
double pma::Track3D::Dist2 | ( | const TVector3 & | p3d | ) | const |
std::vector< float > pma::Track3D::DriftsOfWireIntersection | ( | unsigned int | wire, |
unsigned int | view | ||
) | const |
Definition at line 1093 of file PmaTrack3D.cxx.
References pma::CmToWireDrift(), d, fNodes, X, and Y.
Referenced by CompleteMissingWires(), and HasTPC().
bool pma::Track3D::erase | ( | const art::Ptr< recob::Hit > & | hit | ) |
Definition at line 359 of file PmaTrack3D.cxx.
Referenced by push_back(), and RemoveHits().
void pma::Track3D::ExtendWith | ( | pma::Track3D * | src | ) |
Extend the track with everything from src, delete the src;.
Definition at line 1684 of file PmaTrack3D.cxx.
References DeleteSegments(), fAssignedPoints, fNodes, fSegments, MakeProjection(), push_back(), release_at(), size(), and SortHits().
Referenced by AddNode().
|
inline |
Definition at line 233 of file PmaTrack3D.h.
References fNodes.
Referenced by pma::ProjectionMatchingAlg::isContained(), SelectHits(), and pma::PMAlgTracker::validate().
bool pma::Track3D::Flip | ( | std::vector< pma::Track3D * > & | allTracks | ) |
Invert the order of hits and vertices in the track, break other tracks if needed (new tracks are added to the allTracks vector). Returns true if successful or false if any of required track flips was not possible (e.g. resulting track would be composed of hits from a single 2D projection).
Definition at line 499 of file PmaTrack3D.cxx.
References Flip(), fNodes, index_of(), InternalFlip(), n, NextSegment(), pma::Segment3D::Parent(), pma::SortedObjectBase::Prev(), s, and Split().
Referenced by pma::ProjectionMatchingAlg::alignTracks(), pma::PMAlgTracker::areCoLinear(), AttachBackToSameTPC(), AttachToSameTPC(), pma::ProjectionMatchingAlg::buildSegment(), Flip(), pma::VtxCandidate::JoinTracks(), ems::EMShower3D::Make3DSeg(), ems::EMShower3D::Reoptimize(), pma::TrkCandidateColl::setTreeOriginAtBack(), pma::TrkCandidateColl::setTreeOriginAtFront(), Split(), and pma::PMAlgStitching::StitchTracks().
void pma::Track3D::Flip | ( | void | ) |
Invert the order of hits and vertices in the track, will fail on configuration that causes breaking another track.
Definition at line 596 of file PmaTrack3D.cxx.
References InternalFlip().
Referenced by AttachTo(), AutoFlip(), and HasTPC().
|
inline |
Definition at line 72 of file PmaTrack3D.h.
References fHits.
Referenced by pma::ProjectionMatchingAlg::alignTracks(), pma::PMAlgTracker::areCoLinear(), pma::ProjectionMatchingAlg::buildMultiTPCTrack(), pma::ProjectionMatchingAlg::buildSegment(), ems::EMShower3D::ConvertFrom(), ems::EMShower3D::ConvertFrom2(), pma::TrkCandidateColl::flipTreesToCoordinate(), pma::PMAlgVertexing::getVertices(), InitFromHits(), pma::ProjectionMatchingAlg::isContained(), pma::PMAlgTracker::mergeCoLinear(), pma::bTrack3DLonger::operator()(), ems::EMShower3D::Reoptimize(), ShiftEndsToHits(), pma::ProjectionMatchingAlg::ShortenSeg(), pma::ProjectionMatchingAlg::TestTrk(), ems::EMShower3D::Validate(), pma::ProjectionMatchingAlg::validate(), pma::ProjectionMatchingAlg::validate_on_adc(), and pma::ProjectionMatchingAlg::validate_on_adc_test().
|
inline |
|
inline |
Definition at line 105 of file PmaTrack3D.h.
References fNodes.
Referenced by pma::ProjectionMatchingAlg::guideEndpoints(), pma::ProjectionMatchingAlg::mergeTracks(), trkf::PMAlgTrajFitter::produce(), trkf::PMAlgTrackMaker::produce(), pma::PMAlgStitching::StitchTracks(), ems::EMShower3D::Validate(), and pma::PMAlgTracker::validate().
|
inline |
Definition at line 104 of file PmaTrack3D.h.
References fNodes.
Referenced by pma::ProjectionMatchingAlg::guideEndpoints(), pma::ProjectionMatchingAlg::mergeTracks(), trkf::PMAlgTrajFitter::produce(), trkf::PMAlgTrackMaker::produce(), pma::PMAlgStitching::StitchTracks(), ems::EMShower3D::Validate(), and pma::PMAlgTracker::validate().
bool pma::Track3D::GetBranches | ( | std::vector< pma::Track3D const * > & | branches, |
bool | skipFirst = false |
||
) | const |
Definition at line 1727 of file PmaTrack3D.cxx.
References fNodes, GetBranches(), n, and pma::Segment3D::Parent().
Referenced by AddNode(), GetBranches(), IsAttachedTo(), and pma::VtxCandidate::JoinTracks().
pma::Vector3D pma::Track3D::GetDirection3D | ( | size_t | index | ) | const |
Get trajectory direction at given hit index.
Definition at line 373 of file PmaTrack3D.cxx.
References fHits, fNodes, fSegments, GetNearestElement(), n, pma::Hit3D::Point2D(), s, pma::Hit3D::TPC(), and pma::Hit3D::View2D().
Referenced by pma::convertFrom(), and Length().
|
inline |
|
inline |
double pma::Track3D::GetMse | ( | unsigned int | view = geo::kUnknown | ) | const |
MSE of hits weighted with hit amplidudes and wire plane coefficients.
Definition at line 1774 of file PmaTrack3D.cxx.
References fNodes, fSegments, n, and s.
Referenced by AddRefPoint(), pma::PMAlgTracker::extendTrack(), pma::PMAlgTracker::matchCluster(), and pma::ProjectionMatchingAlg::ShortenSeg().
|
private |
Definition at line 2573 of file PmaTrack3D.cxx.
References fNodes, and fSegments.
Referenced by GetDirection3D(), MakeProjection(), and ShiftEndsToHits().
|
private |
Definition at line 2615 of file PmaTrack3D.cxx.
References fNodes, fSegments, and pma::Element3D::GetDistance2To().
|
private |
Definition at line 1990 of file PmaTrack3D.cxx.
References d, Dist2(), fNodes, GetNearestTrkInTree(), pma::SortedObjectBase::Next(), pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), and pma::Segment3D::Parent().
Referenced by GetNearestTrkInTree(), ReassignHitsInTree(), and SetMaxHitsPerSeg().
|
private |
double pma::Track3D::GetObjFnInTree | ( | bool | skipFirst = false | ) |
Definition at line 2181 of file PmaTrack3D.cxx.
References fNodes, GetObjFnInTree(), GetObjFunction(), pma::SortedObjectBase::Next(), pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), and pma::Segment3D::Parent().
Referenced by AddRefPoint(), GetObjFnInTree(), and TuneFullTree().
double pma::Track3D::GetObjFunction | ( | float | penaltyFactor = 1.0F | ) | const |
Objective function optimized in track reconstruction.
Definition at line 1793 of file PmaTrack3D.cxx.
References fEndSegWeight, fNodes, and fPenaltyValue.
Referenced by AddRefPoint(), CheckEndSegment(), GetObjFnInTree(), Optimize(), and TuneSinglePass().
|
inline |
double pma::Track3D::GetRawdEdxSequence | ( | std::map< size_t, std::vector< double > > & | dedx, |
unsigned int | view = geo::kZ , |
||
unsigned int | skip = 0 , |
||
bool | inclDisabled = false |
||
) | const |
Sequence of <hit_index, (wire, drift, X, Y, Z, dE, dx, range)> values for the track, hits tagged as outliers are skipped by default. Results are pushed into the dedx vector given in the function arguments:
hit (segment middle if many hits) 2D projection in view: dedx[n][0] = wire; dedx[n][1] = drift;
hit (segment middle if many hits) 3D position [cm]: dedx[n][2] = X; dedx[n][3] = Y; dedx[n][4] = Z;
dedx[n][5] = dE [now ADC], energy assigned to the segment;
dedx[n][6] = dx [cm], length of the segment.
dedx[n][7] = range, total length to the track endpoint;
Parameters: dedx - vector to store results (empty at the begining); view - view (U, V or Z) from which dedx is created; skip - number of hits to skip at the begining (first hit has poorly estimated segment length so it can be convenient to set skip=1 and handle first hit charge manually); inclDisabled - if true then artificial hits added with CompleteMissingWires() are used, otherwise only true hits found in ADC are used.
Return value: sum of ADC's of hits skipped at the begining.
Definition at line 990 of file PmaTrack3D.cxx.
References c1, fHits, HitDxByView(), pma::Hit3D::IsEnabled(), kForward, Length(), NextHit(), pma::Hit3D::PeakTime(), pma::Hit3D::Point3D(), PrevHit(), s, size(), pma::Hit3D::SummedADC(), and pma::Hit3D::Wire().
Referenced by AutoFlip(), pma::PMAlgVertexing::getdQdx(), HasTPC(), and trkf::PMAlgTrackMaker::produce().
pma::Track3D * pma::Track3D::GetRoot | ( | void | ) |
Definition at line 1712 of file PmaTrack3D.cxx.
References fNodes, GetRoot(), and pma::Segment3D::Parent().
Referenced by AddNode(), AttachBackTo(), AttachTo(), GetRoot(), pma::VtxCandidate::IsAttached(), pma::VtxCandidate::JoinTracks(), and pma::PMAlgStitching::StitchTracks().
|
inline |
Definition at line 215 of file PmaTrack3D.h.
References fT0.
Referenced by trkf::PMAlgTrackMaker::produce().
|
inline |
Definition at line 53 of file PmaTrack3D.h.
References fTag.
Referenced by trkf::PMAlgTrackMaker::produce().
|
private |
Calculate 3D position corresponding to 2D hit, return true if the 3D point is in the same TPC as the hit, false otherwise. Calculates also distance^2 between the hit and 2D projection of the track. NOTE: results are meaningful only if the function returns true.
Definition at line 2638 of file PmaTrack3D.cxx.
References geo::CryostatID::Cryostat, fSegments, recob::Hit::PeakTime(), geo::PlaneID::Plane, pma::Node3D::SameTPC(), geo::TPCID::TPC, geo::WireID::Wire, pma::WireDriftToCm(), and recob::Hit::WireID().
Referenced by SetMaxHitsPerSeg(), and TestHits().
bool pma::Track3D::HasRefPoint | ( | TVector3 * | p | ) | const |
Definition at line 1767 of file PmaTrack3D.cxx.
References fAssignedPoints.
Referenced by AddRefPoint().
|
inline |
Check if the T0 has been set - enables us to distinguish between T0 set very close to zero or not set.
Definition at line 218 of file PmaTrack3D.h.
References CleanupTails(), fT0Flag, and ShiftEndsToHits().
Referenced by trkf::PMAlgTrackMaker::produce().
|
inline |
Definition at line 54 of file PmaTrack3D.h.
References fTag.
Referenced by trkf::PMAlgTrackMaker::produce().
|
inline |
Definition at line 110 of file PmaTrack3D.h.
References AutoFlip(), CanFlip(), CompleteMissingWires(), dir, DriftsOfWireIntersection(), Flip(), fNodes, GetRawdEdxSequence(), HitDxByView(), hits(), geo::kZ, NextHit(), PrevHit(), TestHits(), TestHitsMse(), pma::Element3D::TPC(), lar::dump::vector(), and WireDriftRange().
Referenced by Split().
bool pma::Track3D::HasTwoViews | ( | size_t | nmin = 1 | ) | const |
Definition at line 428 of file PmaTrack3D.cxx.
References geo::kU, geo::kV, geo::kZ, and NHits().
Referenced by pma::ProjectionMatchingAlg::buildSegment(), pma::PMAlgFitter::buildShowers(), pma::PMAlgFitter::buildTracks(), Initialize(), Length(), ReassignHitsInTree(), and Split().
double pma::Track3D::HitDxByView | ( | size_t | index, |
unsigned int | view | ||
) | const |
Length of the track part associated with index'th hit. Calculated as a half distance to the preceding hit plus half distance to the subsequent hit. In case of the first (last) hit - missing part is estimated as 1/4 of the distance to the next (previous) hit. NOTE: only hits from a given view are considered; other hits are accounted for segment lengths but overall dx is calculated between hits in given view.
Definition at line 952 of file PmaTrack3D.cxx.
References kBackward, kForward, and size().
Referenced by GetRawdEdxSequence(), HasTPC(), HitDxByView(), pma::ProjectionMatchingAlg::selectInitialHits(), and SetMaxHitsPerSeg().
|
private |
Distance to the nearest subsequent (dir = Track3D::kForward) or preceeding (dir = Track3D::kBackward) hit in given view. In case of last (first) hit in this view the half-distance in opposite direction is returned. Parameter secondDir is only for internal protection - please leave the default value.
Definition at line 893 of file PmaTrack3D.cxx.
References pma::Dist2(), fHits, HitDxByView(), kBackward, kForward, Length(), pma::Hit3D::Point3D(), size(), and pma::Hit3D::View2D().
int pma::Track3D::index_of | ( | const pma::Hit3D * | hit | ) | const |
Definition at line 333 of file PmaTrack3D.cxx.
Referenced by DisableSingleViewEnds(), Flip(), pma::TrkCandidateColl::setTreeOriginAtFront(), and size().
int pma::Track3D::index_of | ( | const pma::Node3D * | n | ) | const |
|
private |
Definition at line 126 of file PmaTrack3D.cxx.
References AddNode(), ClearNodes(), pma::Dist2(), fEndSegWeight, fHits, fNodes, front(), MakeProjection(), Optimize(), pma::Hit3D::PeakTime(), SelectAllHits(), size(), UpdateHitsRadius(), pma::Hit3D::View2D(), pma::Hit3D::Wire(), x, y, and z.
Referenced by Initialize(), and SetMaxHitsPerSeg().
|
private |
Definition at line 299 of file PmaTrack3D.cxx.
References AddNode(), ClearNodes(), MakeProjection(), maxY, geo::BoxBoundedGeo::MinX(), minY, Optimize(), geo::GeometryCore::TPC(), and UpdateHitsRadius().
Referenced by Initialize(), and SetMaxHitsPerSeg().
|
private |
Definition at line 215 of file PmaTrack3D.cxx.
References AddNode(), ClearNodes(), fAssignedPoints, MakeProjection(), pmtana::mean(), Optimize(), RebuildSegments(), scale, SelectAllHits(), size(), UpdateHitsRadius(), w, and y.
Referenced by Initialize(), and SetMaxHitsPerSeg().
bool pma::Track3D::Initialize | ( | float | initEndSegW = 0.05F | ) |
Definition at line 84 of file PmaTrack3D.cxx.
References Cryos(), HasTwoViews(), InitFromHits(), InitFromMiddle(), InitFromRefPoints(), TPCs(), and UpdateHitsRadius().
Referenced by pma::ProjectionMatchingAlg::buildSegment(), pma::ProjectionMatchingAlg::buildTrack(), and SetTag().
void pma::Track3D::InsertNode | ( | TVector3 const & | p3d, |
size_t | at_idx, | ||
unsigned int | tpc, | ||
unsigned int | cryo | ||
) |
Definition at line 1342 of file PmaTrack3D.cxx.
References fNodes, and RebuildSegments().
Referenced by AddNode(), and pma::VtxCandidate::JoinTracks().
|
private |
Definition at line 565 of file PmaTrack3D.cxx.
References fNodes, InternalFlip(), pma::Segment3D::Parent(), RebuildSegments(), and s.
Referenced by Flip(), InternalFlip(), and SetMaxHitsPerSeg().
bool pma::Track3D::IsAttachedTo | ( | pma::Track3D const * | trk | ) | const |
Definition at line 1752 of file PmaTrack3D.cxx.
References GetBranches().
Referenced by AddNode(), AttachBackTo(), AttachTo(), pma::VtxCandidate::HasLoops(), and pma::VtxCandidate::IsAttached().
|
inline |
Definition at line 234 of file PmaTrack3D.h.
References AddNode(), and fNodes.
Referenced by pma::ProjectionMatchingAlg::isContained(), SelectHits(), and pma::PMAlgTracker::validate().
|
inline |
Definition at line 81 of file PmaTrack3D.h.
References AddHits(), Cryos(), Dist2(), GetDirection3D(), HasTwoViews(), hits(), geo::kUnknown, Length(), NEnabledHits(), NHits(), RemoveHits(), size(), TPCs(), and lar::dump::vector().
Referenced by pma::PMAlgTracker::areCoLinear(), pma::PMAlgFitter::buildShowers(), pma::PMAlgFitter::buildTracks(), GetRawdEdxSequence(), HitDxByView(), Length(), pma::ProjectionMatchingAlg::mergeTracks(), pma::ProjectionMatchingAlg::ShortenSeg(), and pma::ProjectionMatchingAlg::twoViewFraction().
double pma::Track3D::Length | ( | size_t | start, |
size_t | stop, | ||
size_t | step = 1 |
||
) | const |
Definition at line 831 of file PmaTrack3D.cxx.
References back(), pma::Dist2(), fHits, h1, pma::Hit3D::Point3D(), size(), and tmp.
|
private |
Definition at line 2950 of file PmaTrack3D.cxx.
References fHits, fNodes, fSegments, pma::Segment3D::GetDistance2To(), pma::Node3D::GetDistance2To(), n, pma::SortedObjectBase::Next(), NextSegment(), pma::SortedObjectBase::Prev(), PrevSegment(), s, and pma::Element3D::TPC().
Referenced by Optimize(), and SetMaxHitsPerSeg().
void pma::Track3D::MakeProjection | ( | void | ) |
Definition at line 2912 of file PmaTrack3D.cxx.
References pma::Element3D::AddHit(), pma::Element3D::AddPoint(), fAssignedPoints, fHits, fNodes, fSegments, GetNearestElement(), n, and s.
Referenced by AddNode(), CheckEndSegment(), CleanupTails(), CompleteMissingWires(), DisableSingleViewEnds(), ExtendWith(), InitFromHits(), InitFromMiddle(), InitFromRefPoints(), pma::VtxCandidate::JoinTracks(), MakeProjectionInTree(), pma::ProjectionMatchingAlg::mergeTracks(), Optimize(), RemoveHits(), ShiftEndsToHits(), and Track3D().
void pma::Track3D::MakeProjectionInTree | ( | bool | skipFirst = false | ) |
Definition at line 2123 of file PmaTrack3D.cxx.
References fNodes, MakeProjection(), MakeProjectionInTree(), pma::SortedObjectBase::Next(), pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), and pma::Segment3D::Parent().
Referenced by AddRefPoint(), MakeProjectionInTree(), and TuneFullTree().
unsigned int pma::Track3D::NEnabledHits | ( | unsigned int | view = geo::kUnknown | ) | const |
Definition at line 416 of file PmaTrack3D.cxx.
References fHits, pma::Hit3D::IsEnabled(), geo::kUnknown, n, size(), and pma::Hit3D::View2D().
Referenced by Length(), and pma::ProjectionMatchingAlg::TestTrk().
int pma::Track3D::NextHit | ( | int | index, |
unsigned int | view = geo::kZ , |
||
bool | inclDisabled = false |
||
) | const |
Definition at line 861 of file PmaTrack3D.cxx.
References fHits, pma::Hit3D::IsEnabled(), size(), and pma::Hit3D::View2D().
Referenced by CompleteMissingWires(), GetRawdEdxSequence(), pma::ProjectionMatchingAlg::guideEndpoints(), HasTPC(), and pma::ProjectionMatchingAlg::selectInitialHits().
pma::Segment3D * pma::Track3D::NextSegment | ( | pma::Node3D * | vtx | ) | const |
Definition at line 966 of file PmaTrack3D.cxx.
References pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), and pma::Segment3D::Parent().
Referenced by pma::VtxCandidate::Add(), ApplyDriftShiftInTree(), AttachBackToSameTPC(), AttachToSameTPC(), CanFlip(), CleanupTails(), pma::VtxCandidate::Compute(), pma::VtxCandidate::ComputeMse2D(), DisableSingleViewEnds(), Flip(), GetNearestTrkInTree(), GetObjFnInTree(), pma::TrkCandidateColl::getTreeCopy(), pma::VtxCandidate::JoinTracks(), MakeFastProjection(), MakeProjectionInTree(), ReassignHitsInTree(), Segments(), pma::TrkCandidateColl::setTreeId(), pma::TrkCandidateColl::setTreeOriginAtFront(), SortHits(), SortHitsInTree(), SwapVertices(), TuneSinglePass(), and UpdateParamsInTree().
unsigned int pma::Track3D::NHits | ( | unsigned int | view | ) | const |
Definition at line 406 of file PmaTrack3D.cxx.
Referenced by AddNode(), pma::ProjectionMatchingAlg::buildTrack(), pma::ProjectionMatchingAlg::extendTrack(), pma::PMAlgVertexing::getdQdx(), HasTwoViews(), Length(), and SelectHits().
|
inline |
Definition at line 232 of file PmaTrack3D.h.
References fNodes.
Referenced by pma::VtxCandidate::Add(), pma::PMAlgTracker::areCoLinear(), pma::ProjectionMatchingAlg::buildSegment(), pma::PMAlgFitter::buildShowers(), pma::PMAlgFitter::buildTracks(), pma::VtxCandidate::Compute(), pma::VtxCandidate::ComputeMse2D(), pma::ProjectionMatchingAlg::extendTrack(), pma::PMAlgVertexing::findKinksOnTracks(), pma::PMAlgVertexing::getKinks(), pma::TrkCandidateColl::getTreeCopy(), pma::PMAlgVertexing::getVertices(), pma::VtxCandidate::JoinTracks(), pma::VtxCandidate::MaxAngle(), pma::PMAlgVertexing::mergeBrokenTracks(), pma::PMAlgTracker::mergeCoLinear(), pma::ProjectionMatchingAlg::mergeTracks(), pma::PMAlgCosmicTagger::outOfDriftWindow(), trkf::PMAlgTrackMaker::produce(), pma::TrkCandidateColl::setParentDaughterConnections(), pma::TrkCandidateColl::setTreeId(), pma::TrkCandidateColl::setTreeOriginAtFront(), and pma::PMAlgStitching::StitchTracks().
|
inline |
|
inline |
double pma::Track3D::Optimize | ( | int | nNodes = -1 , |
double | eps = 0.01 , |
||
bool | selAllHits = true , |
||
bool | setAllNodes = true , |
||
size_t | selSegHits = 0 , |
||
size_t | selVtxHits = 0 |
||
) |
Main optimization method.
Definition at line 1804 of file PmaTrack3D.cxx.
References AddNode(), CheckEndSegment(), fEndSegWeight, fMaxSegStop, fMaxSegStopFactor, fMinSegStop, fNodes, fPenaltyValue, fSegments, fSegStopValue, GetObjFunction(), kBegin, kEnd, MakeFastProjection(), MakeProjection(), n, SelectAllHits(), SelectRndHits(), size(), and UpdateParams().
Referenced by AddRefPoint(), pma::ProjectionMatchingAlg::buildMultiTPCTrack(), pma::ProjectionMatchingAlg::buildSegment(), pma::ProjectionMatchingAlg::buildTrack(), pma::ProjectionMatchingAlg::extendTrack(), pma::PMAlgVertexing::findKinksOnTracks(), pma::ProjectionMatchingAlg::guideEndpoints(), InitFromHits(), InitFromMiddle(), InitFromRefPoints(), pma::ProjectionMatchingAlg::mergeTracks(), and pma::ProjectionMatchingAlg::ShortenSeg().
int pma::Track3D::PrevHit | ( | int | index, |
unsigned int | view = geo::kZ , |
||
bool | inclDisabled = false |
||
) | const |
Definition at line 877 of file PmaTrack3D.cxx.
References fHits, pma::Hit3D::IsEnabled(), size(), and pma::Hit3D::View2D().
Referenced by GetRawdEdxSequence(), pma::ProjectionMatchingAlg::guideEndpoints(), and HasTPC().
pma::Segment3D * pma::Track3D::PrevSegment | ( | pma::Node3D * | vtx | ) | const |
Definition at line 980 of file PmaTrack3D.cxx.
References pma::Segment3D::Parent(), and pma::SortedObjectBase::Prev().
Referenced by CleanupTails(), DisableSingleViewEnds(), MakeFastProjection(), Segments(), and SwapVertices().
|
inline |
Definition at line 66 of file PmaTrack3D.h.
References erase(), fHits, and pma::Hit3D::fParent.
Referenced by AddHits(), CompleteMissingWires(), ExtendWith(), pma::ProjectionMatchingAlg::mergeTracks(), push_back(), ReassignHitsInTree(), and Split().
bool pma::Track3D::push_back | ( | const art::Ptr< recob::Hit > & | hit | ) |
Definition at line 347 of file PmaTrack3D.cxx.
References fHits, pma::Hit3D::fParent, and push_back().
|
private |
Definition at line 2070 of file PmaTrack3D.cxx.
References pma::Hit3D::Cryo(), fHits, fNodes, pma::Hit3D::GetDistToProj(), GetNearestTrkInTree(), HasTwoViews(), pma::SortedObjectBase::Next(), pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), pma::Segment3D::Parent(), pma::Hit3D::Point2D(), push_back(), ReassignHitsInTree(), release_at(), size(), pma::Hit3D::TPC(), and pma::Hit3D::View2D().
Referenced by ReassignHitsInTree(), and SetMaxHitsPerSeg().
|
private |
Definition at line 2365 of file PmaTrack3D.cxx.
References DeleteSegments(), fNodes, and fSegments.
Referenced by AddNode(), CheckEndSegment(), DisableSingleViewEnds(), InitFromRefPoints(), InsertNode(), InternalFlip(), RemoveNode(), SetMaxHitsPerSeg(), ShiftEndsToHits(), Split(), and Track3D().
pma::Hit3D * pma::Track3D::release_at | ( | size_t | index | ) |
Definition at line 340 of file PmaTrack3D.cxx.
References fHits.
Referenced by ExtendWith(), ReassignHitsInTree(), pma::ProjectionMatchingAlg::RemoveNotEnabledHits(), SetTag(), and Split().
void pma::Track3D::RemoveHits | ( | const std::vector< art::Ptr< recob::Hit > > & | hits | ) |
Remove hits; removes also hit->node/seg assignments.
Definition at line 399 of file PmaTrack3D.cxx.
References erase(), hits(), MakeProjection(), and n.
Referenced by Length(), pma::PMAlgTracker::reassignHits_1(), and pma::PMAlgTracker::reassignHits_2().
bool pma::Track3D::RemoveNode | ( | size_t | idx | ) |
Definition at line 1355 of file PmaTrack3D.cxx.
References fNodes, pma::SortedBranchBase::NextCount(), pma::SortedObjectBase::Prev(), and RebuildSegments().
Referenced by AddNode().
|
inline |
Definition at line 227 of file PmaTrack3D.h.
References fSegments, NextSegment(), and PrevSegment().
Referenced by pma::PMAlgTracker::areCoLinear(), pma::ProjectionMatchingAlg::buildMultiTPCTrack(), pma::ProjectionMatchingAlg::guideEndpoints(), pma::PMAlgVertexing::isSingleParticle(), pma::PMAlgVertexing::mergeBrokenTracks(), pma::ProjectionMatchingAlg::validate(), pma::ProjectionMatchingAlg::validate_on_adc(), and pma::ProjectionMatchingAlg::validate_on_adc_test().
bool pma::Track3D::SelectAllHits | ( | void | ) |
Definition at line 2901 of file PmaTrack3D.cxx.
References fHits.
Referenced by AddNode(), pma::ProjectionMatchingAlg::buildMultiTPCTrack(), pma::ProjectionMatchingAlg::buildTrack(), InitFromHits(), InitFromRefPoints(), and Optimize().
bool pma::Track3D::SelectHits | ( | float | fraction = 1.0F | ) |
Definition at line 2855 of file PmaTrack3D.cxx.
References fHits, FirstElement(), geo::kU, geo::kV, geo::kZ, LastElement(), NHits(), and pma::Element3D::SelectAllHits().
Referenced by AddNode(), trkf::PMAlgTrajFitter::produce(), trkf::PMAlgTrackMaker::produce(), pma::PMAlgTracker::reassignSingleViewEnds_1(), pma::PMAlgTracker::reassignSingleViewEnds_2(), and pma::ProjectionMatchingAlg::twoViewFraction().
bool pma::Track3D::SelectRndHits | ( | size_t | segmax, |
size_t | vtxmax | ||
) |
Definition at line 2893 of file PmaTrack3D.cxx.
References fNodes, fSegments, n, and s.
Referenced by AddNode(), and Optimize().
|
inline |
Definition at line 271 of file PmaTrack3D.h.
References fEndSegWeight, and fhicl::detail::atom::value().
Referenced by pma::ProjectionMatchingAlg::buildSegment().
|
inline |
Definition at line 277 of file PmaTrack3D.h.
References AttachBackToOtherTPC(), AttachBackToSameTPC(), AttachToOtherTPC(), AttachToSameTPC(), AverageDist2(), CheckEndSegment(), ClearNodes(), DeleteSegments(), fMaxHitsPerSeg, GetNearestTrkInTree(), GetUnconstrainedProj3D(), HitDxByView(), InitFromHits(), InitFromMiddle(), InitFromRefPoints(), InternalFlip(), MakeFastProjection(), ReassignHitsInTree(), RebuildSegments(), SwapVertices(), UpdateHitsRadius(), UpdateParams(), and fhicl::detail::atom::value().
|
inline |
Definition at line 274 of file PmaTrack3D.h.
References fPenaltyFactor, and fhicl::detail::atom::value().
void pma::Track3D::SetT0FromDx | ( | double | dx | ) |
Function to convert dx into dT0.
Definition at line 2309 of file PmaTrack3D.cxx.
References fNodes, fT0, and fT0Flag.
Referenced by AddRefPoint(), and ApplyDriftShiftInTree().
|
inline |
Definition at line 56 of file PmaTrack3D.h.
References fTag, Initialize(), release_at(), Track3D(), fhicl::detail::atom::value(), and ~Track3D().
|
inline |
Definition at line 55 of file PmaTrack3D.h.
References fTag.
Referenced by pma::PMAlgCosmicTagger::outOfDriftWindow().
bool pma::Track3D::ShiftEndsToHits | ( | void | ) |
Move the first/last Node3D to the first/last hit in the track; returns true if all OK, false if empty segments found.
Definition at line 2422 of file PmaTrack3D.cxx.
References back(), fNodes, front(), GetNearestElement(), pma::Element3D::Length(), MakeProjection(), pma::SortedObjectBase::Next(), pma::SortedBranchBase::NextCount(), pma::SortedObjectBase::Prev(), and RebuildSegments().
Referenced by HasT0(), pma::ProjectionMatchingAlg::mergeTracks(), pma::PMAlgTracker::reassignHits_1(), and pma::PMAlgTracker::reassignHits_2().
|
inline |
Definition at line 76 of file PmaTrack3D.h.
References fHits, index_of(), and n.
Referenced by pma::ProjectionMatchingAlg::addEndpointRef(), AutoFlip(), pma::ProjectionMatchingAlg::buildMultiTPCTrack(), pma::ProjectionMatchingAlg::buildShowerSeg(), pma::ProjectionMatchingAlg::buildTrack(), pma::ProjectionMatchingAlg::chkEndpointHits(), pma::PMAlgTracker::collectSingleViewEnd(), pma::PMAlgTracker::collectSingleViewFront(), CompleteMissingWires(), pma::convertFrom(), ems::EMShower3D::ConvertFrom(), ems::EMShower3D::ConvertFrom2(), Cryos(), DisableSingleViewEnds(), erase(), pma::ProjectionMatchingAlg::extendTrack(), ExtendWith(), pma::PMAlgVertexing::getdQdx(), trkf::PMAlgTrackMaker::getPdgFromCnnOnHits(), GetRawdEdxSequence(), pma::ProjectionMatchingAlg::guideEndpoints(), HitDxByView(), index_of(), InitFromHits(), InitFromRefPoints(), pma::VtxCandidate::JoinTracks(), Length(), shower::EMShowerAlg::MakeShower(), pma::PMAlgTracker::mergeCoLinear(), pma::ProjectionMatchingAlg::mergeTracks(), NEnabledHits(), NextHit(), Optimize(), PrevHit(), trkf::PMAlgTrajFitter::produce(), trkf::PMAlgTrackMaker::produce(), ReassignHitsInTree(), pma::PMAlgTracker::reassignSingleViewEnds_1(), pma::PMAlgTracker::reassignSingleViewEnds_2(), pma::ProjectionMatchingAlg::RemoveNotEnabledHits(), pma::ProjectionMatchingAlg::selectInitialHits(), pma::ProjectionMatchingAlg::ShortenSeg(), SortHits(), Split(), pma::ProjectionMatchingAlg::TestTrk(), TPCs(), pma::ProjectionMatchingAlg::twoViewFraction(), UpdateHitsRadius(), and UpdateParams().
void pma::Track3D::SortHits | ( | void | ) |
Definition at line 2670 of file PmaTrack3D.cxx.
References fHits, fNodes, pma::Hit3D::fParent, pma::Element3D::Hit(), pma::SortedObjectBase::Next(), NextSegment(), pma::Element3D::NHits(), size(), and pma::Element3D::SortHits().
Referenced by AddNode(), pma::ProjectionMatchingAlg::buildMultiTPCTrack(), pma::ProjectionMatchingAlg::buildSegment(), pma::ProjectionMatchingAlg::buildTrack(), CompleteMissingWires(), DisableSingleViewEnds(), pma::PMAlgTracker::extendTrack(), ExtendWith(), pma::ProjectionMatchingAlg::mergeTracks(), pma::PMAlgTracker::reassignHits_1(), pma::ProjectionMatchingAlg::ShortenSeg(), and SortHitsInTree().
void pma::Track3D::SortHitsInTree | ( | bool | skipFirst = false | ) |
Definition at line 2152 of file PmaTrack3D.cxx.
References fNodes, pma::SortedObjectBase::Next(), pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), pma::Segment3D::Parent(), SortHits(), and SortHitsInTree().
Referenced by AddRefPoint(), SortHitsInTree(), and TuneFullTree().
pma::Track3D * pma::Track3D::Split | ( | size_t | idx, |
bool | try_start_at_idx = true |
||
) |
Definition at line 1370 of file PmaTrack3D.cxx.
References AttachTo(), CanFlip(), pma::Node3D::ClearAssigned(), pma::Element3D::Cryo(), pma::Hit3D::Cryo(), Dist2(), fHits, Flip(), fNodes, fT0, fT0Flag, fTag, pma::Node3D::GetDriftShift(), HasTPC(), HasTwoViews(), n, pma::SortedBranchBase::Next(), pma::Segment3D::Parent(), pma::Hit3D::Point2D(), pma::Node3D::Point3D(), pma::SortedObjectBase::Prev(), push_back(), RebuildSegments(), release_at(), pma::SortedObjectBase::RemoveNext(), pma::SortedBranchBase::RemoveNext(), s, size(), pma::Element3D::TPC(), pma::Hit3D::TPC(), and pma::Hit3D::View2D().
Referenced by AddNode(), Flip(), pma::VtxCandidate::JoinTracks(), and pma::TrkCandidateColl::setTreeOriginAtFront().
|
private |
Definition at line 3140 of file PmaTrack3D.cxx.
References pma::SortedObjectBase::AddNext(), pma::SortedObjectBase::Disconnect(), fNodes, NextSegment(), and PrevSegment().
Referenced by CheckEndSegment(), and SetMaxHitsPerSeg().
unsigned int pma::Track3D::TestHits | ( | const std::vector< art::Ptr< recob::Hit > > & | hits, |
double | dist = 0.4 |
||
) | const |
Count close 2D hits.
Definition at line 811 of file PmaTrack3D.cxx.
References GetUnconstrainedProj3D(), and hits().
Referenced by HasTPC(), and pma::ProjectionMatchingAlg::testHits().
double pma::Track3D::TestHitsMse | ( | const std::vector< art::Ptr< recob::Hit > > & | hits, |
bool | normalized = true |
||
) | const |
MSE of 2D hits.
Definition at line 788 of file PmaTrack3D.cxx.
References Dist2(), hits(), and pma::WireDriftToCm().
Referenced by HasTPC().
std::vector< unsigned int > pma::Track3D::TPCs | ( | void | ) | const |
Definition at line 437 of file PmaTrack3D.cxx.
Referenced by pma::ProjectionMatchingAlg::buildSegment(), pma::ProjectionMatchingAlg::buildTrack(), Initialize(), Length(), pma::ProjectionMatchingAlg::validate(), pma::ProjectionMatchingAlg::validate_on_adc(), and pma::ProjectionMatchingAlg::validate_on_adc_test().
double pma::Track3D::TuneFullTree | ( | double | eps = 0.001 , |
double | gmax = 50.0 |
||
) |
Definition at line 2211 of file PmaTrack3D.cxx.
References GetObjFnInTree(), geo::vect::isfinite(), MakeProjectionInTree(), SortHitsInTree(), TuneSinglePass(), and UpdateParamsInTree().
Referenced by AddRefPoint(), and pma::VtxCandidate::JoinTracks().
double pma::Track3D::TuneSinglePass | ( | bool | skipFirst = false | ) |
Definition at line 1959 of file PmaTrack3D.cxx.
References fEndSegWeight, fNodes, fPenaltyValue, GetObjFunction(), pma::SortedObjectBase::Next(), pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), pma::Node3D::Optimize(), pma::Segment3D::Parent(), and TuneSinglePass().
Referenced by AddRefPoint(), TuneFullTree(), and TuneSinglePass().
|
private |
Definition at line 3214 of file PmaTrack3D.cxx.
References fHitsRadius, pma::GetHitsRadius2D(), geo::kU, geo::kV, geo::kZ, size(), and pma::Hit3D::View2D().
Referenced by InitFromHits(), InitFromMiddle(), InitFromRefPoints(), Initialize(), and SetMaxHitsPerSeg().
|
private |
Definition at line 3112 of file PmaTrack3D.cxx.
References AverageDist2(), fHitsRadius, fMinSegStop, fPenaltyFactor, fPenaltyValue, fSegments, fSegStopFactor, fSegStopValue, n, and size().
Referenced by Optimize(), SetMaxHitsPerSeg(), and UpdateParamsInTree().
bool pma::Track3D::UpdateParamsInTree | ( | bool | skipFirst = false | ) |
Definition at line 1915 of file PmaTrack3D.cxx.
References fNodes, pma::SortedObjectBase::Next(), pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), pma::Segment3D::Parent(), UpdateParams(), and UpdateParamsInTree().
Referenced by AddRefPoint(), TuneFullTree(), and UpdateParamsInTree().
void pma::Track3D::UpdateProjection | ( | void | ) |
std::pair< TVector2, TVector2 > pma::Track3D::WireDriftRange | ( | unsigned int | view, |
unsigned int | tpc, | ||
unsigned int | cryo | ||
) | const |
Rectangular region of the track 2D projection in view/tpc/cryo; first in the returned pair is (min_wire; min_drift), second is (max_wire; max_drift). Used for preselection of neighbouring hits in the track validation functions.
Definition at line 469 of file PmaTrack3D.cxx.
References pma::CmToWireDrift(), fNodes, and tmp.
Referenced by HasTPC(), pma::ProjectionMatchingAlg::validate(), and pma::ProjectionMatchingAlg::validate_on_adc_test().
|
private |
Definition at line 324 of file PmaTrack3D.h.
Referenced by AddRefPoint(), ApplyDriftShiftInTree(), ExtendWith(), HasRefPoint(), InitFromRefPoints(), MakeProjection(), Track3D(), and ~Track3D().
|
private |
Definition at line 343 of file PmaTrack3D.h.
Referenced by GetEndSegWeight(), GetObjFunction(), InitFromHits(), Optimize(), SetEndSegWeight(), and TuneSinglePass().
|
private |
Definition at line 322 of file PmaTrack3D.h.
Referenced by AddHits(), ApplyDriftShiftInTree(), back(), CompleteMissingWires(), Cryos(), DisableSingleViewEnds(), erase(), front(), GetDirection3D(), GetRawdEdxSequence(), HitDxByView(), index_of(), InitFromHits(), Length(), MakeFastProjection(), MakeProjection(), NEnabledHits(), NextHit(), NHits(), operator[](), PrevHit(), push_back(), ReassignHitsInTree(), release_at(), SelectAllHits(), SelectHits(), size(), SortHits(), Split(), TPCs(), Track3D(), and ~Track3D().
|
private |
Definition at line 344 of file PmaTrack3D.h.
Referenced by UpdateHitsRadius(), and UpdateParams().
|
private |
Definition at line 333 of file PmaTrack3D.h.
Referenced by GetMaxHitsPerSeg(), and SetMaxHitsPerSeg().
|
private |
Definition at line 339 of file PmaTrack3D.h.
Referenced by Optimize().
|
private |
Definition at line 335 of file PmaTrack3D.h.
Referenced by Optimize().
|
private |
Definition at line 338 of file PmaTrack3D.h.
Referenced by Optimize(), and UpdateParams().
|
private |
Definition at line 330 of file PmaTrack3D.h.
Referenced by AddNode(), ApplyDriftShiftInTree(), AttachBackTo(), AttachBackToOtherTPC(), AttachBackToSameTPC(), AttachTo(), AttachToOtherTPC(), AttachToSameTPC(), AverageDist2(), BackCryo(), BackTPC(), CanFlip(), CheckEndSegment(), CleanupTails(), ClearNodes(), DisableSingleViewEnds(), Dist2(), DriftsOfWireIntersection(), ExtendWith(), FirstElement(), Flip(), FrontCryo(), FrontTPC(), GetBranches(), GetDirection3D(), GetMse(), GetNearestElement(), GetNearestTrkInTree(), GetObjFnInTree(), GetObjFunction(), GetRoot(), HasTPC(), index_of(), InitFromHits(), InsertNode(), InternalFlip(), LastElement(), MakeFastProjection(), MakeProjection(), MakeProjectionInTree(), Nodes(), Optimize(), ReassignHitsInTree(), RebuildSegments(), RemoveNode(), SelectRndHits(), SetT0FromDx(), ShiftEndsToHits(), SortHits(), SortHitsInTree(), Split(), SwapVertices(), Track3D(), TuneSinglePass(), UpdateParamsInTree(), UpdateProjection(), WireDriftRange(), and ~Track3D().
|
private |
Definition at line 334 of file PmaTrack3D.h.
Referenced by GetPenalty(), SetPenalty(), and UpdateParams().
|
private |
Definition at line 342 of file PmaTrack3D.h.
Referenced by GetObjFunction(), Optimize(), TuneSinglePass(), and UpdateParams().
|
private |
Definition at line 331 of file PmaTrack3D.h.
Referenced by AddNode(), AttachBackToOtherTPC(), AttachBackToSameTPC(), AttachToOtherTPC(), AverageDist2(), CheckEndSegment(), CleanupTails(), DeleteSegments(), Dist2(), ExtendWith(), GetDirection3D(), GetMse(), GetNearestElement(), GetUnconstrainedProj3D(), MakeFastProjection(), MakeProjection(), Optimize(), RebuildSegments(), Segments(), SelectRndHits(), UpdateParams(), UpdateProjection(), and ~Track3D().
|
private |
Definition at line 341 of file PmaTrack3D.h.
Referenced by UpdateParams().
|
private |
Definition at line 337 of file PmaTrack3D.h.
Referenced by Optimize(), and UpdateParams().
|
private |
Definition at line 346 of file PmaTrack3D.h.
Referenced by GetT0(), SetT0FromDx(), and Split().
|
private |
Definition at line 347 of file PmaTrack3D.h.
Referenced by HasT0(), SetT0FromDx(), and Split().
|
private |
Definition at line 349 of file PmaTrack3D.h.
Referenced by GetTag(), HasTagFlag(), SetTag(), SetTagFlag(), and Split().