CMS 3D CMS Logo

DTOccupancyPoint Class Reference

This class is used for evaluation of layer occupancy in DTOccupancyTest. More...

#include <DQM/DTMonitorClient/src/DTOccupancyPoint.h>

List of all members.

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
 DTOccupancyPoint (double mean, double rms, DTLayerId layerId)
 DTOccupancyPoint (double mean, double rms)
 DTOccupancyPoint ()
 Constructor.
DTLayerId layerId () const
double mean () const
 average cell occupancy in the layer
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.
void setLayerId (DTLayerId layerId)
virtual ~DTOccupancyPoint ()
 Destructor.

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

00016                                    : theMean(0.),
00017                                        theRMS(0.) {
00018  debug = false; // FIXME: to be removed
00019 
00020 }

DTOccupancyPoint::DTOccupancyPoint ( double  mean,
double  rms 
)

Definition at line 24 of file DTOccupancyPoint.cc.

References debug.

00024                                                           : theMean(mean),
00025                                                               theRMS(rms) {
00026  debug = false; // FIXME: to be removed
00027 }

DTOccupancyPoint::DTOccupancyPoint ( double  mean,
double  rms,
DTLayerId  layerId 
)

Definition at line 30 of file DTOccupancyPoint.cc.

References debug.

00030                                                                              : theMean(mean),
00031                                                                                  theRMS(rms),
00032                                                                                  theLayerId(layerId) {
00033  debug = false; // FIXME: to be removed
00034 }

DTOccupancyPoint::~DTOccupancyPoint (  )  [virtual]

Destructor.

Definition at line 38 of file DTOccupancyPoint.cc.

00038 {}


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

00062                                                                              {
00063   return fabs(mean() - anotherPoint.mean());
00064 }

double DTOccupancyPoint::deltaRMS ( const DTOccupancyPoint anotherPoint  )  const

Definition at line 68 of file DTOccupancyPoint.cc.

References rms().

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

00068                                                                             {
00069   return fabs(rms() - anotherPoint.rms());
00070 }

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 funct::sqrt().

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

00055                                                                             {
00056   return sqrt(deltaMean(anotherPoint)*deltaMean(anotherPoint) +
00057               deltaRMS(anotherPoint)* deltaRMS(anotherPoint));
00058 }

DTLayerId DTOccupancyPoint::layerId (  )  const

Definition at line 136 of file DTOccupancyPoint.cc.

References theLayerId.

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

00136                                           {
00137   return theLayerId;
00138 }

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

00043                                     {
00044   return theMean;
00045 }

bool DTOccupancyPoint::operator!= ( const DTOccupancyPoint other  )  const

Definition at line 84 of file DTOccupancyPoint.cc.

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

00084                                                                      {
00085   if(theMean != other.mean() ||
00086      theRMS != other.rms() ||
00087      theLayerId != other.layerId()) return true;
00088   return false;
00089 }

bool DTOccupancyPoint::operator< ( const DTOccupancyPoint other  )  const

Definition at line 93 of file DTOccupancyPoint.cc.

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

00093                                                                     {
00094   if(distance(DTOccupancyPoint()) == other.distance(DTOccupancyPoint())) {
00095     return false;
00096   }
00097 
00098   if(fabs(distance(DTOccupancyPoint()) - other.distance(DTOccupancyPoint())) < 0.000001) {
00099     if(layerId().rawId() < other.layerId().rawId()) {
00100       return true;
00101     } else {
00102       return false;
00103     }
00104   }
00105 
00106   if(distance(DTOccupancyPoint()) < other.distance(DTOccupancyPoint())) return true;
00107   return false;
00108 }

bool DTOccupancyPoint::operator== ( const DTOccupancyPoint other  )  const

Definition at line 74 of file DTOccupancyPoint.cc.

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

00074                                                                      {
00075   // FIXME: should add the layer ID? not clear
00076   if(theMean == other.mean() &&
00077      theRMS == other.rms() &&
00078      theLayerId == other.layerId()) return true;
00079   return false;
00080 }

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

00049                                    {
00050   return theRMS;
00051 }

void DTOccupancyPoint::setLayerId ( DTLayerId  layerId  ) 

Definition at line 131 of file DTOccupancyPoint.cc.

References theLayerId.

00131                                                    {
00132   theLayerId = layerId;
00133 }


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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:58 2009 for CMSSW by  doxygen 1.5.4