]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PMD/AliPMDClustering.h
removed pmdcontainer
[u/mrichter/AliRoot.git] / PMD / AliPMDClustering.h
CommitLineData
deb0fc73 1#ifndef PMDClustering_H
2#define PMDClustering_H
3//-----------------------------------------------------//
4// //
5// Header File : PMDClustering.h, Version 00 //
6// //
7// Date : September 26 2002 //
8// //
9// clustering code for alice pmd //
10// //
11//-----------------------------------------------------//
12/*
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
20 supermodule.
21
22 d, clno and clusters are the only global ( public ) variables. Others
23 are local ( private ) to the code.
24
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 )
27
28 LAST UPDATE : October 23, 2002
29-----------------------------------------------------------------------
30*/
31
32
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
37#include "Rtypes.h"
38
39class TNtuple;
40class TObjArray;
deb0fc73 41class AliPMDcluster;
42class AliPMDClustering
43{
44
45 protected:
46
47 static const double pi=3.141593;
48 static const double sqrth=0.8660254; // sqrth = sqrt(3.)/2.
49 static const int nmx=5184;
50 static const int ndimx=72;
51 static const int ndimy=72;
52
53 /*
54 nmx : # of cells in a supermodule
55 ndimx : maximum number of cells along x direction (origin at one corner)
56 ndimy : maximum number of cells along axis at 60 degrees with x axis
57 */
58
59 double d[ndimx][ndimy], clusters[5][5000];
60 int clno;
61
62 /*
63 d ---- energy deposited ( or ADC ) in each cell of the supermodule
64 clno --- number of clusters in a supermodule
65 A cell is defined in terms of two integers (i,j) giving the its location
66 clusters[0][i] --- x position of the cluster center
67 clusters[1][i] --- y position of the cluster center
68 clusters[2][i] --- total energy in the cluster
69 clusters[3][i] --- number of cells forming the cluster
70 ( possibly fractional )
71 clusters[4][i] --- cluster radius
72 One corner of the supermodule is chosen as the origin
73 */
74
75
76 int iord[2][nmx], infocl[2][ndimx][ndimy], infcl[3][nmx];
77 double coord[2][ndimx][ndimy];
78
79 /*
80 iord --- ordered list of i and j according to decreasing energy dep.
81 infocl --- cellwise information on the cluster to which the cell
82 belongs and whether it has largest energy dep. or not
83 ( now redundant - probably )
84 infcl --- cluster information [0][i] -- cluster number
85 [1][i] -- i of the cell
86 [2][i] -- j of the cell
87 coord --- x and y coordinates of center of each cell
88 */
89
90 Int_t fMessage;
91
92 public:
93 AliPMDClustering();
94 virtual ~AliPMDClustering();
95
96 void DoClust(int, int, double [][72], TObjArray *);
97 int crclust(double, double, int, int);
98 void refclust(int, int, int);
99 double ranmar();
100 void order(int);
101 double Dist(double, double, double, double);
102 void gaussfit(int, int, double &, double &, double &, double &, double &,
103 double &, double &);
104 void ConvertL2G(int, double, double, double &, double &);
105 void cell_pos(Int_t , Int_t , Int_t , Float_t &, Float_t &);
106 void SetMessage(Int_t);
107
108 ClassDef(AliPMDClustering,1)
109};
110#endif