]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCclustererMI.h
Added const members to contain the IDs of FMD files used by the preprocessor and...
[u/mrichter/AliRoot.git] / TPC / AliTPCclustererMI.h
CommitLineData
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
20class TFile;
21class AliTPCParam;
194b0609 22class AliTPCRecoParam;
1c53abe2 23class AliTPCclusterMI;
24class AliTPCClustersRow;
f8aae377 25class AliRawReader;
1c53abe2 26class AliSimDigits;
27class TTree;
65c045f0 28class TTreeSRedirector;
ef4ad662 29class AliRawEventHeaderBase;
940ed1f0 30class AliTPCCalROC;
03fe1804 31class TVirtualFFT;
1c53abe2 32
33class AliTPCclustererMI : public TObject{
34public:
194b0609 35 AliTPCclustererMI(const AliTPCParam* par, const AliTPCRecoParam * recoParam = 0);
e046d791 36 AliTPCclustererMI(const AliTPCclustererMI &param); // copy constructor
37 AliTPCclustererMI &operator = (const AliTPCclustererMI & param); //assignment
65c045f0 38 virtual ~AliTPCclustererMI();
f8aae377 39 virtual void Digits2Clusters();
40 virtual void Digits2Clusters(AliRawReader* rawReader);
c8c88e5d 41 virtual void SetOldRCUFormat(Bool_t rcuFormat = kFALSE)
42 { fIsOldRCUFormat = rcuFormat; };
1c53abe2 43 virtual void SetInput(TTree * tree); // set input tree with digits
44 virtual void SetOutput(TTree * tree); //set output tree with
45private:
97f127bb 46 Bool_t IsMaximum(Float_t k, Int_t max, const Float_t *bins) const;
13116aec 47 void MakeCluster2(Int_t k,Int_t max,Float_t *bins,UInt_t m,
1c53abe2 48 AliTPCclusterMI &c);
13116aec 49 void MakeCluster(Int_t k,Int_t max,Float_t *bins,UInt_t m,
1c53abe2 50 AliTPCclusterMI &c);
51 Float_t GetSigmaY2(Int_t iz);
52 Float_t GetSigmaZ2(Int_t iz);
53 Float_t FitMax(Float_t vmatrix[5][5], Float_t y, Float_t z, Float_t sigmay, Float_t sigmaz);
03fe1804 54 void AddCluster(AliTPCclusterMI &c, Float_t *matrix, Int_t pos); // add the cluster to the array
13116aec 55 void UnfoldCluster(Float_t * matrix[7], Float_t recmatrix[5][5],
1c53abe2 56 Float_t & meani, Float_t & meanj, Float_t & sum, Float_t &overlap );
940ed1f0 57 void FindClusters(AliTPCCalROC * noiseROC);
58 Double_t ProcesSignal(Float_t * signal, Int_t nchannels, Int_t id[3], Double_t &rms, Double_t &pedestalCalib);
03fe1804 59 void DumpHistos();
60 Int_t TransformFFT(Float_t *input, Float_t threshold, Bool_t locMax, Float_t *freq, Float_t *re, Float_t *im, Float_t *mag, Float_t *phi);
1c53abe2 61
13116aec 62 Float_t * fBins; //!digits array
5b33a7f5 63 Int_t * fSigBins; //!digits array containg only timebins above threshold
64 Int_t fNSigBins;//!size of fSigBins
1c53abe2 65 Int_t fLoop; //loop - cf in 2 loops
97f127bb 66 Int_t fMaxBin; //current ( for current sector) maximal bin
67 Int_t fMaxTime; //current ( for current sector) maximal time
68 Int_t fMaxPad; //current ( for current sector) maximal pad
1c53abe2 69 Int_t fSector; //!current sector
508541c7 70 Int_t fRow; //!current row
1c53abe2 71 Float_t fSign; //!current sign
72 Float_t fRx; // current radius
73 Float_t fPadWidth; // the width of the pad
74 Float_t fPadLength; // the width of the pad
75 Float_t fZWidth; //the z bin width
b6f060dc 76 Bool_t fPedSubtraction; // perform pedestal subtraction or not
c8c88e5d 77 Bool_t fIsOldRCUFormat; // assume old RCU raw data format
ef4ad662 78 AliRawEventHeaderBase *fEventHeader; //! event header information
79 UInt_t fTimeStamp; // Time Stamp
80 UInt_t fEventType; // Event Type
1c53abe2 81 TTree * fInput; //!input tree with digits - object not owner
82 TTree * fOutput; //!output tree with digits - object not owner
83 AliTPCClustersRow * fRowCl; //! current cluster row
84 AliSimDigits * fRowDig; //! current digits row
85 const AliTPCParam * fParam; //! tpc parameters
86 Int_t fNcluster; // number of clusters - for given row
65c045f0 87 TObjArray * fAmplitudeHisto; //! array of histograms of amplitudes
88 TTreeSRedirector *fDebugStreamer; //!debug streamer
194b0609 89 const AliTPCRecoParam * fRecoParam; //! reconstruction parameters
7041b196 90 Bool_t fBDumpSignal; // dump signal flag
03fe1804 91 TVirtualFFT *fFFTr2c; //! Fast Furier transform object
1c53abe2 92 ClassDef(AliTPCclustererMI,1) // Time Projection Chamber digits
93};
94
97f127bb 95inline Bool_t AliTPCclustererMI::IsMaximum(Float_t q,Int_t max,const Float_t *bins) const {
1c53abe2 96 //is this a local maximum ?
97 if (bins[-max] >= q) return kFALSE;
98 if (bins[-1 ] >= q) return kFALSE;
99 if (bins[+max] > q) return kFALSE;
100 if (bins[+1 ] > q) return kFALSE;
101 if (bins[-max-1] >= q) return kFALSE;
102 if (bins[+max-1] >= q) return kFALSE;
103 if (bins[+max+1] > q) return kFALSE;
104 if (bins[-max+1] >= q) return kFALSE;
105 return kTRUE;
106}
107
108
109
110//-----------------------------------------------------------------
111
112#endif
113
114