]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PMD/AliPMDClustering.h
get tables from the aliroot directory if they are not in the current one
[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 */
deb0fc73 5//-----------------------------------------------------//
6// //
7// Header File : PMDClustering.h, Version 00 //
8// //
9// Date : September 26 2002 //
10// //
11// clustering code for alice pmd //
12// //
13//-----------------------------------------------------//
e1287360 14/* --------------------------------------------------------------------
15 Code developed by S. C. Phatak, Institute of Physics,
deb0fc73 16 Bhubaneswar 751 005 ( phatak@iopb.res.in ) Given the energy deposited
17 ( or ADC value ) in each cell of supermodule ( pmd or cpv ), the code
18 builds up superclusters and breaks them into clusters. The input is
19 in array d[ndimx][ndimy] and cluster information is in array
e1287360 20 clusters[5][5000]. integer clno gives total number of clusters in the
deb0fc73 21 supermodule.
e1287360 22 d, clno and clusters are the only global ( public ) variables. Others
23 are local ( private ) to the code.
deb0fc73 24 At the moment, the data is read for whole detector ( all supermodules
25 and pmd as well as cpv. This will have to be modify later )
deb0fc73 26 LAST UPDATE : October 23, 2002
e1287360 27-----------------------------------------------------------------------*/
deb0fc73 28#include "Rtypes.h"
29
30class TNtuple;
31class TObjArray;
deb0fc73 32class AliPMDcluster;
33class AliPMDClustering
34{
a918d77a 35
36 public:
37 AliPMDClustering();
38 virtual ~AliPMDClustering();
e1287360 39
a918d77a 40 void DoClust(Double_t celladc[][96], TObjArray *pmdcont);
41 void Order();
42
43 Int_t CrClust(Double_t ave, Double_t cutoff, Int_t nmx1);
44 void RefClust(Int_t incr);
e1287360 45 void GaussFit(Int_t ncell, Int_t nclust, Double_t &x,
a918d77a 46 Double_t &y, Double_t &z, Double_t &xc,
47 Double_t &yc, Double_t &zc, Double_t &rc);
48 Double_t Distance(Double_t x1, Double_t y1,
49 Double_t x2, Double_t y2);
50 Double_t Ranmar() const;
51 void SetEdepCut(Float_t decut);
52 void SetDebug(Int_t idebug);
e1287360 53
deb0fc73 54 protected:
55
a918d77a 56 static const Double_t fgkSqroot3by2; // fgkSqroot3by2 = sqrt(3.)/2.
e1287360 57 /*enum {
a918d77a 58 kNMX = 4608,
59 kNDIMX = 48,
60 kNDIMY = 96
e1287360 61 };*/
62 /*
63 Proposed changes inNMX, kNDIMX and kNDIMY by S. C. Phatak to account
64 for rectangular ( vs rhomboid ) geometry.
65 To keep the clustering functional, we define a rhomboid which
66 superscribes the rectangle. So we need to pad up dummy cells in x
67 direction. The number of these cells is 96/2-1=47 in each row ( value
68 of x ). For first two rows, all dummy cells are to the left. For
69 every two rows add one cell to right and subtract one from left.
70 So previous (i,j) values go over to ( i',j) i'=i+(96-j)/2-1
71 Note we use C++ convention so i and j run from 0 to 47 or 95.
72 */
deb0fc73 73
e1287360 74 enum {
75 kNMX = 9120,
76 kNDIMX = 95,
77 kNDIMY = 96,
78 kNDIMXr = 48,
79 kNDIMYr = 96
80 };
deb0fc73 81 /*
a918d77a 82 kNMX : # of cells in a supermodule
83 kNDIMX : maximum number of cells along x direction (origin at one corner)
84 kNDIMY : maximum number of cells along axis at 60 degrees with x axis
deb0fc73 85 */
86
a918d77a 87 Double_t fEdepCell[kNDIMX][kNDIMY]; //energy(ADC) in each cell of the supermodule
88 Double_t fClusters[5][5000]; // Cluster informations
89 Int_t fClno; // number of clusters in a supermodule
deb0fc73 90
91 /*
deb0fc73 92 clusters[0][i] --- x position of the cluster center
93 clusters[1][i] --- y position of the cluster center
94 clusters[2][i] --- total energy in the cluster
e1287360 95 clusters[3][i] --- number of cells forming the cluster
deb0fc73 96 ( possibly fractional )
97 clusters[4][i] --- cluster radius
deb0fc73 98 */
99
a918d77a 100 Int_t fIord[2][kNMX]; // ordered list of i and j according to decreasing energy dep.
101 Int_t fInfocl[2][kNDIMX][kNDIMY]; // cellwise information on the cluster to which the cell
102 Int_t fInfcl[3][kNMX]; // cluster information [0][i] -- cluster number
103 Double_t fCoord[2][kNDIMX][kNDIMY];
deb0fc73 104
e1287360 105 /*
106 fIord --- ordered list of i and j according to decreasing energy dep.
107 fInfocl --- cellwise information on the cluster to which the cell
108 belongs and whether it has largest energy dep. or not
109 ( now redundant - probably )
110 fInfcl --- cluster information [0][i] -- cluster number
111 [1][i] -- i of the cell
112 [2][i] -- j of the cell
113 coord --- x and y coordinates of center of each cell
deb0fc73 114 */
115
a918d77a 116 Int_t fDebug; // Switch for debug (1:Print, 0:Noprint)
117 Float_t fCutoff; // Energy(ADC) cutoff per cell before clustering
deb0fc73 118
e1287360 119 ClassDef(AliPMDClustering,3) // Does clustering for PMD
deb0fc73 120};
121#endif