]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDmcm.h
Initial check-in of the model classes for User module
[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 AliTRDtrigParam;
17
18 class AliTRDmcm : public TObject {
19
20  public:
21
22   enum { kMaxTrackletsPerMCM = 4, kMcmCol = 21, kMcmTBmax = 60, kSelClus = 6, kMaxClus = 4 };
23
24   AliTRDmcm();
25   AliTRDmcm(const AliTRDmcm &m);
26   AliTRDmcm(AliTRDtrigParam *trigp, Int_t id);
27   virtual         ~AliTRDmcm();
28   AliTRDmcm       &operator=(const AliTRDmcm &m);
29
30   virtual void     Copy(TObject &m) const;
31
32           void     SetRobId(Int_t id)                          { fRobId = id; };
33           void     SetChaId(Int_t id)                          { fChaId = id; };
34           void     SetRow(Int_t row)                           { fRow = row;  };
35           void     SetColRange(Int_t colf, Int_t coll)         { fColFirst = colf; fColLast = coll; };
36           void     SetADC(Int_t icol, Int_t itb, Float_t adc)  { fADC[icol][itb] = adc;       };
37           void     SetCluster(Int_t icol, Int_t itb)           { fIsClus[icol][itb] = kTRUE;  };
38           void     UnSetCluster(Int_t icol, Int_t itb)         { fIsClus[icol][itb] = kFALSE; };
39
40           Int_t   *GetTrkIndex()                               { return &fTrkIndex[0];        };
41           Int_t    GetRobId() const { return fRobId; };
42           Int_t    GetChaId() const { return fChaId; };
43           Int_t    GetRow() const { return fRow; };
44           void     GetColRange(Int_t &colf, Int_t &coll) const { colf = fColFirst; coll = fColLast; };
45           Float_t  GetADC(Int_t icol, Int_t itb) const         { return fADC[icol][itb];     };
46           Int_t    GetNtrkSeeds() const                        { return fNtrkSeeds;          };
47           Int_t   *GetSeedCol()                                { return &fSeedCol[0];        };
48           Int_t   *GetPadHits()                                { return &fPadHits[0];        };
49           Bool_t   IsCluster(Int_t icol, Int_t itim) const     { return fIsClus[icol][itim]; };
50           Int_t    Ntrk() const { return fNtrk; };
51           Int_t    Id() const { return fId; };
52
53           void     AddTrk(Int_t id);
54           void     Reset();
55           Bool_t   Run();
56           Bool_t   IsCluster(Float_t amp[3]) const;
57           void     AddTimeBin(Int_t itime);
58           Int_t    CreateSeeds();
59           void     Sort(Int_t nel, Int_t *x1, Int_t *x2, Int_t dir);
60
61           void     Filter(Int_t nexp, Int_t ftype = 0);
62           void     DeConvExpA(Double_t *source, Double_t *target, Int_t n, Int_t nexp);
63           void     DeConvExpD(Double_t *source, Int_t    *target, Int_t n, Int_t nexp);
64           void     DeConvExpMI(Double_t *source, Double_t *target, Int_t n);
65           void     TailMakerSpline(Double_t *ampin, Double_t *ampout, Double_t lambda, Int_t n);
66           void     TailCancelationMI(Double_t *ampin, Double_t *ampout, Double_t norm, Double_t lambda, Int_t n);
67
68  protected:
69
70   AliTRDtrigParam *fTrigParam;                         //! Pointer to the trigger parameters class
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,2)                                //  TRD MCM class
98
99 };
100
101 #endif