LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
pma::Segment3D Class Reference

#include "PmaSegment3D.h"

Inheritance diagram for pma::Segment3D:
pma::Element3D pma::SortedObjectBase

Public Member Functions

 Segment3D (void)
 
 Segment3D (pma::Track3D *trk, pma::Node3D *vstart, pma::Node3D *vstop)
 
Vector3D Start (void) const
 
Vector3D End (void) const
 
double GetDistance2To (const TVector3 &p3d) const override
 Distance [cm] from the 3D segment to the point 3D. More...
 
double GetDistance2To (const TVector2 &p2d, unsigned int view) const override
 Distance [cm] from the 2D point to the object's 2D projection in one of wire views. More...
 
pma::Vector3D GetDirection3D (void) const override
 Get 3D direction cosines of this segment. More...
 
TVector3 GetProjection (const TVector2 &p, unsigned int view) const
 Get 3D projection of a 2D point from the view. More...
 
TVector3 GetUnconstrainedProj3D (const TVector2 &p2d, unsigned int view) const override
 
void SetProjection (pma::Hit3D &h) const override
 Set hit 3D position and its 2D projection to the vertex. More...
 
double Length2 (void) const override
 
pma::Track3DParent (void) const
 
int TPC (void) const
 TPC index or -1 if out of any TPC. More...
 
int Cryo (void) const
 Cryostat index or -1 if out of any cryostat. More...
 
double Length (void) const
 
const std::vector< pma::Hit3D * > & Hits (void) const
 
bool HasHit (const pma::Hit3D *h) const
 
pma::Hit3DHit (size_t index)
 
void RemoveHitAt (size_t index)
 
void AddHit (pma::Hit3D *h)
 
size_t NHits (void) const
 
unsigned int NHits (unsigned int view) const
 
size_t NEnabledHits (unsigned int view=geo::kUnknown) const
 
size_t NPrecalcEnabledHits (void) const
 
TVector3 const & ReferencePoint (size_t index) const
 
size_t NPoints (void) const
 
void AddPoint (TVector3 *p)
 
virtual void ClearAssigned (pma::Track3D *trk=0)
 
void UpdateHitParams (void)
 
void UpdateProjection (void)
 
void SortHits (void)
 
double SumDist2 (void) const
 
double SumDist2 (unsigned int view) const
 
double SumHitsQ (unsigned int view) const
 
unsigned int NThisHits (unsigned int view) const
 
double HitsRadius3D (unsigned int view) const
 
bool IsFrozen (void) const
 Check if the vertex 3D position is fixed. More...
 
void SetFrozen (bool state)
 Fix / relese vertex 3D position. More...
 
bool SelectRndHits (size_t nmax_per_view)
 
bool SelectAllHits (void)
 
virtual void Disconnect (void)
 
virtual bool AddNext (pma::SortedObjectBase *nextElement)
 
virtual int RemoveNext (pma::SortedObjectBase *nextElement)
 
virtual bool IsFirst (void) const
 
virtual bool IsLast (void) const
 
virtual pma::SortedObjectBasePrev (void) const
 
virtual pma::SortedObjectBaseNext (unsigned int index=0) const
 
virtual unsigned int NextCount (void) const
 

Static Public Member Functions

static float OptFactor (unsigned int view)
 
static void SetOptFactor (unsigned int view, float value)
 

Protected Attributes

int fTPC
 
int fCryo
 
bool fFrozen
 
std::vector< pma::Hit3D * > fAssignedHits
 
std::vector< TVector3 * > fAssignedPoints
 
size_t fNThisHits [3]
 
size_t fNThisHitsEnabledAll
 
size_t fNHits [3]
 
double fSumHitsQ [3]
 
double fHitsRadius
 
pma::SortedObjectBasenext
 
pma::SortedObjectBaseprev
 

Static Protected Attributes

static float fOptFactors [3] = { 0.2F, 0.8F, 1.0F }
 

Private Member Functions

 Segment3D (const pma::Segment3D &src)
 
double SumDist2Hits (void) const override
 

Static Private Member Functions

static double GetDist2 (const TVector3 &psrc, const TVector3 &p0, const TVector3 &p1)
 
static double GetDist2 (const TVector2 &psrc, const TVector2 &p0, const TVector2 &p1)
 

Private Attributes

pma::Track3DfParent
 

Detailed Description

Definition at line 24 of file PmaSegment3D.h.

Constructor & Destructor Documentation

pma::Segment3D::Segment3D ( void  )
inline

Definition at line 27 of file PmaSegment3D.h.

Referenced by Parent().

27 : fParent(0) {}
pma::Track3D * fParent
Definition: PmaSegment3D.h:71
pma::Segment3D::Segment3D ( pma::Track3D trk,
pma::Node3D vstart,
pma::Node3D vstop 
)

Definition at line 16 of file PmaSegment3D.cxx.

References pma::Element3D::Cryo(), pma::Element3D::fCryo, pma::Element3D::fTPC, and pma::Element3D::TPC().

16  :
17  SortedObjectBase(vstart, vstop),
18  fParent(trk)
19 {
20  if (vstart->TPC() == vstop->TPC()) fTPC = vstart->TPC();
21  if (vstart->Cryo() == vstop->Cryo()) fCryo = vstart->Cryo();
22 }
pma::Track3D * fParent
Definition: PmaSegment3D.h:71
int TPC(void) const
TPC index or -1 if out of any TPC.
Definition: PmaElement3D.h:31
int Cryo(void) const
Cryostat index or -1 if out of any cryostat.
Definition: PmaElement3D.h:33
pma::Segment3D::Segment3D ( const pma::Segment3D src)
private

Member Function Documentation

void pma::Element3D::AddHit ( pma::Hit3D h)
inlineinherited

Definition at line 65 of file PmaElement3D.h.

References pma::Element3D::fAssignedHits, and pma::Element3D::SetProjection().

Referenced by pma::Track3D::MakeProjection().

66  {
67  fAssignedHits.push_back(h);
68  SetProjection(*h);
69  }
virtual void SetProjection(pma::Hit3D &h) const =0
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
bool pma::SortedObjectBase::AddNext ( pma::SortedObjectBase nextElement)
virtualinherited

Reimplemented in pma::SortedBranchBase.

Definition at line 32 of file SortedObjects.cxx.

