3edbbba2 |
1 | #ifndef ALIPMDCLUSTERINGV1_H |
2 | #define ALIPMDCLUSTERINGV1_H |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ |
5 | //-----------------------------------------------------// |
6 | // // |
01c4d84a |
7 | // Header File : PMDClusteringV1.h, Version 00 // |
3edbbba2 |
8 | // // |
9 | // Date : September 26 2002 // |
10 | // // |
11 | // clustering code for alice pmd // |
12 | // // |
13 | //-----------------------------------------------------// |
14 | /* -------------------------------------------------------------------- |
15 | Code developed by S. C. Phatak, Institute of Physics, |
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 |
20 | clusters[5][5000]. integer clno gives total number of clusters in the |
21 | supermodule. |
22 | d, clno and clusters are the only global ( public ) variables. Others |
23 | are local ( private ) to the code. |
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 ) |
26 | LAST UPDATE : October 23, 2002 |
27 | -----------------------------------------------------------------------*/ |
28 | #include "Rtypes.h" |
29 | #include "AliPMDClustering.h" |
30 | |
31 | class TNtuple; |
32 | class TObjArray; |
33 | class AliPMDcluster; |
fd30f88e |
34 | class AliPMDcludata; |
3edbbba2 |
35 | class AliPMDClusteringV1: public AliPMDClustering |
36 | { |
3edbbba2 |
37 | public: |
38 | AliPMDClusteringV1(); |
39 | virtual ~AliPMDClusteringV1(); |
40 | |
41 | void DoClust(Int_t idet, Int_t ismn, Double_t celladc[][96], |
42 | TObjArray *pmdcont); |
43 | void Order(); |
44 | |
45 | Int_t CrClust(Double_t ave, Double_t cutoff, Int_t nmx1); |
46 | void RefClust(Int_t incr); |
47 | void GaussFit(Int_t ncell, Int_t nclust, Double_t &x, |
48 | Double_t &y, Double_t &z, Double_t &xc, |
49 | Double_t &yc, Double_t &zc, Double_t &rc); |
50 | Double_t Distance(Double_t x1, Double_t y1, |
51 | Double_t x2, Double_t y2); |
3edbbba2 |
52 | void SetEdepCut(Float_t decut); |
53 | |
54 | protected: |
fd30f88e |
55 | |
56 | TObjArray *pmdclucont; |
57 | AliPMDcludata *pmdcludata; |
58 | |
3edbbba2 |
59 | static const Double_t fgkSqroot3by2; // fgkSqroot3by2 = sqrt(3.)/2. |
01c4d84a |
60 | |
3edbbba2 |
61 | enum { |
fd30f88e |
62 | kNMX = 11424, // no. of cells in a module |
63 | kNDIMX = 119, // max no. of cells along x direction |
64 | kNDIMY = 96 // max no. of cells along axis at 60 deg with x axis |
3edbbba2 |
65 | }; |
3edbbba2 |
66 | |
01c4d84a |
67 | Double_t fEdepCell[kNDIMX][kNDIMY]; //energy(ADC) in each cell |
fd30f88e |
68 | |
01c4d84a |
69 | //Variables for association |
fd30f88e |
70 | Int_t fCellTrNo[kNDIMX][kNDIMY]; // id x-y value of cells |
01c4d84a |
71 | Int_t fClTr[15][5000]; // 1d x-y cell info of attached cells |
72 | |
73 | Int_t fIord[2][kNMX]; // ordered list of i and j according |
74 | // to decreasing energy dep. |
fd30f88e |
75 | Int_t fInfocl[2][kNDIMX][kNDIMY]; // cellwise information on the |
76 | // cluster to which the cell |
01c4d84a |
77 | Int_t fInfcl[3][kNMX]; // cluster information [0][i] |
78 | // -- cluster number |
3edbbba2 |
79 | Double_t fCoord[2][kNDIMX][kNDIMY]; |
80 | |
81 | /* |
82 | fIord --- ordered list of i and j according to decreasing energy dep. |
83 | fInfocl --- cellwise information on the cluster to which the cell |
84 | belongs and whether it has largest energy dep. or not |
85 | ( now redundant - probably ) |
86 | fInfcl --- cluster information [0][i] -- cluster number |
87 | [1][i] -- i of the cell |
88 | [2][i] -- j of the cell |
89 | coord --- x and y coordinates of center of each cell |
90 | */ |
91 | |
92 | Float_t fCutoff; // Energy(ADC) cutoff per cell before clustering |
93 | |
fd30f88e |
94 | ClassDef(AliPMDClusteringV1,3) // Does clustering for PMD |
3edbbba2 |
95 | }; |
96 | #endif |