variables names changed according to ALICE convention
[u/mrichter/AliRoot.git] / PMD / AliPMDClustering.h
CommitLineData
a918d77a 1#ifndef ALIPMDCLUSTERING_H
2#define ALIPMDCLUSTERING_H
ed228cbc 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
deb0fc73 6//-----------------------------------------------------//
7// //
8// Header File : PMDClustering.h, Version 00 //
9// //
10// Date : September 26 2002 //
11// //
12// clustering code for alice pmd //
13// //
14//-----------------------------------------------------//
15/*
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
23 supermodule.
24
25 d, clno and clusters are the only global ( public ) variables. Others
26 are local ( private ) to the code.
27
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 )
30
31 LAST UPDATE : October 23, 2002
32-----------------------------------------------------------------------
33*/
34
deb0fc73 35#include "Rtypes.h"
36
37class TNtuple;
38class TObjArray;
deb0fc73 39class AliPMDcluster;
40class AliPMDClustering
41{
a918d77a 42
43 public:
44 AliPMDClustering();
45 virtual ~AliPMDClustering();
46
47 void DoClust(Double_t celladc[][96], TObjArray *pmdcont);
48 void Order();
49
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);
deb0fc73 60
61 protected:
62
a918d77a 63 static const Double_t fgkSqroot3by2; // fgkSqroot3by2 = sqrt(3.)/2.
a854e5de 64 enum {
a918d77a 65 kNMX = 4608,
66 kNDIMX = 48,
67 kNDIMY = 96
a854e5de 68 };
deb0fc73 69
70 /*
a918d77a 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
deb0fc73 74 */
75
a918d77a 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
deb0fc73 79
80 /*
deb0fc73 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
deb0fc73 87 */
88
a918d77a 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];
deb0fc73 93
94 /*
a918d77a 95 fIord --- ordered list of i and j according to decreasing energy dep.
96 fInfocl --- cellwise information on the cluster to which the cell
deb0fc73 97 belongs and whether it has largest energy dep. or not
98 ( now redundant - probably )
a918d77a 99 fInfcl --- cluster information [0][i] -- cluster number
deb0fc73 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
103 */
104
a918d77a 105 Int_t fDebug; // Switch for debug (1:Print, 0:Noprint)
106 Float_t fCutoff; // Energy(ADC) cutoff per cell before clustering
deb0fc73 107
a918d77a 108 ClassDef(AliPMDClustering,2) // Does clustering for PMD
deb0fc73 109};
110#endif