LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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=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 27 of file PmaSegment3D.h.

Constructor & Destructor Documentation

pma::Segment3D::Segment3D ( void  )
inline

Definition at line 29 of file PmaSegment3D.h.

Referenced by Parent().

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

Definition at line 20 of file PmaSegment3D.cxx.

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

21  : SortedObjectBase(vstart, vstop), fParent(trk)
22 {
23  if (vstart->TPC() == vstop->TPC()) fTPC = vstart->TPC();
24  if (vstart->Cryo() == vstop->Cryo()) fCryo = vstart->Cryo();
25 }
pma::Track3D * fParent
Definition: PmaSegment3D.h:73
int TPC(void) const
TPC index or -1 if out of any TPC.
Definition: PmaElement3D.h:35
int Cryo(void) const
Cryostat index or -1 if out of any cryostat.
Definition: PmaElement3D.h:37
pma::Segment3D::Segment3D ( const pma::Segment3D src)
private

Member Function Documentation

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

Definition at line 70 of file PmaElement3D.h.

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

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

71  {
72  fAssignedHits.push_back(h);
73  SetProjection(*h);
74  }
virtual void SetProjection(pma::Hit3D &h) const =0
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:122
bool pma::SortedObjectBase::AddNext ( pma::SortedObjectBase nextElement)
virtualinherited

Reimplemented in pma::SortedBranchBase.

Definition at line 31 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().

32 {
33  if (!nextElement || (nextElement == this)) return false;
34 
35  if (next && (next->prev == this)) next->prev = 0;
36 
37  if (nextElement->prev && (nextElement->prev != this)) nextElement->prev->RemoveNext(nextElement);
38 
39  next = nextElement;
40  next->prev = this;
41  return true;
42 }
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 82 of file PmaElement3D.h.

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

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

82 { fAssignedPoints.push_back(p); }
std::vector< TVector3 * > fAssignedPoints
Definition: PmaElement3D.h:123
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:123
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:122
double fHitsRadius
Definition: PmaElement3D.h:128
int pma::Element3D::Cryo ( void  ) const
inlineinherited
void pma::SortedObjectBase::Disconnect ( void  )
virtualinherited

Reimplemented in pma::SortedBranchBase.

Definition at line 25 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().

26 {
27  if (prev) prev->RemoveNext(this);
28  if (next) RemoveNext(next);
29 }
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 37 of file PmaSegment3D.h.

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

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

Get 3D direction cosines of this segment.

Implements pma::Element3D.

Definition at line 58 of file PmaSegment3D.cxx.

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

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

59 {
60  pma::Node3D* v0 = static_cast<pma::Node3D*>(prev);
61  pma::Node3D* v1 = static_cast<pma::Node3D*>(next);
62  pma::Vector3D dir(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() const
Definition: PmaNode3D.h:44
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
recob::tracking::Vector_t Vector3D
Definition: Utilities.h:34
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 204 of file PmaSegment3D.cxx.

References E.

Referenced by GetDistance2To(), and SumDist2Hits().

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

Definition at line 248 of file PmaSegment3D.cxx.

References E.

249 {
250  pma::Vector2D v0(psrc.X() - p0.X(), psrc.Y() - p0.Y());
251  pma::Vector2D v1(p1.X() - p0.X(), p1.Y() - p0.Y());
252  pma::Vector2D v2(psrc.X() - p1.X(), psrc.Y() - p1.Y());
253 
254  double v1Norm2 = v1.Mag2();
255  if (v1Norm2 >= 1.0E-6) // >= 0.01mm
256  {
257  double v0v1 = v0.Dot(v1);
258  double v2v1 = v2.Dot(v1);
259  double v0Norm2 = v0.Mag2();
260  double v2Norm2 = v2.Mag2();
261 
262  double result = 0.0;
263  if ((v0v1 > 0.0) && (v2v1 < 0.0)) {
264  double cosine01_square = 0.0;
265  double mag01_square = v0Norm2 * v1Norm2;
266  if (mag01_square != 0.0) cosine01_square = v0v1 * v0v1 / mag01_square;
267 
268  result = (1.0 - cosine01_square) * v0Norm2;
269  }
270  else // increase distance to prefer hit assigned to the vertex, not segment
271  {
272  if (v0v1 <= 0.0)
273  result = 1.0001 * v0Norm2;
274  else
275  result = 1.0001 * v2Norm2;
276  }
277  if (result >= 0.0)
278  return result;
279  else
280  return 0.0;
281  }
282  else // short segment or its projection
283  {
284  double dx = 0.5 * (p0.X() + p1.X()) - psrc.X();
285  double dy = 0.5 * (p0.Y() + p1.Y()) - psrc.Y();
286  return dx * dx + dy * dy;
287  }
288 }
Float_t E
Definition: plot.C:20
ROOT::Math::DisplacementVector2D< ROOT::Math::Cartesian2D< double > > Vector2D
Definition: Utilities.h:33
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 27 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().

28 {
29  pma::Node3D* v0 = static_cast<pma::Node3D*>(prev);
30  pma::Node3D* v1 = static_cast<pma::Node3D*>(next);
31  return GetDist2(p3d, v0->Point3D(), v1->Point3D());
32 }
TVector3 const & Point3D() const
Definition: PmaNode3D.h:44
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 34 of file PmaSegment3D.cxx.

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

35 {
36  pma::Node3D* v0 = static_cast<pma::Node3D*>(prev);
37  pma::Node3D* v1 = static_cast<pma::Node3D*>(next);
38  return GetDist2(p2d, v0->Projection2D(view), v1->Projection2D(view));
39 }
TVector2 const & Projection2D(unsigned int view) const
Definition: PmaNode3D.h:50
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  result = v3dStart;
98  if (b > 0.0) result += (v3d * b);
99  }
100  else
101  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 }
TVector3 const & Point3D() const
Definition: PmaNode3D.h:44
TVector2 const & Projection2D(unsigned int view) const
Definition: PmaNode3D.h:50
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
Float_t E
Definition: plot.C:20
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 }
TVector3 const & Point3D() const
Definition: PmaNode3D.h:44
TVector2 const & Projection2D(unsigned int view) const
Definition: PmaNode3D.h:50
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
Float_t E
Definition: plot.C:20
pma::SortedObjectBase * next
Definition: SortedObjects.h:53
bool pma::Element3D::HasHit ( const pma::Hit3D h) const
inlineinherited

