CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 79 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().

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

Member Data Documentation

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

Definition at line 80 of file FastLineRecognition.h.

Referenced by FastLineRecognition::getOneLine().

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