1 #ifndef PMDClustering_H
2 #define PMDClustering_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 -----------------------------------------------------------------------
36 #include <Riostream.h> // define cout stream
37 #include <stdlib.h> // defines exit() functions
38 #include <time.h> // for time function
39 #include <math.h> // for mathematical functions
45 class AliPMDClustering
50 static const double pi;
51 static const double sqrth; // sqrth = sqrt(3.)/2.
59 nmx : # of cells in a supermodule
60 ndimx : maximum number of cells along x direction (origin at one corner)
61 ndimy : maximum number of cells along axis at 60 degrees with x axis
64 double d[ndimx][ndimy], clusters[5][5000];
68 d ---- energy deposited ( or ADC ) in each cell of the supermodule
69 clno --- number of clusters in a supermodule
70 A cell is defined in terms of two integers (i,j) giving the its location
71 clusters[0][i] --- x position of the cluster center
72 clusters[1][i] --- y position of the cluster center
73 clusters[2][i] --- total energy in the cluster
74 clusters[3][i] --- number of cells forming the cluster
75 ( possibly fractional )
76 clusters[4][i] --- cluster radius
77 One corner of the supermodule is chosen as the origin
81 int iord[2][nmx], infocl[2][ndimx][ndimy], infcl[3][nmx];
82 double coord[2][ndimx][ndimy];
85 iord --- ordered list of i and j according to decreasing energy dep.
86 infocl --- cellwise information on the cluster to which the cell
87 belongs and whether it has largest energy dep. or not
88 ( now redundant - probably )
89 infcl --- cluster information [0][i] -- cluster number
90 [1][i] -- i of the cell
91 [2][i] -- j of the cell
92 coord --- x and y coordinates of center of each cell
100 virtual ~AliPMDClustering();
102 void DoClust(double /*celladc*/[][96], TObjArray * /* pmdcont */);
105 int crclust(double /* ave */, double /* cutoff */ , int /* nmx1 */);
106 void refclust(int /* incr */);
107 void gaussfit(int /*ncell*/, int /*nclust*/, double &/*x*/,
108 double &/*y*/, double &/*z*/, double &/*xc*/,
109 double &/*yc*/, double &/*zc*/, double &/*rc*/);
110 double Dist(double /* x1 */, double /* y1 */ ,
111 double /* x2 */, double /* y2 */);
113 void SetEdepCut(Float_t /* decut */);
114 void SetDebug(Int_t /* idebug */);
116 ClassDef(AliPMDClustering,2)