1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#ifndef DTOccupancyPoint_H
#define DTOccupancyPoint_H
/** \class DTOccupancyPoint
* 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
*/
#include "DataFormats/MuonDetId/interface/DTLayerId.h"
class DTOccupancyPoint {
public:
/// Constructor
DTOccupancyPoint();
DTOccupancyPoint(double mean, double rms);
DTOccupancyPoint(double mean, double rms, DTLayerId layerId);
/// Destructor
virtual ~DTOccupancyPoint();
// Operations
/// average cell occupancy in the layer
double mean() const;
/// RMS of the distribution of the cell occupancies in the layer
double rms() const;
/// distance from another point in the 2D plane
double distance(const DTOccupancyPoint& anotherPoint) const;
double deltaMean(const DTOccupancyPoint& anotherPoint) const;
double deltaRMS(const DTOccupancyPoint& anotherPoint) const;
bool operator==(const DTOccupancyPoint& other) const;
bool operator!=(const DTOccupancyPoint& other) const;
bool operator<(const DTOccupancyPoint& other) const;
void setLayerId(DTLayerId layerId);
DTLayerId layerId() const;
private:
double theMean;
double theRMS;
DTLayerId theLayerId;
bool debug; // FIXME: to be removed
};
// Compute the average RMS among two DTOccupancyPoints
double computeAverageRMS(const DTOccupancyPoint& onePoint, const DTOccupancyPoint& anotherPoint);
// Compute the min RMS among two DTOccupancyPoints
double computeMinRMS(const DTOccupancyPoint& onePoint, const DTOccupancyPoint& anotherPoint);
#endif
|