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;
27 class TTreeSRedirector;
29 class AliTPCclustererMI : public TObject{
31 AliTPCclustererMI(const AliTPCParam* par);
32 virtual ~AliTPCclustererMI();
33 virtual void Digits2Clusters();
34 virtual void Digits2Clusters(AliRawReader* rawReader);
35 virtual void SetPedSubtraction(Bool_t pedestalSub = kFALSE)
36 { fPedSubtraction = pedestalSub; };
37 virtual void SetOldRCUFormat(Bool_t rcuFormat = kFALSE)
38 { fIsOldRCUFormat = rcuFormat; };
39 virtual void SetInput(TTree * tree); // set input tree with digits
40 virtual void SetOutput(TTree * tree); //set output tree with
42 Bool_t IsMaximum(Float_t k, Int_t max, const Float_t *bins);
43 void MakeCluster2(Int_t k,Int_t max,Float_t *bins,UInt_t m,
45 void MakeCluster(Int_t k,Int_t max,Float_t *bins,UInt_t m,
47 Float_t GetSigmaY2(Int_t iz);
48 Float_t GetSigmaZ2(Int_t iz);
49 Float_t FitMax(Float_t vmatrix[5][5], Float_t y, Float_t z, Float_t sigmay, Float_t sigmaz);
50 void AddCluster(AliTPCclusterMI &c); // add the cluster to the array
51 void UnfoldCluster(Float_t * matrix[7], Float_t recmatrix[5][5],
52 Float_t & meani, Float_t & meanj, Float_t & sum, Float_t &overlap );
54 Double_t ProcesSignal(Float_t * signal, Int_t nchannels, Int_t id[3]);
58 Float_t * fBins; //!digits array
59 Float_t * fResBins; //!digits array with res. after 1 finder
60 Int_t fLoop; //loop - cf in 2 loops
64 Int_t fSector; //!current sector
65 Int_t fRow; //!current row
66 Float_t fSign; //!current sign
67 Float_t fRx; // current radius
68 Float_t fPadWidth; // the width of the pad
69 Float_t fPadLength; // the width of the pad
70 Float_t fZWidth; //the z bin width
72 Bool_t fPedSubtraction; // perform pedestal subtraction or not
73 Bool_t fIsOldRCUFormat; // assume old RCU raw data format
75 TTree * fInput; //!input tree with digits - object not owner
76 TTree * fOutput; //!output tree with digits - object not owner
77 AliTPCClustersRow * fRowCl; //! current cluster row
78 AliSimDigits * fRowDig; //! current digits row
79 const AliTPCParam * fParam; //! tpc parameters
80 Int_t fNcluster; // number of clusters - for given row
81 TObjArray * fAmplitudeHisto; //! array of histograms of amplitudes
82 TTreeSRedirector *fDebugStreamer; //!debug streamer
84 ClassDef(AliTPCclustererMI,1) // Time Projection Chamber digits
87 inline Bool_t AliTPCclustererMI::IsMaximum(Float_t q,Int_t max,const Float_t *bins){
88 //is this a local maximum ?
89 if (bins[-max] >= q) return kFALSE;
90 if (bins[-1 ] >= q) return kFALSE;
91 if (bins[+max] > q) return kFALSE;
92 if (bins[+1 ] > q) return kFALSE;
93 if (bins[-max-1] >= q) return kFALSE;
94 if (bins[+max-1] >= q) return kFALSE;
95 if (bins[+max+1] > q) return kFALSE;
96 if (bins[-max+1] >= q) return kFALSE;
102 //-----------------------------------------------------------------