1 #ifndef PMDClustering_H
2 #define PMDClustering_H
3 //-----------------------------------------------------//
5 // Header File : PMDClustering.h, Version 00 //
7 // Date : September 26 2002 //
9 // clustering code for alice pmd //
11 //-----------------------------------------------------//
13 --------------------------------------------------------------------
14 Code developed by S. C. Phatak, Institute of Physics,
15 Bhubaneswar 751 005 ( phatak@iopb.res.in ) Given the energy deposited
16 ( or ADC value ) in each cell of supermodule ( pmd or cpv ), the code
17 builds up superclusters and breaks them into clusters. The input is
18 in array d[ndimx][ndimy] and cluster information is in array
19 clusters[5][5000]. integer clno gives total number of clusters in the
22 d, clno and clusters are the only global ( public ) variables. Others
23 are local ( private ) to the code.
25 At the moment, the data is read for whole detector ( all supermodules
26 and pmd as well as cpv. This will have to be modify later )
28 LAST UPDATE : October 23, 2002
29 -----------------------------------------------------------------------
33 #include <Riostream.h> // define cout stream
34 #include <stdlib.h> // defines exit() functions
35 #include <time.h> // for time function
36 #include <math.h> // for mathematical functions
42 class AliPMDClustering
47 static const double pi;
48 static const double sqrth; // sqrth = sqrt(3.)/2.
56 nmx : # of cells in a supermodule
57 ndimx : maximum number of cells along x direction (origin at one corner)
58 ndimy : maximum number of cells along axis at 60 degrees with x axis
61 double d[ndimx][ndimy], clusters[5][5000];
65 d ---- energy deposited ( or ADC ) in each cell of the supermodule
66 clno --- number of clusters in a supermodule
67 A cell is defined in terms of two integers (i,j) giving the its location
68 clusters[0][i] --- x position of the cluster center
69 clusters[1][i] --- y position of the cluster center
70 clusters[2][i] --- total energy in the cluster
71 clusters[3][i] --- number of cells forming the cluster
72 ( possibly fractional )
73 clusters[4][i] --- cluster radius
74 One corner of the supermodule is chosen as the origin
78 int iord[2][nmx], infocl[2][ndimx][ndimy], infcl[3][nmx];
79 double coord[2][ndimx][ndimy];
82 iord --- ordered list of i and j according to decreasing energy dep.
83 infocl --- cellwise information on the cluster to which the cell
84 belongs and whether it has largest energy dep. or not
85 ( now redundant - probably )
86 infcl --- cluster information [0][i] -- cluster number
87 [1][i] -- i of the cell
88 [2][i] -- j of the cell
89 coord --- x and y coordinates of center of each cell
96 virtual ~AliPMDClustering();
98 void DoClust(int, int, double [][72], TObjArray *);
99 int crclust(double, double, int, int);
100 void refclust(int, int, int);
103 double Dist(double, double, double, double);
104 void gaussfit(int, int, double &, double &, double &, double &, double &,
106 void ConvertL2G(int, double, double, double &, double &);
107 void cell_pos(Int_t , Int_t , Int_t , Float_t &, Float_t &);
108 void SetMessage(Int_t);
110 ClassDef(AliPMDClustering,1)