1 #ifndef ALITPCCLUSTERERMI_H
2 #define ALITPCCLUSTERERMI_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
11 //-------------------------------------------------------
14 // Origin: Marian Ivanov
15 //-------------------------------------------------------
18 #define kMAXCLUSTER 2500
22 class AliTPCclusterMI;
23 class AliTPCClustersRow;
28 class AliTPCclustererMI : public TObject{
30 AliTPCclustererMI(const AliTPCParam* par);
31 virtual void Digits2Clusters();
32 virtual void Digits2Clusters(AliRawReader* rawReader);
33 virtual void SetInput(TTree * tree); // set input tree with digits
34 virtual void SetOutput(TTree * tree); //set output tree with
36 Bool_t IsMaximum(Int_t k, Int_t max, const Int_t *bins);
37 void MakeCluster2(Int_t k,Int_t max,Int_t *bins,UInt_t m,
39 void MakeCluster(Int_t k,Int_t max,Int_t *bins,UInt_t m,
41 Float_t GetSigmaY2(Int_t iz);
42 Float_t GetSigmaZ2(Int_t iz);
43 Float_t FitMax(Float_t vmatrix[5][5], Float_t y, Float_t z, Float_t sigmay, Float_t sigmaz);
44 void AddCluster(AliTPCclusterMI &c); // add the cluster to the array
45 void UnfoldCluster(Int_t * matrix[7], Float_t recmatrix[5][5],
46 Float_t & meani, Float_t & meanj, Float_t & sum, Float_t &overlap );
51 Int_t * fBins; //!digits array
52 Int_t * fResBins; //!digits array with res. after 1 finder
53 Int_t fLoop; //loop - cf in 2 loops
57 Int_t fSector; //!current sector
58 Float_t fSign; //!current sign
59 Float_t fRx; // current radius
60 Float_t fPadWidth; // the width of the pad
61 Float_t fPadLength; // the width of the pad
62 Float_t fZWidth; //the z bin width
64 TTree * fInput; //!input tree with digits - object not owner
65 TTree * fOutput; //!output tree with digits - object not owner
66 AliTPCClustersRow * fRowCl; //! current cluster row
67 AliSimDigits * fRowDig; //! current digits row
68 const AliTPCParam * fParam; //! tpc parameters
69 Int_t fNcluster; // number of clusters - for given row
70 ClassDef(AliTPCclustererMI,1) // Time Projection Chamber digits
73 inline Bool_t AliTPCclustererMI::IsMaximum(Int_t q,Int_t max,const Int_t *bins){
74 //is this a local maximum ?
75 if (bins[-max] >= q) return kFALSE;
76 if (bins[-1 ] >= q) return kFALSE;
77 if (bins[+max] > q) return kFALSE;
78 if (bins[+1 ] > q) return kFALSE;
79 if (bins[-max-1] >= q) return kFALSE;
80 if (bins[+max-1] >= q) return kFALSE;
81 if (bins[+max+1] > q) return kFALSE;
82 if (bins[-max+1] >= q) return kFALSE;
88 //-----------------------------------------------------------------