]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCclustererMI.h
1. Adding protection against the "digital noise" clusters
[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;
1c53abe2 31
32class AliTPCclustererMI : public TObject{
33public:
194b0609 34 AliTPCclustererMI(const AliTPCParam* par, const AliTPCRecoParam * recoParam = 0);
e046d791 35 AliTPCclustererMI(const AliTPCclustererMI &param); // copy constructor
36 AliTPCclustererMI &operator = (const AliTPCclustererMI & param); //assignment
65c045f0 37 virtual ~AliTPCclustererMI();
f8aae377 38 virtual void Digits2Clusters();
39 virtual void Digits2Clusters(AliRawReader* rawReader);
1c53abe2 40 virtual void SetInput(TTree * tree); // set input tree with digits
ebe95b38 41 virtual void SetOutput(TTree * tree); // set output tree with
42 virtual void FillRow(); // fill the output container - Tree or TObjArray
43 TObjArray * GetOutputArray(){return fOutputArray;}
1c53abe2 44private:
97f127bb 45 Bool_t IsMaximum(Float_t k, Int_t max, const Float_t *bins) const;
13116aec 46 void MakeCluster2(Int_t k,Int_t max,Float_t *bins,UInt_t m,
1c53abe2 47 AliTPCclusterMI &c);
13116aec 48 void MakeCluster(Int_t k,Int_t max,Float_t *bins,UInt_t m,
1c53abe2 49 AliTPCclusterMI &c);
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);
03fe1804 53 void AddCluster(AliTPCclusterMI &c, Float_t *matrix, Int_t pos); // add the cluster to the array
13116aec 54 void UnfoldCluster(Float_t * matrix[7], Float_t recmatrix[5][5],
1c53abe2 55 Float_t & meani, Float_t & meanj, Float_t & sum, Float_t &overlap );
940ed1f0 56 void FindClusters(AliTPCCalROC * noiseROC);
eea36fac 57 Bool_t AcceptCluster(AliTPCclusterMI*c);
940ed1f0 58 Double_t ProcesSignal(Float_t * signal, Int_t nchannels, Int_t id[3], Double_t &rms, Double_t &pedestalCalib);
1c53abe2 59
13116aec 60 Float_t * fBins; //!digits array
5b33a7f5 61 Int_t * fSigBins; //!digits array containg only timebins above threshold
62 Int_t fNSigBins;//!size of fSigBins
1c53abe2 63 Int_t fLoop; //loop - cf in 2 loops
97f127bb 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
1c53abe2 67 Int_t fSector; //!current sector
508541c7 68 Int_t fRow; //!current row
1c53abe2 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
b6f060dc 74 Bool_t fPedSubtraction; // perform pedestal subtraction or not
ef4ad662 75 AliRawEventHeaderBase *fEventHeader; //! event header information
76 UInt_t fTimeStamp; // Time Stamp
77 UInt_t fEventType; // Event Type
1c53abe2 78 TTree * fInput; //!input tree with digits - object not owner
79 TTree * fOutput; //!output tree with digits - object not owner
ebe95b38 80 TObjArray *fOutputArray; //! output TObjArray with pointers arrays of cluster
1c53abe2 81 AliTPCClustersRow * fRowCl; //! current cluster row
82 AliSimDigits * fRowDig; //! current digits row
83 const AliTPCParam * fParam; //! tpc parameters
84 Int_t fNcluster; // number of clusters - for given row
65c045f0 85 TTreeSRedirector *fDebugStreamer; //!debug streamer
194b0609 86 const AliTPCRecoParam * fRecoParam; //! reconstruction parameters
7041b196 87 Bool_t fBDumpSignal; // dump signal flag
9a090ccd 88 ClassDef(AliTPCclustererMI,2) // Time Projection Chamber digits
1c53abe2 89};
90
97f127bb 91inline Bool_t AliTPCclustererMI::IsMaximum(Float_t q,Int_t max,const Float_t *bins) const {
1c53abe2 92 //is this a local maximum ?
93 if (bins[-max] >= q) return kFALSE;
94 if (bins[-1 ] >= q) return kFALSE;
95 if (bins[+max] > q) return kFALSE;
96 if (bins[+1 ] > q) return kFALSE;
97 if (bins[-max-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 return kTRUE;
102}
103
104
105
106//-----------------------------------------------------------------
107
108#endif
109
110