CMS 3D CMS Logo

DTOccupancyCluster.h
Go to the documentation of this file.
1 #ifndef DTOccupancyCluster_H
2 #define DTOccupancyCluster_H
3 
11 #include "DTOccupancyPoint.h"
12 
13 #include <vector>
14 #include <string>
15 #include <cmath>
16 #include <set>
17 
18 class TH2F;
19 
21 public:
23  // Contruct the cluster from a couple of point
24  DTOccupancyCluster(const DTOccupancyPoint& firstPoint, const DTOccupancyPoint& secondPoint);
25 
27  // Contruct the cluster from a single point: you can not add points to such a cluster
28  DTOccupancyCluster(const DTOccupancyPoint& singlePoint);
29 
31  virtual ~DTOccupancyCluster();
32 
33  // Operations
34 
36  bool isValid() const;
37 
40  bool addPoint(const DTOccupancyPoint& anotherPoint);
41 
44  double distance(const DTOccupancyPoint& point) const;
45 
47  double averageMean() const;
48 
50  double averageRMS() const;
51 
53  double maxMean() const;
54 
56  double maxRMS() const;
57 
60  int nBinsX,
61  double minX,
62  double maxX,
63  int nBinsY,
64  double minY,
65  double maxY,
66  int fillColor) const;
67 
69  int nPoints() const;
70 
71  std::set<DTLayerId> getLayerIDs() const;
72 
73 protected:
74 private:
75  bool qualityCriterion(const DTOccupancyPoint& firstPoint, const DTOccupancyPoint& secondPoint);
76 
77  bool qualityCriterion(const DTOccupancyPoint& anotherPoint);
78 
79  void computeRadius();
80 
82  double radius;
83  std::vector<DTOccupancyPoint> thePoints;
84 
85  double theMaxMean;
86  double theMaxRMS;
87  double theMeanSum;
88  double theRMSSum;
89 };
90 
92 bool clusterIsLessThan(const DTOccupancyCluster& clusterOne, const DTOccupancyCluster& clusterTwo);
93 
94 #endif
std::set< DTLayerId > getLayerIDs() const
double averageRMS() const
average RMS of the cell occpuancy distributions of the layers in the cluster
double averageMean() const
average cell occupancy of the layers in the cluster
DTOccupancyCluster(const DTOccupancyPoint &firstPoint, const DTOccupancyPoint &secondPoint)
Constructor.
bool isValid() const
Check if the cluster candidate satisfies the quality requirements.
bool clusterIsLessThan(const DTOccupancyCluster &clusterOne, const DTOccupancyCluster &clusterTwo)
for DTOccupancyCluster sorting
int nPoints() const
of layers belonging to the cluster
std::vector< DTOccupancyPoint > thePoints
bool addPoint(const DTOccupancyPoint &anotherPoint)
TH2F * getHisto(std::string histoName, int nBinsX, double minX, double maxX, int nBinsY, double minY, double maxY, int fillColor) const
get a TH2F displaying the cluster
virtual ~DTOccupancyCluster()
Destructor.
double distance(const DTOccupancyPoint &point) const
double maxMean() const
max average cell occupancy of the layers in the cluster
double maxRMS() const
max RMS of the cell occpuancy distributions of the layers in the cluster
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
bool qualityCriterion(const DTOccupancyPoint &firstPoint, const DTOccupancyPoint &secondPoint)