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
41 class AliPMDContainer;
43 class AliPMDClustering
48 static const double pi=3.141593;
49 static const double sqrth=0.8660254; // sqrth = sqrt(3.)/2.
50 static const int nmx=5184;
51 static const int ndimx=72;
52 static const int ndimy=72;
55 nmx : # of cells in a supermodule
56 ndimx : maximum number of cells along x direction (origin at one corner)
57 ndimy : maximum number of cells along axis at 60 degrees with x axis
60 double d[ndimx][ndimy], clusters[5][5000];
64 d ---- energy deposited ( or ADC ) in each cell of the supermodule
65 clno --- number of clusters in a supermodule
66 A cell is defined in terms of two integers (i,j) giving the its location
67 clusters[0][i] --- x position of the cluster center
68 clusters[1][i] --- y position of the cluster center
69 clusters[2][i] --- total energy in the cluster
70 clusters[3][i] --- number of cells forming the cluster
71 ( possibly fractional )
72 clusters[4][i] --- cluster radius
73 One corner of the supermodule is chosen as the origin
77 int iord[2][nmx], infocl[2][ndimx][ndimy], infcl[3][nmx];
78 double coord[2][ndimx][ndimy];
81 iord --- ordered list of i and j according to decreasing energy dep.
82 infocl --- cellwise information on the cluster to which the cell
83 belongs and whether it has largest energy dep. or not
84 ( now redundant - probably )
85 infcl --- cluster information [0][i] -- cluster number
86 [1][i] -- i of the cell
87 [2][i] -- j of the cell
88 coord --- x and y coordinates of center of each cell
95 virtual ~AliPMDClustering();
97 void DoClust(int, int, double [][72], TObjArray *);
98 int crclust(double, double, int, int);
99 void refclust(int, int, int);
102 double Dist(double, double, double, double);
103 void gaussfit(int, int, double &, double &, double &, double &, double &,
105 void ConvertL2G(int, double, double, double &, double &);
106 void cell_pos(Int_t , Int_t , Int_t , Float_t &, Float_t &);
107 void SetMessage(Int_t);
109 ClassDef(AliPMDClustering,1)