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 */
9 #include "AliITSClusterFinder.h"
13 class AliITSclusterSSD;
14 class AliITSpackageSSD;
17 class AliITSClusterFinderSSD: public AliITSClusterFinder
22 AliITSClusterFinderSSD(AliITSsegmentation *seg, TClonesArray *digits);
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
107 TClonesArray *fClusterP; //!
108 Int_t fNClusterP; //!Number of P side clusters in the array
110 TClonesArray *fClusterN; //!Number of N side clusters in the array
111 Int_t fNClusterN; //!
113 TClonesArray *fPackages; //!packages
114 Int_t fNPackages; //!
116 TArrayI *fDigitsIndexP; //!Digits on P side
117 Int_t fNDigitsP; //!Number of Digits on P side
119 TArrayI *fDigitsIndexN; //!Digits on N side
120 Int_t fNDigitsN; //!Number of Digits on N side
123 Float_t fPitch; //!Strip pitch
124 Float_t fTanP; //!Pside stereo angle tangent
125 Float_t fTanN; //!Nside stereo angle tangent
127 /*************************************************/
128 /** parameters for reconstruction ****/
129 /** to be tune when slow simulation raliable ****/
130 /*************************************************/
135 Float_t fPNsignalRatio; //!
138 static const Bool_t fgkSIDEP; //!
139 static const Bool_t fgkSIDEN; //!
142 Int_t fSFF; //!forward stepping factor
143 Int_t fSFB; //!backward stepping factor
146 ClassDef(AliITSClusterFinderSSD, 1) //Class for clustering and reconstruction of space points in SSDs