28 class DetectorClocksData;
29 class DetectorPropertiesData;
96 bool erase(
const art::Ptr<recob::Hit>&
hit);
103 return fHits.front();
124 double Length(
size_t start,
size_t stop,
size_t step = 1)
const;
126 double Dist2(
const TVector2& p2d,
unsigned int view,
unsigned int tpc,
unsigned int cryo)
const;
127 double Dist2(
const TVector3& p3d)
const;
140 unsigned int NHits(
unsigned int view)
const;
144 std::vector<unsigned int>
TPCs()
const;
145 std::vector<unsigned int>
Cryos()
const;
150 return fNodes.front()->TPC();
155 return fNodes.front()->Cryo();
161 return fNodes.back()->TPC();
166 return fNodes.back()->Cryo();
173 if (
n->TPC() == tpc)
return true;
184 unsigned int cryo)
const;
201 std::vector<pma::Track3D*>& allTracks,
209 bool normalized =
true)
const;
214 double dist = 0.4)
const;
216 int NextHit(
int index,
unsigned int view =
geo::kZ,
bool inclDisabled =
false)
const;
217 int PrevHit(
int index,
unsigned int view =
geo::kZ,
bool inclDisabled =
false)
const;
224 double HitDxByView(
size_t index,
unsigned int view)
const;
256 unsigned int skip = 0,
257 bool inclDisabled =
false)
const;
261 unsigned int view)
const;
286 bool selAllHits =
true,
287 bool setAllNodes =
true,
288 size_t selSegHits = 0,
289 size_t selVtxHits = 0);
296 double TuneFullTree(
double eps = 0.001,
double gmax = 50.0);
303 bool skipFirst =
false);
328 std::vector<pma::Segment3D*>
const&
337 std::vector<pma::Node3D*>
const&
374 bool try_start_at_idx =
true);
384 bool GetBranches(std::vector<pma::Track3D const*>& branches,
bool skipFirst =
false)
const;
446 float initEndSegW = 0.05
F);
456 bool skipFirst =
false);
467 bool secondDir =
false)
const;
474 art::Ptr<recob::Hit>
hit,
476 double& dist2)
const;
492 bool skipFrontVtx =
false,
493 bool skipBackVtx =
false)
const;
bool SelectHits(float fraction=1.0F)
void AddHits(detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< recob::Hit >> &hits)
void MakeFastProjection()
process_name opflash particleana ie ie ie z
void AutoFlip(pma::Track3D::EDirection dir, double thr=0.0, unsigned int n=0)
bool HasTPC(int tpc) const
bool HasTagFlag(ETag value) const noexcept
double GetMse(unsigned int view=geo::kUnknown) const
MSE of hits weighted with hit amplidudes and wire plane coefficients.
void SortHitsInTree(bool skipFirst=false)
bool AttachTo(pma::Node3D *vStart, bool noFlip=false)
void SetTagFlag(ETag value)
double Dist2(const TVector2 &p2d, unsigned int view, unsigned int tpc, unsigned int cryo) const
void AddNode(detinfo::DetectorPropertiesData const &detProp, TVector3 const &p3d, unsigned int tpc, unsigned int cryo)
bool IsAttachedTo(pma::Track3D const *trk) const
process_name opflash particleana ie x
int PrevHit(int index, unsigned int view=geo::kZ, bool inclDisabled=false) const
void ApplyDriftShiftInTree(const detinfo::DetectorClocksData &clockData, detinfo::DetectorPropertiesData const &detProp, double dx, bool skipFirst=false)
pma::Hit3D * operator[](size_t index)
pma::Hit3D const * front() const
unsigned int TestHits(detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< recob::Hit >> &hits, double dist=0.4) const
Count close 2D hits.
void ReassignHitsInTree(pma::Track3D *plRoot=nullptr)
int index_of(const pma::Hit3D *hit) const
ETag GetTag() const noexcept
bool AttachBackToSameTPC(pma::Node3D *vStart)
bool GetBranches(std::vector< pma::Track3D const * > &branches, bool skipFirst=false) const
bool AttachToOtherTPC(pma::Node3D *vStart)
bool CheckEndSegment(pma::Track3D::ETrackEnd endCode)
bool InitFromHits(detinfo::DetectorPropertiesData const &detProp, int tpc, int cryo, float initEndSegW=0.05F)
float GetEndSegWeight() const noexcept
double GetObjFunction(float penaltyFactor=1.0F) const
Objective function optimized in track reconstruction.
std::vector< pma::Node3D * > const & Nodes() const noexcept
bool Initialize(detinfo::DetectorPropertiesData const &detProp, float initEndSegW=0.05F)
float GetPenalty() const noexcept
Planes which measure Z direction.
Implementation of the Projection Matching Algorithm.
std::vector< unsigned int > TPCs() const
void AddRefPoint(double x, double y, double z)
std::vector< pma::Segment3D * > fSegments
bool AttachBackToOtherTPC(pma::Node3D *vStart)
unsigned int BackTPC() const
recob::tracking::Vector_t Vector3D
double TuneFullTree(double eps=0.001, double gmax=50.0)
pma::Vector3D GetDirection3D(size_t index) const
Get trajectory direction at given hit index.
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.
double TuneSinglePass(bool skipFirst=false)
void AddRefPoint(const TVector3 &p)
unsigned int NEnabledHits(unsigned int view=geo::kUnknown) const
std::vector< unsigned int > Cryos() const
unsigned int BackCryo() const
unsigned int fMaxHitsPerSeg
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
pma::Track3D * Split(detinfo::DetectorPropertiesData const &detProp, size_t idx, bool try_start_at_idx=true)
void SetMaxHitsPerSeg(unsigned int value) noexcept
double TestHitsMse(detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< recob::Hit >> &hits, bool normalized=true) const
MSE of 2D hits.
bool UpdateParamsInTree(bool skipFirst, size_t &depth)
bool CanFlip() const
Check if the track can be flipped without breaking any other track.
unsigned int fSegStopValue
void ExtendWith(pma::Track3D *src)
Extend the track with everything from src, delete the src;.
void AddNode(pma::Node3D *node)
pma::Hit3D * release_at(size_t index)
unsigned int NHits(unsigned int view) const
pma::Node3D * FirstElement() const
process_name opflash particleana ie ie y
std::vector< pma::Segment3D * > const & Segments() const noexcept
pma::Node3D * LastElement() const
void SetEndSegWeight(float value) noexcept
bool GetUnconstrainedProj3D(detinfo::DetectorPropertiesData const &detProp, art::Ptr< recob::Hit > hit, TVector3 &p3d, double &dist2) const
bool HasRefPoint(TVector3 *p) const
bool InitFromRefPoints(detinfo::DetectorPropertiesData const &detProp, int tpc, int cryo)
std::vector< float > DriftsOfWireIntersection(detinfo::DetectorPropertiesData const &detProp, unsigned int wire, unsigned int view) const
void SetT0FromDx(const detinfo::DetectorClocksData &clockData, detinfo::DetectorPropertiesData const &detProp, double dx)
Function to convert dx into dT0.
Implementation of the Projection Matching Algorithm.
void RemoveHits(const std::vector< art::Ptr< recob::Hit >> &hits)
Remove hits; removes also hit->node/seg assignments.
double GetObjFnInTree(bool skipFirst=false)
void InternalFlip(std::vector< pma::Track3D * > &toSort)
unsigned int FrontTPC() const
unsigned int FrontCryo() const
bool erase(const art::Ptr< recob::Hit > &hit)
unsigned int DisableSingleViewEnds()
Definition of data types for geometry description.
bool AttachToSameTPC(pma::Node3D *vStart)
void InsertNode(detinfo::DetectorPropertiesData const &detProp, TVector3 const &p3d, size_t at_idx, unsigned int tpc, unsigned int cryo)
std::vector< pma::Node3D * > fNodes
bool SelectRndHits(size_t segmax, size_t vtxmax)
unsigned int GetMaxHitsPerSeg() const noexcept
size_t CompleteMissingWires(detinfo::DetectorPropertiesData const &detProp, unsigned int view)
void InitFromMiddle(detinfo::DetectorPropertiesData const &detProp, int tpc, int cryo)
void push_back(pma::Hit3D *hit)
double AverageDist2() const
bool HasTwoViews(size_t nmin=1) const
void CleanupTails()
Cut out tails with no hits assigned.
void MakeProjectionInTree(bool skipFirst=false)
double Length(size_t step=1) const
double GetRawdEdxSequence(std::map< size_t, std::vector< double >> &dedx, unsigned int view=geo::kZ, unsigned int skip=0, bool inclDisabled=false) const
Contains all timing reference information for the detector.
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
std::vector< TVector3 * > fAssignedPoints
pma::Segment3D * PrevSegment(pma::Node3D *vtx) const
bool RemoveNode(size_t idx)
bool HasT0() const noexcept
int NextHit(int index, unsigned int view=geo::kZ, bool inclDisabled=false) const
pma::Hit3D const * back() const
void SetPenalty(float value) noexcept
double HitDxByView(size_t index, unsigned int view) const
bool SwapVertices(size_t v0, size_t v1)
pma::Hit3D const * operator[](size_t index) const
pma::Track3D * GetNearestTrkInTree(const TVector3 &p3d_cm, double &dist, bool skipFirst=false)
bool AttachBackTo(pma::Node3D *vStart)
pma::Element3D * GetNearestElement(const TVector2 &p2d, unsigned int view, int tpc=-1, bool skipFrontVtx=false, bool skipBackVtx=false) const
pma::Segment3D * NextSegment(pma::Node3D *vtx) const
std::pair< TVector2, TVector2 > WireDriftRange(detinfo::DetectorPropertiesData const &detProp, unsigned int view, unsigned int tpc, unsigned int cryo) const
std::vector< pma::Hit3D * > fHits