References pma::SortedObjectBase::next, pma::SortedObjectBase::prev, and pma::SortedObjectBase::RemoveNext().

Referenced by pma::Track3D::AddNode(), pma::Track3D::AttachToSameTPC(), pma::SortedObjectBase::SortedObjectBase(), pma::Track3D::SwapVertices(), pma::SortedBranchBase::~SortedBranchBase(), and pma::SortedObjectBase::~SortedObjectBase().

33 {
34  if (!nextElement || (nextElement == this)) return false;
35 
36  if (next && (next->prev == this))
37  next->prev = 0;
38 
39  if (nextElement->prev && (nextElement->prev != this))
40  nextElement->prev->RemoveNext(nextElement);
41 
42  next = nextElement;
43  next->prev = this;
44  return true;
45 }
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
virtual int RemoveNext(pma::SortedObjectBase *nextElement)
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
void pma::Element3D::AddPoint ( TVector3 *  p)
inlineinherited

Definition at line 77 of file PmaElement3D.h.

References pma::Element3D::ClearAssigned(), pma::Element3D::fAssignedPoints, and pma::Element3D::UpdateHitParams().

Referenced by pma::Track3D::MakeProjection().

77 { fAssignedPoints.push_back(p); }
std::vector< TVector3 * > fAssignedPoints
Definition: PmaElement3D.h:114
void pma::Element3D::ClearAssigned ( pma::Track3D trk = 0)
virtualinherited

Clear hits/points vectors of this element, optionally only those which are owned by given track.

Reimplemented in pma::Node3D.

Definition at line 49 of file PmaElement3D.cxx.

References pma::Element3D::fAssignedHits, pma::Element3D::fAssignedPoints, and pma::Element3D::fHitsRadius.

Referenced by pma::Element3D::AddPoint().

50 {
51  fAssignedPoints.clear();
52  fAssignedHits.clear();
53  fHitsRadius = 0.0;
54 }
std::vector< TVector3 * > fAssignedPoints
Definition: PmaElement3D.h:114
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
double fHitsRadius
Definition: PmaElement3D.h:119
int pma::Element3D::Cryo ( void  ) const
inlineinherited
void pma::SortedObjectBase::Disconnect ( void  )
virtualinherited

Reimplemented in pma::SortedBranchBase.

Definition at line 26 of file SortedObjects.cxx.

References pma::SortedObjectBase::next, pma::SortedObjectBase::prev, and pma::SortedObjectBase::RemoveNext().

Referenced by pma::Track3D::SwapVertices(), pma::SortedBranchBase::~SortedBranchBase(), and pma::SortedObjectBase::~SortedObjectBase().

27 {
28  if (prev) prev->RemoveNext(this);
29  if (next) RemoveNext(next);
30 }
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
virtual int RemoveNext(pma::SortedObjectBase *nextElement)
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
Vector3D pma::Segment3D::End ( void  ) const
inline

Definition at line 35 of file PmaSegment3D.h.

References GetDirection3D(), GetDistance2To(), GetProjection(), GetUnconstrainedProj3D(), Length2(), pma::SortedObjectBase::Next(), and SetProjection().

36  {
37  auto const & p = static_cast< Node3D* >(Next())->Point3D();
38  return Vector3D(p.X(), p.Y(), p.Z());
39  }
::fhicl::TupleAs< Point(::geo::Length_t,::geo::Length_t,::geo::Length_t)> Point3D
Atom object for reading a 3D point or vector (centimeters).
recob::tracking::Vector_t Vector3D
Definition: Utilities.h:29
virtual pma::SortedObjectBase * Next(unsigned int index=0) const
Definition: SortedObjects.h:45
pma::Vector3D pma::Segment3D::GetDirection3D ( void  ) const
overridevirtual

Get 3D direction cosines of this segment.

Implements pma::Element3D.

Definition at line 57 of file PmaSegment3D.cxx.

References dir, pma::SortedObjectBase::next, pma::Node3D::Point3D(), and pma::SortedObjectBase::prev.

Referenced by End(), and pma::ProjectionMatchingAlg::guideEndpoints().

58 {
59  pma::Node3D* v0 = static_cast< pma::Node3D* >(prev);
60  pma::Node3D* v1 = static_cast< pma::Node3D* >(next);
62  v1->Point3D().X() - v0->Point3D().X(),
63  v1->Point3D().Y() - v0->Point3D().Y(),
64  v1->Point3D().Z() - v0->Point3D().Z());
65  return dir.Unit();
66 }
TVector3 const & Point3D(void) const
Definition: PmaNode3D.h:33
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
recob::tracking::Vector_t Vector3D
Definition: Utilities.h:29
TDirectory * dir
Definition: macro.C:5
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
double pma::Segment3D::GetDist2 ( const TVector3 &  psrc,
const TVector3 &  p0,
const TVector3 &  p1 
)
staticprivate

Definition at line 217 of file PmaSegment3D.cxx.

References E.

Referenced by GetDistance2To(), and SumDist2Hits().

218 {
219  pma::Vector3D v0(psrc.X() - p0.X(), psrc.Y() - p0.Y(), psrc.Z() - p0.Z());
220  pma::Vector3D v1(p1.X() - p0.X(), p1.Y() - p0.Y(), p1.Z() - p0.Z());
221  pma::Vector3D v2(psrc.X() - p1.X(), psrc.Y() - p1.Y(), psrc.Z() - p1.Z());
222 
223  double v1Norm2 = v1.Mag2();
224  if (v1Norm2 >= 1.0E-6) // >= 0.01mm
225  {
226  double v0v1 = v0.Dot(v1);
227  double v2v1 = v2.Dot(v1);
228  double v0Norm2 = v0.Mag2();
229  double v2Norm2 = v2.Mag2();
230 
231  double result = 0.0;
232  if ((v0v1 > 0.0) && (v2v1 < 0.0))
233  {
234  double cosine01_square = 0.0;
235  double mag01_square = v0Norm2 * v1Norm2;
236  if (mag01_square != 0.0) cosine01_square = v0v1 * v0v1 / mag01_square;
237 
238  result = (1.0 - cosine01_square) * v0Norm2;
239  }
240  else // increase distance to prefer hit assigned to the vertex, not segment
241  {
242  if (v0v1 <= 0.0) result = 1.0001 * v0Norm2;
243  else result = 1.0001 * v2Norm2;
244  }
245 
246  if (result >= 0.0) return result;
247  else return 0.0;
248  }
249  else // short segment or its projection
250  {
251  double dx = 0.5 * (p0.X() + p1.X()) - psrc.X();
252  double dy = 0.5 * (p0.Y() + p1.Y()) - psrc.Y();
253  double dz = 0.5 * (p0.Z() + p1.Z()) - psrc.Z();
254  return dx * dx + dy * dy + dz * dz;
255  }
256 }
Float_t E
Definition: plot.C:23
recob::tracking::Vector_t Vector3D
Definition: Utilities.h:29
double pma::Segment3D::GetDist2 ( const TVector2 &  psrc,
const TVector2 &  p0,
const TVector2 &  p1 
)
staticprivate

