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() [1/3]

DTOccupancyPoint::DTOccupancyPoint ( )

Constructor.

Definition at line 12 of file DTOccupancyPoint.cc.

12  : theMean(0.), theRMS(0.) {
13  debug = false; // FIXME: to be removed
14 }

References debug.

Referenced by operator<().

◆ DTOccupancyPoint() [2/3]

DTOccupancyPoint::DTOccupancyPoint ( double  mean,
double  rms 
)

Definition at line 16 of file DTOccupancyPoint.cc.

16  : theMean(mean), theRMS(rms) {
17  debug = false; // FIXME: to be removed
18 }

References debug.

◆ DTOccupancyPoint() [3/3]

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

Definition at line 20 of file DTOccupancyPoint.cc.

22  debug = false; // FIXME: to be removed
23 }

References debug.

◆ ~DTOccupancyPoint()

DTOccupancyPoint::~DTOccupancyPoint ( )
virtual

Destructor.

Definition at line 25 of file DTOccupancyPoint.cc.

25 {}

Member Function Documentation

◆ deltaMean()

double DTOccupancyPoint::deltaMean ( const DTOccupancyPoint anotherPoint) const

Definition at line 35 of file DTOccupancyPoint.cc.

35  {
36  return fabs(mean() - anotherPoint.mean());
37 }

References mean().

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

◆ deltaRMS()

double DTOccupancyPoint::deltaRMS ( const DTOccupancyPoint anotherPoint) const

Definition at line 39 of file DTOccupancyPoint.cc.

39  {
40  return fabs(rms() - anotherPoint.rms());
41 }

References rms().

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

◆ distance()

double DTOccupancyPoint::distance ( const DTOccupancyPoint anotherPoint) const

distance from another point in the 2D plane

Definition at line 31 of file DTOccupancyPoint.cc.

31  {
32  return sqrt(deltaMean(anotherPoint) * deltaMean(anotherPoint) + deltaRMS(anotherPoint) * deltaRMS(anotherPoint));
33 }

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

Referenced by operator<().

◆ layerId()

DTLayerId DTOccupancyPoint::layerId ( ) const

Definition at line 91 of file DTOccupancyPoint.cc.

91 { return theLayerId; }

References theLayerId.

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

◆ mean()

double DTOccupancyPoint::mean ( ) const

average cell occupancy in the layer

Definition at line 27 of file DTOccupancyPoint.cc.

27 { return theMean; }

References theMean.

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

◆ operator!=()

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

Definition at line 50 of file DTOccupancyPoint.cc.

50  {
51  if (theMean != other.mean() || theRMS != other.rms() || theLayerId != other.layerId())
52  return true;
53  return false;
54 }

References trackingPlots::other, theLayerId, theMean, and theRMS.

◆ operator<()

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

Definition at line 56 of file DTOccupancyPoint.cc.

56  {
57  if (distance(DTOccupancyPoint()) == other.distance(DTOccupancyPoint())) {
58  return false;
59  }
60 
61  if (fabs(distance(DTOccupancyPoint()) - other.distance(DTOccupancyPoint())) < 0.000001) {
62  if (layerId().rawId() < other.layerId().rawId()) {
63  return true;
64  } else {
65  return false;
66  }
67  }
68 
69  if (distance(DTOccupancyPoint()) < other.distance(DTOccupancyPoint()))
70  return true;
71  return false;
72 }

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

◆ operator==()

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

Definition at line 43 of file DTOccupancyPoint.cc.

43  {
44  // FIXME: should add the layer ID? not clear
45  if (theMean == other.mean() && theRMS == other.rms() && theLayerId == other.layerId())
46  return true;
47  return false;
48 }

References trackingPlots::other, theLayerId, theMean, and theRMS.

◆ rms()

double DTOccupancyPoint::rms ( ) const

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

Definition at line 29 of file DTOccupancyPoint.cc.

29 { return theRMS; }

References theRMS.

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

◆ setLayerId()

void DTOccupancyPoint::setLayerId ( DTLayerId  layerId)

Definition at line 89 of file DTOccupancyPoint.cc.

89 { theLayerId = layerId; }

References layerId(), and theLayerId.

Member Data Documentation

◆ debug

bool DTOccupancyPoint::debug
private

◆ theLayerId

DTLayerId DTOccupancyPoint::theLayerId
private

Definition at line 53 of file DTOccupancyPoint.h.

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

◆ theMean

double DTOccupancyPoint::theMean
private

Definition at line 51 of file DTOccupancyPoint.h.

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

◆ theRMS

double DTOccupancyPoint::theRMS
private

Definition at line 52 of file DTOccupancyPoint.h.

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

DTOccupancyPoint::debug
bool debug
Definition: DTOccupancyPoint.h:55
DTOccupancyPoint
Definition: DTOccupancyPoint.h:13
DTOccupancyPoint::deltaMean
double deltaMean(const DTOccupancyPoint &anotherPoint) const
Definition: DTOccupancyPoint.cc:35
DTOccupancyPoint::layerId
DTLayerId layerId() const
Definition: DTOccupancyPoint.cc:91
DTOccupancyPoint::deltaRMS
double deltaRMS(const DTOccupancyPoint &anotherPoint) const
Definition: DTOccupancyPoint.cc:39
DTOccupancyPoint::DTOccupancyPoint
DTOccupancyPoint()
Constructor.
Definition: DTOccupancyPoint.cc:12
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
trackingPlots.other
other
Definition: trackingPlots.py:1467
DTOccupancyPoint::theRMS
double theRMS
Definition: DTOccupancyPoint.h:52
DTOccupancyPoint::theLayerId
DTLayerId theLayerId
Definition: DTOccupancyPoint.h:53
DTOccupancyPoint::mean
double mean() const
average cell occupancy in the layer
Definition: DTOccupancyPoint.cc:27
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
DTOccupancyPoint::theMean
double theMean
Definition: DTOccupancyPoint.h:51
DTOccupancyPoint::distance
double distance(const DTOccupancyPoint &anotherPoint) const
distance from another point in the 2D plane
Definition: DTOccupancyPoint.cc:31
DTOccupancyPoint::rms
double rms() const
RMS of the distribution of the cell occupancies in the layer.
Definition: DTOccupancyPoint.cc:29