]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - ITS/AliITSClusterFinderSSD.h
Fix bug in FillDigitsIndex
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderSSD.h
... / ...
CommitLineData
1#ifndef ALIITSCLUSTERFINDERSSD_H
2#define ALIITSCLUSTERFINDERSSD_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6
7#include <TMath.h>
8
9#include "AliITSClusterFinder.h"
10
11class TArrayI;
12
13class AliITSclusterSSD;
14class AliITSpackageSSD;
15
16
17class AliITSClusterFinderSSD: public AliITSClusterFinder
18{
19
20public:
21
22 AliITSClusterFinderSSD(AliITSsegmentation *seg, TClonesArray *digits);
23
24 virtual ~AliITSClusterFinderSSD();
25
26
27 void FindRawClusters();
28
29
30 void SetAlpha1(Float_t a) {fAlpha1 =a;}
31 void SetAlpha2(Float_t a) {fAlpha2 =a;}
32 void SetAlpha3(Float_t a) {fAlpha3 =a;}
33
34
35
36 protected:
37
38 void InitReconstruction();
39 Bool_t CreateNewRecPoint(Float_t P, Float_t dP, Float_t N, Float_t dN,
40 Float_t Sig,Float_t dSig,
41 AliITSclusterSSD *clusterP, AliITSclusterSSD *clusterN,
42 Stat_t prob);
43 Bool_t CreateNewRecPoint(AliITSclusterSSD *clusterP, AliITSclusterSSD *clusterN, Stat_t prob);
44
45 AliITSclusterSSD* GetPSideCluster(Int_t idx);
46 AliITSclusterSSD* GetNSideCluster(Int_t idx);
47 AliITSclusterSSD* GetCluster(Int_t idx, Bool_t side);
48
49
50 void FindNeighbouringDigits();
51 void SeparateOverlappedClusters();
52 void SplitCluster(TArrayI *list, Int_t nsplits, Int_t index, Bool_t side);
53 Int_t SortDigitsP(Int_t start, Int_t end);
54 Int_t SortDigitsN(Int_t start, Int_t end);
55 void FillDigitsIndex();
56 void SortDigits();
57 void FillClIndexArrays(Int_t* arrayP, Int_t *arrayN);
58 void SortClusters(Int_t* arrayP, Int_t *arrayN);
59 Int_t SortClustersP(Int_t start, Int_t end,Int_t *array);
60 Int_t SortClustersN(Int_t start, Int_t end,Int_t *array);
61 void ConsumeClusters();
62 void ClustersToPackages();
63 void PackagesToPoints();
64 void ReconstructNotConsumedClusters();
65 Bool_t Strip2Local( Float_t stripP, Float_t stripN, Float_t &Z,Float_t &X);
66 Float_t GetClusterZ(AliITSclusterSSD* clust);
67 Bool_t IsCrossing(AliITSclusterSSD* p, AliITSclusterSSD* n);
68 //returns index of best combination in "comb"
69 Int_t GetBestComb(Int_t** comb,Int_t Ncomb, Int_t Ncl, AliITSpackageSSD * pkg);
70
71 //get point that have best signal ratio
72 void GetBestMatchingPoint(Int_t & ip, Int_t & in, AliITSpackageSSD* pkg );
73
74 //calculates Distance To Perfect Matching Line
75 Float_t DistToPML(Float_t psig, Float_t nsig){ return (TMath::Abs( (7.0*nsig - 8.0*psig )/10.630146) );}
76
77
78 Int_t GetDiff(Float_t *retx, Float_t *rety) {return 0;}
79
80 void CalcStepFactor(Float_t Psteo, Float_t Nsteo );
81
82/*************************************************/
83/** methods for resolving packages ****/
84/*************************************************/
85//names may not be meaningful for all, see implementations for descriptions
86
87 void ResolveSimplePackage(AliITSpackageSSD *pkg);
88 void ResolvePackageWithOnePSideCluster(AliITSpackageSSD *pkg);
89 void ResolvePackageWithOneNSideCluster(AliITSpackageSSD *pkg);
90 void ResolveTwoForTwoPackage(AliITSpackageSSD *pkg);
91
92 void ResolveClusterWithOneCross(AliITSpackageSSD *pkg,
93 Int_t clusterIndex, Bool_t clusterSide);
94
95 void ResolvePClusterWithOneCross(AliITSpackageSSD *pkg, Int_t clusterIndex);
96 void ResolveNClusterWithOneCross(AliITSpackageSSD *pkg, Int_t clusterIndex);
97 Bool_t ResolvePackageBestCombin(AliITSpackageSSD *pkg);
98 void ResolveOneBestMatchingPoint(AliITSpackageSSD *pkg);
99
100 Bool_t GetCrossing(Float_t &x, Float_t &z); //x, y of strips crossing
101 void GetCrossingError(Float_t&, Float_t&); //x, y of strips crossing errors
102
103 // Data memebers
104
105 AliITS *fITS; //!Pointer to AliITS object
106
107 TClonesArray *fClusterP; //!
108 Int_t fNClusterP; //!Number of P side clusters in the array
109
110 TClonesArray *fClusterN; //!Number of N side clusters in the array
111 Int_t fNClusterN; //!
112
113 TClonesArray *fPackages; //!packages
114 Int_t fNPackages; //!
115
116 TArrayI *fDigitsIndexP; //!Digits on P side
117 Int_t fNDigitsP; //!Number of Digits on P side
118
119 TArrayI *fDigitsIndexN; //!Digits on N side
120 Int_t fNDigitsN; //!Number of Digits on N side
121
122
123 Float_t fPitch; //!Strip pitch
124 Float_t fTanP; //!Pside stereo angle tangent
125 Float_t fTanN; //!Nside stereo angle tangent
126
127/*************************************************/
128/** parameters for reconstruction ****/
129/** to be tune when slow simulation raliable ****/
130/*************************************************/
131
132 Float_t fAlpha1; //!
133 Float_t fAlpha2; //!
134 Float_t fAlpha3; //!
135 Float_t fPNsignalRatio; //!
136
137
138 static const Bool_t fgkSIDEP; //!
139 static const Bool_t fgkSIDEN; //!
140
141
142 Int_t fSFF; //!forward stepping factor
143 Int_t fSFB; //!backward stepping factor
144
145public:
146 ClassDef(AliITSClusterFinderSSD, 1) //Class for clustering and reconstruction of space points in SSDs
147
148};
149
150
151#endif