Definition at line 258 of file PmaSegment3D.cxx.

References E.

259 {
260  pma::Vector2D v0(psrc.X() - p0.X(), psrc.Y() - p0.Y());
261  pma::Vector2D v1(p1.X() - p0.X(), p1.Y() - p0.Y());
262  pma::Vector2D v2(psrc.X() - p1.X(), psrc.Y() - p1.Y());
263 
264  double v1Norm2 = v1.Mag2();
265  if (v1Norm2 >= 1.0E-6) // >= 0.01mm
266  {
267  double v0v1 = v0.Dot(v1);
268  double v2v1 = v2.Dot(v1);
269  double v0Norm2 = v0.Mag2();
270  double v2Norm2 = v2.Mag2();
271 
272  double result = 0.0;
273  if ((v0v1 > 0.0) && (v2v1 < 0.0))
274  {
275  double cosine01_square = 0.0;
276  double mag01_square = v0Norm2 * v1Norm2;
277  if (mag01_square != 0.0) cosine01_square = v0v1 * v0v1 / mag01_square;
278 
279  result = (1.0 - cosine01_square) * v0Norm2;
280  }
281  else // increase distance to prefer hit assigned to the vertex, not segment
282  {
283  if (v0v1 <= 0.0) result = 1.0001 * v0Norm2;
284  else result = 1.0001 * v2Norm2;
285  }
286  if (result >= 0.0) return result;
287  else return 0.0;
288  }
289  else // short segment or its projection
290  {
291  double dx = 0.5 * (p0.X() + p1.X()) - psrc.X();
292  double dy = 0.5 * (p0.Y() + p1.Y()) - psrc.Y();
293  return dx * dx + dy * dy;
294  }
295 }
Float_t E
Definition: plot.C:23
ROOT::Math::DisplacementVector2D< ROOT::Math::Cartesian2D< double > > Vector2D
Definition: Utilities.h:28
double pma::Segment3D::GetDistance2To ( const TVector3 &  p3d) const
overridevirtual

Distance [cm] from the 3D segment to the point 3D.

Implements pma::Element3D.

Definition at line 24 of file PmaSegment3D.cxx.

References GetDist2(), pma::SortedObjectBase::next, pma::Node3D::Point3D(), and pma::SortedObjectBase::prev.

Referenced by pma::VtxCandidate::Add(), pma::VtxCandidate::ComputeMse2D(), End(), and pma::Track3D::MakeFastProjection().

25 {
26  pma::Node3D* v0 = static_cast< pma::Node3D* >(prev);
27  pma::Node3D* v1 = static_cast< pma::Node3D* >(next);
28  return GetDist2(p3d, v0->Point3D(), v1->Point3D());
29 }
TVector3 const & Point3D(void) const
Definition: PmaNode3D.h:33
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
static double GetDist2(const TVector3 &psrc, const TVector3 &p0, const TVector3 &p1)
double pma::Segment3D::GetDistance2To ( const TVector2 &  p2d,
unsigned int  view 
) const
overridevirtual

Distance [cm] from the 2D point to the object's 2D projection in one of wire views.

Implements pma::Element3D.

Definition at line 31 of file PmaSegment3D.cxx.

References GetDist2(), pma::SortedObjectBase::next, pma::SortedObjectBase::prev, and pma::Node3D::Projection2D().

32 {
33  pma::Node3D* v0 = static_cast< pma::Node3D* >(prev);
34  pma::Node3D* v1 = static_cast< pma::Node3D* >(next);
35  return GetDist2(p2d, v0->Projection2D(view), v1->Projection2D(view));
36 }
TVector2 const & Projection2D(unsigned int view) const
Definition: PmaNode3D.h:39
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
static double GetDist2(const TVector3 &psrc, const TVector3 &p0, const TVector3 &p1)
TVector3 pma::Segment3D::GetProjection ( const TVector2 &  p,
unsigned int  view 
) const

Get 3D projection of a 2D point from the view.

Definition at line 68 of file PmaSegment3D.cxx.

References E, pma::SortedObjectBase::next, pma::Node3D::Point3D(), pma::SortedObjectBase::prev, and pma::Node3D::Projection2D().

Referenced by End().

69 {
70  pma::Node3D* vStart = static_cast< pma::Node3D* >(prev);
71  pma::Node3D* vStop = static_cast< pma::Node3D* >(next);
72 
73  TVector2 v0(p);
74  v0 -= vStart->Projection2D(view);
75 
76  TVector2 v1(vStop->Projection2D(view));
77  v1 -= vStart->Projection2D(view);
78 
79  TVector3 v3d(vStop->Point3D());
80  v3d -= vStart->Point3D();
81 
82  TVector3 v3dStart(vStart->Point3D());
83  TVector3 v3dStop(vStop->Point3D());
84 
85  double v0Norm = v0.Mod();
86  double v1Norm = v1.Mod();
87 
88  TVector3 result(0, 0, 0);
89  if (v1Norm > 1.0E-6)// 0.01mm
90  {
91  double mag = v0Norm * v1Norm;
92  double cosine = 0.0;
93  if (mag != 0.0) cosine = v0 * v1 / mag;
94  double b = v0Norm * cosine / v1Norm;
95 
96  if (b < 1.0)
97  {
98  result = v3dStart;
99  if (b > 0.0) result += (v3d * b);
100  }
101  else result = v3dStop;
102  }
103  else // segment 2D projection is almost a point
104  {
105  mf::LogWarning("pma::Segment3D") << "Short segment projection.";
106 
107  result = v3dStart;
108  result += v3dStop;
109  result *= 0.5;
110  }
111  return result;
112 }
TVector2 const & Projection2D(unsigned int view) const
Definition: PmaNode3D.h:39
Float_t E
Definition: plot.C:23
TVector3 const & Point3D(void) const
Definition: PmaNode3D.h:33
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
TVector3 pma::Segment3D::GetUnconstrainedProj3D ( const TVector2 &  p2d,
unsigned int  view 
) const
overridevirtual

