LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
pma::Element3D Class Referenceabstract

#include "PmaElement3D.h"

Inheritance diagram for pma::Element3D:
pma::Node3D pma::Segment3D

Public Member Functions

virtual ~Element3D ()
 
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...
 
virtual double GetDistance2To (const TVector3 &p3d) const =0
 Distance [cm] from the 3D point to the object 3D. More...
 
virtual double GetDistance2To (const TVector2 &p2d, unsigned int view) const =0
 Distance [cm] from the 2D point to the object's 2D projection in one of wire views. More...
 
virtual pma::Vector3D GetDirection3D (void) const =0
 Get 3D direction cosines corresponding to this element. More...
 
virtual TVector3 GetUnconstrainedProj3D (const TVector2 &p2d, unsigned int view) const =0
 
virtual void SetProjection (pma::Hit3D &h) const =0
 
virtual double Length2 (void) const =0
 
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
 
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 NHits (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)
 

Static Public Member Functions

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

Protected Member Functions

 Element3D (void)
 
virtual double SumDist2Hits (void) const =0
 

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
 

Static Protected Attributes

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

Detailed Description

Definition at line 30 of file PmaElement3D.h.

Constructor & Destructor Documentation

pma::Element3D::~Element3D ( )
virtualdefault
pma::Element3D::Element3D ( void  )
protected

Definition at line 24 of file PmaElement3D.cxx.

References fNHits, fNThisHits, fNThisHitsEnabledAll, and fSumHitsQ.

Referenced by SetOptFactor().

24  : fTPC(-1), fCryo(-1), fFrozen(false), fHitsRadius(0)
25 {
27  for (unsigned int i = 0; i < 3; i++) {
28  fNHits[i] = 0;
29  fNThisHits[i] = 0;
30  fSumHitsQ[i] = 0.0;
31  }
32 }
double fSumHitsQ[3]
Definition: PmaElement3D.h:127
size_t fNThisHits[3]
Definition: PmaElement3D.h:124
size_t fNHits[3]
Definition: PmaElement3D.h:126
size_t fNThisHitsEnabledAll
Definition: PmaElement3D.h:125
double fHitsRadius
Definition: PmaElement3D.h:128

Member Function Documentation

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

Definition at line 70 of file PmaElement3D.h.

References fAssignedHits, and 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
void pma::Element3D::AddPoint ( TVector3 *  p)
inline

Definition at line 82 of file PmaElement3D.h.

References ClearAssigned(), fAssignedPoints, and 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)
virtual

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 fAssignedHits, fAssignedPoints, and fHitsRadius.

Referenced by 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
inline

Cryostat index or -1 if out of any cryostat.

Definition at line 37 of file PmaElement3D.h.

References fCryo, GetDirection3D(), GetDistance2To(), GetUnconstrainedProj3D(), Length2(), and SetProjection().

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

37 { return fCryo; }
virtual pma::Vector3D pma::Element3D::GetDirection3D ( void  ) const
pure virtual

Get 3D direction cosines corresponding to this element.

Implemented in pma::Node3D, and pma::Segment3D.

Referenced by Cryo(), and pma::Node3D::GetDirection3D().

virtual double pma::Element3D::GetDistance2To ( const TVector3 &  p3d) const
pure virtual

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

Implemented in pma::Node3D, and pma::Segment3D.

Referenced by Cryo(), pma::Track3D::GetNearestElement(), pma::Track3D::MakeFastProjection(), and SumDist2().

virtual double pma::Element3D::GetDistance2To ( const TVector2 &  p2d,
unsigned int  view 
) const
pure virtual

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

Implemented in pma::Node3D, and pma::Segment3D.

virtual TVector3 pma::Element3D::GetUnconstrainedProj3D ( const TVector2 &  p2d,
unsigned int  view 
) const
pure virtual

Implemented in pma::Node3D, and pma::Segment3D.

Referenced by Cryo().

bool pma::Element3D::HasHit ( const pma::Hit3D h) const
inline

Definition at line 57 of file PmaElement3D.h.

References 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)
inline

Definition at line 65 of file PmaElement3D.h.

References 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
inline

Definition at line 55 of file PmaElement3D.h.

References fAssignedHits.

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

Definition at line 209 of file PmaElement3D.cxx.

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

Referenced by 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
bool pma::Element3D::IsFrozen ( void  ) const
inline

Check if the vertex 3D position is fixed.

Definition at line 105 of file PmaElement3D.h.

References fFrozen.

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