Definition at line 57 of file PmaElement3D.h.

References pma::Element3D::fAssignedHits.

58  {
59  for (const auto a : fAssignedHits) {
60  if (h == a) return true;
61  }
62  return false;
63  }
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:122
pma::Hit3D& pma::Element3D::Hit ( size_t  index)
inlineinherited

Definition at line 65 of file PmaElement3D.h.

References pma::Element3D::fAssignedHits.

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

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

Definition at line 55 of file PmaElement3D.h.

References pma::Element3D::fAssignedHits.

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

Definition at line 209 of file PmaElement3D.cxx.

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

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

210 {
211  if (fTPC < 0) {
212  if (!fAssignedHits.empty())
213  mf::LogWarning("pma::Element3D") << "Hits assigned to TPC-crossing element.";
214  return 0.0F;
215  }
216 
217  TVector3 mean3D(0, 0, 0);
218  size_t nHits = 0;
219  for (auto h : fAssignedHits)
220  if (h->View2D() == view) {
221  mean3D += h->Point3D();
222  nHits++;
223  }
224  if (!nHits) return 0.0;
225  mean3D *= (1.0 / nHits);
226 
227  double r2, maxR2 = 0.0;
228  for (auto h : fAssignedHits)
229  if (h->View2D() == view) {
230  r2 = pma::Dist2(h->Point3D(), mean3D);
231  if (r2 > maxR2) maxR2 = r2;
232  }
233  return sqrt(maxR2);
234 }
double Dist2(const TVector2 &v1, const TVector2 &v2)
Definition: Utilities.cxx:39
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:122
virtual bool pma::SortedObjectBase::IsFirst ( void  ) const
inlinevirtualinherited

Definition at line 39 of file SortedObjects.h.

References pma::SortedObjectBase::prev.

