CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
DTOccupancyPoint Class Reference

#include <DTOccupancyPoint.h>

Public Member Functions

double deltaMean (const DTOccupancyPoint &anotherPoint) const
 
double deltaRMS (const DTOccupancyPoint &anotherPoint) const
 
double distance (const DTOccupancyPoint &anotherPoint) const
 distance from another point in the 2D plane More...
 
 DTOccupancyPoint ()
 Constructor. More...
 
 DTOccupancyPoint (double mean, double rms)
 
 DTOccupancyPoint (double mean, double rms, DTLayerId layerId)
 
DTLayerId layerId () const
 
double mean () const
 average cell occupancy in the layer More...
 
bool operator!= (const DTOccupancyPoint &other) const
 
bool operator< (const DTOccupancyPoint &other) const
 
bool operator== (const DTOccupancyPoint &other) const
 
double rms () const
 RMS of the distribution of the cell occupancies in the layer. More...
 
void setLayerId (DTLayerId layerId)
 
virtual ~DTOccupancyPoint ()
 Destructor. More...
 

Private Attributes

bool debug
 
DTLayerId theLayerId
 
double theMean
 
double theRMS
 

Detailed Description

This class is used for evaluation of layer occupancy in DTOccupancyTest. It describes a point in the 2D plane (average cell occupancy vs cell occupancy RMS).

Date:
2008/07/02 16:50:29
Revision:
1.2
Author
G. Cerminara - INFN Torino

Definition at line 15 of file DTOccupancyPoint.h.

Constructor & Destructor Documentation

DTOccupancyPoint::DTOccupancyPoint ( )

Constructor.

Definition at line 16 of file DTOccupancyPoint.cc.

References debug.

Referenced by operator<().

16  : theMean(0.),
17  theRMS(0.) {
18  debug = false; // FIXME: to be removed
19 
20 }
DTOccupancyPoint::DTOccupancyPoint ( double  mean,
double  rms 
)

Definition at line 24 of file DTOccupancyPoint.cc.

References debug.

24  : theMean(mean),
25  theRMS(rms) {
26  debug = false; // FIXME: to be removed
27 }
double mean() const
average cell occupancy in the layer
double rms() const
RMS of the distribution of the cell occupancies in the layer.
DTOccupancyPoint::DTOccupancyPoint ( double  mean,
double  rms,
DTLayerId  layerId 
)

Definition at line 30 of file DTOccupancyPoint.cc.

References debug.

30  : theMean(mean),
31  theRMS(rms),
32  theLayerId(layerId) {
33  debug = false; // FIXME: to be removed
34 }
double mean() const
average cell occupancy in the layer
double rms() const
RMS of the distribution of the cell occupancies in the layer.
DTOccupancyPoint::~DTOccupancyPoint ( )
virtual

Destructor.

Definition at line 38 of file DTOccupancyPoint.cc.

38 {}

Member Function Documentation

double DTOccupancyPoint::deltaMean ( const DTOccupancyPoint anotherPoint) const

Definition at line 62 of file DTOccupancyPoint.cc.

References mean().

Referenced by distance(), and DTOccupancyCluster::qualityCriterion().

62  {
63  return fabs(mean() - anotherPoint.mean());
64 }
double mean() const
average cell occupancy in the layer
double DTOccupancyPoint::deltaRMS ( const DTOccupancyPoint anotherPoint) const

Definition at line 68 of file DTOccupancyPoint.cc.

References rms().

Referenced by distance(), and DTOccupancyCluster::qualityCriterion().

68  {
69  return fabs(rms() - anotherPoint.rms());
70 }
double rms() const
RMS of the distribution of the cell occupancies in the layer.
double DTOccupancyPoint::distance ( const DTOccupancyPoint anotherPoint) const

distance from another point in the 2D plane

Definition at line 55 of file DTOccupancyPoint.cc.

References deltaMean(), deltaRMS(), and mathSSE::sqrt().

Referenced by DTOccupancyCluster::distance(), and operator<().

