25#include "FairRootManager.h"
26#include "TClonesArray.h"
39 , clustersInMethod_2(0)
93 for (Int_t iPad = 0; iPad <
fNofPads; iPad++) {
103 for (Int_t iPad = 0; iPad <
fNofPads; iPad++) {
142 Int_t clusterNumber = 0;
143 for (Int_t iPad = 0; iPad <
fNofPads; iPad++)
216 Int_t tempPad = addedPad;
224 if (wardStepRec ==
false) {
230 std::cout <<
"Error with tempPad in WardBlockCreateStep\n";
233 Int_t lastPadInRecursion = tempPad;
243 if (wardStepRec == 0) {
258 if (lastPadInRecursion != 0) {
263 std::cout <<
"Add cluster " << lastPadInRecursion <<
" in cluster " << wardStep <<
"\n";
274 Float_t listLimit = 0.9;
276 Bool_t workListFinished =
false;
280 Int_t nomActivePad = 0;
285 Bool_t wardStepRec =
true;
291 nomActivePad = lastActivePad;
293 }
while ((nomActivePad == 0) && (lastActivePad <
fNofPads));
295 if ((nomActivePad != 0) && (lastActivePad <
fNofPads)) {
305 workListFinished =
true;
309 }
while ((!workListFinished) );
352 for (Int_t i = 0; i <
fNofPads + 1; i++) {
363 Bool_t clusterWasDeleted =
false;
366 clusterWasDeleted =
false;
371 if (clusterWasDeleted ==
true) {
390 clusterWasDeleted =
true;
471 Float_t minimalDistance = maxDistance;
472 Int_t cluster1 = 0, cluster2 = 0;
474 minimalDistance = maxDistance + 0.0001;
499 if (cluster1 == -1)
break;
501 if (minimalDistance >= maxDistance)
break;
503 if (cluster1 > cluster2) {
539 for (Int_t iPad = 0; iPad <
fNofPads; iPad++)
553 Bool_t thereIsNewCluaster =
false;
559 thereIsNewCluaster =
true;
563 if (thereIsNewCluaster ==
false) {
576 }
while (minimalDistance < maxDistance);
655 std::cout <<
"---Ward block created\n";
658 std::cout <<
"---Ward data processed\n";
660 std::cout <<
"---Ward clustering finished\n";
684 if (
fClusters[iCluster].padsInCluster[iPad] > 10000)
return 0;
685 if (
fClusters[iCluster].padsInCluster[iPad] < 0)
return 0;
Class for pixel hits in MUCH detector.
Data class for a reconstructed hit in the STS.
Int_t GetAPadsNom() const
UInt_t GetPadCharge(Int_t iPad)
Int_t GetGoodNeighborsNum(Int_t iPad)
Int_t GetDigiNum(Int_t iPad)
Float_t GetX0(Int_t iPad)
Int_t GetNeighbor(Int_t iPad, Int_t iNeighbor)
Float_t GetY0(Int_t iPad)
void WardMainFunction(CbmClusteringGeometry *moduleGeo, Float_t maxDistance)
Float_t GetX0(Int_t iCluster)
void WardCreate(CbmClusteringGeometry *moduleGeo)
CbmClusteringWard()
Constructor.
Float_t XCenterRecalculation(Int_t cl1, Int_t cl2)
void AddClusterInBlock(CbmClusteringGeometry *moduleGeo, Int_t newCluster, Int_t addedCluster)
Int_t GetCluster(Int_t iCluster)
void WardBlockCreate(CbmClusteringGeometry *moduleGeo)
UInt_t GetClCharge(Int_t iCluster)
Bool_t WardBlockCreateStep(CbmClusteringGeometry *moduleGeo, Int_t wardStep, Bool_t wardStepRec, Int_t addedPad)
void WardDistanceRecalculation(Int_t clusterNumber)
void GetClustersFromBlock()
ClusterBlock * fClustersInBlock
Int_t GetPadInCluster(Int_t iCluster, Int_t iPad)
Float_t GetY0(Int_t iCluster)
Float_t YCenterRecalculation(Int_t cl1, Int_t cl2)
void DeleteCluaster(Int_t clusterNumber)
void WardProcessingData(Float_t maxDistance)
Float_t WardDistance(Int_t iPad1, Int_t iPad2)
virtual ~CbmClusteringWard()
Destructor.
Float_t wardDistances[50]