]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCclustererMI.h
Extacting the OCDB in a separate module. The detectors have write permission in the...
[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;
98ee6d31 21class TClonesArray;
1c53abe2 22class AliTPCParam;
194b0609 23class AliTPCRecoParam;
1c53abe2 24class AliTPCclusterMI;
25class AliTPCClustersRow;
f8aae377 26class AliRawReader;
1c53abe2 27class AliSimDigits;
28class TTree;
65c045f0 29class TTreeSRedirector;
ef4ad662 30class AliRawEventHeaderBase;
940ed1f0 31class AliTPCCalROC;
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);
1c53abe2 41 virtual void SetInput(TTree * tree); // set input tree with digits
ebe95b38 42 virtual void SetOutput(TTree * tree); // set output tree with
43 virtual void FillRow(); // fill the output container - Tree or TObjArray
44 TObjArray * GetOutputArray(){return fOutputArray;}
98ee6d31 45 TClonesArray * GetOutputClonesArray(){return fOutputClonesArray;}
46
47 void StoreInClonesArray(Bool_t bOutput = kTRUE) {fBClonesArray = bOutput;} // store output clusters in TClonesArray
48
1c53abe2 49private:
97f127bb 50 Bool_t IsMaximum(Float_t k, Int_t max, const Float_t *bins) const;
13116aec 51 void MakeCluster2(Int_t k,Int_t max,Float_t *bins,UInt_t m,
1c53abe2 52 AliTPCclusterMI &c);
13116aec 53 void MakeCluster(Int_t k,Int_t max,Float_t *bins,UInt_t m,
1c53abe2 54 AliTPCclusterMI &c);
55 Float_t GetSigmaY2(Int_t iz);
56 Float_t GetSigmaZ2(Int_t iz);
57 Float_t FitMax(Float_t vmatrix[5][5], Float_t y, Float_t z, Float_t sigmay, Float_t sigmaz);
03fe1804 58 void AddCluster(AliTPCclusterMI &c, Float_t *matrix, Int_t pos); // add the cluster to the array
13116aec 59 void UnfoldCluster(Float_t * matrix[7], Float_t recmatrix[5][5],
1c53abe2 60 Float_t & meani, Float_t & meanj, Float_t & sum, Float_t &overlap );
940ed1f0 61 void FindClusters(AliTPCCalROC * noiseROC);
eea36fac 62 Bool_t AcceptCluster(AliTPCclusterMI*c);
940ed1f0 63 Double_t ProcesSignal(Float_t * signal, Int_t nchannels, Int_t id[3], Double_t &rms, Double_t &pedestalCalib);
1c53abe2 64
13116aec 65 Float_t * fBins; //!digits array
5b33a7f5 66 Int_t * fSigBins; //!digits array containg only timebins above threshold
67 Int_t fNSigBins;//!size of fSigBins
1c53abe2 68 Int_t fLoop; //loop - cf in 2 loops
97f127bb 69 Int_t fMaxBin; //current ( for current sector) maximal bin
70 Int_t fMaxTime; //current ( for current sector) maximal time
71 Int_t fMaxPad; //current ( for current sector) maximal pad
1c53abe2 72 Int_t fSector; //!current sector
508541c7 73 Int_t fRow; //!current row
1c53abe2 74 Float_t fSign; //!current sign
75 Float_t fRx; // current radius
76 Float_t fPadWidth; // the width of the pad
77 Float_t fPadLength; // the width of the pad
78 Float_t fZWidth; //the z bin width
b6f060dc 79 Bool_t fPedSubtraction; // perform pedestal subtraction or not
ef4ad662 80 AliRawEventHeaderBase *fEventHeader; //! event header information
81 UInt_t fTimeStamp; // Time Stamp
82 UInt_t fEventType; // Event Type
1c53abe2 83 TTree * fInput; //!input tree with digits - object not owner
84 TTree * fOutput; //!output tree with digits - object not owner
ebe95b38 85 TObjArray *fOutputArray; //! output TObjArray with pointers arrays of cluster
98ee6d31 86 TClonesArray *fOutputClonesArray; //! output TClonesArray with clusters
1c53abe2 87 AliTPCClustersRow * fRowCl; //! current cluster row
88 AliSimDigits * fRowDig; //! current digits row
89 const AliTPCParam * fParam; //! tpc parameters
90 Int_t fNcluster; // number of clusters - for given row
98ee6d31 91 Int_t fNclusters; // tot number of clusters
65c045f0 92 TTreeSRedirector *fDebugStreamer; //!debug streamer
194b0609 93 const AliTPCRecoParam * fRecoParam; //! reconstruction parameters
7041b196 94 Bool_t fBDumpSignal; // dump signal flag
98ee6d31 95 Bool_t fBClonesArray; // output clusters stored in TClonesArray
96
9a090ccd 97 ClassDef(AliTPCclustererMI,2) // Time Projection Chamber digits
1c53abe2 98};
99
97f127bb 100inline Bool_t AliTPCclustererMI::IsMaximum(Float_t q,Int_t max,const Float_t *bins) const {
1c53abe2 101 //is this a local maximum ?
102 if (bins[-max] >= q) return kFALSE;
103 if (bins[-1 ] >= q) return kFALSE;
104 if (bins[+max] > q) return kFALSE;
105 if (bins[+1 ] > q) return kFALSE;
106 if (bins[-max-1] >= q) return kFALSE;
107 if (bins[+max-1] >= q) return kFALSE;
108 if (bins[+max+1] > q) return kFALSE;
109 if (bins[-max+1] >= q) return kFALSE;
110 return kTRUE;
111}
112
113
114
115//-----------------------------------------------------------------
116
117#endif
118
119