105 { return fFrozen; }
double pma::Element3D::Length ( void  ) const
inline
virtual double pma::Element3D::Length2 ( void  ) const
pure virtual

Implemented in pma::Node3D, and pma::Segment3D.

Referenced by Cryo(), and Length().

size_t pma::Element3D::NEnabledHits ( unsigned int  view = geo::kUnknown) const

Definition at line 34 of file PmaElement3D.cxx.

References fAssignedHits, geo::kUnknown, and n.

Referenced by pma::Track3D::AddNode(), and 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]
size_t pma::Element3D::NHits ( void  ) const
inline
unsigned int pma::Element3D::NHits ( unsigned int  view) const
inline

Definition at line 99 of file PmaElement3D.h.

References fNHits.

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

Definition at line 81 of file PmaElement3D.h.

References 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
inline

Definition at line 78 of file PmaElement3D.h.

References 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
inline

Definition at line 100 of file PmaElement3D.h.

References fNThisHits, and HitsRadius3D().

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

Definition at line 112 of file PmaElement3D.h.

References fOptFactors.

Referenced by SumDist2(), pma::Segment3D::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
inline

Definition at line 80 of file PmaElement3D.h.

References fAssignedPoints.

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

Definition at line 66 of file PmaElement3D.h.

References 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
bool pma::Element3D::SelectAllHits ( void  )

Definition at line 284 of file PmaElement3D.cxx.

References fAssignedHits.

Referenced by pma::Track3D::SelectHits(), SelectRndHits(), and 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)

Definition at line 236 of file PmaElement3D.cxx.

References fAssignedHits, NHits(), and SelectAllHits().

Referenced by 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)
inline

Fix / relese vertex 3D position.

Definition at line 107 of file PmaElement3D.h.

References fFrozen, SelectAllHits(), and SelectRndHits().

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

Definition at line 113 of file PmaElement3D.h.

References 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
virtual void pma::Element3D::SetProjection ( pma::Hit3D h) const
pure virtual

Implemented in pma::Node3D, and pma::Segment3D.

Referenced by AddHit(), Cryo(), and UpdateProjection().

void pma::Element3D::SortHits ( void  )

Definition at line 44 of file PmaElement3D.cxx.

References fAssignedHits.

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

45 {
46  std::sort(fAssignedHits.begin(), fAssignedHits.end(), pma::bTrajectory3DOrderLess());
47 }
std::vector< pma::Hit3D * > fAssignedHits
Definition: PmaElement3D.h:122
double pma::Element3D::SumDist2 ( void  ) const

Definition at line 164 of file PmaElement3D.cxx.

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

Referenced by pma::Node3D::Mse(), and 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

Definition at line 187 of file PmaElement3D.cxx.

References fAssignedHits, fTPC, GetDistance2To(), geo::kUnknown, and 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
virtual double pma::Element3D::SumDist2Hits ( void  ) const
protectedpure virtual

Implemented in pma::Node3D, and pma::Segment3D.

Referenced by SumDist2().

double pma::Element3D::SumHitsQ ( unsigned int  view) const
inline

Definition at line 98 of file PmaElement3D.h.

References fSumHitsQ.

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

Definition at line 56 of file PmaElement3D.cxx.

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

Referenced by 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  )
inline

Definition at line 89 of file PmaElement3D.h.

References fAssignedHits, SetProjection(), SortHits(), and 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
protected
int pma::Element3D::fCryo
protected

Definition at line 117 of file PmaElement3D.h.

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

bool pma::Element3D::fFrozen
protected
double pma::Element3D::fHitsRadius
protected
size_t pma::Element3D::fNHits[3]
protected

Definition at line 126 of file PmaElement3D.h.

Referenced by Element3D(), NHits(), and UpdateHitParams().

size_t pma::Element3D::fNThisHits[3]
protected

Definition at line 124 of file PmaElement3D.h.

Referenced by Element3D(), NThisHits(), and UpdateHitParams().

size_t pma::Element3D::fNThisHitsEnabledAll
protected

Definition at line 125 of file PmaElement3D.h.

Referenced by Element3D(), NPrecalcEnabledHits(), and UpdateHitParams().

float pma::Element3D::fOptFactors = {0.2F, 0.8F, 1.0F}
staticprotected

Definition at line 130 of file PmaElement3D.h.

Referenced by OptFactor(), and SetOptFactor().

double pma::Element3D::fSumHitsQ[3]
protected

Definition at line 127 of file PmaElement3D.h.

Referenced by Element3D(), SumHitsQ(), and UpdateHitParams().

int pma::Element3D::fTPC
protected

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