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 "AliITSclusterSSD.h"
12 //#include "AliITSpackageSSD.h"
13 #include "AliITSClusterFinder.h"
15 class AliITSclusterSSD;
16 class AliITSpackageSSD;
19 class AliITSClusterFinderSSD: public AliITSClusterFinder
24 AliITSClusterFinderSSD(AliITSsegmentation *seg, TClonesArray *digits, TClonesArray *recp);
26 virtual ~AliITSClusterFinderSSD();
29 void FindRawClusters();
32 void SetAlpha1(Float_t a) {falpha1 =a;}
33 void SetAlpha2(Float_t a) {falpha2 =a;}
34 void SetAlpha3(Float_t a) {falpha3 =a;}
40 void InitReconstruction();
41 Bool_t CreateNewRecPoint(Float_t P, Float_t dP, Float_t N, Float_t dN,
42 Float_t Sig,Float_t dSig,
43 AliITSclusterSSD *clusterP, AliITSclusterSSD *clusterN,
45 Bool_t CreateNewRecPoint(AliITSclusterSSD *clusterP, AliITSclusterSSD *clusterN, Stat_t prob);
47 AliITSclusterSSD* GetPSideCluster(Int_t idx);
48 AliITSclusterSSD* GetNSideCluster(Int_t idx);
49 AliITSclusterSSD* GetCluster(Int_t idx, Bool_t side);
52 void FindNeighbouringDigits();
53 void SeparateOverlappedClusters();
54 void SplitCluster(TArrayI *list, Int_t nsplits, Int_t index, Bool_t side);
55 Int_t SortDigitsP(Int_t start, Int_t end);
56 Int_t SortDigitsN(Int_t start, Int_t end);
57 void FillDigitsIndex();
59 void FillClIndexArrays(Int_t* arrayP, Int_t *arrayN);
60 void SortClusters(Int_t* arrayP, Int_t *arrayN);
61 Int_t SortClustersP(Int_t start, Int_t end,Int_t *array);
62 Int_t SortClustersN(Int_t start, Int_t end,Int_t *array);
63 void ConsumeClusters();
64 void ClustersToPackages();
65 void PackagesToPoints();
66 void ReconstructNotConsumedClusters();
67 Bool_t Strip2Local( Float_t stripP, Float_t stripN, Float_t &Z,Float_t &X);
68 Float_t GetClusterZ(AliITSclusterSSD* clust);
69 Bool_t IsCrossing(AliITSclusterSSD* p, AliITSclusterSSD* n);
70 //returns index of best combination in "comb"
71 Int_t GetBestComb(Int_t** comb,Int_t Ncomb, Int_t Ncl, AliITSpackageSSD * pkg);
73 //get point that have best signal ratio
74 void GetBestMatchingPoint(Int_t & ip, Int_t & in, AliITSpackageSSD* pkg );
76 //calculates Distance To Perfect Matching Line
77 Float_t DistToPML(Float_t psig, Float_t nsig){ return (TMath::Abs( (7.0*nsig - 8.0*psig )/10.630146) );}
80 Int_t GetDiff(Float_t *retx, Float_t *rety) {return 0;}
82 void CalcStepFactor(Float_t Psteo, Float_t Nsteo );
84 /*************************************************/
85 /** methods for resolving packages ****/
86 /*************************************************/
87 //names may not be meaningful for all, see implementations for descriptions
89 void ResolveSimplePackage(AliITSpackageSSD *pkg);
90 void ResolvePackageWithOnePSideCluster(AliITSpackageSSD *pkg);
91 void ResolvePackageWithOneNSideCluster(AliITSpackageSSD *pkg);
92 void ResolveTwoForTwoPackage(AliITSpackageSSD *pkg);
94 void ResolveClusterWithOneCross(AliITSpackageSSD *pkg,
95 Int_t clusterIndex, Bool_t clusterSide);
97 void ResolvePClusterWithOneCross(AliITSpackageSSD *pkg, Int_t clusterIndex);
98 void ResolveNClusterWithOneCross(AliITSpackageSSD *pkg, Int_t clusterIndex);
99 Bool_t ResolvePackageBestCombin(AliITSpackageSSD *pkg);
100 void ResolveOneBestMatchingPoint(AliITSpackageSSD *pkg);
102 Bool_t GetCrossing(Float_t &x, Float_t &z); //x, y of strips crossing
103 void GetCrossingError(Float_t&, Float_t&); //x, y of strips crossing errors
107 AliITS *fITS; //Pointer to AliITS object
108 TClonesArray *fDigits; //Pointer to TClonesArray of digits
110 TClonesArray *fRecPoints; //Pointer to TClonesArray of rec points
113 TClonesArray *fClusterP; //
114 Int_t fNClusterP; //Number of P side clusters in the array
116 TClonesArray *fClusterN; //Number of N side clusters in the array
119 TClonesArray *fPackages; //packages
122 TArrayI *fDigitsIndexP; //Digits on P side
123 Int_t fNDigitsP; //Number of Digits on P side
125 TArrayI *fDigitsIndexN; //Digits on N side
126 Int_t fNDigitsN; //Number of Digits on N side
129 Float_t fPitch; //Strip pitch
130 Float_t fTanP; //Pside stereo angle tangent
131 Float_t fTanN; //Nside stereo angle tangent
133 /*************************************************/
134 /** parameters for reconstruction ****/
135 /** to be tune when slow simulation raliable ****/
136 /*************************************************/
141 Float_t fPNsignalRatio;
144 static const Bool_t fgkSIDEP=kTRUE;
145 static const Bool_t fgkSIDEN=kFALSE;
148 Int_t fSFF; //forward stepping factor
149 Int_t fSFB; //backward stepping factor
152 ClassDef(AliITSClusterFinderSSD, 1) //Class for clustering and reconstruction of space points in SSDs