source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/reconstruction/modules/base/clustering/include/GTUClusteringModule.hh @ 117

Last change on this file since 117 was 117, checked in by moretto, 11 years ago

ESAF version compilable on mac OS

File size: 2.9 KB
Line 
1// ESAF : Euso Simulation and Analysis Framework
2// $Id: GTUClusteringModule.hh 1112 2004-09-28 12:10:53Z thea $
3// R. Pesce created Mar, 11 2004
4
5#ifndef __GTUCLUSTERINGMODULE_HH_
6#define __GTUCLUSTERINGMODULE_HH_
7
8#include "euso.hh"
9#include "RecoModule.hh"
10
11class RecoEvent;
12class EusoCluster;
13class RecoRootEvent;
14
15class GTUClusteringModule : public RecoModule {
16public:
17    // ctor
18    GTUClusteringModule();
19
20    // dtor
21    virtual ~GTUClusteringModule();
22
23    // Init method: called at the beginning of a run
24    virtual Bool_t Init();
25
26    // called before each event process
27    virtual Bool_t PreProcess();
28
29    // event processing
30    virtual Bool_t Process( RecoEvent* );
31
32    // called after processing an event
33    virtual Bool_t PostProcess();
34
35    // save root output
36    virtual Bool_t SaveRootData( RecoRootEvent* );
37 
38    // called at the end of each run
39    virtual Bool_t Done();
40
41    // memory clean
42    virtual void UserMemoryClean();
43
44    EsafConfigClass(Reco, GTUClusteringModule)
45
46private:
47    RecoEvent *fEv;
48    RecoRootEvent *fRecoRootEvent;
49
50    vector<EusoCluster*> fSpClusters;
51    Double_t fThetaMin;
52    Double_t fThetaMax;
53    Double_t fPhiMin;
54    Double_t fPhiMax;
55    Int_t fGtuMin;
56    Int_t fGtuMax;
57
58    Int_t fNumPoints;
59    vector<Int_t> fPixels;
60    Int_t fNumHitsMinimum;
61
62    vector< vector<Int_t> > fTmClusters;
63    vector<Int_t> fCluPixels;
64
65    // variables for clustering
66    Bool_t fUseNatural;         // use natural values
67    Int_t fNumClusters;         // total number of clusters
68    Int_t fNumSigClusters;      // number of significant clusters
69    Int_t fNumClustersUniform;  // number of clusters expected in an uniform distribution
70    Int_t fNumPointsMinimum;    // minimum number of points in a significant cluster
71    Int_t fSignificanceLevel;   // level of significance (from config file)
72    Double_t fDensity;          // density of points
73    Double_t fThreshold;        // threshold distance
74    Int_t fNumNodes;            // number of nodes
75    Int_t fNumPointsCluster;    // number of points in cluster
76    Int_t fCounter;             // point to be processed
77    Int_t fBookmark;            // first point of a new cluster
78    vector<Int_t> fId;          // identifier of point
79    vector<Bool_t> fFlag1;      // flag that indicates if a point is already in a cluster
80    vector<Bool_t> fFlag2;      // flag that indicates if a point is already considered in the
81                                // current search
82   
83    // methods for clustering
84    void Prepare();
85    void CalculateDensity();
86    Int_t GTUDistance(Int_t n1, Int_t n2);
87    void CalculateThreshold();
88    void CalculateNumClustersUniform();
89    void CalculateNumPointsMinimum();
90
91    void NewCluster();
92    void SearchClusters();
93    void WriteCluster();
94    void FillCluster();
95
96    void Histo();
97    ClassDef(GTUClusteringModule,0)
98};
99
100#endif  /* __GTUCLUSTERINGMODULE_HH_ */
101
Note: See TracBrowser for help on using the repository browser.