LArSoft
v09_90_00
Liquid Argon Software toolkit - https://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 () const noexcept |
bool | HasTagFlag (ETag value) const noexcept |
void | SetTagFlag (ETag value) |
Track3D () | |
Track3D (const Track3D &src) | |
~Track3D () | |
bool | Initialize (detinfo::DetectorPropertiesData const &detProp, float initEndSegW=0.05F) |
pma::Hit3D * | release_at (size_t index) |
void | push_back (pma::Hit3D *hit) |
bool | push_back (const detinfo::DetectorPropertiesData &detProp, 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 const * | front () const |
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 (detinfo::DetectorPropertiesData const &detProp, 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 () const |
std::vector< unsigned int > | Cryos () const |
unsigned int | FrontTPC () const |
unsigned int | FrontCryo () const |
unsigned int | BackTPC () const |
unsigned int | BackCryo () const |
bool | HasTPC (int tpc) const |
std::pair< TVector2, TVector2 > | WireDriftRange (detinfo::DetectorPropertiesData const &detProp, unsigned int view, unsigned int tpc, unsigned int cryo) const |
bool | Flip (const detinfo::DetectorPropertiesData &detProp, std::vector< pma::Track3D * > &allTracks) |
void | Flip () |
bool | CanFlip () 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 (detinfo::DetectorPropertiesData const &detProp, std::vector< pma::Track3D * > &allTracks, pma::Track3D::EDirection dir, double thr=0.0, unsigned int n=0) |
double | TestHitsMse (detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< recob::Hit >> &hits, bool normalized=true) const |
MSE of 2D hits. More... | |
unsigned int | TestHits (detinfo::DetectorPropertiesData const &detProp, 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 (detinfo::DetectorPropertiesData const &detProp, unsigned int wire, unsigned int view) const |
size_t | CompleteMissingWires (detinfo::DetectorPropertiesData const &detProp, 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 (const detinfo::DetectorPropertiesData &detProp, 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, size_t &depth) |
double | GetObjFnInTree (bool skipFirst=false) |
double | TuneSinglePass (bool skipFirst=false) |
double | TuneFullTree (double eps=0.001, double gmax=50.0) |
void | ApplyDriftShiftInTree (const detinfo::DetectorClocksData &clockData, detinfo::DetectorPropertiesData const &detProp, double dx, bool skipFirst=false) |
void | SetT0FromDx (const detinfo::DetectorClocksData &clockData, detinfo::DetectorPropertiesData const &detProp, double dx) |
Function to convert dx into dT0. More... | |
double | GetT0 () const |
bool | HasT0 () const noexcept |
void | CleanupTails () |
Cut out tails with no hits assigned. More... | |
bool | ShiftEndsToHits () |
std::vector< pma::Segment3D * > const & | Segments () const noexcept |
pma::Segment3D * | NextSegment (pma::Node3D *vtx) const |
pma::Segment3D * | PrevSegment (pma::Node3D *vtx) const |
std::vector< pma::Node3D * > const & | Nodes () const noexcept |
pma::Node3D * | FirstElement () const |
pma::Node3D * | LastElement () const |
void | AddNode (pma::Node3D *node) |
void | AddNode (detinfo::DetectorPropertiesData const &detProp, TVector3 const &p3d, unsigned int tpc, unsigned int cryo) |
bool | AddNode (detinfo::DetectorPropertiesData const &detProp) |
void | InsertNode (detinfo::DetectorPropertiesData const &detProp, TVector3 const &p3d, size_t at_idx, unsigned int tpc, unsigned int cryo) |
bool | RemoveNode (size_t idx) |
pma::Track3D * | Split (detinfo::DetectorPropertiesData const &detProp, 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 () |
bool | GetBranches (std::vector< pma::Track3D const * > &branches, bool skipFirst=false) const |
void | MakeProjection () |
void | UpdateProjection () |
void | SortHits () |
unsigned int | DisableSingleViewEnds () |
bool | SelectHits (float fraction=1.0F) |
bool | SelectRndHits (size_t segmax, size_t vtxmax) |
bool | SelectAllHits () |
float | GetEndSegWeight () const noexcept |
void | SetEndSegWeight (float value) noexcept |
float | GetPenalty () const noexcept |
void | SetPenalty (float value) noexcept |
unsigned int | GetMaxHitsPerSeg () const noexcept |
void | SetMaxHitsPerSeg (unsigned int value) noexcept |
Private Member Functions | |
void | ClearNodes () |
void | MakeFastProjection () |
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 () |
double | AverageDist2 () const |
bool | InitFromHits (detinfo::DetectorPropertiesData const &detProp, int tpc, int cryo, float initEndSegW=0.05F) |
bool | InitFromRefPoints (detinfo::DetectorPropertiesData const &detProp, int tpc, int cryo) |
void | InitFromMiddle (detinfo::DetectorPropertiesData const &detProp, 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=nullptr) |
double | HitDxByView (size_t index, unsigned int view, Track3D::EDirection dir, bool secondDir=false) const |
bool | GetUnconstrainedProj3D (detinfo::DetectorPropertiesData const &detProp, art::Ptr< recob::Hit > hit, TVector3 &p3d, double &dist2) const |
void | DeleteSegments () |
void | RebuildSegments () |
bool | SwapVertices (size_t v0, size_t v1) |
bool | UpdateParams () |
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 {70} |
float | fPenaltyFactor {1.0F} |
float | fMaxSegStopFactor {8.0F} |
unsigned int | fSegStopValue {2} |
unsigned int | fMinSegStop {2} |
unsigned int | fMaxSegStop {2} |
float | fSegStopFactor {0.2F} |
float | fPenaltyValue {0.1F} |
float | fEndSegWeight {0.05F} |
float | fHitsRadius {1.0F} |
double | fT0 {} |
bool | fT0Flag {false} |
ETag | fTag {kNotTagged} |
Definition at line 40 of file PmaTrack3D.h.
Enumerator | |
---|---|
kForward | |
kBackward |
Definition at line 43 of file PmaTrack3D.h.
enum pma::Track3D::ETag |
Definition at line 44 of file PmaTrack3D.h.
Enumerator | |
---|---|
kBegin | |
kEnd |
Definition at line 42 of file PmaTrack3D.h.
|
default |
pma::Track3D::Track3D | ( | const Track3D & | src | ) |
Definition at line 31 of file PmaTrack3D.cxx.
References fAssignedPoints, fHits, fNodes, pma::Hit3D::fParent, MakeProjection(), and RebuildSegments().
pma::Track3D::~Track3D | ( | ) |
Definition at line 64 of file PmaTrack3D.cxx.
References fAssignedPoints, fHits, fNodes, and fSegments.
void pma::Track3D::AddHits | ( | detinfo::DetectorPropertiesData const & | detProp, |
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 404 of file PmaTrack3D.cxx.
References fHits, hits(), and push_back().
Referenced by pma::ProjectionMatchingAlg::buildSegment(), pma::ProjectionMatchingAlg::buildTrack(), and pma::ProjectionMatchingAlg::extendTrack().
void pma::Track3D::AddNode | ( | pma::Node3D * | node | ) |
Definition at line 1241 of file PmaTrack3D.cxx.
References fNodes, and RebuildSegments().
Referenced by InitFromHits(), InitFromMiddle(), InitFromRefPoints(), pma::ProjectionMatchingAlg::mergeTracks(), and Optimize().
|
inline |
Definition at line 279 of file PmaTrack3D.h.
References cluster::SortHits().
bool pma::Track3D::AddNode | ( | detinfo::DetectorPropertiesData const & | detProp | ) |
Definition at line 1247 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().
|
inline |
Definition at line 218 of file PmaTrack3D.h.
Referenced by pma::ProjectionMatchingAlg::addEndpointRef_().
|
inline |
void pma::Track3D::ApplyDriftShiftInTree | ( | const detinfo::DetectorClocksData & | clockData, |
detinfo::DetectorPropertiesData const & | detProp, | ||
double | dx, | ||
bool | skipFirst = false |
||
) |
Adjust track tree position in the drift direction (when T0 is being corrected).
Definition at line 2284 of file PmaTrack3D.cxx.
References pma::Node3D::ApplyDriftShift(), ApplyDriftShiftInTree(), fAssignedPoints, fHits, fNodes, pma::Node3D::fPoint3D, pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), pma::Segment3D::Parent(), and SetT0FromDx().
Referenced by ApplyDriftShiftInTree(), pma::PMAlgTracker::mergeCoLinear(), and pma::PMAlgStitching::StitchTracks().
bool pma::Track3D::AttachBackTo | ( | pma::Node3D * | vStart | ) |
Definition at line 1624 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 pma::VtxCandidate::JoinTracks().
|
private |
Definition at line 1655 of file PmaTrack3D.cxx.
References fNodes, fSegments, and pma::SortedObjectBase::Prev().
Referenced by AttachBackTo().
|
private |
Definition at line 1669 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().
bool pma::Track3D::AttachTo | ( | pma::Node3D * | vStart, |
bool | noFlip = false |
||
) |
Definition at line 1516 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 pma::TrkCandidateColl::getTreeCopy(), pma::VtxCandidate::JoinTracks(), and Split().
|
private |
Definition at line 1555 of file PmaTrack3D.cxx.
References fNodes, and fSegments.
Referenced by AttachTo().
|
private |
Definition at line 1568 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().
void pma::Track3D::AutoFlip | ( | pma::Track3D::EDirection | dir, |
double | thr = 0.0 , |
||
unsigned int | n = 0 |
||
) |
Definition at line 662 of file PmaTrack3D.cxx.
References util::end(), Flip(), GetRawdEdxSequence(), kBackward, kForward, n, and size().
Referenced by pma::ProjectionMatchingAlg::autoFlip(), and pma::TrkCandidateColl::flipTreesByDQdx().
bool pma::Track3D::AutoFlip | ( | detinfo::DetectorPropertiesData const & | detProp, |
std::vector< pma::Track3D * > & | allTracks, | ||
pma::Track3D::EDirection | dir, | ||
double | thr = 0.0 , |
||
unsigned int | n = 0 |
||
) |
Definition at line 738 of file PmaTrack3D.cxx.
References util::end(), Flip(), GetRawdEdxSequence(), kBackward, kForward, n, and size().
|
private |
Definition at line 3091 of file PmaTrack3D.cxx.
References fNodes, fSegments, n, and sum.
Referenced by UpdateParams().
|
inline |
Definition at line 88 of file PmaTrack3D.h.
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 |
Definition at line 122 of file PmaTrack3D.h.
Referenced by pma::ProjectionMatchingAlg::guideEndpoints(), pma::ProjectionMatchingAlg::mergeTracks(), pma::PMAlgStitching::StitchTracks(), and ems::EMShower3D::Validate().
|
inline |
Definition at line 121 of file PmaTrack3D.h.
Referenced by pma::ProjectionMatchingAlg::guideEndpoints(), pma::ProjectionMatchingAlg::mergeTracks(), pma::PMAlgStitching::StitchTracks(), and ems::EMShower3D::Validate().
bool pma::Track3D::CanFlip | ( | ) | const |
Check if the track can be flipped without breaking any other track.
Definition at line 644 of file PmaTrack3D.cxx.
References CanFlip(), fNodes, n, NextSegment(), pma::Segment3D::Parent(), and pma::SortedObjectBase::Prev().
Referenced by AttachBackToSameTPC(), AttachTo(), AttachToSameTPC(), CanFlip(), pma::TrkCandidateColl::flipTreesByDQdx(), pma::VtxCandidate::JoinTracks(), and Split().
|
private |
Definition at line 3177 of file PmaTrack3D.cxx.
References fNodes, fSegments, GetObjFunction(), kBegin, kEnd, MakeProjection(), RebuildSegments(), and SwapVertices().
Referenced by Optimize().
void pma::Track3D::CleanupTails | ( | ) |
Cut out tails with no hits assigned.
Definition at line 2384 of file PmaTrack3D.cxx.
References fNodes, fSegments, MakeProjection(), pma::SortedBranchBase::NextCount(), NextSegment(), pma::Element3D::NHits(), and PrevSegment().
Referenced by pma::PMAlgTracker::reassignHits_1().
|
private |
Definition at line 112 of file PmaTrack3D.cxx.
References fNodes.
Referenced by InitFromHits(), InitFromMiddle(), and InitFromRefPoints().
size_t pma::Track3D::CompleteMissingWires | ( | detinfo::DetectorPropertiesData const & | detProp, |
unsigned int | view | ||
) |
Definition at line 1170 of file PmaTrack3D.cxx.
References util::abs(), 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 trkf::PMAlgTrajFitter::produce(), and trkf::PMAlgTrackMaker::produce().
std::vector< unsigned int > pma::Track3D::Cryos | ( | ) | const |
Definition at line 466 of file PmaTrack3D.cxx.
References fHits.
Referenced by Initialize(), pma::ProjectionMatchingAlg::validate(), pma::ProjectionMatchingAlg::validate_on_adc(), and pma::ProjectionMatchingAlg::validate_on_adc_test().
|
private |
Definition at line 2367 of file PmaTrack3D.cxx.
References fSegments.
Referenced by ExtendWith(), and RebuildSegments().
unsigned int pma::Track3D::DisableSingleViewEnds | ( | ) |
Definition at line 2688 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 pma::PMAlgTracker::reassignSingleViewEnds_1(), and pma::ProjectionMatchingAlg::twoViewFraction().
double pma::Track3D::Dist2 | ( | const TVector2 & | p2d, |
unsigned int | view, | ||
unsigned int | tpc, | ||
unsigned int | cryo | ||
) | const |
Definition at line 2520 of file PmaTrack3D.cxx.
References larg4::dist(), fNodes, and fSegments.
Referenced by GetNearestTrkInTree(), 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 | ( | detinfo::DetectorPropertiesData const & | detProp, |
unsigned int | wire, | ||
unsigned int | view | ||
) | const |
Definition at line 1138 of file PmaTrack3D.cxx.
References pma::CmToWireDrift(), d, fNodes, X, and Y.
Referenced by CompleteMissingWires().
bool pma::Track3D::erase | ( | const art::Ptr< recob::Hit > & | hit | ) |
Definition at line 367 of file PmaTrack3D.cxx.
Referenced by RemoveHits().
void pma::Track3D::ExtendWith | ( | pma::Track3D * | src | ) |
Extend the track with everything from src, delete the src;.
Definition at line 1711 of file PmaTrack3D.cxx.
References DeleteSegments(), fAssignedPoints, fNodes, fSegments, MakeProjection(), push_back(), release_at(), size(), and SortHits().
|
inline |
Definition at line 275 of file PmaTrack3D.h.
Referenced by pma::ProjectionMatchingAlg::isContained(), SelectHits(), and pma::PMAlgTracker::validate().
bool pma::Track3D::Flip | ( | const detinfo::DetectorPropertiesData & | detProp, |
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 527 of file PmaTrack3D.cxx.
References Flip(), fNodes, index_of(), InternalFlip(), n, NextSegment(), pma::Segment3D::Parent(), pma::SortedObjectBase::Prev(), 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 | ( | ) |
Invert the order of hits and vertices in the track, will fail on configuration that causes breaking another track.
Definition at line 624 of file PmaTrack3D.cxx.
References InternalFlip().
Referenced by AttachTo(), and AutoFlip().
|
inline |
Definition at line 87 of file PmaTrack3D.h.
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(), 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 |
Definition at line 119 of file PmaTrack3D.h.
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 118 of file PmaTrack3D.h.
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 1757 of file PmaTrack3D.cxx.
References fNodes, GetBranches(), n, and pma::Segment3D::Parent().
Referenced by 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 380 of file PmaTrack3D.cxx.
References fHits, fNodes, fSegments, GetNearestElement(), n, pma::Hit3D::Point2D(), pma::Hit3D::TPC(), and pma::Hit3D::View2D().
Referenced by pma::convertFrom().
|
inlinenoexcept |
Definition at line 319 of file PmaTrack3D.h.
|
inlinenoexcept |
Definition at line 325 of file PmaTrack3D.h.
double pma::Track3D::GetMse | ( | unsigned int | view = geo::kUnknown | ) | const |
MSE of hits weighted with hit amplidudes and wire plane coefficients.
Definition at line 1798 of file PmaTrack3D.cxx.
References fNodes, fSegments, and n.
Referenced by pma::PMAlgTracker::extendTrack(), pma::PMAlgTracker::matchCluster(), and pma::ProjectionMatchingAlg::ShortenSeg_().
|
private |
Definition at line 2554 of file PmaTrack3D.cxx.
References larg4::dist(), fNodes, and fSegments.
Referenced by GetDirection3D(), MakeProjection(), and ShiftEndsToHits().
|
private |
Definition at line 2594 of file PmaTrack3D.cxx.
References larg4::dist(), fNodes, fSegments, and pma::Element3D::GetDistance2To().
|
private |
Definition at line 2025 of file PmaTrack3D.cxx.
References d, larg4::dist(), Dist2(), fNodes, GetNearestTrkInTree(), pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), and NextSegment().
Referenced by GetNearestTrkInTree(), and ReassignHitsInTree().
|
private |
double pma::Track3D::GetObjFnInTree | ( | bool | skipFirst = false | ) |
Definition at line 2204 of file PmaTrack3D.cxx.
References fNodes, GetObjFnInTree(), GetObjFunction(), pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), and pma::Segment3D::Parent().
Referenced by GetObjFnInTree(), and TuneFullTree().
double pma::Track3D::GetObjFunction | ( | float | penaltyFactor = 1.0F | ) | const |
Objective function optimized in track reconstruction.
Definition at line 1817 of file PmaTrack3D.cxx.
References fEndSegWeight, fNodes, fPenaltyValue, and sum.
Referenced by CheckEndSegment(), GetObjFnInTree(), Optimize(), and TuneSinglePass().
|
inlinenoexcept |
Definition at line 322 of file PmaTrack3D.h.
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 1027 of file PmaTrack3D.cxx.
References c1, fHits, HitDxByView(), pma::Hit3D::IsEnabled(), kForward, Length(), NextHit(), pma::Hit3D::PeakTime(), pma::Hit3D::Point3D(), PrevHit(), size(), pma::Hit3D::SummedADC(), and pma::Hit3D::Wire().
Referenced by AutoFlip(), pma::PMAlgVertexing::getdQdx(), and trkf::PMAlgTrackMaker::produce().
pma::Track3D * pma::Track3D::GetRoot | ( | ) |
Definition at line 1742 of file PmaTrack3D.cxx.
References fNodes, GetRoot(), and pma::Segment3D::Parent().
Referenced by AttachBackTo(), AttachTo(), GetRoot(), pma::VtxCandidate::IsAttached(), pma::VtxCandidate::JoinTracks(), and pma::PMAlgStitching::StitchTracks().
|
inline |
|
inlinenoexcept |
|
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 2615 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 TestHits().
bool pma::Track3D::HasRefPoint | ( | TVector3 * | p | ) | const |
|
inlinenoexcept |
Check if the T0 has been set - enables us to distinguish between T0 set very close to zero or not set.
Definition at line 260 of file PmaTrack3D.h.
Referenced by trkf::PMAlgTrackMaker::produce().
|
inlinenoexcept |
Definition at line 67 of file PmaTrack3D.h.
References value.
Referenced by trkf::PMAlgTrackMaker::produce().
|
inline |
Definition at line 124 of file PmaTrack3D.h.
References dir, larg4::dist(), hits(), geo::kZ, pma::Element3D::TPC(), and lar::dump::vector().
Referenced by Split().
bool pma::Track3D::HasTwoViews | ( | size_t | nmin = 1 | ) | const |
Definition at line 439 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(), 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 993 of file PmaTrack3D.cxx.
References kBackward, kForward, and size().
Referenced by GetRawdEdxSequence(), HitDxByView(), and pma::ProjectionMatchingAlg::selectInitialHits().
|
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 928 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 341 of file PmaTrack3D.cxx.
Referenced by DisableSingleViewEnds(), Flip(), and pma::TrkCandidateColl::setTreeOriginAtFront().
int pma::Track3D::index_of | ( | const pma::Node3D * | n | ) | const |
|
private |
Definition at line 119 of file PmaTrack3D.cxx.
References AddNode(), ClearNodes(), detinfo::DetectorPropertiesData::ConvertTicksToX(), pma::Dist2(), fEndSegWeight, fHits, fNodes, geo::GeometryCore::IntersectionPoint(), MakeProjection(), Optimize(), pma::Hit3D::PeakTime(), SelectAllHits(), UpdateHitsRadius(), pma::Hit3D::View2D(), pma::Hit3D::Wire(), geo::WireID::Wire, x, y, and z.
Referenced by Initialize().
|
private |
Definition at line 307 of file PmaTrack3D.cxx.
References AddNode(), ClearNodes(), MakeProjection(), maxY, geo::BoxBoundedGeo::MinX(), minY, Optimize(), geo::GeometryCore::TPC(), and UpdateHitsRadius().
Referenced by Initialize().
|
private |
Definition at line 218 of file PmaTrack3D.cxx.
References AddNode(), ClearNodes(), fAssignedPoints, MakeProjection(), pmtana::mean(), Optimize(), RebuildSegments(), scale, SelectAllHits(), size(), UpdateHitsRadius(), w, and y.
Referenced by Initialize().
bool pma::Track3D::Initialize | ( | detinfo::DetectorPropertiesData const & | detProp, |
float | initEndSegW = 0.05F |
||
) |
Definition at line 77 of file PmaTrack3D.cxx.
References Cryos(), HasTwoViews(), InitFromHits(), InitFromMiddle(), InitFromRefPoints(), TPCs(), and UpdateHitsRadius().
Referenced by pma::ProjectionMatchingAlg::buildSegment(), and pma::ProjectionMatchingAlg::buildTrack().
void pma::Track3D::InsertNode | ( | detinfo::DetectorPropertiesData const & | detProp, |
TVector3 const & | p3d, | ||
size_t | at_idx, | ||
unsigned int | tpc, | ||
unsigned int | cryo | ||
) |
Definition at line 1400 of file PmaTrack3D.cxx.
References fNodes, and RebuildSegments().
Referenced by pma::VtxCandidate::JoinTracks().
|
private |
Definition at line 597 of file PmaTrack3D.cxx.
References fNodes, InternalFlip(), pma::Segment3D::Parent(), and RebuildSegments().
Referenced by Flip(), and InternalFlip().
bool pma::Track3D::IsAttachedTo | ( | pma::Track3D const * | trk | ) | const |
Definition at line 1776 of file PmaTrack3D.cxx.
References GetBranches().
Referenced by AttachBackTo(), AttachTo(), pma::VtxCandidate::HasLoops(), and pma::VtxCandidate::IsAttached().
|
inline |
Definition at line 276 of file PmaTrack3D.h.
Referenced by pma::ProjectionMatchingAlg::isContained(), SelectHits(), and pma::PMAlgTracker::validate().
|
inline |
Definition at line 94 of file PmaTrack3D.h.
References tca::AddHits(), pma::Dist2(), hits(), geo::kUnknown, Length(), tca::Length(), util::size(), 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 863 of file PmaTrack3D.cxx.
References back(), pma::Dist2(), fHits, h1, pma::Hit3D::Point3D(), size(), and tmp.
|
private |
Definition at line 2923 of file PmaTrack3D.cxx.
References fHits, fNodes, fSegments, pma::Element3D::GetDistance2To(), pma::Segment3D::GetDistance2To(), pma::Node3D::GetDistance2To(), n, pma::SortedObjectBase::Next(), NextSegment(), pma::SortedObjectBase::Prev(), PrevSegment(), pma::Element3D::RemoveHitAt(), and pma::Element3D::TPC().
Referenced by Optimize().
void pma::Track3D::MakeProjection | ( | ) |
Definition at line 2887 of file PmaTrack3D.cxx.
References pma::Element3D::AddHit(), pma::Element3D::AddPoint(), fAssignedPoints, fHits, fNodes, fSegments, GetNearestElement(), and n.
Referenced by 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 2154 of file PmaTrack3D.cxx.
References fNodes, MakeProjection(), MakeProjectionInTree(), pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), and pma::Segment3D::Parent().
Referenced by MakeProjectionInTree(), and TuneFullTree().
unsigned int pma::Track3D::NEnabledHits | ( | unsigned int | view = geo::kUnknown | ) | const |
Definition at line 430 of file PmaTrack3D.cxx.
References fHits, geo::kUnknown, and n.
Referenced by pma::ProjectionMatchingAlg::TestTrk_().
int pma::Track3D::NextHit | ( | int | index, |
unsigned int | view = geo::kZ , |
||
bool | inclDisabled = false |
||
) | const |
Definition at line 894 of file PmaTrack3D.cxx.
References fHits, pma::Hit3D::IsEnabled(), size(), and pma::Hit3D::View2D().
Referenced by CompleteMissingWires(), GetRawdEdxSequence(), pma::ProjectionMatchingAlg::guideEndpoints(), and pma::ProjectionMatchingAlg::selectInitialHits().
pma::Segment3D * pma::Track3D::NextSegment | ( | pma::Node3D * | vtx | ) | const |
Definition at line 1005 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(), pma::TrkCandidateColl::setTreeId(), pma::TrkCandidateColl::setTreeOriginAtFront(), SortHits(), SortHitsInTree(), SwapVertices(), TuneSinglePass(), and UpdateParamsInTree().
unsigned int pma::Track3D::NHits | ( | unsigned int | view | ) | const |
Definition at line 421 of file PmaTrack3D.cxx.
Referenced by AddNode(), pma::ProjectionMatchingAlg::buildTrack(), pma::ProjectionMatchingAlg::extendTrack(), pma::PMAlgVertexing::getdQdx(), HasTwoViews(), and SelectHits().
|
inlinenoexcept |
Definition at line 274 of file PmaTrack3D.h.
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 |
Definition at line 85 of file PmaTrack3D.h.
|
inline |
Definition at line 86 of file PmaTrack3D.h.
double pma::Track3D::Optimize | ( | const detinfo::DetectorPropertiesData & | detProp, |
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 1827 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 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 911 of file PmaTrack3D.cxx.
References fHits, pma::Hit3D::IsEnabled(), size(), and pma::Hit3D::View2D().
Referenced by GetRawdEdxSequence(), and pma::ProjectionMatchingAlg::guideEndpoints().
pma::Segment3D * pma::Track3D::PrevSegment | ( | pma::Node3D * | vtx | ) | const |
Definition at line 1018 of file PmaTrack3D.cxx.
References pma::SortedObjectBase::Prev().
Referenced by CleanupTails(), DisableSingleViewEnds(), MakeFastProjection(), and SwapVertices().
|
inline |
Definition at line 77 of file PmaTrack3D.h.
References pma::Hit3D::fParent, and push_back().
Referenced by AddHits(), CompleteMissingWires(), ExtendWith(), pma::ProjectionMatchingAlg::mergeTracks(), push_back(), ReassignHitsInTree(), and Split().
bool pma::Track3D::push_back | ( | const detinfo::DetectorPropertiesData & | detProp, |
const art::Ptr< recob::Hit > & | hit | ||
) |
Definition at line 355 of file PmaTrack3D.cxx.
References fHits, pma::Hit3D::fParent, and push_back().
|
private |
Definition at line 2105 of file PmaTrack3D.cxx.
References pma::Hit3D::Cryo(), fHits, fNodes, pma::Hit3D::GetDistToProj(), GetNearestTrkInTree(), HasTwoViews(), 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().
|
private |
Definition at line 2374 of file PmaTrack3D.cxx.
References DeleteSegments(), fNodes, and fSegments.
Referenced by AddNode(), CheckEndSegment(), DisableSingleViewEnds(), InitFromRefPoints(), InsertNode(), InternalFlip(), RemoveNode(), ShiftEndsToHits(), Split(), and Track3D().
pma::Hit3D * pma::Track3D::release_at | ( | size_t | index | ) |
Definition at line 348 of file PmaTrack3D.cxx.
References fHits.
Referenced by ExtendWith(), ReassignHitsInTree(), pma::ProjectionMatchingAlg::RemoveNotEnabledHits(), 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 412 of file PmaTrack3D.cxx.
References erase(), hits(), MakeProjection(), and n.
Referenced by pma::PMAlgTracker::reassignHits_1().
bool pma::Track3D::RemoveNode | ( | size_t | idx | ) |
Definition at line 1413 of file PmaTrack3D.cxx.
References fNodes, pma::SortedBranchBase::NextCount(), pma::SortedObjectBase::Prev(), and RebuildSegments().
|
inlinenoexcept |
Definition at line 269 of file PmaTrack3D.h.
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 2877 of file PmaTrack3D.cxx.
References fHits.
Referenced by pma::ProjectionMatchingAlg::buildMultiTPCTrack(), pma::ProjectionMatchingAlg::buildTrack(), InitFromHits(), InitFromRefPoints(), and Optimize().
bool pma::Track3D::SelectHits | ( | float | fraction = 1.0F | ) |
Definition at line 2826 of file PmaTrack3D.cxx.
References fHits, FirstElement(), geo::kU, geo::kV, geo::kZ, LastElement(), NHits(), and pma::Element3D::SelectAllHits().
Referenced by trkf::PMAlgTrajFitter::produce(), trkf::PMAlgTrackMaker::produce(), pma::PMAlgTracker::reassignSingleViewEnds_1(), and pma::ProjectionMatchingAlg::twoViewFraction().
bool pma::Track3D::SelectRndHits | ( | size_t | segmax, |
size_t | vtxmax | ||
) |
Definition at line 2867 of file PmaTrack3D.cxx.
References fNodes, fSegments, and n.
Referenced by Optimize().
|
inlinenoexcept |
Definition at line 320 of file PmaTrack3D.h.
References value.
Referenced by pma::ProjectionMatchingAlg::buildSegment().
|
inlinenoexcept |
|
inlinenoexcept |
void pma::Track3D::SetT0FromDx | ( | const detinfo::DetectorClocksData & | clockData, |
detinfo::DetectorPropertiesData const & | detProp, | ||
double | dx | ||
) |
Function to convert dx into dT0.
Definition at line 2326 of file PmaTrack3D.cxx.
References fNodes, fT0, fT0Flag, detinfo::DetectorPropertiesData::GetXTicksCoefficient(), detinfo::ElecClock::TickPeriod(), detinfo::DetectorClocksData::TPCClock(), detinfo::DetectorClocksData::TriggerOffsetTPC(), and detinfo::DetectorClocksData::TriggerTime().
Referenced by ApplyDriftShiftInTree().
|
inline |
Definition at line 68 of file PmaTrack3D.h.
References Initialize().
Referenced by pma::PMAlgCosmicTagger::outOfDriftWindow().
bool pma::Track3D::ShiftEndsToHits | ( | ) |
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 2425 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 pma::ProjectionMatchingAlg::mergeTracks(), and pma::PMAlgTracker::reassignHits_1().
|
inline |
Definition at line 89 of file PmaTrack3D.h.
References 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(), DisableSingleViewEnds(), erase(), pma::ProjectionMatchingAlg::extendTrack(), ExtendWith(), pma::PMAlgVertexing::getdQdx(), trkf::PMAlgTrackMaker::getPdgFromCnnOnHits(), GetRawdEdxSequence(), pma::ProjectionMatchingAlg::guideEndpoints(), HitDxByView(), index_of(), InitFromRefPoints(), pma::VtxCandidate::JoinTracks(), Length(), shower::EMShowerAlg::MakeShower(), pma::PMAlgTracker::mergeCoLinear(), pma::ProjectionMatchingAlg::mergeTracks(), NextHit(), Optimize(), PrevHit(), trkf::PMAlgTrajFitter::produce(), trkf::PMAlgTrackMaker::produce(), ReassignHitsInTree(), pma::PMAlgTracker::reassignSingleViewEnds_1(), pma::ProjectionMatchingAlg::RemoveNotEnabledHits(), pma::ProjectionMatchingAlg::selectInitialHits(), pma::ProjectionMatchingAlg::ShortenSeg_(), SortHits(), Split(), pma::ProjectionMatchingAlg::TestTrk_(), pma::ProjectionMatchingAlg::twoViewFraction(), and UpdateParams().
void pma::Track3D::SortHits | ( | void | ) |
Definition at line 2651 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 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 2179 of file PmaTrack3D.cxx.
References fNodes, pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), pma::Segment3D::Parent(), SortHits(), and SortHitsInTree().
Referenced by SortHitsInTree(), and TuneFullTree().
pma::Track3D * pma::Track3D::Split | ( | detinfo::DetectorPropertiesData const & | detProp, |
size_t | idx, | ||
bool | try_start_at_idx = true |
||
) |
Definition at line 1428 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(), size(), pma::Element3D::TPC(), pma::Hit3D::TPC(), and pma::Hit3D::View2D().
Referenced by Flip(), pma::VtxCandidate::JoinTracks(), and pma::TrkCandidateColl::setTreeOriginAtFront().
|
private |
Definition at line 3139 of file PmaTrack3D.cxx.
References pma::SortedObjectBase::AddNext(), pma::SortedObjectBase::Disconnect(), fNodes, NextSegment(), and PrevSegment().
Referenced by CheckEndSegment().
unsigned int pma::Track3D::TestHits | ( | detinfo::DetectorPropertiesData const & | detProp, |
const std::vector< art::Ptr< recob::Hit >> & | hits, | ||
double | dist = 0.4 |
||
) | const |
Count close 2D hits.
Definition at line 845 of file PmaTrack3D.cxx.
References larg4::dist(), GetUnconstrainedProj3D(), and hits().
Referenced by pma::ProjectionMatchingAlg::testHits().
double pma::Track3D::TestHitsMse | ( | detinfo::DetectorPropertiesData const & | detProp, |
const std::vector< art::Ptr< recob::Hit >> & | hits, | ||
bool | normalized = true |
||
) | const |
MSE of 2D hits.
Definition at line 820 of file PmaTrack3D.cxx.
References Dist2(), hits(), and pma::WireDriftToCm().
std::vector< unsigned int > pma::Track3D::TPCs | ( | ) | const |
Definition at line 448 of file PmaTrack3D.cxx.
References fHits.
Referenced by pma::ProjectionMatchingAlg::buildSegment(), pma::ProjectionMatchingAlg::buildTrack(), Initialize(), 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 2230 of file PmaTrack3D.cxx.
References GetObjFnInTree(), geo::vect::isfinite(), MakeProjectionInTree(), SortHitsInTree(), TuneSinglePass(), and UpdateParamsInTree().
Referenced by pma::VtxCandidate::JoinTracks().
double pma::Track3D::TuneSinglePass | ( | bool | skipFirst = false | ) |
Definition at line 1998 of file PmaTrack3D.cxx.
References fEndSegWeight, fNodes, fPenaltyValue, GetObjFunction(), pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), pma::Node3D::Optimize(), pma::Segment3D::Parent(), and TuneSinglePass().
Referenced by TuneFullTree(), and TuneSinglePass().
|
private |
Definition at line 3212 of file PmaTrack3D.cxx.
References fHits, fHitsRadius, pma::GetHitsRadius2D(), geo::kU, geo::kV, and geo::kZ.
Referenced by InitFromHits(), InitFromMiddle(), InitFromRefPoints(), and Initialize().
|
private |
Definition at line 3113 of file PmaTrack3D.cxx.
References AverageDist2(), fHitsRadius, fMinSegStop, fPenaltyFactor, fPenaltyValue, fSegments, fSegStopFactor, fSegStopValue, n, and size().
Referenced by Optimize(), and UpdateParamsInTree().
bool pma::Track3D::UpdateParamsInTree | ( | bool | skipFirst, |
size_t & | depth | ||
) |
Definition at line 1960 of file PmaTrack3D.cxx.
References fNodes, pma::SortedBranchBase::Next(), pma::SortedBranchBase::NextCount(), NextSegment(), pma::Segment3D::Parent(), UpdateParams(), and UpdateParamsInTree().
Referenced by TuneFullTree(), and UpdateParamsInTree().
void pma::Track3D::UpdateProjection | ( | void | ) |
std::pair< TVector2, TVector2 > pma::Track3D::WireDriftRange | ( | detinfo::DetectorPropertiesData const & | detProp, |
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 484 of file PmaTrack3D.cxx.
References pma::CmToWireDrift(), fNodes, and tmp.
Referenced by pma::ProjectionMatchingAlg::validate(), and pma::ProjectionMatchingAlg::validate_on_adc_test().
|
private |
Definition at line 387 of file PmaTrack3D.h.
Referenced by ApplyDriftShiftInTree(), ExtendWith(), HasRefPoint(), InitFromRefPoints(), MakeProjection(), Track3D(), and ~Track3D().
|
private |
Definition at line 409 of file PmaTrack3D.h.
Referenced by GetObjFunction(), InitFromHits(), Optimize(), and TuneSinglePass().
|
private |
Definition at line 385 of file PmaTrack3D.h.
Referenced by AddHits(), ApplyDriftShiftInTree(), CompleteMissingWires(), Cryos(), DisableSingleViewEnds(), erase(), GetDirection3D(), GetRawdEdxSequence(), HitDxByView(), index_of(), InitFromHits(), Length(), MakeFastProjection(), MakeProjection(), NEnabledHits(), NextHit(), NHits(), PrevHit(), push_back(), ReassignHitsInTree(), release_at(), SelectAllHits(), SelectHits(), SortHits(), Split(), TPCs(), Track3D(), UpdateHitsRadius(), and ~Track3D().
|
private |
Definition at line 410 of file PmaTrack3D.h.
Referenced by UpdateHitsRadius(), and UpdateParams().
|
private |
Definition at line 399 of file PmaTrack3D.h.
|
private |
Definition at line 405 of file PmaTrack3D.h.
Referenced by Optimize().
|
private |
Definition at line 401 of file PmaTrack3D.h.
Referenced by Optimize().
|
private |
Definition at line 404 of file PmaTrack3D.h.
Referenced by Optimize(), and UpdateParams().
|
private |
Definition at line 396 of file PmaTrack3D.h.
Referenced by AddNode(), ApplyDriftShiftInTree(), AttachBackTo(), AttachBackToOtherTPC(), AttachBackToSameTPC(), AttachTo(), AttachToOtherTPC(), AttachToSameTPC(), AverageDist2(), CanFlip(), CheckEndSegment(), CleanupTails(), ClearNodes(), DisableSingleViewEnds(), Dist2(), DriftsOfWireIntersection(), ExtendWith(), Flip(), GetBranches(), GetDirection3D(), GetMse(), GetNearestElement(), GetNearestTrkInTree(), GetObjFnInTree(), GetObjFunction(), GetRoot(), index_of(), InitFromHits(), InsertNode(), InternalFlip(), MakeFastProjection(), MakeProjection(), MakeProjectionInTree(), Optimize(), ReassignHitsInTree(), RebuildSegments(), RemoveNode(), SelectRndHits(), SetT0FromDx(), ShiftEndsToHits(), SortHits(), SortHitsInTree(), Split(), SwapVertices(), Track3D(), TuneSinglePass(), UpdateParamsInTree(), UpdateProjection(), WireDriftRange(), and ~Track3D().
|
private |
Definition at line 400 of file PmaTrack3D.h.
Referenced by UpdateParams().
|
private |
Definition at line 408 of file PmaTrack3D.h.
Referenced by GetObjFunction(), Optimize(), TuneSinglePass(), and UpdateParams().
|
private |
Definition at line 397 of file PmaTrack3D.h.
Referenced by AddNode(), AttachBackToOtherTPC(), AttachBackToSameTPC(), AttachToOtherTPC(), AverageDist2(), CheckEndSegment(), CleanupTails(), DeleteSegments(), Dist2(), ExtendWith(), GetDirection3D(), GetMse(), GetNearestElement(), GetUnconstrainedProj3D(), MakeFastProjection(), MakeProjection(), Optimize(), RebuildSegments(), SelectRndHits(), UpdateParams(), UpdateProjection(), and ~Track3D().
|
private |
Definition at line 407 of file PmaTrack3D.h.
Referenced by UpdateParams().
|
private |
Definition at line 403 of file PmaTrack3D.h.
Referenced by Optimize(), and UpdateParams().
|
private |
Definition at line 412 of file PmaTrack3D.h.
Referenced by SetT0FromDx(), and Split().
|
private |
Definition at line 413 of file PmaTrack3D.h.
Referenced by SetT0FromDx(), and Split().
|
private |
Definition at line 415 of file PmaTrack3D.h.
Referenced by Split().