CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/DQM/DTMonitorClient/src/DTOccupancyClusterBuilder.h

Go to the documentation of this file.
00001 #ifndef DTOccupancyClusterBuilder_H
00002 #define DTOccupancyClusterBuilder_H
00003 
00013 #include "DTOccupancyPoint.h"
00014 #include "DTOccupancyCluster.h"
00015 
00016 #include <set>
00017 #include <map>
00018 #include <vector>
00019 #include <string>
00020 
00021 
00022 class DTOccupancyClusterBuilder {
00023 public:
00025   DTOccupancyClusterBuilder();
00026 
00028   virtual ~DTOccupancyClusterBuilder();
00029 
00030   // Operations
00032   void addPoint(const DTOccupancyPoint& point);
00033 
00035   void buildClusters();
00036 
00038   void drawClusters(std::string canvasName);
00039 
00041   DTOccupancyCluster getBestCluster() const;
00042 
00043   bool isProblematic(DTLayerId layerId) const;
00044 
00045 protected:
00046 
00047 private:
00048   std::pair<DTOccupancyPoint, DTOccupancyPoint> getInitialPair();
00049 
00050   void computePointToPointDistances();
00051 
00052   void computeDistancesToCluster(const DTOccupancyCluster& cluster);
00053 
00054   bool buildNewCluster();
00055 
00056   void sortClusters();
00057   
00058   std::set<DTOccupancyPoint> thePoints;
00059   std::map<double, std::pair<DTOccupancyPoint, DTOccupancyPoint> > theDistances;
00060   std::map<double, DTOccupancyPoint> theDistancesFromTheCluster;
00061   std::vector<DTOccupancyCluster> theClusters;
00062   std::set<DTLayerId> theProblematicLayers;
00063 
00064   double maxMean;
00065   double maxRMS;
00066 
00067 };
00068 
00069 #endif
00070