1 #ifndef ALIPMDCLUSTERING_H
2 #define ALIPMDCLUSTERING_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 //-----------------------------------------------------//
8 // Header File : PMDClustering.h, Version 00 //
10 // Date : September 26 2002 //
12 // clustering code for alice pmd //
14 //-----------------------------------------------------//
16 --------------------------------------------------------------------
17 Code developed by S. C. Phatak, Institute of Physics,
18 Bhubaneswar 751 005 ( phatak@iopb.res.in ) Given the energy deposited
19 ( or ADC value ) in each cell of supermodule ( pmd or cpv ), the code
20 builds up superclusters and breaks them into clusters. The input is
21 in array d[ndimx][ndimy] and cluster information is in array
22 clusters[5][5000]. integer clno gives total number of clusters in the
25 d, clno and clusters are the only global ( public ) variables. Others
26 are local ( private ) to the code.
28 At the moment, the data is read for whole detector ( all supermodules
29 and pmd as well as cpv. This will have to be modify later )
31 LAST UPDATE : October 23, 2002
32 -----------------------------------------------------------------------
40 class AliPMDClustering
45 virtual ~AliPMDClustering();
47 void DoClust(Double_t celladc[][96], TObjArray *pmdcont);
50 Int_t CrClust(Double_t ave, Double_t cutoff, Int_t nmx1);
51 void RefClust(Int_t incr);
52 void GaussFit(Int_t ncell, Int_t nclust, Double_t &x,
53 Double_t &y, Double_t &z, Double_t &xc,
54 Double_t &yc, Double_t &zc, Double_t &rc);
55 Double_t Distance(Double_t x1, Double_t y1,
56 Double_t x2, Double_t y2);
57 Double_t Ranmar() const;
58 void SetEdepCut(Float_t decut);
59 void SetDebug(Int_t idebug);
63 static const Double_t fgkSqroot3by2; // fgkSqroot3by2 = sqrt(3.)/2.
71 kNMX : # of cells in a supermodule
72 kNDIMX : maximum number of cells along x direction (origin at one corner)
73 kNDIMY : maximum number of cells along axis at 60 degrees with x axis
76 Double_t fEdepCell[kNDIMX][kNDIMY]; //energy(ADC) in each cell of the supermodule
77 Double_t fClusters[5][5000]; // Cluster informations
78 Int_t fClno; // number of clusters in a supermodule
81 clusters[0][i] --- x position of the cluster center
82 clusters[1][i] --- y position of the cluster center
83 clusters[2][i] --- total energy in the cluster
84 clusters[3][i] --- number of cells forming the cluster
85 ( possibly fractional )
86 clusters[4][i] --- cluster radius
89 Int_t fIord[2][kNMX]; // ordered list of i and j according to decreasing energy dep.
90 Int_t fInfocl[2][kNDIMX][kNDIMY]; // cellwise information on the cluster to which the cell
91 Int_t fInfcl[3][kNMX]; // cluster information [0][i] -- cluster number
92 Double_t fCoord[2][kNDIMX][kNDIMY];
95 fIord --- ordered list of i and j according to decreasing energy dep.
96 fInfocl --- cellwise information on the cluster to which the cell
97 belongs and whether it has largest energy dep. or not
98 ( now redundant - probably )
99 fInfcl --- cluster information [0][i] -- cluster number
100 [1][i] -- i of the cell
101 [2][i] -- j of the cell
102 coord --- x and y coordinates of center of each cell
105 Int_t fDebug; // Switch for debug (1:Print, 0:Noprint)
106 Float_t fCutoff; // Energy(ADC) cutoff per cell before clustering
108 ClassDef(AliPMDClustering,2) // Does clustering for PMD