]>
Commit | Line | Data |
---|---|---|
1c53abe2 | 1 | #ifndef ALITPCCLUSTERERMI_H |
2 | #define ALITPCCLUSTERERMI_H | |
3 | ||
4 | //------------------------------------------------------- | |
5 | // TPC clusterer | |
6 | // | |
7 | // Origin: Marian Ivanov | |
8 | //------------------------------------------------------- | |
9 | #include <Rtypes.h> | |
10 | #include <TObject.h> | |
11 | #define kMAXCLUSTER 2500 | |
12 | ||
13 | class TFile; | |
14 | class AliTPCParam; | |
15 | class AliTPCclusterMI; | |
16 | class AliTPCClustersRow; | |
17 | class AliSimDigits; | |
18 | class TTree; | |
19 | ||
20 | class AliTPCclustererMI : public TObject{ | |
21 | public: | |
22 | AliTPCclustererMI(); | |
23 | virtual void Digits2Clusters(const AliTPCParam *par, Int_t eventn=1); | |
24 | virtual void SetInput(TTree * tree); // set input tree with digits | |
25 | virtual void SetOutput(TTree * tree); //set output tree with | |
26 | private: | |
27 | Bool_t IsMaximum(Int_t k, Int_t max, const Int_t *bins); | |
28 | void MakeCluster2(Int_t k,Int_t max,Int_t *bins,UInt_t m, | |
29 | AliTPCclusterMI &c); | |
30 | void MakeCluster(Int_t k,Int_t max,Int_t *bins,UInt_t m, | |
31 | AliTPCclusterMI &c); | |
32 | Float_t GetSigmaY2(Int_t iz); | |
33 | Float_t GetSigmaZ2(Int_t iz); | |
34 | Float_t FitMax(Float_t vmatrix[5][5], Float_t y, Float_t z, Float_t sigmay, Float_t sigmaz); | |
35 | void AddCluster(AliTPCclusterMI &c); // add the cluster to the array | |
36 | void UnfoldCluster(Int_t * matrix[7], Float_t recmatrix[5][5], | |
37 | Float_t & meani, Float_t & meanj, Float_t & sum, Float_t &overlap ); | |
38 | ||
39 | ||
40 | ||
41 | Int_t * fBins; //!digits array | |
42 | Int_t * fResBins; //!digits array with res. after 1 finder | |
43 | Int_t fLoop; //loop - cf in 2 loops | |
44 | Int_t fMaxBin; | |
45 | Int_t fMaxTime; | |
46 | Int_t fMaxPad; | |
47 | Int_t fSector; //!current sector | |
48 | Float_t fSign; //!current sign | |
49 | Float_t fRx; // current radius | |
50 | Float_t fPadWidth; // the width of the pad | |
51 | Float_t fPadLength; // the width of the pad | |
52 | Float_t fZWidth; //the z bin width | |
53 | ||
54 | TTree * fInput; //!input tree with digits - object not owner | |
55 | TTree * fOutput; //!output tree with digits - object not owner | |
56 | AliTPCClustersRow * fRowCl; //! current cluster row | |
57 | AliSimDigits * fRowDig; //! current digits row | |
58 | const AliTPCParam * fParam; //! tpc parameters | |
59 | Int_t fNcluster; // number of clusters - for given row | |
60 | ClassDef(AliTPCclustererMI,1) // Time Projection Chamber digits | |
61 | }; | |
62 | ||
63 | inline Bool_t AliTPCclustererMI::IsMaximum(Int_t q,Int_t max,const Int_t *bins){ | |
64 | //is this a local maximum ? | |
65 | if (bins[-max] >= q) return kFALSE; | |
66 | if (bins[-1 ] >= q) return kFALSE; | |
67 | if (bins[+max] > q) return kFALSE; | |
68 | if (bins[+1 ] > q) return kFALSE; | |
69 | if (bins[-max-1] >= q) return kFALSE; | |
70 | if (bins[+max-1] >= q) return kFALSE; | |
71 | if (bins[+max+1] > q) return kFALSE; | |
72 | if (bins[-max+1] >= q) return kFALSE; | |
73 | return kTRUE; | |
74 | } | |
75 | ||
76 | ||
77 | ||
78 | //----------------------------------------------------------------- | |
79 | ||
80 | #endif | |
81 | ||
82 |