FACT++  1.0
void Ring::InterpolCenters ( const std::vector< Ring > &  rings)

Definition at line 66 of file Ring.cc.

References fMag, fR, fX, and fY.

Referenced by GetMag().

67 {
68  fX = 0;
69  fY = 0;
70  fR = 0;
71 
72  fMag=0;
73 
74  const int n=rings.size();
75  if (n==0)
76  return;
77 
78  for (auto it=rings.begin(); it!=rings.end(); it++)
79  {
80  fX += it->GetX();
81  fY += it->GetY();
82  fR += it->GetR();
83  fMag += it->GetMag();
84  }
85 
86  fX /= n;
87  fY /= n;
88  fR /= n;
89  fMag /= n;
90 }
double fMag
Definition: Ring.h:18
double fR
Definition: Ring.h:15
double fX
Definition: Ring.h:13
double fY
Definition: Ring.h:14

+ Here is the caller graph for this function: