test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 <math.h>
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 
59  TH2F * getHisto(std::string histoName, int nBinsX, double minX, double maxX,
60  int nBinsY, double minY, double maxY, int fillColor) const;
61 
63  int nPoints() const;
64 
65  std::set<DTLayerId> getLayerIDs() const;
66 
67 protected:
68 
69 private:
70 
71  bool qualityCriterion(const DTOccupancyPoint& firstPoint, const DTOccupancyPoint& secondPoint);
72 
73  bool qualityCriterion(const DTOccupancyPoint& anotherPoint);
74 
75  void computeRadius();
76 
78  double radius;
79  std::vector<DTOccupancyPoint> thePoints;
80 
81  double theMaxMean;
82  double theMaxRMS;
83  double theMeanSum;
84  double theRMSSum;
85 
86 };
87 
89 bool clusterIsLessThan(const DTOccupancyCluster& clusterOne, const DTOccupancyCluster& clusterTwo);
90 
91 #endif
92 
bool isValid() const
Check if the cluster candidate satisfies the quality requirements.
DTOccupancyCluster(const DTOccupancyPoint &firstPoint, const DTOccupancyPoint &secondPoint)
Constructor.
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
double maxMean() const
max average cell occupancy of the layers in the cluster
double averageRMS() const
average RMS of the cell occpuancy distributions of the layers in the cluster
double maxRMS() const
max RMS of the cell occpuancy distributions of the layers in the cluster
std::vector< DTOccupancyPoint > thePoints
bool addPoint(const DTOccupancyPoint &anotherPoint)
double averageMean() const
average cell occupancy of the layers in the cluster
int nPoints() const
of layers belonging to the cluster
virtual ~DTOccupancyCluster()
Destructor.
std::set< DTLayerId > getLayerIDs() const
bool clusterIsLessThan(const DTOccupancyCluster &clusterOne, const DTOccupancyCluster &clusterTwo)
for DTOccupancyCluster sorting
double distance(const DTOccupancyPoint &point) const
*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)