CbmRoot
CbmClusteringWard.h
Go to the documentation of this file.
1 /*
2  * CbmClusteringWard.h
3  *
4  * Created on: Apr 10, 2012
5  * Author: kozlov
6  */
7 
8 #ifndef CBMCLUSTERINGWARD_H_
9 #define CBMCLUSTERINGWARD_H_
10 
11 #include "CbmClusteringGeometry.h"
12 #include "FairTask.h"
13 
14 //class CbmMuchGeoScheme;
15 //class CbmMuchCluster;
16 //class CbmMuchPad;
17 //class TClonesArray;
18 
19 class CbmClusteringWard //: public FairTask
20 {
21 public:
26 
27  CbmClusteringWard(CbmClusteringGeometry* moduleGeo, Int_t blockSize);
31  virtual ~CbmClusteringWard();
32 
33  Float_t WardDistance(Int_t iPad1, Int_t iPad2);
34  void WardCreate(CbmClusteringGeometry* moduleGeo);
36  Int_t newCluster,
37  Int_t addedCluster);
39  Int_t wardStep,
40  Bool_t wardStepRec,
41  Int_t addedPad);
42  void WardBlockCreate(CbmClusteringGeometry* moduleGeo);
43  void DeleteCluaster(Int_t clusterNumber);
44  void WardDistanceRecalculation(Int_t clusterNumber);
45  Float_t XCenterRecalculation(Int_t cl1, Int_t cl2);
46  Float_t YCenterRecalculation(Int_t cl1, Int_t cl2);
47  void WardProcessingData(Float_t maxDistance);
48  void GetClustersFromBlock();
49  void WardMainFunction(CbmClusteringGeometry* moduleGeo, Float_t maxDistance);
50 
51  Int_t GetNofClusters() const { return fNofClusters; }
52  Int_t GetNofAPads() const { return fNofActivePads; }
53  Int_t GetNofPads() const { return fNofPads; }
54 
55  //void MainClusteringA1(CbmMuchGeoCl* moduleGeo, Int_t algVersion);
56 
57  /*Int_t GetNofClusters() const { return fNofClusters;}
58  Int_t GetNofPads() const { return fNofPads;}
59  Int_t GetNofActivePads() const { return fNofActivePads;}*/
60 
61  Int_t GetCluster(Int_t iCluster);
62  Float_t GetX0(Int_t iCluster);
63  Float_t GetY0(Int_t iCluster);
64  UInt_t GetClCharge(Int_t iCluster);
65  Int_t GetNofPads(Int_t iCluster);
66  Int_t GetPadInCluster(Int_t iCluster, Int_t iPad);
67 
68 private:
69  Int_t BLOCK_SIZE;
71 
72  Int_t fNofPads;
74 
75  Bool_t* fS; //g_MAX_PADS
76  Int_t* fNumbersOfPads; //g_MAX_PADS
77 
79 
80  Int_t fNofClusters;
81 
82  struct ClusterBlock {
83  //Nomera sisedei klastera
84  Int_t neighbors[50]; //numbersOfNeighbors
85  //Koli4estvo sosedei klastera
86  Int_t nofNeighbors; //maxNumberOfNeighbors
87  //Nomer klastera
88  Int_t nofCluster; //numberOfCluster
89  //Obozna4enie klastera v massive nomerov klasterov
91  //Amplituda klastera
92  Float_t clCharge; //A
93  //Koordinati tsentra klastera
94  Float_t xc, yc;
95  //Rassto9ni9 mejdu klasterami
96  Float_t wardDistances[50]; //W
97  Bool_t S[50];
98  //Nomera 94eek v klastere
99  //---!!!---
100  //int numbersOfPadsInCluster[g_ward_MAX_NEIGHBORS];
101  //Koli4estvo 94eek v klastere
102  Int_t nofPads; //padsInCluster
103  Int_t padsInCluster[30];
104  };
106 
107  //Massiv sootvetstvi9 94eek i klasterov
108  Int_t* padsInClusters; //g_MAX_PADS
111  //Massiv neobrabotannih 94eek
112  Bool_t* wardActivePads; //g_MAX_PADS
113  //Pervii element bloka obrabativaemih dannih
115  //Koli4estvo ob'ektov v spiske obrabitki
116  Int_t listValue;
117 
118  struct Cluster {
119  Int_t nofCluster;
120  Float_t xc;
121  Float_t yc;
122  UInt_t sumClCharge;
123  Int_t nofPads;
124  Int_t padsInCluster[30];
125  };
127 
130 };
131 
132 #endif /* CBMCLUSTERINGWARD_H_ */
CbmClusteringWard::firstBlockElement
Int_t firstBlockElement
Definition: CbmClusteringWard.h:114
CbmClusteringWard::ClusterBlock::linkToDesignation
Int_t linkToDesignation
Definition: CbmClusteringWard.h:90
CbmClusteringWard::WardProcessingData
void WardProcessingData(Float_t maxDistance)
Definition: CbmClusteringWard.cxx:509
CbmClusteringWard::ClusterBlock::nofPads
Int_t nofPads
Definition: CbmClusteringWard.h:102
CbmClusteringWard::WardDistance
Float_t WardDistance(Int_t iPad1, Int_t iPad2)
Definition: CbmClusteringWard.cxx:125
CbmClusteringWard::ClusterBlock
Definition: CbmClusteringWard.h:82
CbmClusteringGeometry.h
CbmClusteringWard::Cluster::padsInCluster
Int_t padsInCluster[30]
Definition: CbmClusteringWard.h:124
CbmClusteringWard::ClusterBlock::nofNeighbors
Int_t nofNeighbors
Definition: CbmClusteringWard.h:86
CbmClusteringWard::fNofPads
Int_t fNofPads
Definition: CbmClusteringWard.h:72
CbmClusteringWard::fNofActivePads
Int_t fNofActivePads
Definition: CbmClusteringWard.h:73
CbmClusteringWard::XCenterRecalculation
Float_t XCenterRecalculation(Int_t cl1, Int_t cl2)
Definition: CbmClusteringWard.cxx:497
CbmClusteringWard::ClusterBlock::nofCluster
Int_t nofCluster
Definition: CbmClusteringWard.h:88
CbmClusteringWard::GetClCharge
UInt_t GetClCharge(Int_t iCluster)
Definition: CbmClusteringWard.cxx:748
CbmClusteringWard::WardCreate
void WardCreate(CbmClusteringGeometry *moduleGeo)
Definition: CbmClusteringWard.cxx:135
CbmClusteringWard::Cluster::yc
Float_t yc
Definition: CbmClusteringWard.h:121
CbmClusteringWard::operator=
CbmClusteringWard & operator=(const CbmClusteringWard &)
CbmClusteringWard::padsInClusters
Int_t * padsInClusters
Definition: CbmClusteringWard.h:108
CbmClusteringWard::clustersInMethod_2
Int_t clustersInMethod_2
Definition: CbmClusteringWard.h:110
CbmClusteringWard::Cluster::nofCluster
Int_t nofCluster
Definition: CbmClusteringWard.h:119
CbmClusteringWard::Cluster::nofPads
Int_t nofPads
Definition: CbmClusteringWard.h:123
CbmClusteringWard::CbmClusteringWard
CbmClusteringWard()
Constructor.
Definition: CbmClusteringWard.cxx:31
CbmClusteringWard::fS
Bool_t * fS
Definition: CbmClusteringWard.h:75
CbmClusteringWard::DeleteCluaster
void DeleteCluaster(Int_t clusterNumber)
Definition: CbmClusteringWard.cxx:374
CbmClusteringWard::Cluster::xc
Float_t xc
Definition: CbmClusteringWard.h:120
CbmClusteringWard::WardBlockCreateStep
Bool_t WardBlockCreateStep(CbmClusteringGeometry *moduleGeo, Int_t wardStep, Bool_t wardStepRec, Int_t addedPad)
Definition: CbmClusteringWard.cxx:214
CbmClusteringWard::YCenterRecalculation
Float_t YCenterRecalculation(Int_t cl1, Int_t cl2)
Definition: CbmClusteringWard.cxx:503
CbmClusteringWard::AddClusterInBlock
void AddClusterInBlock(CbmClusteringGeometry *moduleGeo, Int_t newCluster, Int_t addedCluster)
Definition: CbmClusteringWard.cxx:191
CbmClusteringWard::wardActivePads
Bool_t * wardActivePads
Definition: CbmClusteringWard.h:112
CbmClusteringWard::listValue
Int_t listValue
Definition: CbmClusteringWard.h:116
CbmClusteringWard::fModuleGeo
CbmClusteringGeometry * fModuleGeo
Definition: CbmClusteringWard.h:78
CbmClusteringWard::CbmClusteringWard
CbmClusteringWard(const CbmClusteringWard &)
CbmClusteringWard::WardDistanceRecalculation
void WardDistanceRecalculation(Int_t clusterNumber)
Definition: CbmClusteringWard.cxx:449
CbmClusteringWard::WardMainFunction
void WardMainFunction(CbmClusteringGeometry *moduleGeo, Float_t maxDistance)
Definition: CbmClusteringWard.cxx:717
CbmClusteringWard::WardBlockCreate
void WardBlockCreate(CbmClusteringGeometry *moduleGeo)
Definition: CbmClusteringWard.cxx:280
CbmClusteringWard::GetNofClusters
Int_t GetNofClusters() const
Definition: CbmClusteringWard.h:51
CbmClusteringWard::GetPadInCluster
Int_t GetPadInCluster(Int_t iCluster, Int_t iPad)
Definition: CbmClusteringWard.cxx:754
CbmClusteringWard::GetNofPads
Int_t GetNofPads() const
Definition: CbmClusteringWard.h:53
CbmClusteringWard
Definition: CbmClusteringWard.h:20
CbmClusteringWard::clustersInMethod
Int_t clustersInMethod
Definition: CbmClusteringWard.h:109
CbmClusteringWard::ClusterBlock::yc
Float_t yc
Definition: CbmClusteringWard.h:94
CbmClusteringWard::GetClustersFromBlock
void GetClustersFromBlock()
Definition: CbmClusteringWard.cxx:686
CbmClusteringWard::MAX_NEIGHBORS
Int_t MAX_NEIGHBORS
Definition: CbmClusteringWard.h:70
CbmClusteringWard::GetX0
Float_t GetX0(Int_t iCluster)
Definition: CbmClusteringWard.cxx:742
CbmClusteringWard::BLOCK_SIZE
Int_t BLOCK_SIZE
Definition: CbmClusteringWard.h:69
CbmClusteringWard::ClusterBlock::wardDistances
Float_t wardDistances[50]
Definition: CbmClusteringWard.h:96
CbmClusteringWard::ClusterBlock::padsInCluster
Int_t padsInCluster[30]
Definition: CbmClusteringWard.h:103
CbmClusteringWard::fNumbersOfPads
Int_t * fNumbersOfPads
Definition: CbmClusteringWard.h:76
CbmClusteringWard::~CbmClusteringWard
virtual ~CbmClusteringWard()
Destructor.
Definition: CbmClusteringWard.cxx:118
CbmClusteringGeometry
Definition: CbmClusteringGeometry.h:17
CbmClusteringWard::ClusterBlock::neighbors
Int_t neighbors[50]
Definition: CbmClusteringWard.h:84
CbmClusteringWard::GetCluster
Int_t GetCluster(Int_t iCluster)
Definition: CbmClusteringWard.cxx:739
CbmClusteringWard::fClustersInBlock
ClusterBlock * fClustersInBlock
Definition: CbmClusteringWard.h:105
CbmClusteringWard::fClusters
Cluster * fClusters
Definition: CbmClusteringWard.h:126
CbmClusteringWard::ClusterBlock::xc
Float_t xc
Definition: CbmClusteringWard.h:94
CbmClusteringWard::fNofClusters
Int_t fNofClusters
Definition: CbmClusteringWard.h:80
CbmClusteringWard::ClusterBlock::clCharge
Float_t clCharge
Definition: CbmClusteringWard.h:92
CbmClusteringWard::GetNofAPads
Int_t GetNofAPads() const
Definition: CbmClusteringWard.h:52
CbmClusteringWard::GetY0
Float_t GetY0(Int_t iCluster)
Definition: CbmClusteringWard.cxx:745
CbmClusteringWard::ClusterBlock::S
Bool_t S[50]
Definition: CbmClusteringWard.h:97
CbmClusteringWard::Cluster::sumClCharge
UInt_t sumClCharge
Definition: CbmClusteringWard.h:122
CbmClusteringWard::Cluster
Definition: CbmClusteringWard.h:118