Go to the documentation of this file.00001 #ifndef DTOccupancyCluster_H
00002 #define DTOccupancyCluster_H
00003
00013 #include "DTOccupancyPoint.h"
00014
00015 #include <vector>
00016 #include <string>
00017 #include <math.h>
00018 #include <set>
00019
00020 class TH2F;
00021
00022 class DTOccupancyCluster {
00023 public:
00025
00026 DTOccupancyCluster(const DTOccupancyPoint& firstPoint, const DTOccupancyPoint& secondPoint);
00027
00029
00030 DTOccupancyCluster(const DTOccupancyPoint& singlePoint);
00031
00033 virtual ~DTOccupancyCluster();
00034
00035
00036
00038 bool isValid() const;
00039
00042 bool addPoint(const DTOccupancyPoint& anotherPoint);
00043
00046 double distance(const DTOccupancyPoint& point) const;
00047
00049 double averageMean() const;
00050
00052 double averageRMS() const;
00053
00055 double maxMean() const;
00056
00058 double maxRMS() const;
00059
00061 TH2F * getHisto(std::string histoName, int nBinsX, double minX, double maxX,
00062 int nBinsY, double minY, double maxY, int fillColor) const;
00063
00065 int nPoints() const;
00066
00067 std::set<DTLayerId> getLayerIDs() const;
00068
00069 protected:
00070
00071 private:
00072
00073 bool qualityCriterion(const DTOccupancyPoint& firstPoint, const DTOccupancyPoint& secondPoint);
00074
00075 bool qualityCriterion(const DTOccupancyPoint& anotherPoint);
00076
00077 void computeRadius();
00078
00079 bool theValidity;
00080 double radius;
00081 std::vector<DTOccupancyPoint> thePoints;
00082
00083 double theMaxMean;
00084 double theMaxRMS;
00085 double theMeanSum;
00086 double theRMSSum;
00087
00088 };
00089
00091 bool clusterIsLessThan(const DTOccupancyCluster& clusterOne, const DTOccupancyCluster& clusterTwo);
00092
00093 #endif
00094