Get 3D projection of a 2D point from the view, no limitations if it falls beyond the segment endpoints.

Implements pma::Element3D.

Definition at line 114 of file PmaSegment3D.cxx.

References E, pma::SortedObjectBase::next, pma::Node3D::Point3D(), pma::SortedObjectBase::prev, and pma::Node3D::Projection2D().

Referenced by End().

115 {
116  pma::Node3D* vStart = static_cast< pma::Node3D* >(prev);
117  pma::Node3D* vStop = static_cast< pma::Node3D* >(next);
118 
119  TVector2 v0(p2d);
120  v0 -= vStart->Projection2D(view);
121 
122  TVector2 v1(vStop->Projection2D(view));
123  v1 -= vStart->Projection2D(view);
124 
125  TVector3 v3d(vStop->Point3D());
126  v3d -= vStart->Point3D();
127 
128  double v0Norm = v0.Mod();
129  double v1Norm = v1.Mod();
130  if (v1Norm > 1.0E-6) // 0.01mm
131  {
132  double mag = v0Norm * v1Norm;
133  double cosine = 0.0;
134  if (mag != 0.0) cosine = v0 * v1 / mag;
135  double b = v0Norm * cosine / v1Norm;
136 
137  return vStart->Point3D() + (v3d * b);
138  }
139  else // segment 2D projection is almost a point
140  {
141  v3d = vStart->Point3D();
142  v3d += vStop->Point3D();
143  v3d *= 0.5;
144 
145  return v3d;
146  }
147 }
TVector2 const & Projection2D(unsigned int view) const
Definition: PmaNode3D.h:39
Float_t E
Definition: plot.C:23
TVector3 const & Point3D(void) const
Definition: PmaNode3D.h:33
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
bool pma::Element3D::HasHit ( const pma::Hit3D h) const
inlineinherited

Definition at line 53 of file PmaElement3D.h.

References pma::Element3D::fAssignedHits.

54  {
55  for (const auto a : fAssignedHits) { if (h == a) return true; }
56  return false;
57  }
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
pma::Hit3D& pma::Element3D::Hit ( size_t  index)
inlineinherited

Definition at line 59 of file PmaElement3D.h.

References pma::Element3D::fAssignedHits.

Referenced by pma::Track3D::AddNode(), pma::Track3D::DisableSingleViewEnds(), and pma::Track3D::SortHits().

59 { return *(fAssignedHits[index]); }
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
const std::vector< pma::Hit3D* >& pma::Element3D::Hits ( void  ) const
inlineinherited

Definition at line 51 of file PmaElement3D.h.

References pma::Element3D::fAssignedHits.

51 { return fAssignedHits; }
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
double pma::Element3D::HitsRadius3D ( unsigned int  view) const
inherited

Definition at line 224 of file PmaElement3D.cxx.

References pma::Dist2(), pma::Element3D::fAssignedHits, and pma::Element3D::fTPC.

Referenced by pma::Element3D::NThisHits().

225 {
226  if (fTPC < 0)
227  {
228  if (!fAssignedHits.empty()) mf::LogWarning("pma::Element3D") << "Hits assigned to TPC-crossing element.";
229  return 0.0F;
230  }
231 
232  TVector3 mean3D(0, 0, 0);
233  size_t nHits = 0;
234  for (auto h : fAssignedHits)
235  if (h->View2D() == view)
236  { mean3D += h->Point3D(); nHits++; }
237  if (!nHits) return 0.0;
238  mean3D *= (1.0 / nHits);
239 
240  double r2, maxR2 = 0.0;
241  for (auto h : fAssignedHits)
242  if (h->View2D() == view)
243  {
244  r2 = pma::Dist2(h->Point3D(), mean3D);
245  if (r2 > maxR2) maxR2 = r2;
246  }
247  return sqrt(maxR2);
248 }
double Dist2(const TVector2 &v1, const TVector2 &v2)
Definition: Utilities.cxx:19
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
virtual bool pma::SortedObjectBase::IsFirst ( void  ) const
inlinevirtualinherited

Definition at line 41 of file SortedObjects.h.

References pma::SortedObjectBase::prev.

41 { return !prev; }
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
bool pma::Element3D::IsFrozen ( void  ) const
inlineinherited

Check if the vertex 3D position is fixed.

Definition at line 96 of file PmaElement3D.h.

References pma::Element3D::fFrozen.

Referenced by pma::Track3D::AddNode(), and pma::ProjectionMatchingAlg::mergeTracks().

96 { return fFrozen; }
virtual bool pma::SortedObjectBase::IsLast ( void  ) const
inlinevirtualinherited

Reimplemented in pma::SortedBranchBase.

Definition at line 42 of file SortedObjects.h.

References pma::SortedObjectBase::next.

42 { return !next; }
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
double pma::Element3D::Length ( void  ) const
inlineinherited
double pma::Segment3D::Length2 ( void  ) const
overridevirtual

Squared sum of half-lengths of connected 3D segments (used in the vertex position optimization).

Implements pma::Element3D.

Definition at line 205 of file PmaSegment3D.cxx.

References pma::Dist2(), pma::SortedObjectBase::next, and pma::SortedObjectBase::prev.

Referenced by End(), pma::Node3D::MakeGradient(), and pma::Node3D::Pi().

206 {
207  if (prev && next)
208  return pma::Dist2( ((pma::Node3D*)prev)->Point3D(), ((pma::Node3D*)next)->Point3D() );
209  else
210  {
211  mf::LogError("pma::Segment3D") << "Segment endpoints not set.";
212  return 0.0;
213  }
214 }
double Dist2(const TVector2 &v1, const TVector2 &v2)
Definition: Utilities.cxx:19
::fhicl::TupleAs< Point(::geo::Length_t,::geo::Length_t,::geo::Length_t)> Point3D
Atom object for reading a 3D point or vector (centimeters).
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
size_t pma::Element3D::NEnabledHits ( unsigned int  view = geo::kUnknown) const
inherited

