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