Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-21 22:39:37

0001 #ifndef DTOccupancyPoint_H
0002 #define DTOccupancyPoint_H
0003 
0004 /** \class DTOccupancyPoint
0005  *  This class is used for evaluation of layer occupancy in DTOccupancyTest.
0006  *  It describes a point in the 2D plane (average cell occupancy vs cell occupancy RMS).
0007  *
0008  *  \author G. Cerminara - INFN Torino
0009  */
0010 
0011 #include "DataFormats/MuonDetId/interface/DTLayerId.h"
0012 
0013 class DTOccupancyPoint {
0014 public:
0015   /// Constructor
0016   DTOccupancyPoint();
0017 
0018   DTOccupancyPoint(double mean, double rms);
0019 
0020   DTOccupancyPoint(double mean, double rms, DTLayerId layerId);
0021 
0022   /// Destructor
0023   virtual ~DTOccupancyPoint();
0024 
0025   // Operations
0026 
0027   /// average cell occupancy in the layer
0028   double mean() const;
0029 
0030   /// RMS of the distribution of the cell occupancies in the layer
0031   double rms() const;
0032 
0033   /// distance from another point in the 2D plane
0034   double distance(const DTOccupancyPoint& anotherPoint) const;
0035 
0036   double deltaMean(const DTOccupancyPoint& anotherPoint) const;
0037 
0038   double deltaRMS(const DTOccupancyPoint& anotherPoint) const;
0039 
0040   bool operator==(const DTOccupancyPoint& other) const;
0041 
0042   bool operator!=(const DTOccupancyPoint& other) const;
0043 
0044   bool operator<(const DTOccupancyPoint& other) const;
0045 
0046   void setLayerId(DTLayerId layerId);
0047 
0048   DTLayerId layerId() const;
0049 
0050 private:
0051   double theMean;
0052   double theRMS;
0053   DTLayerId theLayerId;
0054 
0055   bool debug;  // FIXME: to be removed
0056 };
0057 
0058 // Compute the average RMS among two DTOccupancyPoints
0059 double computeAverageRMS(const DTOccupancyPoint& onePoint, const DTOccupancyPoint& anotherPoint);
0060 
0061 // Compute the min RMS among two DTOccupancyPoints
0062 double computeMinRMS(const DTOccupancyPoint& onePoint, const DTOccupancyPoint& anotherPoint);
0063 
0064 #endif