Definition at line 35 of file PmaElement3D.cxx.

References pma::Element3D::fAssignedHits, geo::kUnknown, and n.

Referenced by pma::Track3D::AddNode(), and pma::Element3D::NHits().

36 {
37  size_t n = 0;
38  for (size_t i = 0; i < fAssignedHits.size(); i++)
39  if (fAssignedHits[i]->IsEnabled() &&
40  ((view == geo::kUnknown) || (view == fAssignedHits[i]->View2D()))) n++;
41  return n;
42 }
Unknown view.
Definition: geo_types.h:83
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
Char_t n[5]
virtual unsigned int pma::SortedObjectBase::NextCount ( void  ) const
inlinevirtualinherited

Reimplemented in pma::SortedBranchBase.

Definition at line 46 of file SortedObjects.h.

References pma::SortedObjectBase::next.

Referenced by pma::Node3D::Pi(), and pma::Element3D::UpdateHitParams().

47  {
48  if (next) return 1;
49  else return 0;
50  }
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
size_t pma::Element3D::NHits ( void  ) const
inlineinherited
unsigned int pma::Element3D::NHits ( unsigned int  view) const
inlineinherited

Definition at line 90 of file PmaElement3D.h.

References pma::Element3D::fNHits.

90 { return fNHits[view]; }
size_t fNHits[3]
Definition: PmaElement3D.h:117
size_t pma::Element3D::NPoints ( void  ) const
inlineinherited

Definition at line 76 of file PmaElement3D.h.

References pma::Element3D::fAssignedPoints.

Referenced by pma::Track3D::DisableSingleViewEnds().

76 { return fAssignedPoints.size(); }
std::vector< TVector3 * > fAssignedPoints
Definition: PmaElement3D.h:114
size_t pma::Element3D::NPrecalcEnabledHits ( void  ) const
inlineinherited

Definition at line 73 of file PmaElement3D.h.

References pma::Element3D::fNThisHitsEnabledAll.

Referenced by pma::Node3D::Mse().

73 { return fNThisHitsEnabledAll; }
size_t fNThisHitsEnabledAll
Definition: PmaElement3D.h:116
unsigned int pma::Element3D::NThisHits ( unsigned int  view) const
inlineinherited

Definition at line 91 of file PmaElement3D.h.

References pma::Element3D::fNThisHits, and pma::Element3D::HitsRadius3D().

91 { return fNThisHits[view]; }
size_t fNThisHits[3]
Definition: PmaElement3D.h:115
static float pma::Element3D::OptFactor ( unsigned int  view)
inlinestaticinherited

Definition at line 103 of file PmaElement3D.h.

References pma::Element3D::fOptFactors.

Referenced by pma::Element3D::SumDist2(), SumDist2Hits(), and pma::Node3D::SumDist2Hits().

103 { return fOptFactors[view]; }
static float fOptFactors[3]
Definition: PmaElement3D.h:121
TVector3 const& pma::Element3D::ReferencePoint ( size_t  index) const
inlineinherited

Definition at line 75 of file PmaElement3D.h.

References pma::Element3D::fAssignedPoints.

75 { return *(fAssignedPoints[index]); }
std::vector< TVector3 * > fAssignedPoints
Definition: PmaElement3D.h:114
void pma::Element3D::RemoveHitAt ( size_t  index)
inlineinherited

Definition at line 60 of file PmaElement3D.h.

References pma::Element3D::fAssignedHits.

61  {
62  if (index < fAssignedHits.size())
63  fAssignedHits.erase(fAssignedHits.begin() + index);
64  }
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
int pma::SortedObjectBase::RemoveNext ( pma::SortedObjectBase nextElement)
virtualinherited

Reimplemented in pma::SortedBranchBase.

Definition at line 47 of file SortedObjects.cxx.

References pma::SortedObjectBase::next, and pma::SortedObjectBase::prev.

Referenced by pma::SortedObjectBase::AddNext(), pma::SortedBranchBase::AddNext(), pma::SortedObjectBase::Disconnect(), pma::SortedBranchBase::Disconnect(), pma::Track3D::Split(), pma::SortedBranchBase::~SortedBranchBase(), and pma::SortedObjectBase::~SortedObjectBase().

48 {
49  if (nextElement && (next == nextElement))
50  {
51  if (next->prev == this) next->prev = 0;
52  else
53  {
54  mf::LogError("pma::SortedObjectBase") << "Object structure is broken.";
55  }
56 
57  next = 0;
58  return 0;
59  }
60  else return -1;
61 }
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
bool pma::Element3D::SelectAllHits ( void  )
inherited

Definition at line 296 of file PmaElement3D.cxx.

References pma::Element3D::fAssignedHits.

Referenced by pma::Track3D::SelectHits(), pma::Element3D::SelectRndHits(), and pma::Element3D::SetFrozen().

297 {
298  bool changed = false;
299  for (auto h : fAssignedHits)
300  {
301  changed |= !(h->IsEnabled());
302  h->SetEnabled(true);
303  }
304  return changed;
305 }
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
bool pma::Element3D::SelectRndHits ( size_t  nmax_per_view)
inherited

Definition at line 250 of file PmaElement3D.cxx.

References pma::Element3D::fAssignedHits, pma::Element3D::NHits(), and pma::Element3D::SelectAllHits().

Referenced by pma::Element3D::SetFrozen().