55  {
56  return sqrt(deltaMean(anotherPoint)*deltaMean(anotherPoint) +
57  deltaRMS(anotherPoint)* deltaRMS(anotherPoint));
58 }
double deltaMean(const DTOccupancyPoint &anotherPoint) const
double deltaRMS(const DTOccupancyPoint &anotherPoint) const
T sqrt(T t)
Definition: SSEVec.h:46
DTLayerId DTOccupancyPoint::layerId ( ) const

Definition at line 136 of file DTOccupancyPoint.cc.

References theLayerId.

Referenced by operator!=(), operator<(), operator==(), and setLayerId().

136  {
137  return theLayerId;
138 }
double DTOccupancyPoint::mean ( ) const

average cell occupancy in the layer

Definition at line 43 of file DTOccupancyPoint.cc.

References theMean.

Referenced by DTOccupancyCluster::addPoint(), deltaMean(), DTOccupancyCluster::DTOccupancyCluster(), operator!=(), operator==(), and DTOccupancyCluster::qualityCriterion().

43  {
44  return theMean;
45 }
bool DTOccupancyPoint::operator!= ( const DTOccupancyPoint other) const

Definition at line 84 of file DTOccupancyPoint.cc.

References layerId(), mean(), rms(), theLayerId, theMean, and theRMS.

84  {
85  if(theMean != other.mean() ||
86  theRMS != other.rms() ||
87  theLayerId != other.layerId()) return true;
88  return false;
89 }
double mean() const
average cell occupancy in the layer
double rms() const
RMS of the distribution of the cell occupancies in the layer.
DTLayerId layerId() const
bool DTOccupancyPoint::operator< ( const DTOccupancyPoint other) const

Definition at line 93 of file DTOccupancyPoint.cc.

References distance(), DTOccupancyPoint(), layerId(), and DetId::rawId().

93  {
95  return false;
96  }
97 
98  if(fabs(distance(DTOccupancyPoint()) - other.distance(DTOccupancyPoint())) < 0.000001) {
99  if(layerId().rawId() < other.layerId().rawId()) {
100  return true;
101  } else {
102  return false;
103  }
104  }
105 
106  if(distance(DTOccupancyPoint()) < other.distance(DTOccupancyPoint())) return true;
107  return false;
108 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
DTOccupancyPoint()
Constructor.
double distance(const DTOccupancyPoint &anotherPoint) const
distance from another point in the 2D plane
DTLayerId layerId() const
bool DTOccupancyPoint::operator== ( const DTOccupancyPoint other) const

Definition at line 74 of file DTOccupancyPoint.cc.

References layerId(), mean(), rms(), theLayerId, theMean, and theRMS.

74  {
75  // FIXME: should add the layer ID? not clear
76  if(theMean == other.mean() &&
77  theRMS == other.rms() &&
78  theLayerId == other.layerId()) return true;
79  return false;
80 }
double mean() const
average cell occupancy in the layer
double rms() const
RMS of the distribution of the cell occupancies in the layer.
DTLayerId layerId() const
double DTOccupancyPoint::rms ( ) const

RMS of the distribution of the cell occupancies in the layer.

Definition at line 49 of file DTOccupancyPoint.cc.

References theRMS.

Referenced by DTOccupancyCluster::addPoint(), computeAverageRMS(), computeMinRMS(), deltaRMS(), DTOccupancyCluster::DTOccupancyCluster(), operator!=(), operator==(), and DTOccupancyCluster::qualityCriterion().

49  {
50  return theRMS;
51 }
void DTOccupancyPoint::setLayerId ( DTLayerId  layerId)

Definition at line 131 of file DTOccupancyPoint.cc.

References layerId(), and theLayerId.

131  {
133 }
DTLayerId layerId() const

Member Data Documentation

bool DTOccupancyPoint::debug
private

Definition at line 58 of file DTOccupancyPoint.h.

Referenced by DTOccupancyPoint().

DTLayerId DTOccupancyPoint::theLayerId
private

Definition at line 56 of file DTOccupancyPoint.h.

Referenced by layerId(), operator!=(), operator==(), and setLayerId().

double DTOccupancyPoint::theMean
private

Definition at line 54 of file DTOccupancyPoint.h.

Referenced by mean(), operator!=(), and operator==().

double DTOccupancyPoint::theRMS
private

Definition at line 55 of file DTOccupancyPoint.h.

Referenced by operator!=(), operator==(), and rms().