#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 37 of file PmaTrack3D.h.
Enumerator | |
---|---|
kForward | |
kBackward |
Definition at line 40 of file PmaTrack3D.h.
enum pma::Track3D::ETag |
Definition at line 41 of file PmaTrack3D.h.
Enumerator | |
---|---|
kBegin | |
kEnd |
Definition at line 39 of file PmaTrack3D.h.
|
default |
pma::Track3D::Track3D | ( | const Track3D & | src | ) |
Definition at line 30 of file PmaTrack3D.cxx.
pma::Track3D::~Track3D | ( | ) |
Definition at line 63 of file PmaTrack3D.cxx.
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 403 of file PmaTrack3D.cxx.
void pma::Track3D::AddNode | ( | pma::Node3D * | node | ) |
Definition at line 1264 of file PmaTrack3D.cxx.
|
inline |
Definition at line 352 of file PmaTrack3D.h.
bool pma::Track3D::AddNode | ( | detinfo::DetectorPropertiesData const & | detProp | ) |
Definition at line 1271 of file PmaTrack3D.cxx.
|
inline |
Definition at line 262 of file PmaTrack3D.h.
|
inline |
Definition at line 267 of file PmaTrack3D.h.
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 2333 of file PmaTrack3D.cxx.
bool pma::Track3D::AttachBackTo | ( | pma::Node3D * | vStart | ) |
Definition at line 1655 of file PmaTrack3D.cxx.
|
private |
Definition at line 1687 of file PmaTrack3D.cxx.
|
private |
Definition at line 1702 of file PmaTrack3D.cxx.
bool pma::Track3D::AttachTo | ( | pma::Node3D * | vStart, |
bool | noFlip = false |
||
) |
Definition at line 1544 of file PmaTrack3D.cxx.
|
private |
Definition at line 1584 of file PmaTrack3D.cxx.
|
private |
Definition at line 1598 of file PmaTrack3D.cxx.
void pma::Track3D::AutoFlip | ( | pma::Track3D::EDirection | dir, |
double | thr = 0.0 , |
||
unsigned int | n = 0 |
||
) |
Definition at line 672 of file PmaTrack3D.cxx.
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 749 of file PmaTrack3D.cxx.
|
private |
Definition at line 3159 of file PmaTrack3D.cxx.
|
inline |
Definition at line 103 of file PmaTrack3D.h.
|
inline |
Definition at line 161 of file PmaTrack3D.h.
|
inline |
Definition at line 156 of file PmaTrack3D.h.
bool pma::Track3D::CanFlip | ( | ) | const |
Check if the track can be flipped without breaking any other track.
Definition at line 653 of file PmaTrack3D.cxx.
|
private |
Definition at line 3248 of file PmaTrack3D.cxx.
void pma::Track3D::CleanupTails | ( | ) |
Cut out tails with no hits assigned.
Definition at line 2437 of file PmaTrack3D.cxx.
|
private |
Definition at line 113 of file PmaTrack3D.cxx.
size_t pma::Track3D::CompleteMissingWires | ( | detinfo::DetectorPropertiesData const & | detProp, |
unsigned int | view | ||
) |
Definition at line 1192 of file PmaTrack3D.cxx.
std::vector< unsigned int > pma::Track3D::Cryos | ( | ) | const |
Definition at line 471 of file PmaTrack3D.cxx.
|
private |
Definition at line 2418 of file PmaTrack3D.cxx.
unsigned int pma::Track3D::DisableSingleViewEnds | ( | ) |
Definition at line 2749 of file PmaTrack3D.cxx.
double pma::Track3D::Dist2 | ( | const TVector2 & | p2d, |
unsigned int | view, | ||
unsigned int | tpc, | ||
unsigned int | cryo | ||
) | const |
Definition at line 2575 of file PmaTrack3D.cxx.
double pma::Track3D::Dist2 | ( | const TVector3 & | p3d | ) | const |
Definition at line 2603 of file PmaTrack3D.cxx.
std::vector< float > pma::Track3D::DriftsOfWireIntersection | ( | detinfo::DetectorPropertiesData const & | detProp, |
unsigned int | wire, | ||
unsigned int | view | ||
) | const |
Definition at line 1160 of file PmaTrack3D.cxx.
bool pma::Track3D::erase | ( | const art::Ptr< recob::Hit > & | hit | ) |
Definition at line 364 of file PmaTrack3D.cxx.
void pma::Track3D::ExtendWith | ( | pma::Track3D * | src | ) |
Extend the track with everything from src, delete the src;.
Definition at line 1745 of file PmaTrack3D.cxx.
|
inline |
Definition at line 340 of file PmaTrack3D.h.
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 533 of file PmaTrack3D.cxx.
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 632 of file PmaTrack3D.cxx.
|
inline |
Definition at line 98 of file PmaTrack3D.h.
|
inline |
Definition at line 150 of file PmaTrack3D.h.
|
inline |
Definition at line 145 of file PmaTrack3D.h.
bool pma::Track3D::GetBranches | ( | std::vector< pma::Track3D const * > & | branches, |
bool | skipFirst = false |
||
) | const |
Definition at line 1793 of file PmaTrack3D.cxx.
pma::Vector3D pma::Track3D::GetDirection3D | ( | size_t | index | ) | const |
Get trajectory direction at given hit index.
Definition at line 378 of file PmaTrack3D.cxx.
|
inlinenoexcept |
Definition at line 393 of file PmaTrack3D.h.
|
inlinenoexcept |
Definition at line 415 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 1837 of file PmaTrack3D.cxx.
|
private |
Definition at line 2611 of file PmaTrack3D.cxx.
|
private |
Definition at line 2652 of file PmaTrack3D.cxx.
|
private |
Definition at line 2069 of file PmaTrack3D.cxx.
|
private |
double pma::Track3D::GetObjFnInTree | ( | bool | skipFirst = false | ) |
Definition at line 2251 of file PmaTrack3D.cxx.
double pma::Track3D::GetObjFunction | ( | float | penaltyFactor = 1.0F | ) | const |
Objective function optimized in track reconstruction.
Definition at line 1857 of file PmaTrack3D.cxx.
|
inlinenoexcept |
Definition at line 404 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 1048 of file PmaTrack3D.cxx.
pma::Track3D * pma::Track3D::GetRoot | ( | ) |
Definition at line 1777 of file PmaTrack3D.cxx.
|
inline |
Definition at line 306 of file PmaTrack3D.h.
|
inlinenoexcept |
Definition at line 64 of file PmaTrack3D.h.
|
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 2674 of file PmaTrack3D.cxx.
bool pma::Track3D::HasRefPoint | ( | TVector3 * | p | ) | const |
Definition at line 1829 of file PmaTrack3D.cxx.
|
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 313 of file PmaTrack3D.h.
Definition at line 69 of file PmaTrack3D.h.
|
inline |
Definition at line 167 of file PmaTrack3D.h.
bool pma::Track3D::HasTwoViews | ( | size_t | nmin = 1 | ) | const |
Definition at line 442 of file PmaTrack3D.cxx.
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 1011 of file PmaTrack3D.cxx.
|
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 945 of file PmaTrack3D.cxx.
int pma::Track3D::index_of | ( | const pma::Hit3D * | hit | ) | const |
Definition at line 335 of file PmaTrack3D.cxx.
int pma::Track3D::index_of | ( | const pma::Node3D * | n | ) | const |
Definition at line 327 of file PmaTrack3D.cxx.
|
private |
Definition at line 121 of file PmaTrack3D.cxx.
|
private |
Definition at line 299 of file PmaTrack3D.cxx.
|
private |
Definition at line 211 of file PmaTrack3D.cxx.
bool pma::Track3D::Initialize | ( | detinfo::DetectorPropertiesData const & | detProp, |
float | initEndSegW = 0.05F |
||
) |
Definition at line 77 of file PmaTrack3D.cxx.
void pma::Track3D::InsertNode | ( | detinfo::DetectorPropertiesData const & | detProp, |
TVector3 const & | p3d, | ||
size_t | at_idx, | ||
unsigned int | tpc, | ||
unsigned int | cryo | ||
) |
Definition at line 1425 of file PmaTrack3D.cxx.
|
private |
Definition at line 604 of file PmaTrack3D.cxx.
bool pma::Track3D::IsAttachedTo | ( | pma::Track3D const * | trk | ) | const |
Definition at line 1813 of file PmaTrack3D.cxx.
|
inline |
Definition at line 345 of file PmaTrack3D.h.
|
inline |
Definition at line 117 of file PmaTrack3D.h.
double pma::Track3D::Length | ( | size_t | start, |
size_t | stop, | ||
size_t | step = 1 |
||
) | const |
Definition at line 877 of file PmaTrack3D.cxx.
|
private |
Definition at line 2989 of file PmaTrack3D.cxx.
void pma::Track3D::MakeProjection | ( | ) |
Definition at line 2952 of file PmaTrack3D.cxx.
void pma::Track3D::MakeProjectionInTree | ( | bool | skipFirst = false | ) |
Definition at line 2199 of file PmaTrack3D.cxx.
unsigned int pma::Track3D::NEnabledHits | ( | unsigned int | view = geo::kUnknown | ) | const |
Definition at line 432 of file PmaTrack3D.cxx.
int pma::Track3D::NextHit | ( | int | index, |
unsigned int | view = geo::kZ , |
||
bool | inclDisabled = false |
||
) | const |
Definition at line 909 of file PmaTrack3D.cxx.
pma::Segment3D * pma::Track3D::NextSegment | ( | pma::Node3D * | vtx | ) | const |
Definition at line 1024 of file PmaTrack3D.cxx.
unsigned int pma::Track3D::NHits | ( | unsigned int | view | ) | const |
Definition at line 422 of file PmaTrack3D.cxx.
|
inlinenoexcept |
Definition at line 335 of file PmaTrack3D.h.
|
inline |
Definition at line 95 of file PmaTrack3D.h.
|
inline |
Definition at line 96 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 1868 of file PmaTrack3D.cxx.
int pma::Track3D::PrevHit | ( | int | index, |
unsigned int | view = geo::kZ , |
||
bool | inclDisabled = false |
||
) | const |
Definition at line 927 of file PmaTrack3D.cxx.
pma::Segment3D * pma::Track3D::PrevSegment | ( | pma::Node3D * | vtx | ) | const |
Definition at line 1038 of file PmaTrack3D.cxx.
|
inline |
Definition at line 87 of file PmaTrack3D.h.
bool pma::Track3D::push_back | ( | const detinfo::DetectorPropertiesData & | detProp, |
const art::Ptr< recob::Hit > & | hit | ||
) |
Definition at line 351 of file PmaTrack3D.cxx.
|
private |
Definition at line 2149 of file PmaTrack3D.cxx.
|
private |
Definition at line 2426 of file PmaTrack3D.cxx.
pma::Hit3D * pma::Track3D::release_at | ( | size_t | index | ) |
Definition at line 343 of file PmaTrack3D.cxx.
void pma::Track3D::RemoveHits | ( | const std::vector< art::Ptr< recob::Hit >> & | hits | ) |
bool pma::Track3D::RemoveNode | ( | size_t | idx | ) |
Definition at line 1439 of file PmaTrack3D.cxx.
|
inlinenoexcept |
Definition at line 326 of file PmaTrack3D.h.
bool pma::Track3D::SelectAllHits | ( | void | ) |
Definition at line 2941 of file PmaTrack3D.cxx.
bool pma::Track3D::SelectHits | ( | float | fraction = 1.0F | ) |
Definition at line 2888 of file PmaTrack3D.cxx.
bool pma::Track3D::SelectRndHits | ( | size_t | segmax, |
size_t | vtxmax | ||
) |
Definition at line 2930 of file PmaTrack3D.cxx.
|
inlinenoexcept |
Definition at line 398 of file PmaTrack3D.h.
|
inlinenoexcept |
Definition at line 420 of file PmaTrack3D.h.
|
inlinenoexcept |
Definition at line 409 of file PmaTrack3D.h.
void pma::Track3D::SetT0FromDx | ( | const detinfo::DetectorClocksData & | clockData, |
detinfo::DetectorPropertiesData const & | detProp, | ||
double | dx | ||
) |
Function to convert dx into dT0.
Definition at line 2376 of file PmaTrack3D.cxx.
|
inline |
Definition at line 74 of file PmaTrack3D.h.
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 2479 of file PmaTrack3D.cxx.
|
inline |
Definition at line 108 of file PmaTrack3D.h.
void pma::Track3D::SortHits | ( | void | ) |
Definition at line 2711 of file PmaTrack3D.cxx.
void pma::Track3D::SortHitsInTree | ( | bool | skipFirst = false | ) |
Definition at line 2225 of file PmaTrack3D.cxx.
pma::Track3D * pma::Track3D::Split | ( | detinfo::DetectorPropertiesData const & | detProp, |
size_t | idx, | ||
bool | try_start_at_idx = true |
||
) |
Definition at line 1455 of file PmaTrack3D.cxx.
|
private |
Definition at line 3209 of file PmaTrack3D.cxx.
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 858 of file PmaTrack3D.cxx.
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 832 of file PmaTrack3D.cxx.
std::vector< unsigned int > pma::Track3D::TPCs | ( | ) | const |
Definition at line 452 of file PmaTrack3D.cxx.
double pma::Track3D::TuneFullTree | ( | double | eps = 0.001 , |
double | gmax = 50.0 |
||
) |
Definition at line 2278 of file PmaTrack3D.cxx.
double pma::Track3D::TuneSinglePass | ( | bool | skipFirst = false | ) |
Definition at line 2041 of file PmaTrack3D.cxx.
|
private |
Definition at line 3284 of file PmaTrack3D.cxx.
|
private |
Definition at line 3182 of file PmaTrack3D.cxx.
Definition at line 2002 of file PmaTrack3D.cxx.
void pma::Track3D::UpdateProjection | ( | void | ) |
Definition at line 3150 of file PmaTrack3D.cxx.
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 490 of file PmaTrack3D.cxx.
|
private |
Definition at line 484 of file PmaTrack3D.h.
|
private |
Definition at line 506 of file PmaTrack3D.h.
|
private |
Definition at line 482 of file PmaTrack3D.h.
|
private |
Definition at line 507 of file PmaTrack3D.h.
|
private |
Definition at line 496 of file PmaTrack3D.h.
|
private |
Definition at line 502 of file PmaTrack3D.h.
|
private |
Definition at line 498 of file PmaTrack3D.h.
|
private |
Definition at line 501 of file PmaTrack3D.h.
|
private |
Definition at line 493 of file PmaTrack3D.h.
|
private |
Definition at line 497 of file PmaTrack3D.h.
|
private |
Definition at line 505 of file PmaTrack3D.h.
|
private |
Definition at line 494 of file PmaTrack3D.h.
|
private |
Definition at line 504 of file PmaTrack3D.h.
|
private |
Definition at line 500 of file PmaTrack3D.h.
|
private |
Definition at line 509 of file PmaTrack3D.h.
|
private |
Definition at line 510 of file PmaTrack3D.h.
|
private |
Definition at line 512 of file PmaTrack3D.h.