251 {
252  if (!nmax_per_view) { return SelectAllHits(); }
253 
254  size_t nhits[3];
255  for (size_t i = 0; i < 3; ++i) nhits[i] = NHits(i);
256 
257  int m[3], count[3];
258  bool state[3];
259  for (size_t i = 0; i < 3; ++i)
260  {
261  if (nhits[i] >= 2 * nmax_per_view)
262  {
263  m[i] = nhits[i] / nmax_per_view;
264  state[i] = true;
265  }
266  else if (nhits[i] > nmax_per_view)
267  {
268  m[i] = nhits[i] / (nhits[i] - nmax_per_view);
269  state[i] = false;
270  }
271  else { m[i] = 0; state[i] = false; }
272 
273  count[i] = 0;
274  }
275 
276  bool b, changed = false;
277  for (auto h : fAssignedHits)
278  {
279  b = h->IsEnabled();
280 
281  size_t view = h->View2D();
282  if (m[view])
283  {
284  if (count[view] % m[view] == 0) h->SetEnabled(state[view]);
285  else h->SetEnabled(!(state[view]));
286 
287  ++count[view];
288  }
289  else h->SetEnabled(true);
290 
291  changed |= (b != h->IsEnabled());
292  }
293  return changed;
294 }
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
bool SelectAllHits(void)
size_t NHits(void) const
Definition: PmaElement3D.h:71
void pma::Element3D::SetFrozen ( bool  state)
inlineinherited

Fix / relese vertex 3D position.

Definition at line 98 of file PmaElement3D.h.

References pma::Element3D::fFrozen, pma::Element3D::SelectAllHits(), and pma::Element3D::SelectRndHits().

98 { fFrozen = state; }
static void pma::Element3D::SetOptFactor ( unsigned int  view,
float  value 
)
inlinestaticinherited

Definition at line 104 of file PmaElement3D.h.

References pma::Element3D::Element3D(), pma::Element3D::fOptFactors, and fhicl::detail::atom::value().

Referenced by pma::ProjectionMatchingAlg::ProjectionMatchingAlg().

104 { fOptFactors[view] = value; }
static float fOptFactors[3]
Definition: PmaElement3D.h:121
std::string value(boost::any const &)
void pma::Segment3D::SetProjection ( pma::Hit3D h) const
overridevirtual

Set hit 3D position and its 2D projection to the vertex.

Implements pma::Element3D.

Definition at line 149 of file PmaSegment3D.cxx.

References E, pma::SortedObjectBase::next, pma::Hit3D::Point2D(), pma::Node3D::Point3D(), pma::SortedObjectBase::prev, pma::Node3D::Projection2D(), pma::Hit3D::SetPoint3D(), pma::Hit3D::SetProjection(), and pma::Hit3D::View2D().

Referenced by pma::Track3D::AddNode(), and End().

150 {
151  pma::Node3D* vStart = static_cast< pma::Node3D* >(prev);
152  pma::Node3D* vStop = static_cast< pma::Node3D* >(next);
153 
154  auto const & pointStart = vStart->Point3D();
155  auto const & pointStop = vStop->Point3D();
156 
157  auto const & projStart = vStart->Projection2D(h.View2D());
158  auto const & projStop = vStop->Projection2D(h.View2D());
159 
160  pma::Vector2D v0(
161  h.Point2D().X() - projStart.X(),
162  h.Point2D().Y() - projStart.Y());
163 
164  pma::Vector2D v1(
165  projStop.X() - projStart.X(),
166  projStop.Y() - projStart.Y());
167 
168  pma::Vector3D v3d(
169  pointStop.X() - pointStart.X(),
170  pointStop.Y() - pointStart.Y(),
171  pointStop.Z() - pointStart.Z());
172 
173  double v0Norm = sqrt(v0.Mag2());
174  double v1Norm = sqrt(v1.Mag2());
175  if (v1Norm > 1.0E-6) // 0.01mm
176  {
177  double mag = v0Norm * v1Norm;
178  double cosine = 0.0;
179  if (mag != 0.0) cosine = v0.Dot(v1) / mag;
180  double b = v0Norm * cosine / v1Norm;
181 
182  pma::Vector2D p(projStart.X(), projStart.Y());
183  p += (v1 * b);
184  v3d *= b;
185 
186  h.SetProjection(p.X(), p.Y(), (float)b);
187  h.SetPoint3D(
188  pointStart.X() + v3d.X(),
189  pointStart.Y() + v3d.Y(),
190  pointStart.Z() + v3d.Z());
191  }
192  else // segment 2D projection is almost a point
193  {
194  h.SetProjection(
195  0.5 * (projStart.X() + projStop.X()),
196  0.5 * (projStart.Y() + projStop.Y()), 0.0F);
197 
198  h.SetPoint3D(
199  0.5 * (pointStart.X() + pointStop.X()),
200  0.5 * (pointStart.Y() + pointStop.Y()),
201  0.5 * (pointStart.Z() + pointStop.Z()));
202  }
203 }
TVector2 const & Projection2D(unsigned int view) const
Definition: PmaNode3D.h:39
Float_t E
Definition: plot.C:23
unsigned int View2D(void) const
Definition: PmaHit3D.h:58
TVector3 const & Point3D(void) const
Definition: PmaNode3D.h:33
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
recob::tracking::Vector_t Vector3D
Definition: Utilities.h:29
ROOT::Math::DisplacementVector2D< ROOT::Math::Cartesian2D< double > > Vector2D
Definition: Utilities.h:28
void SetProjection(const TVector2 &p, float b)
Definition: PmaHit3D.h:73
TVector2 const & Point2D(void) const
Definition: PmaHit3D.h:53
void SetPoint3D(const TVector3 &p3d)
Definition: PmaHit3D.h:50
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
void pma::Element3D::SortHits ( void  )
inherited

Definition at line 44 of file PmaElement3D.cxx.

References pma::Element3D::fAssignedHits.

Referenced by pma::Track3D::AddNode(), pma::Track3D::SortHits(), and pma::Element3D::UpdateProjection().

45 {
46  std::sort(fAssignedHits.begin(), fAssignedHits.end(), pma::bTrajectory3DOrderLess());
47 }
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
Vector3D pma::Segment3D::Start ( void  ) const
inline

Definition at line 30 of file PmaSegment3D.h.

References pma::SortedObjectBase::Prev().

31  {
32  auto const & p = static_cast< Node3D* >(Prev())->Point3D();
33  return Vector3D(p.X(), p.Y(), p.Z());
34  }
::fhicl::TupleAs< Point(::geo::Length_t,::geo::Length_t,::geo::Length_t)> Point3D
Atom object for reading a 3D point or vector (centimeters).
recob::tracking::Vector_t Vector3D
Definition: Utilities.h:29
virtual pma::SortedObjectBase * Prev(void) const
Definition: SortedObjects.h:44
double pma::Element3D::SumDist2 ( void  ) const
inherited

