CbmRoot
CbmMuchClustering.h
Go to the documentation of this file.
1 /*
2  * CbmMuchClustering.h
3  *
4  * Created on: Mar 5, 2012
5  * Author: kozlov
6  */
7 
8 #ifndef CBMMUCHCLUSTERING_H_
9 #define CBMMUCHCLUSTERING_H_
10 
11 #include "CbmClusteringA1.h"
12 #include "CbmClusteringGeometry.h"
13 #include "CbmClusteringSL.h"
14 #include "CbmClusteringWard.h"
15 #include "CbmMuchGeoScheme.h"
16 #include "CbmMuchModuleGem.h"
17 #include "FairTask.h"
18 
19 
20 #include "TH1F.h"
21 
22 #include <map>
23 #include <vector>
24 
25 class TClonesArray;
26 class CbmDigiManager;
27 
28 class CbmMuchClustering : public FairTask {
29 public:
30  CbmMuchClustering(const char* digiFileName);
31  virtual ~CbmMuchClustering();
32  virtual InitStatus Init();
33  virtual void Exec(Option_t* opt);
34  virtual void Finish();
35 
36  void SetAlgorithmVersion(Int_t AlgorithmVersion) {
37  fAlgorithmVersion = AlgorithmVersion;
38  }
39 
41  void SetDigiCharges();
42  void ClearDigiCharges();
44 
45 private:
46  void ReadDataBranches();
47 
48  /* Clustering algorithms
49  * 1 - Developed algorithm, using all neighbors;
50  * 2 - Developed algorithm, do not using diagonal neighbors;
51  * 3 - Simple Single Linkage method, using all neighbors;
52  * 4 - Simple Single Linkage method, do not using diagonal neighbors;
53  * 5 - Ward's method (!) not tested
54  */
56  Int_t fNofModules; // Number of modules in detector
57  Int_t fNofClusters; // Number of clusters for event
58 
59  CbmMuchGeoScheme* fScheme; // MuCh geometry scheme
60  TString fDigiFile; // Digitization file
61 
62  std::vector<CbmClusteringGeometry*> fModulesGeometryArray;
63  std::map<Int_t, Int_t> fModulesByDetId;
64 
65  CbmDigiManager* fDigiMan = nullptr;
66  TClonesArray* fCluster; // Output array of CbmMuchCluster
67  TClonesArray* fHit; // Output array of CbmMuchHit
68  Int_t fNofEvents; // Event counter
69 
70  void ClusteringA1(CbmClusteringGeometry* m1, CbmMuchModuleGem* m2, Int_t Ver);
71  void ClusteringSL(CbmClusteringGeometry* m1, CbmMuchModuleGem* m2, Int_t Ver);
73  CbmMuchModuleGem* m2 /*, Int_t Ver*/);
74 
77 
79 };
80 
81 #endif
CbmClusteringWard.h
CbmMuchGeoScheme
Definition: CbmMuchGeoScheme.h:43
CbmMuchClustering::fNofModules
Int_t fNofModules
Definition: CbmMuchClustering.h:56
CbmClusteringGeometry.h
CbmMuchClustering::ClusteringWard
void ClusteringWard(CbmClusteringGeometry *m1, CbmMuchModuleGem *m2)
Definition: CbmMuchClustering.cxx:371
CbmClusteringA1.h
CbmMuchClustering::fModulesByDetId
std::map< Int_t, Int_t > fModulesByDetId
Definition: CbmMuchClustering.h:63
CbmMuchClustering::SetDigiCharges
void SetDigiCharges()
Definition: CbmMuchClustering.cxx:179
CbmMuchClustering::SetAlgorithmVersion
void SetAlgorithmVersion(Int_t AlgorithmVersion)
Definition: CbmMuchClustering.h:36
CbmMuchClustering::ClusteringMainFunction
void ClusteringMainFunction()
Definition: CbmMuchClustering.cxx:208
CbmClusteringSL.h
CbmMuchClustering::fDigiFile
TString fDigiFile
Definition: CbmMuchClustering.h:60
CbmMuchClustering::fModulesGeometryArray
std::vector< CbmClusteringGeometry * > fModulesGeometryArray
Definition: CbmMuchClustering.h:62
CbmMuchClustering::Init
virtual InitStatus Init()
Definition: CbmMuchClustering.cxx:73
CbmMuchClustering::fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmMuchClustering.h:65
CbmMuchClustering::ClusteringA1
void ClusteringA1(CbmClusteringGeometry *m1, CbmMuchModuleGem *m2, Int_t Ver)
Definition: CbmMuchClustering.cxx:243
CbmMuchClustering::fNofEvents
Int_t fNofEvents
Definition: CbmMuchClustering.h:68
CbmMuchClustering::Exec
virtual void Exec(Option_t *opt)
Definition: CbmMuchClustering.cxx:92
CbmMuchClustering::ClassDef
ClassDef(CbmMuchClustering, 1)
CbmMuchModuleGem
Definition: CbmMuchModuleGem.h:24
CbmMuchClustering::fAlgorithmVersion
Int_t fAlgorithmVersion
Definition: CbmMuchClustering.h:55
CbmMuchClustering::fHit
TClonesArray * fHit
Definition: CbmMuchClustering.h:67
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmMuchClustering::~CbmMuchClustering
virtual ~CbmMuchClustering()
Definition: CbmMuchClustering.cxx:62
CbmMuchClustering::ClearDigiCharges
void ClearDigiCharges()
Definition: CbmMuchClustering.cxx:194
CbmMuchClustering::fNofClusters
Int_t fNofClusters
Definition: CbmMuchClustering.h:57
CbmMuchClustering::CreateModulesGeometryArray
void CreateModulesGeometryArray()
Definition: CbmMuchClustering.cxx:140
CbmMuchClustering::CbmMuchClustering
CbmMuchClustering(const CbmMuchClustering &)
CbmMuchClustering::fScheme
CbmMuchGeoScheme * fScheme
Definition: CbmMuchClustering.h:59
CbmMuchClustering::operator=
CbmMuchClustering & operator=(const CbmMuchClustering &)
CbmMuchClustering::ReadDataBranches
void ReadDataBranches()
Definition: CbmMuchClustering.cxx:123
CbmClusteringGeometry
Definition: CbmClusteringGeometry.h:17
CbmMuchClustering::CbmMuchClustering
CbmMuchClustering(const char *digiFileName)
Definition: CbmMuchClustering.cxx:49
CbmMuchGeoScheme.h
CbmMuchClustering::fCluster
TClonesArray * fCluster
Interface to digi data.
Definition: CbmMuchClustering.h:66
CbmMuchClustering::Finish
virtual void Finish()
Definition: CbmMuchClustering.cxx:119
CbmMuchModuleGem.h
CbmMuchClustering::ClusteringSL
void ClusteringSL(CbmClusteringGeometry *m1, CbmMuchModuleGem *m2, Int_t Ver)
Definition: CbmMuchClustering.cxx:307
CbmMuchClustering
Definition: CbmMuchClustering.h:28