49 LogTrace(
"DTDQM|DTMonitorClient|DTOccupancyTest|DTOccupancyClusterBuilder")
50 <<
" # of valid clusters: " <<
theClusters.size() << endl;
57 int colorMap[12] = {632, 600, 800, 400, 820, 416, 432, 880, 616, 860, 900, 920};
59 TCanvas*
canvas =
new TCanvas(canvasName.c_str(), canvasName.c_str());
61 for (vector<DTOccupancyCluster>::const_iterator cluster =
theClusters.begin(); cluster !=
theClusters.end();
77 histo->Draw(
"box,same");
87 for (set<DTOccupancyPoint>::const_iterator pt_i =
thePoints.begin(); pt_i !=
thePoints.end(); ++pt_i) {
88 for (set<DTOccupancyPoint>::const_iterator pt_j =
thePoints.begin(); pt_j !=
thePoints.end(); ++pt_j) {
90 theDistances[pt_i->distance(*pt_j)] = make_pair(*pt_i, *pt_j);
104 LogTrace(
"DTDQM|DTMonitorClient|DTOccupancyTest|DTOccupancyClusterBuilder")
105 <<
"--------- New Cluster Candidate ----------------------" << endl;
106 pair<DTOccupancyPoint, DTOccupancyPoint> initialPair =
getInitialPair();
107 LogTrace(
"DTDQM|DTMonitorClient|DTOccupancyTest|DTOccupancyClusterBuilder")
108 <<
" Initial Pair: " << endl
109 <<
" point1: mean " << initialPair.first.mean() <<
" rms " << initialPair.first.rms() << endl
110 <<
" point2: mean " << initialPair.second.mean() <<
" rms " << initialPair.second.rms() << endl;
112 if (clusterCandidate.
isValid()) {
128 LogTrace(
"DTDQM|DTMonitorClient|DTOccupancyTest|DTOccupancyClusterBuilder")
129 <<
" # of layers: " << clusterCandidate.
nPoints() <<
" avrg. mean: " << clusterCandidate.
averageMean()
130 <<
" avrg. rms: " << clusterCandidate.
averageRMS() << endl;
142 LogTrace(
"DTDQM|DTMonitorClient|DTOccupancyTest|DTOccupancyClusterBuilder") <<
" sorting" << endl;
145 for (vector<DTOccupancyCluster>::const_iterator cluster = ++(
theClusters.begin()); cluster !=
theClusters.end();
147 set<DTLayerId> clusterLayers = (*cluster).getLayerIDs();
148 LogTrace(
"DTDQM|DTMonitorClient|DTOccupancyTest|DTOccupancyClusterBuilder")
149 <<
" # layers in the cluster: " << clusterLayers.size() << endl;
152 LogTrace(
"DTDQM|DTMonitorClient|DTOccupancyTest|DTOccupancyClusterBuilder")
std::set< DTLayerId > theProblematicLayers
std::map< double, std::pair< DTOccupancyPoint, DTOccupancyPoint > > theDistances
std::map< double, DTOccupancyPoint > theDistancesFromTheCluster
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 getBestCluster() const
get the cluster correspondig to "normal" cell occupancy.
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
bool isValid() const
Check if the cluster candidate satisfies the quality requirements.
int nPoints() const
of layers belonging to the cluster
std::set< DTOccupancyPoint > thePoints
bool addPoint(const DTOccupancyPoint &anotherPoint)
void drawClusters(std::string canvasName)
draw a TH2F histograms showing the clusters
bool isProblematic(DTLayerId layerId) const
virtual ~DTOccupancyClusterBuilder()
Destructor.
void computeDistancesToCluster(const DTOccupancyCluster &cluster)
void addPoint(const DTOccupancyPoint &point)
Add an occupancy point for a given layer.
void buildClusters()
build the clusters
DTOccupancyClusterBuilder()
Constructor.
void computePointToPointDistances()
std::pair< DTOccupancyPoint, DTOccupancyPoint > getInitialPair()
std::vector< DTOccupancyCluster > theClusters
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
bool clusterIsLessThan(const DTOccupancyCluster &clusterOne, const DTOccupancyCluster &clusterTwo)
for DTOccupancyCluster sorting
*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