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 AliTPCRecoParam;
23 class AliTPCclusterMI;
24 class AliTPCClustersRow;
28 class TTreeSRedirector;
29 class AliRawEventHeaderBase;
32 class AliTPCclustererMI : public TObject{
34 AliTPCclustererMI(const AliTPCParam* par, const AliTPCRecoParam * recoParam = 0);
35 AliTPCclustererMI(const AliTPCclustererMI ¶m); // copy constructor
36 AliTPCclustererMI &operator = (const AliTPCclustererMI & param); //assignment
37 virtual ~AliTPCclustererMI();
38 virtual void Digits2Clusters();
39 virtual void Digits2Clusters(AliRawReader* rawReader);
40 virtual void SetOldRCUFormat(Bool_t rcuFormat = kFALSE)
41 { fIsOldRCUFormat = rcuFormat; };
42 virtual void SetInput(TTree * tree); // set input tree with digits
43 virtual void SetOutput(TTree * tree); //set output tree with
45 Bool_t IsMaximum(Float_t k, Int_t max, const Float_t *bins) const;
46 void MakeCluster2(Int_t k,Int_t max,Float_t *bins,UInt_t m,
48 void MakeCluster(Int_t k,Int_t max,Float_t *bins,UInt_t m,
50 Float_t GetSigmaY2(Int_t iz);
51 Float_t GetSigmaZ2(Int_t iz);
52 Float_t FitMax(Float_t vmatrix[5][5], Float_t y, Float_t z, Float_t sigmay, Float_t sigmaz);
53 void AddCluster(AliTPCclusterMI &c); // add the cluster to the array
54 void UnfoldCluster(Float_t * matrix[7], Float_t recmatrix[5][5],
55 Float_t & meani, Float_t & meanj, Float_t & sum, Float_t &overlap );
56 void FindClusters(AliTPCCalROC * noiseROC);
57 Double_t ProcesSignal(Float_t * signal, Int_t nchannels, Int_t id[3], Double_t &rms, Double_t &pedestalCalib);
61 Float_t * fBins; //!digits array
62 Float_t * fResBins; //!digits array with res. after 1 finder
63 Int_t fLoop; //loop - cf in 2 loops
64 Int_t fMaxBin; //current ( for current sector) maximal bin
65 Int_t fMaxTime; //current ( for current sector) maximal time
66 Int_t fMaxPad; //current ( for current sector) maximal pad
67 Int_t fSector; //!current sector
68 Int_t fRow; //!current row
69 Float_t fSign; //!current sign
70 Float_t fRx; // current radius
71 Float_t fPadWidth; // the width of the pad
72 Float_t fPadLength; // the width of the pad
73 Float_t fZWidth; //the z bin width
75 Bool_t fPedSubtraction; // perform pedestal subtraction or not
76 Bool_t fIsOldRCUFormat; // assume old RCU raw data format
77 AliRawEventHeaderBase *fEventHeader; //! event header information
78 UInt_t fTimeStamp; // Time Stamp
79 UInt_t fEventType; // Event Type
80 TTree * fInput; //!input tree with digits - object not owner
81 TTree * fOutput; //!output tree with digits - object not owner
82 AliTPCClustersRow * fRowCl; //! current cluster row
83 AliSimDigits * fRowDig; //! current digits row
84 const AliTPCParam * fParam; //! tpc parameters
85 Int_t fNcluster; // number of clusters - for given row
86 TObjArray * fAmplitudeHisto; //! array of histograms of amplitudes
87 TTreeSRedirector *fDebugStreamer; //!debug streamer
88 const AliTPCRecoParam * fRecoParam; //! reconstruction parameters
89 ClassDef(AliTPCclustererMI,1) // Time Projection Chamber digits
92 inline Bool_t AliTPCclustererMI::IsMaximum(Float_t q,Int_t max,const Float_t *bins) const {
93 //is this a local maximum ?
94 if (bins[-max] >= q) return kFALSE;
95 if (bins[-1 ] >= q) return kFALSE;
96 if (bins[+max] > q) return kFALSE;
97 if (bins[+1 ] > q) return kFALSE;
98 if (bins[-max-1] >= q) return kFALSE;
99 if (bins[+max-1] >= q) return kFALSE;
100 if (bins[+max+1] > q) return kFALSE;
101 if (bins[-max+1] >= q) return kFALSE;
107 //-----------------------------------------------------------------