CMS 3D CMS Logo

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

Author
G. Cerminara - INFN Torino

Definition at line 13 of file DTOccupancyPoint.h.

Constructor & Destructor Documentation

DTOccupancyPoint::DTOccupancyPoint ( )

Constructor.

Definition at line 14 of file DTOccupancyPoint.cc.

References debug.

Referenced by operator<().

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

Definition at line 22 of file DTOccupancyPoint.cc.

References debug.

22  : theMean(mean),
23  theRMS(rms) {
24  debug = false; // FIXME: to be removed
25 }
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 28 of file DTOccupancyPoint.cc.

References debug.

28  : theMean(mean),
29  theRMS(rms),
30  theLayerId(layerId) {
31  debug = false; // FIXME: to be removed
32 }
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 36 of file DTOccupancyPoint.cc.

36 {}

Member Function Documentation

double DTOccupancyPoint::deltaMean ( const DTOccupancyPoint anotherPoint) const

Definition at line 60 of file DTOccupancyPoint.cc.

References mean().

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

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

Definition at line 66 of file DTOccupancyPoint.cc.

References rms().

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

66  {
67  return fabs(rms() - anotherPoint.rms());
68 }
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 53 of file DTOccupancyPoint.cc.

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

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

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

Definition at line 134 of file DTOccupancyPoint.cc.

References theLayerId.

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

134  {
135  return theLayerId;
136 }
double DTOccupancyPoint::mean ( ) const

average cell occupancy in the layer

Definition at line 41 of file DTOccupancyPoint.cc.

References theMean.

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

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

Definition at line 82 of file DTOccupancyPoint.cc.

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

82  {
83  if(theMean != other.mean() ||
84  theRMS != other.rms() ||
85  theLayerId != other.layerId()) return true;
86  return false;
87 }
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 91 of file DTOccupancyPoint.cc.

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

91  {
93  return false;
94  }
95 
96  if(fabs(distance(DTOccupancyPoint()) - other.distance(DTOccupancyPoint())) < 0.000001) {
97  if(layerId().rawId() < other.layerId().rawId()) {
98  return true;
99  } else {
100  return false;
101  }
102  }
103 
104  if(distance(DTOccupancyPoint()) < other.distance(DTOccupancyPoint())) return true;
105  return false;
106 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
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 72 of file DTOccupancyPoint.cc.

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

72  {
73  // FIXME: should add the layer ID? not clear
74  if(theMean == other.mean() &&
75  theRMS == other.rms() &&
76  theLayerId == other.layerId()) return true;
77  return false;
78 }
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 47 of file DTOccupancyPoint.cc.

References theRMS.

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

47  {
48  return theRMS;
49 }
void DTOccupancyPoint::setLayerId ( DTLayerId  layerId)

Definition at line 129 of file DTOccupancyPoint.cc.

References layerId(), and theLayerId.

129  {
131 }
DTLayerId layerId() const

Member Data Documentation

bool DTOccupancyPoint::debug
private
DTLayerId DTOccupancyPoint::theLayerId
private

Definition at line 54 of file DTOccupancyPoint.h.

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

double DTOccupancyPoint::theMean
private

Definition at line 52 of file DTOccupancyPoint.h.

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

double DTOccupancyPoint::theRMS
private

Definition at line 53 of file DTOccupancyPoint.h.

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