]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSClusterFinderSSD.h
Removed fDigits since it is already defined in AliITSClusterFinder.
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderSSD.h
CommitLineData
b0f5e3fc 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
b0f5e3fc 7#include <TArrayS.h>
b0f5e3fc 8#include <TRandom.h>
9#include <TMath.h>
10
f1c1b286 11//#include "AliITSclusterSSD.h"
12//#include "AliITSpackageSSD.h"
b0f5e3fc 13#include "AliITSClusterFinder.h"
14
e8189707 15class AliITSclusterSSD;
16class AliITSpackageSSD;
17
b0f5e3fc 18
19class AliITSClusterFinderSSD: public AliITSClusterFinder
20{
21
22public:
23
24 AliITSClusterFinderSSD(AliITSsegmentation *seg, TClonesArray *digits, TClonesArray *recp);
25
26 virtual ~AliITSClusterFinderSSD();
27
28
29 void FindRawClusters();
30
31
766ef0c8 32 void SetAlpha1(Float_t a) {fAlpha1 =a;}
33 void SetAlpha2(Float_t a) {fAlpha2 =a;}
34 void SetAlpha3(Float_t a) {fAlpha3 =a;}
b0f5e3fc 35
36
37
38 protected:
39
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,
44 Stat_t prob);
45 Bool_t CreateNewRecPoint(AliITSclusterSSD *clusterP, AliITSclusterSSD *clusterN, Stat_t prob);
46
47 AliITSclusterSSD* GetPSideCluster(Int_t idx);
48 AliITSclusterSSD* GetNSideCluster(Int_t idx);
49 AliITSclusterSSD* GetCluster(Int_t idx, Bool_t side);
50
51
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();
58 void SortDigits();
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);
72
73 //get point that have best signal ratio
74 void GetBestMatchingPoint(Int_t & ip, Int_t & in, AliITSpackageSSD* pkg );
75
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) );}
78
79
80 Int_t GetDiff(Float_t *retx, Float_t *rety) {return 0;}
81
82 void CalcStepFactor(Float_t Psteo, Float_t Nsteo );
83
84/*************************************************/
85/** methods for resolving packages ****/
86/*************************************************/
87//names may not be meaningful for all, see implementations for descriptions
88
89 void ResolveSimplePackage(AliITSpackageSSD *pkg);
90 void ResolvePackageWithOnePSideCluster(AliITSpackageSSD *pkg);
91 void ResolvePackageWithOneNSideCluster(AliITSpackageSSD *pkg);
92 void ResolveTwoForTwoPackage(AliITSpackageSSD *pkg);
93
94 void ResolveClusterWithOneCross(AliITSpackageSSD *pkg,
95 Int_t clusterIndex, Bool_t clusterSide);
96
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);
101
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
104
105 // Data memebers
106
46019b87 107 AliITS *fITS; //!Pointer to AliITS object
b0f5e3fc 108
46019b87 109 TClonesArray *fRecPoints; //!Pointer to TClonesArray of rec points
b0f5e3fc 110
46019b87 111 TClonesArray *fClusterP; //!
112 Int_t fNClusterP; //!Number of P side clusters in the array
b0f5e3fc 113
46019b87 114 TClonesArray *fClusterN; //!Number of N side clusters in the array
115 Int_t fNClusterN; //!
b0f5e3fc 116
46019b87 117 TClonesArray *fPackages; //!packages
118 Int_t fNPackages; //!
b0f5e3fc 119
46019b87 120 TArrayI *fDigitsIndexP; //!Digits on P side
121 Int_t fNDigitsP; //!Number of Digits on P side
b0f5e3fc 122
46019b87 123 TArrayI *fDigitsIndexN; //!Digits on N side
124 Int_t fNDigitsN; //!Number of Digits on N side
b0f5e3fc 125
126
46019b87 127 Float_t fPitch; //!Strip pitch
128 Float_t fTanP; //!Pside stereo angle tangent
129 Float_t fTanN; //!Nside stereo angle tangent
b0f5e3fc 130
131/*************************************************/
132/** parameters for reconstruction ****/
133/** to be tune when slow simulation raliable ****/
134/*************************************************/
135
46019b87 136 Float_t fAlpha1; //!
137 Float_t fAlpha2; //!
138 Float_t fAlpha3; //!
139 Float_t fPNsignalRatio; //!
e8189707 140
b0f5e3fc 141
46019b87 142 static const Bool_t fgkSIDEP; //!
143 static const Bool_t fgkSIDEN; //!
f1c1b286 144
be33dccb 145
46019b87 146 Int_t fSFF; //!forward stepping factor
147 Int_t fSFB; //!backward stepping factor
b0f5e3fc 148
149public:
150 ClassDef(AliITSClusterFinderSSD, 1) //Class for clustering and reconstruction of space points in SSDs
151
152};
153
154
155#endif