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...

#include <FastLineRecognition.h>

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 max_a
 
double max_b
 
double min_a
 
double min_b
 
double S1
 
double Saw
 
double Sbw
 
double Sw
 
double weight
 

Detailed Description

cluster of intersection points

Definition at line 81 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, bookConverter::max, min(), 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, mins and maxs
51  Saw += a*w;
52  Sbw += b*w;
53  Sw += w;
54  S1 += 1.;
55 
56  min_a = min(a, min_a);
57  min_b = min(b, min_b);
58  max_a = max(a, max_a);
59  max_b = max(b, max_b);
60 }
const double w
Definition: UKUtility.cc:23
T min(T a, T b)
Definition: MathUtil.h:58
double p2[4]
Definition: TauolaWrapper.h:90
std::vector< const Point * > contents
double b
Definition: hdecay.h:120
double p1[4]
Definition: TauolaWrapper.h:89
double a
Definition: hdecay.h:121
bool FastLineRecognition::Cluster::operator< ( const Cluster c) const
inline

Definition at line 93 of file FastLineRecognition.h.

References Sw.

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

Member Data Documentation

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

Definition at line 85 of file FastLineRecognition.h.

double FastLineRecognition::Cluster::max_b

Definition at line 85 of file FastLineRecognition.h.

double FastLineRecognition::Cluster::min_a

Definition at line 85 of file FastLineRecognition.h.

double FastLineRecognition::Cluster::min_b

Definition at line 85 of file FastLineRecognition.h.

double FastLineRecognition::Cluster::S1

Definition at line 83 of file FastLineRecognition.h.

Referenced by FastLineRecognition::getOneLine().

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