]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDmcm.h
Add QA analysis classes
[u/mrichter/AliRoot.git] / TRD / AliTRDmcm.h
1 #ifndef ALITRDMCM_H
2 #define ALITRDMCM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 ////////////////////////////////////////////////////////////////////////////
9 //                                                                        //
10 //  Multi Chip Module object                                              //
11 //                                                                        //
12 ////////////////////////////////////////////////////////////////////////////
13
14 #include <TObject.h>
15
16 class AliTRDmcm : public TObject {
17
18  public:
19
20   enum { kMaxTrackletsPerMCM = 4
21        , kMcmCol             = 21
22        , kMcmTBmax           = 60
23        , kSelClus            = 6
24        , kMaxClus            = 4 };
25
26   AliTRDmcm();
27   AliTRDmcm(const AliTRDmcm &m);
28   AliTRDmcm(Int_t id);
29   virtual         ~AliTRDmcm();
30   AliTRDmcm       &operator=(const AliTRDmcm &m);
31
32   virtual void     Copy(TObject &m) const;
33
34           void     SetRobId(Int_t id)                          { fRobId = id; };
35           void     SetChaId(Int_t id)                          { fChaId = id; };
36           void     SetRow(Int_t row)                           { fRow = row;  };
37           void     SetColRange(Int_t colf, Int_t coll)         { fColFirst = colf; fColLast = coll; };
38           void     SetADC(Int_t icol, Int_t itb, Float_t adc)  { fADC[icol][itb] = adc;       };
39           void     SetCluster(Int_t icol, Int_t itb)           { fIsClus[icol][itb] = kTRUE;  };
40           void     UnSetCluster(Int_t icol, Int_t itb)         { fIsClus[icol][itb] = kFALSE; };
41
42           Int_t   *GetTrkIndex()                               { return &fTrkIndex[0];        };
43           Int_t    GetRobId() const { return fRobId; };
44           Int_t    GetChaId() const { return fChaId; };
45           Int_t    GetRow() const { return fRow; };
46           void     GetColRange(Int_t &colf, Int_t &coll) const { colf = fColFirst; coll = fColLast; };
47           Float_t  GetADC(Int_t icol, Int_t itb) const         { return fADC[icol][itb];     };
48           Int_t    GetNtrkSeeds() const                        { return fNtrkSeeds;          };
49           Int_t   *GetSeedCol()                                { return &fSeedCol[0];        };
50           Int_t   *GetPadHits()                                { return &fPadHits[0];        };
51           Bool_t   IsCluster(Int_t icol, Int_t itim) const     { return fIsClus[icol][itim]; };
52           Int_t    Ntrk() const { return fNtrk; };
53           Int_t    Id() const { return fId; };
54
55           void     AddTrk(Int_t id);
56           void     Reset();
57           Bool_t   Run();
58           Bool_t   IsCluster(Float_t amp[3]) const;
59           void     AddTimeBin(Int_t itime);
60           Int_t    CreateSeeds();
61           void     Sort(Int_t nel, Int_t *x1, Int_t *x2, Int_t dir) const;
62
63           void     Filter(Int_t nexp, Int_t ftype = 0);
64           void     DeConvExpA(Double_t *source, Double_t *target, Int_t n, Int_t nexp);
65           void     DeConvExpD(Double_t *source, Int_t    *target, Int_t n, Int_t nexp);
66           void     DeConvExpMI(Double_t *source, Double_t *target, Int_t n);
67           void     TailMakerSpline(Double_t *ampin, Double_t *ampout, Double_t lambda, Int_t n);
68           void     TailCancelationMI(Double_t *ampin, Double_t *ampout, Double_t norm, Double_t lambda, Int_t n);
69
70  protected:
71
72           Int_t    fNtrk;                              //  Number of found tracklets
73           Int_t    fTrkIndex[kMaxTrackletsPerMCM];     //  Index of found tracklets
74           Int_t    fRobId;                             //  ROB id
75           Int_t    fChaId;                             //  Chamber id
76           Int_t    fRow;                               //  Pad row number (0-11 or 0-15)
77           Int_t    fColFirst;                          //  First pad column
78           Int_t    fColLast;                           //  Last pad column (<)
79           Float_t  fADC[kMcmCol][kMcmTBmax];           //! Array with MCM ADC values
80           Bool_t   fIsClus[kMcmCol][kMcmTBmax];        //! Flag of a cluster maximum
81           Int_t    fTime1;                             //  First time bin for tracking (incl.)
82           Int_t    fTime2;                             //  Last  time bin for tracking (incl.)
83           Float_t  fClusThr;                           //  Cluster threshold
84           Float_t  fPadThr;                            //  Pad threshold
85           Int_t    fPadHits[kMcmCol];                  //  Hit counter in pads
86           Int_t    fNtrkSeeds;                         //  Number of found seeds
87           Int_t    fSeedCol[kMaxTrackletsPerMCM];      //  Column number of found tracklet seeds
88                                                        //  Filter parameters (1 = long, 2 = short component)
89           Float_t  fR1;                                //  Time constant [microseconds] 
90           Float_t  fR2;                                //  Time constant [microseconds]
91           Float_t  fC1;                                //  Weight
92           Float_t  fC2;                                //  Weight
93           Float_t  fPedestal;                          //  ADC baseline (pedestal)
94
95           Int_t    fId;                                //  Dummy id
96  
97   ClassDef(AliTRDmcm,3)                                //  TRD MCM class
98
99 };
100
101 #endif