39 { 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 105 of file PmaElement3D.h.

References pma::Element3D::fFrozen.

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

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

Reimplemented in pma::SortedBranchBase.

Definition at line 40 of file SortedObjects.h.

References pma::SortedObjectBase::next.

40 { 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 194 of file PmaSegment3D.cxx.

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

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

195 {
196  if (prev && next)
197  return pma::Dist2(((pma::Node3D*)prev)->Point3D(), ((pma::Node3D*)next)->Point3D());
198  else {
199  mf::LogError("pma::Segment3D") << "Segment endpoints not set.";
200  return 0.0;
201  }
202 }
double Dist2(const TVector2 &v1, const TVector2 &v2)
Definition: Utilities.cxx:39
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
::fhicl::TupleAs< Point(::geo::Length_t,::geo::Length_t,::geo::Length_t)> Point3D
Atom object for reading a 3D point or vector (centimeters).
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 34 of file PmaElement3D.cxx.

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

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

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

Reimplemented in pma::SortedBranchBase.

Definition at line 44 of file SortedObjects.h.

References pma::SortedObjectBase::next.

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

45  {
46  if (next)
47  return 1;
48  else
49  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 99 of file PmaElement3D.h.

References pma::Element3D::fNHits.

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

Definition at line 81 of file PmaElement3D.h.

References pma::Element3D::fAssignedPoints.

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

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

Definition at line 78 of file PmaElement3D.h.

References pma::Element3D::fNThisHitsEnabledAll.

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

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

Definition at line 100 of file PmaElement3D.h.

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

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

Definition at line 112 of file PmaElement3D.h.

References pma::Element3D::fOptFactors.

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

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

Definition at line 80 of file PmaElement3D.h.

References pma::Element3D::fAssignedPoints.

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

Definition at line 66 of file PmaElement3D.h.

References pma::Element3D::fAssignedHits.

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

67  {
68  if (index < fAssignedHits.size()) fAssignedHits.erase(fAssignedHits.begin() + index);
69  }
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:122
int pma::SortedObjectBase::RemoveNext ( pma::SortedObjectBase nextElement)
virtualinherited

Reimplemented in pma::SortedBranchBase.

Definition at line 44 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().

45 {
46  if (nextElement && (next == nextElement)) {
47  if (next->prev == this)
48  next->prev = 0;
49  else {
50  mf::LogError("pma::SortedObjectBase") << "Object structure is broken.";
51  }
52 
53  next = 0;
54  return 0;
55  }
56  else
57  return -1;
58 }
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 284 of file PmaElement3D.cxx.

References pma::Element3D::fAssignedHits.

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

285 {
286  bool changed = false;
287  for (auto h : fAssignedHits) {
288  changed |= !(h->IsEnabled());
289  h->SetEnabled(true);
290  }
291  return changed;
292 }
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:122
bool pma::Element3D::SelectRndHits ( size_t  nmax_per_view)
inherited

Definition at line 236 of file PmaElement3D.cxx.

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

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

237 {
238  if (!nmax_per_view) { return SelectAllHits(); }
239 
240  size_t nhits[3];
241  for (size_t i = 0; i < 3; ++i)
242  nhits[i] = NHits(i);
243 
244  int m[3], count[3];
245  bool state[3];
246  for (size_t i = 0; i < 3; ++i) {
247  if (nhits[i] >= 2 * nmax_per_view) {
248  m[i] = nhits[i] / nmax_per_view;
249  state[i] = true;
250  }
251  else if (nhits[i] > nmax_per_view) {
252  m[i] = nhits[i] / (nhits[i] - nmax_per_view);
253  state[i] = false;
254  }
255  else {
256  m[i] = 0;
257  state[i] = false;
258  }
259 
260  count[i] = 0;
261  }
262 
263  bool b, changed = false;
264  for (auto h : fAssignedHits) {
265  b = h->IsEnabled();
266 
267  size_t view = h->View2D();
268  if (m[view]) {
269  if (count[view] % m[view] == 0)
270  h->SetEnabled(state[view]);
271  else
272  h->SetEnabled(!(state[view]));
273 
274  ++count[view];
275  }
276  else
277  h->SetEnabled(true);
278 
279  changed |= (b != h->IsEnabled());
280  }
281  return changed;
282 }
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:122
bool SelectAllHits(void)
size_t NHits(void) const
Definition: PmaElement3D.h:76
void pma::Element3D::SetFrozen ( bool  state)
inlineinherited

Fix / relese vertex 3D position.

Definition at line 107 of file PmaElement3D.h.

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

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

Definition at line 113 of file PmaElement3D.h.

References pma::Element3D::Element3D(), pma::Element3D::fOptFactors, and value.

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

113 { fOptFactors[view] = value; }
static float fOptFactors[3]
Definition: PmaElement3D.h:130
double value
Definition: spectrum.C:18
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(h.Point2D().X() - projStart.X(), h.Point2D().Y() - projStart.Y());
161 
162  pma::Vector2D v1(projStop.X() - projStart.X(), projStop.Y() - projStart.Y());
163 
164  pma::Vector3D v3d(
165  pointStop.X() - pointStart.X(), pointStop.Y() - pointStart.Y(), pointStop.Z() - pointStart.Z());
166 
167  double v0Norm = sqrt(v0.Mag2());
168  double v1Norm = sqrt(v1.Mag2());
169  if (v1Norm > 1.0E-6) // 0.01mm
170  {
171  double mag = v0Norm * v1Norm;
172  double cosine = 0.0;
173  if (mag != 0.0) cosine = v0.Dot(v1) / mag;
174  double b = v0Norm * cosine / v1Norm;
175 
176  pma::Vector2D p(projStart.X(), projStart.Y());
177  p += (v1 * b);
178  v3d *= b;
179 
180  h.SetProjection(p.X(), p.Y(), (float)b);
181  h.SetPoint3D(pointStart.X() + v3d.X(), pointStart.Y() + v3d.Y(), pointStart.Z() + v3d.Z());
182  }
183  else // segment 2D projection is almost a point
184  {
185  h.SetProjection(
186  0.5 * (projStart.X() + projStop.X()), 0.5 * (projStart.Y() + projStop.Y()), 0.0F);
187 
188  h.SetPoint3D(0.5 * (pointStart.X() + pointStop.X()),
189  0.5 * (pointStart.Y() + pointStop.Y()),
190  0.5 * (pointStart.Z() + pointStop.Z()));
191  }
192 }
TVector3 const & Point3D() const
Definition: PmaNode3D.h:44
TVector2 const & Projection2D(unsigned int view) const
Definition: PmaNode3D.h:50
TVector2 const & Point2D() const noexcept
Definition: PmaHit3D.h:55
pma::SortedObjectBase * prev
Definition: SortedObjects.h:54
recob::tracking::Vector_t Vector3D
Definition: Utilities.h:34
Float_t E
Definition: plot.C:20
void SetProjection(const TVector2 &p, float b)
Definition: PmaHit3D.h:75
unsigned int View2D() const noexcept
Definition: PmaHit3D.h:60
void SetPoint3D(const TVector3 &p3d)
Definition: PmaHit3D.h:52
ROOT::Math::DisplacementVector2D< ROOT::Math::Cartesian2D< double > > Vector2D
Definition: Utilities.h:33
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:122
Vector3D pma::Segment3D::Start ( void  ) const
inline

Definition at line 32 of file PmaSegment3D.h.

References pma::SortedObjectBase::Prev().

33  {
34  auto const& p = static_cast<Node3D*>(Prev())->Point3D();
35  return Vector3D(p.X(), p.Y(), p.Z());
36  }
::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:34
virtual pma::SortedObjectBase * Prev(void) const
Definition: SortedObjects.h:42
double pma::Element3D::SumDist2 ( void  ) const
inherited

Definition at line 164 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().

165 {
166  if (fTPC < 0) {
167  if (!fAssignedHits.empty())
168  mf::LogWarning("pma::Element3D") << "Hits assigned to TPC-crossing element.";
169  return 0.0F;
170  }
171 
172  double hit_sum = SumDist2Hits();
173 
174  if (fAssignedPoints.size()) {
175  double d, ref_sum = 0.0F;
176  for (auto p : fAssignedPoints) {
177  d = sqrt(GetDistance2To(*p)) - 0.5; // guide by ref points up to ~ 3D resolution
178  if (d > 0.0) ref_sum += d * d;
179  }
180  if (fAssignedHits.size()) { ref_sum *= 0.2 * fAssignedHits.size() / fAssignedPoints.size(); }
181  hit_sum += ref_sum;
182  }
183 
184  return hit_sum;
185 }
std::vector< TVector3 * > fAssignedPoints
Definition: PmaElement3D.h:123
Float_t d
Definition: plot.C:235
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:122
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 187 of file PmaElement3D.cxx.

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

188 {
189  if (fTPC < 0) {
190  if (!fAssignedHits.empty())
191  mf::LogWarning("pma::Element3D") << "Hits assigned to TPC-crossing element.";
192  return 0.0F;
193  }
194 
195  double hit_sum = 0.0F;
196  for (auto h : fAssignedHits) {
197  if (h->IsEnabled()) {
198  unsigned int hitView = h->View2D();
199  if ((view == geo::kUnknown) || (view == hitView)) {
200  hit_sum += OptFactor(hitView) * // alpha_i
201  h->GetSigmaFactor() * // hit_amp / hit_max_amp
202  GetDistance2To(h->Point2D(), hitView); // hit_to_fit_dist^2
203  }
204  }
205  }
206  return hit_sum;
207 }
Unknown view.
Definition: geo_types.h:142
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:122
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:112
double pma::Segment3D::SumDist2Hits ( void  ) const
overrideprivatevirtual

Implements pma::Element3D.

Definition at line 41 of file PmaSegment3D.cxx.

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

Referenced by Parent().

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

Definition at line 98 of file PmaElement3D.h.

References pma::Element3D::fSumHitsQ.

98 { return fSumHitsQ[view]; }
double fSumHitsQ[3]
Definition: PmaElement3D.h:127
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(), pma::SortedObjectBase::Prev(), and r.

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

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

Definition at line 89 of file PmaElement3D.h.

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

90  {
91  for (auto h : fAssignedHits)
92  SetProjection(*h);
93  }
virtual void SetProjection(pma::Hit3D &h) const =0
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:122

Member Data Documentation

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

Definition at line 117 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 130 of file PmaElement3D.h.

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

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

Definition at line 73 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: