CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
FastLineRecognition::Cluster Struct Reference

cluster of intersection points More...

Public Member Functions

void add (const Point *p1, const Point *p2, double a, double b, double w)
 
 Cluster ()
 
bool operator< (const Cluster &c) const
 

Public Attributes

std::vector< const Point * > contents
 
double S1
 
double Saw
 
double Sbw
 
double Sw
 
double weight
 

Detailed Description

cluster of intersection points

Definition at line 82 of file FastLineRecognition.h.

Constructor & Destructor Documentation

FastLineRecognition::Cluster::Cluster ( )
inline

Member Function Documentation

void FastLineRecognition::Cluster::add ( const Point p1,
const Point p2,
double  a,
double  b,
double  w 
)

Definition at line 31 of file FastLineRecognition.cc.

References relmon_rootfiles_spy::contents, FastLineRecognition::Point::hit, and w.

Referenced by counter.Counter::register().

32 {
33  // which points to be added to contents?
34  bool add1 = true, add2 = true;
35  for (vector<const Point *>::const_iterator it = contents.begin(); it != contents.end() && (add1 || add2); ++it)
36  {
37  if ((*it)->hit == p1->hit)
38  add1 = false;
39 
40  if ((*it)->hit == p2->hit)
41  add2 = false;
42  }
43 
44  // add the points
45  if (add1)
46  contents.push_back(p1);
47  if (add2)
48  contents.push_back(p2);
49 
50  // update sums
51  Saw += a*w;
52  Sbw += b*w;
53  Sw += w;
54  S1 += 1.;
55 }
const double w
Definition: UKUtility.cc:23
std::vector< const Point * > contents
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
bool FastLineRecognition::Cluster::operator< ( const Cluster c) const
inline

Definition at line 93 of file FastLineRecognition.h.

References FastLineRecognition::getOneLine(), hiPixelPairStep_cff::points, mps_fire::result, and Sw.

94  {
95  return (this->Sw > c.Sw) ? true : false;
96  }

Member Data Documentation

std::vector<const Point *> FastLineRecognition::Cluster::contents
double FastLineRecognition::Cluster::S1

Definition at line 84 of file FastLineRecognition.h.

Referenced by FastLineRecognition::getOneLine().

double FastLineRecognition::Cluster::Saw
double FastLineRecognition::Cluster::Sbw
double FastLineRecognition::Cluster::Sw
double FastLineRecognition::Cluster::weight