File indexing completed on 2024-04-06 12:07:05
0001 #ifndef DTOccupancyCluster_H
0002 #define DTOccupancyCluster_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "DTOccupancyPoint.h"
0012
0013 #include <vector>
0014 #include <string>
0015 #include <cmath>
0016 #include <set>
0017
0018 class TH2F;
0019
0020 class DTOccupancyCluster {
0021 public:
0022
0023
0024 DTOccupancyCluster(const DTOccupancyPoint& firstPoint, const DTOccupancyPoint& secondPoint);
0025
0026
0027
0028 DTOccupancyCluster(const DTOccupancyPoint& singlePoint);
0029
0030
0031 virtual ~DTOccupancyCluster();
0032
0033
0034
0035
0036 bool isValid() const;
0037
0038
0039
0040 bool addPoint(const DTOccupancyPoint& anotherPoint);
0041
0042
0043
0044 double distance(const DTOccupancyPoint& point) const;
0045
0046
0047 double averageMean() const;
0048
0049
0050 double averageRMS() const;
0051
0052
0053 double maxMean() const;
0054
0055
0056 double maxRMS() const;
0057
0058
0059 TH2F* getHisto(std::string histoName,
0060 int nBinsX,
0061 double minX,
0062 double maxX,
0063 int nBinsY,
0064 double minY,
0065 double maxY,
0066 int fillColor) const;
0067
0068
0069 int nPoints() const;
0070
0071 std::set<DTLayerId> getLayerIDs() const;
0072
0073 protected:
0074 private:
0075 bool qualityCriterion(const DTOccupancyPoint& firstPoint, const DTOccupancyPoint& secondPoint);
0076
0077 bool qualityCriterion(const DTOccupancyPoint& anotherPoint);
0078
0079 void computeRadius();
0080
0081 bool theValidity;
0082 double radius;
0083 std::vector<DTOccupancyPoint> thePoints;
0084
0085 double theMaxMean;
0086 double theMaxRMS;
0087 double theMeanSum;
0088 double theRMSSum;
0089 };
0090
0091
0092 bool clusterIsLessThan(const DTOccupancyCluster& clusterOne, const DTOccupancyCluster& clusterTwo);
0093
0094 #endif