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 */
11 #include "AliITSClusterFinder.h"
13 class AliITSclusterSSD;
14 class AliITSpackageSSD;
17 class AliITSClusterFinderSSD: public AliITSClusterFinder
22 AliITSClusterFinderSSD(AliITSsegmentation *seg, TClonesArray *digits, TClonesArray *recp);
24 virtual ~AliITSClusterFinderSSD();
27 void FindRawClusters();
30 void SetAlpha1(Float_t a) {falpha1 =a;}
31 void SetAlpha2(Float_t a) {falpha2 =a;}
32 void SetAlpha3(Float_t a) {falpha3 =a;}
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,
43 Bool_t CreateNewRecPoint(AliITSclusterSSD *clusterP, AliITSclusterSSD *clusterN, Stat_t prob);
45 AliITSclusterSSD* GetPSideCluster(Int_t idx);
46 AliITSclusterSSD* GetNSideCluster(Int_t idx);
47 AliITSclusterSSD* GetCluster(Int_t idx, Bool_t side);
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();
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);
71 //get point that have best signal ratio
72 void GetBestMatchingPoint(Int_t & ip, Int_t & in, AliITSpackageSSD* pkg );
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) );}
78 Int_t GetDiff(Float_t *retx, Float_t *rety) {return 0;}
80 void CalcStepFactor(Float_t Psteo, Float_t Nsteo );
82 /*************************************************/
83 /** methods for resolving packages ****/
84 /*************************************************/
85 //names may not be meaningful for all, see implementations for descriptions
87 void ResolveSimplePackage(AliITSpackageSSD *pkg);
88 void ResolvePackageWithOnePSideCluster(AliITSpackageSSD *pkg);
89 void ResolvePackageWithOneNSideCluster(AliITSpackageSSD *pkg);
90 void ResolveTwoForTwoPackage(AliITSpackageSSD *pkg);
92 void ResolveClusterWithOneCross(AliITSpackageSSD *pkg,
93 Int_t clusterIndex, Bool_t clusterSide);
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);
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
105 AliITS *fITS; //Pointer to AliITS object
106 TClonesArray *fDigits; //Pointer to TClonesArray of digits
108 TClonesArray *fRecPoints; //Pointer to TClonesArray of rec points
111 TClonesArray *fClusterP; //
112 Int_t fNClusterP; //Number of P side clusters in the array
114 TClonesArray *fClusterN; //Number of N side clusters in the array
117 TClonesArray *fPackages; //packages
120 TArrayI *fDigitsIndexP; //Digits on P side
121 Int_t fNDigitsP; //Number of Digits on P side
123 TArrayI *fDigitsIndexN; //Digits on N side
124 Int_t fNDigitsN; //Number of Digits on N side
127 Float_t fPitch; //Strip pitch
128 Float_t fTanP; //Pside stereo angle tangent
129 Float_t fTanN; //Nside stereo angle tangent
131 /*************************************************/
132 /** parameters for reconstruction ****/
133 /** to be tune when slow simulation raliable ****/
134 /*************************************************/
139 Float_t fPNsignalRatio;
142 static const Bool_t fgkSIDEP=kTRUE;
143 static const Bool_t fgkSIDEN=kFALSE;
145 Int_t fSFF; //forward stepping factor
146 Int_t fSFB; //backward stepping factor
149 ClassDef(AliITSClusterFinderSSD, 1) //Class for clustering and reconstruction of space points in SSDs