Definition at line 171 of file PmaElement3D.cxx.

References d, pma::Element3D::fAssignedHits, pma::Element3D::fAssignedPoints, pma::Element3D::fTPC, pma::Element3D::GetDistance2To(), and pma::Element3D::SumDist2Hits().

Referenced by pma::Node3D::Mse(), and pma::Element3D::UpdateProjection().

172 {
173  if (fTPC < 0)
174  {
175  if (!fAssignedHits.empty()) mf::LogWarning("pma::Element3D") << "Hits assigned to TPC-crossing element.";
176  return 0.0F;
177  }
178 
179  double hit_sum = SumDist2Hits();
180 
181  if (fAssignedPoints.size())
182  {
183  double d, ref_sum = 0.0F;
184  for (auto p : fAssignedPoints)
185  {
186  d = sqrt( GetDistance2To(*p) ) - 0.5; // guide by ref points up to ~ 3D resolution
187  if (d > 0.0) ref_sum += d * d;
188  }
189  if (fAssignedHits.size())
190  {
191  ref_sum *= 0.2 * fAssignedHits.size() / fAssignedPoints.size();
192  }
193  hit_sum += ref_sum;
194  }
195 
196  return hit_sum;
197 }
std::vector< TVector3 * > fAssignedPoints
Definition: PmaElement3D.h:114
Float_t d
Definition: plot.C:237
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
virtual double GetDistance2To(const TVector3 &p3d) const =0
Distance [cm] from the 3D point to the object 3D.
virtual double SumDist2Hits(void) const =0
double pma::Element3D::SumDist2 ( unsigned int  view) const
inherited

Definition at line 199 of file PmaElement3D.cxx.

References pma::Element3D::fAssignedHits, pma::Element3D::fTPC, pma::Element3D::GetDistance2To(), geo::kUnknown, and pma::Element3D::OptFactor().

200 {
201  if (fTPC < 0)
202  {
203  if (!fAssignedHits.empty()) mf::LogWarning("pma::Element3D") << "Hits assigned to TPC-crossing element.";
204  return 0.0F;
205  }
206 
207  double hit_sum = 0.0F;
208  for (auto h : fAssignedHits)
209  {
210  if (h->IsEnabled())
211  {
212  unsigned int hitView = h->View2D();
213  if ((view == geo::kUnknown) || (view == hitView))
214  {
215  hit_sum += OptFactor(hitView) * // alpha_i
216  h->GetSigmaFactor() * // hit_amp / hit_max_amp
217  GetDistance2To(h->Point2D(), hitView); // hit_to_fit_dist^2
218  }
219  }
220  }
221  return hit_sum;
222 }
Unknown view.
Definition: geo_types.h:83
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
virtual double GetDistance2To(const TVector3 &p3d) const =0
Distance [cm] from the 3D point to the object 3D.
static float OptFactor(unsigned int view)
Definition: PmaElement3D.h:103
double pma::Segment3D::SumDist2Hits ( void  ) const
overrideprivatevirtual

Implements pma::Element3D.

Definition at line 38 of file PmaSegment3D.cxx.

References pma::Element3D::fAssignedHits, GetDist2(), pma::SortedObjectBase::next, pma::Element3D::OptFactor(), pma::SortedObjectBase::prev, and pma::Node3D::Projection2D().

Referenced by Parent().

39 {
40  pma::Node3D* v0 = static_cast< pma::Node3D* >(prev);
41  pma::Node3D* v1 = static_cast< pma::Node3D* >(next);
42 
43  double sum = 0.0F;
44  for (auto h : fAssignedHits)
45  {
46  if (h->IsEnabled())
47  {
48  unsigned int view = h->View2D();
49 
50  sum += OptFactor(view) * h->GetSigmaFactor() // alpha_i * (hit_amp / hit_max_amp)
51  * GetDist2(h->Point2D(), v0->Projection2D(view), v1->Projection2D(view));
52  }
53  }
54  return sum;
55 }
TVector2 const & Projection2D(unsigned int view) const
Definition: PmaNode3D.h:39
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
static float OptFactor(unsigned int view)
Definition: PmaElement3D.h:103
static double GetDist2(const TVector3 &psrc, const TVector3 &p0, const TVector3 &p1)
double pma::Element3D::SumHitsQ ( unsigned int  view) const
inlineinherited

Definition at line 89 of file PmaElement3D.h.

References pma::Element3D::fSumHitsQ.

89 { return fSumHitsQ[view]; }
double fSumHitsQ[3]
Definition: PmaElement3D.h:118
void pma::Element3D::UpdateHitParams ( void  )
inherited

Definition at line 56 of file PmaElement3D.cxx.

References pma::Element3D::fAssignedHits, pma::Element3D::fHitsRadius, pma::Element3D::fNHits, pma::Element3D::fNThisHits, pma::Element3D::fNThisHitsEnabledAll, pma::Element3D::fSumHitsQ, pma::GetHitsRadius2D(), geo::kU, geo::kV, geo::kZ, pma::SortedObjectBase::Next(), pma::SortedObjectBase::NextCount(), and pma::SortedObjectBase::Prev().

Referenced by pma::Element3D::AddPoint().

