]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDRecParam.h
Move tail cancellation parameters to recparam
[u/mrichter/AliRoot.git] / TRD / AliTRDRecParam.h
1 #ifndef AliTRDRECPARAM_H
2 #define AliTRDRECPARAM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 ///////////////////////////////////////////////////////////////////////////////
7 //                                                                           //
8 // Class containing constant reconstruction parameters                       //
9 //                                                                           //
10 ///////////////////////////////////////////////////////////////////////////////
11
12 /* $Id$ */
13
14 #include "TObject.h"
15
16 class AliTRDRecParam : public TObject
17 {
18   public:
19     static AliTRDRecParam* Instance();
20     static void Terminate();
21   
22     enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
23     
24     AliTRDRecParam(const AliTRDRecParam &p);   
25     AliTRDRecParam &operator=(const AliTRDRecParam &p); 
26     virtual void Copy(TObject &p) const;
27   
28     virtual void     SetLUT(Int_t lutOn = 1)                        { fLUTOn          = lutOn;    };
29     virtual void     SetClusMaxThresh(Int_t thresh)                 { fClusMaxThresh  = thresh;   };
30     virtual void     SetClusSigThresh(Int_t thresh)                 { fClusSigThresh  = thresh;   };
31     
32             void SetTailCancelation(Int_t tcOn = 1)                 { fTCOn           = tcOn;     };
33             void SetNexponential(Int_t nexp)                        { fTCnexp         = nexp;     };
34   
35     Bool_t   LUTOn()                                          const { return fLUTOn;         };
36     virtual Int_t    GetClusMaxThresh()                       const { return fClusMaxThresh; };
37     virtual Int_t    GetClusSigThresh()                       const { return fClusSigThresh; };
38     
39     virtual Double_t  LUTposition(Int_t iplane, Double_t ampL, Double_t ampC, Double_t ampR) const;
40   
41             Bool_t   TCOn()                                   const { return fTCOn;          };
42             Int_t    GetTCnexp()                              const { return fTCnexp;            };
43   
44   protected:
45     static AliTRDRecParam* fgInstance;     // Instance of this class (singleton implementation)
46     static Bool_t fgTerminated;               // Defines if this class has already been terminated and therefore does not return instances in GetInstance anymore
47     
48     void Init();
49   
50     // Clusterization parameter
51     Int_t                fClusMaxThresh;                      //  Threshold value for cluster maximum
52     Int_t                fClusSigThresh;                      //  Threshold value for cluster signal
53     
54     Int_t                fLUTOn;                              //  Switch for the lookup table method
55     Int_t                fLUTbin;                             //  Number of bins of the LUT
56     Float_t             *fLUT;                                //! The lookup table
57   
58     Int_t                fTCOn;                               //  Switch for the tail cancelation
59     Int_t                fTCnexp;                             //  Number of exponentials, digital filter
60     virtual void         FillLUT();
61   
62   private:
63     // this is a singleton, constructor is private!  
64     AliTRDRecParam();
65     ~AliTRDRecParam();
66   
67     ClassDef(AliTRDRecParam, 0)
68 };
69
70 #endif