// ESAF : Euso Simulation and Analysis Framework // $Id: BaseClusteringModule.hh,v 1.16 2004/09/28 12:10:10 thea Exp $ // R.Pesce created Jan, 19 2004 #ifndef __BASECLUSTERINGMODULE_HH_ #define __BASECLUSTERINGMODULE_HH_ #include #include "euso.hh" #include "RecoModule.hh" class EusoCluster; class RecoRootEvent; class BaseClusteringModule : public RecoModule { public: // ctor BaseClusteringModule(); // dtor virtual ~BaseClusteringModule(); // Init method: called at the beginning of a run virtual Bool_t Init(); // called before each event process virtual Bool_t PreProcess(); // event processing virtual Bool_t Process( RecoEvent* ); // called after processing an event virtual Bool_t PostProcess(); // called at the end of each run virtual Bool_t Done(); // save root output virtual Bool_t SaveRootData( RecoRootEvent* ); // memory clean virtual void UserMemoryClean(); // get a specified cluster EusoCluster* GetCluster( Int_t num ); EsafConfigClass(Reco,BaseClusteringModule) private: RecoEvent *fEv; RecoRootEvent *fRecoRootEvent; Float_t fAlpha; // correcting factor Int_t fMainMacroCellId; // id of the most populous macrocell Double_t fDensity; // density of points in the main macrocell Double_t fThreshold; // threshold on the distance between two points of a cluster Int_t fTotalNumPoints; // total number of points Int_t fNumClusters; // total number of clusters Int_t fNumSigClusters; // number of significant clusters Int_t fNumClustersUniform; // number of clusters expected in an uniform distribution Int_t fNumPointsMinimum; // minimum number of points in a significant cluster Int_t fSignificanceLevel; // level of significance (from config file) Int_t fNumHitsMinimum; // minimum number of points in a significant pixel (from config file) vector fHitted; // references to pixels with minimum number of hits Int_t fNumPoints; // number of pixels with minimum number of hits // variables for clustering Int_t fNumNodes; // number of nodes Int_t fNumPointsCluster; // number of points in cluster Int_t fCounter; // point to be processed Int_t fBookmark; // first point of a new cluster vector fId; // identifier of point vector fFlag1; // flag that indicates if a point is already in a cluster vector fFlag2; // flag that indicates if a point is already considered in the // current search // methods for clustering void CalculateDensity(); void DensityMainMC(); void DensityEvent(); void CalculateNaturalThreshold(); Double_t CalculateDistance(Int_t n1, Int_t n2); void CalculateNumClustersUniform(); void CalculateNumPointsMinimum(); void NewCluster(); void SearchClusters(); void WriteCluster(); void FillCluster(); void FitCluster( EusoCluster *clu ); void HistoCluster(); // vector of significant clusters vector fClusters; friend class AutomatedClustering; friend class GTUClusteringModule; ClassDef(BaseClusteringModule,0) }; #endif /* __BASECLUSTERINGMODULE_HH_ */