57 {
58  std::vector< pma::Hit3D* > hitsColl, hitsInd1, hitsInd2;
59  for (size_t i = 0; i < 3; ++i) fNThisHitsEnabledAll = 0;
60  for (auto h : fAssignedHits)
61  {
62  if (h->IsEnabled()) fNThisHitsEnabledAll++;
63  switch (h->View2D())
64  {
65  case geo::kZ: hitsColl.push_back(h); break;
66  case geo::kV: hitsInd2.push_back(h); break;
67  case geo::kU: hitsInd1.push_back(h); break;
68  }
69  }
70  fNThisHits[0] = hitsInd1.size();
71  fNThisHits[1] = hitsInd2.size();
72  fNThisHits[2] = hitsColl.size();
73 
74  pma::SortedObjectBase const * chain = dynamic_cast< pma::SortedObjectBase* >(this);
75  pma::Element3D* el = 0;
76  for (size_t b = 0; b < chain->NextCount(); b++)
77  {
78  el = dynamic_cast< pma::Element3D* >(chain->Next(b));
79  if (el)
80  for (auto h : el->fAssignedHits)
81  {
82  switch (h->View2D())
83  {
84  case geo::kZ: hitsColl.push_back(h); break;
85  case geo::kV: hitsInd2.push_back(h); break;
86  case geo::kU: hitsInd1.push_back(h); break;
87  }
88  }
89  }
90  el = dynamic_cast< pma::Element3D* >(chain->Prev());
91  if (el)
92  {
93  for (auto h : el->fAssignedHits)
94  {
95  switch (h->View2D())
96  {
97  case geo::kZ: hitsColl.push_back(h); break;
98  case geo::kV: hitsInd2.push_back(h); break;
99  case geo::kU: hitsInd1.push_back(h); break;
100  }
101  }
102  }
103 
104  fHitsRadius = GetHitsRadius2D(hitsColl);
105  double r = GetHitsRadius2D(hitsInd2);
106  if (r > fHitsRadius) fHitsRadius = r;
107  r = GetHitsRadius2D(hitsInd1);
108  if (r > fHitsRadius) fHitsRadius = r;
109 
110  float amp, sigmaMax = 0.0F;
111  fSumHitsQ[0] = 0.0; fNHits[0] = hitsInd1.size();
112  for (size_t i = 0; i < hitsInd1.size(); i++)
113  {
114  amp = hitsInd1[i]->GetAmplitude();
115  if (amp > sigmaMax) sigmaMax = amp;
116  fSumHitsQ[0] += amp;
117  }
118  for (size_t i = 0; i < hitsInd1.size(); i++)
119  {
120  if (sigmaMax > 0.0F)
121  {
122  amp = hitsInd1[i]->GetAmplitude();
123  if (amp > 0.0F)
124  hitsInd1[i]->SetSigmaFactor((float)sqrt(amp / sigmaMax));
125  else hitsInd1[i]->SetSigmaFactor(0.01F);
126  }
127  else hitsInd1[i]->SetSigmaFactor(1.0F);
128  }
129 
130  sigmaMax = 0.0F;
131  fSumHitsQ[1] = 0.0; fNHits[1] = hitsInd2.size();
132  for (size_t i = 0; i < hitsInd2.size(); i++)
133  {
134  amp = hitsInd2[i]->GetAmplitude();
135  if (amp > sigmaMax) sigmaMax = amp;
136  fSumHitsQ[1] += amp;
137  }
138  for (size_t i = 0; i < hitsInd2.size(); i++)
139  {
140  if (sigmaMax > 0.0F)
141  {
142  amp = hitsInd2[i]->GetAmplitude();
143  if (amp > 0.0F)
144  hitsInd2[i]->SetSigmaFactor((float)sqrt(amp / sigmaMax));
145  else hitsInd2[i]->SetSigmaFactor(0.01F);
146  }
147  else hitsInd2[i]->SetSigmaFactor(1.0F);
148  }
149 
150  sigmaMax = 0.0F;
151  fSumHitsQ[2] = 0.0; fNHits[2] = hitsColl.size();
152  for (size_t i = 0; i < hitsColl.size(); i++)
153  {
154  amp = hitsColl[i]->SummedADC();
155  if (amp > sigmaMax) sigmaMax = amp;
156  fSumHitsQ[2] += amp;
157  }
158  for (size_t i = 0; i < hitsColl.size(); i++)
159  {
160  if (sigmaMax > 0.0F)
161  {
162  amp = hitsColl[i]->SummedADC();
163  if (amp > 0.0F)
164  hitsColl[i]->SetSigmaFactor((float)sqrt(amp / sigmaMax));
165  else hitsColl[i]->SetSigmaFactor(0.01F);
166  }
167  else hitsColl[i]->SetSigmaFactor(1.0F);
168  }
169 }
double fSumHitsQ[3]
Definition: PmaElement3D.h:118
double GetHitsRadius2D(const std::vector< pma::Hit3D * > &hits, bool exact=false)
Definition: Utilities.cxx:78
Planes which measure V.
Definition: geo_types.h:77
Planes which measure Z direction.
Definition: geo_types.h:79
size_t fNThisHits[3]
Definition: PmaElement3D.h:115
Planes which measure U.
Definition: geo_types.h:76
virtual unsigned int NextCount(void) const
Definition: SortedObjects.h:46
size_t fNHits[3]
Definition: PmaElement3D.h:117
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113
size_t fNThisHitsEnabledAll
Definition: PmaElement3D.h:116
double fHitsRadius
Definition: PmaElement3D.h:119
virtual pma::SortedObjectBase * Prev(void) const
Definition: SortedObjects.h:44
virtual pma::SortedObjectBase * Next(unsigned int index=0) const
Definition: SortedObjects.h:45
void pma::Element3D::UpdateProjection ( void  )
inlineinherited

Definition at line 84 of file PmaElement3D.h.

References pma::Element3D::fAssignedHits, pma::Element3D::SetProjection(), pma::Element3D::SortHits(), and pma::Element3D::SumDist2().

84 { for (auto h : fAssignedHits) SetProjection(*h); }
virtual void SetProjection(pma::Hit3D &h) const =0
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:113

Member Data Documentation

std::vector< TVector3* > pma::Element3D::fAssignedPoints
protectedinherited
int pma::Element3D::fCryo
protectedinherited

Definition at line 108 of file PmaElement3D.h.

Referenced by pma::Element3D::Cryo(), pma::Node3D::Node3D(), and Segment3D().

bool pma::Element3D::fFrozen
protectedinherited
double pma::Element3D::fHitsRadius
protectedinherited
size_t pma::Element3D::fNHits[3]
protectedinherited
size_t pma::Element3D::fNThisHits[3]
protectedinherited
size_t pma::Element3D::fNThisHitsEnabledAll
protectedinherited
float pma::Element3D::fOptFactors = { 0.2F, 0.8F, 1.0F }
staticprotectedinherited

Definition at line 121 of file PmaElement3D.h.

Referenced by pma::Element3D::OptFactor(), and pma::Element3D::SetOptFactor().

pma::Track3D* pma::Segment3D::fParent
private

Definition at line 71 of file PmaSegment3D.h.

Referenced by Parent().

double pma::Element3D::fSumHitsQ[3]
protectedinherited
int pma::Element3D::fTPC
protectedinherited

The documentation for this class was generated from the following files: