]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDparameter.h
Track time measurement (S.Radomski)
[u/mrichter/AliRoot.git] / TRD / AliTRDparameter.h
1 #ifndef ALITRDPARAMETER_H
2 #define ALITRDPARAMETER_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 //  TRD parameter class                                                      //
11 //                                                                           //
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #include "TNamed.h"
15
16 class AliTRDgeometry;
17
18 class AliTRDparameter : public TNamed {
19
20  public:
21
22   enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
23  
24   AliTRDparameter();
25   AliTRDparameter(const Text_t* name, const Text_t* title);
26   AliTRDparameter(const AliTRDparameter &p);   
27   virtual ~AliTRDparameter();
28   AliTRDparameter &operator=(const AliTRDparameter &p); 
29
30   virtual void     Copy(TObject &p);
31   virtual void     Init();
32   virtual void     ReInit();
33  
34   virtual void     SetNRowPad();
35   virtual void     SetNRowPad(const Int_t p, const Int_t c, const Int_t npad);
36   virtual void     SetColPadSize(const Int_t p, const Float_t s);
37   virtual void     SetNTimeBin(const Int_t nbin);
38   virtual void     SetExpandTimeBin(const Int_t nbefore, const Int_t nafter)
39                                                                   { fTimeBefore = nbefore;
40                                                                     fTimeAfter  = nafter; };
41
42   virtual void     SetGasGain(Float_t gasgain)                    { fGasGain        = gasgain;  };
43   virtual void     SetNoise(Float_t noise)                        { fNoise          = noise;    };
44   virtual void     SetChipGain(Float_t chipgain)                  { fChipGain       = chipgain; };
45   virtual void     SetADCoutRange(Float_t range)                  { fADCoutRange    = range;    };
46   virtual void     SetADCinRange(Float_t range)                   { fADCinRange     = range;    };
47   virtual void     SetADCthreshold(Int_t thresh)                  { fADCthreshold   = thresh;   };
48   virtual void     SetADCbaseline(Int_t basel)                    { fADCbaseline    = basel;    };   
49   virtual void     SetDiffusion(Int_t diffOn = 1)                 { fDiffusionOn    = diffOn;   };
50   virtual void     SetElAttach(Int_t elOn = 1)                    { fElAttachOn     = elOn;     };
51   virtual void     SetElAttachProp(Float_t prop)                  { fElAttachProp   = prop;     };
52   virtual void     SetExB(Int_t exbOn = 1)                        { fExBOn          = exbOn;    };
53   virtual void     SetPadResponse(Int_t prfOn = 1)                { fPRFOn          = prfOn;    };
54   virtual void     SetTimeResponse(Int_t trfOn = 1)               { fTRFOn          = trfOn;   
55                                                                     ReInit();                   };
56   virtual void     SetCrossTalk(Int_t ctOn = 1)                   { fCTOn           = ctOn;   
57                                                                     ReInit();                   };
58   virtual void     SetTailCancelation(Int_t tcOn = 1)             { fTCOn           = tcOn;     };
59   virtual void     SetNexponential(Int_t nexp)                    { fTCnexp         = nexp;     };
60   virtual void     SetDriftVelocity(Float_t v)                    { fDriftVelocity  = v;       
61                                                                     ReInit();                   };
62   virtual void     SetPadCoupling(Float_t v)                      { fPadCoupling    = v;        };
63   virtual void     SetTimeCoupling(Float_t v)                     { fTimeCoupling   = v;        };
64   virtual void     SetTiltingAngle(Float_t v);
65
66   virtual void     SetLUT(Int_t lutOn = 1)                        { fLUTOn          = lutOn;    };
67   virtual void     SetClusMaxThresh(Int_t thresh)                 { fClusMaxThresh  = thresh;   };
68   virtual void     SetClusSigThresh(Int_t thresh)                 { fClusSigThresh  = thresh;   };
69   
70           Int_t    GetRowMax(const Int_t p, const Int_t c, const Int_t s)     
71                                                             const { return fRowMax[p][c][s]; };
72           Int_t    GetColMax(const Int_t p)                 const { return fColMax[p];       };
73           Int_t    GetTimeMax()                             const { return fTimeMax;         };
74           Int_t    GetTimeBefore()                          const { return fTimeBefore;      }; 
75           Int_t    GetTimeAfter()                           const { return fTimeAfter;       }; 
76           Int_t    GetTimeTotal()                           const { return fTimeMax 
77                                                                          + fTimeBefore 
78                                                                          + fTimeAfter; };
79
80           Float_t  GetRow0(const Int_t p, const Int_t c, const Int_t s)       
81                                                             const { return fRow0[p][c][s]; };
82           Float_t  GetCol0(const Int_t p)                   const { return fCol0[p];       };
83           Float_t  GetTime0(const Int_t p)                  const { return fTime0[p];      };
84
85           Float_t  GetRowPadSize(const Int_t p, const Int_t c, const Int_t s) 
86                                                             const { return fRowPadSize[p][c][s]; };
87           Float_t  GetColPadSize(const Int_t p)             const { return fColPadSize[p];       };
88           Float_t  GetTimeBinSize()                         const { return fTimeBinSize;         };
89
90           Float_t  GetGasGain()                             const { return fGasGain;       };
91           Float_t  GetNoise()                               const { return fNoise;         };
92           Float_t  GetChipGain()                            const { return fChipGain;      };
93           Float_t  GetADCoutRange()                         const { return fADCoutRange;   };
94           Float_t  GetADCinRange()                          const { return fADCinRange;    };
95           Int_t    GetADCthreshold()                        const { return fADCthreshold;  };
96           Int_t    GetADCbaseline()                         const { return fADCbaseline;   };
97           Float_t  GetDiffusionT()                          const { return fDiffusionT;    };
98           Float_t  GetDiffusionL()                          const { return fDiffusionL;    };
99           Float_t  GetElAttachProp()                        const { return fElAttachProp;  };
100           Float_t  GetOmegaTau()                            const { return fOmegaTau;      };
101           Float_t  GetDriftVelocity()                       const { return fDriftVelocity; };
102           Float_t  GetPadCoupling()                         const { return fPadCoupling;   };
103           Float_t  GetTimeCoupling()                        const { return fTimeCoupling;  };
104           Float_t  GetTimeBinWidth()                        const { return fTimeBinWidth;  };
105           Float_t  GetTRFlo()                               const { return fTRFlo;         };
106           Float_t  GetTRFhi()                               const { return fTRFhi;         };
107           Float_t  GetLorentzFactor()                       const { return fLorentzFactor; };
108           Int_t    GetTCnexp()                              const { return fTCnexp;        };
109           Float_t  GetTiltingAngle() const;
110   virtual Float_t  GetDiffusionL(Float_t vd, Float_t b);
111   virtual Float_t  GetDiffusionT(Float_t vd, Float_t b);
112   virtual Float_t  GetOmegaTau(Float_t vd, Float_t b);
113
114   virtual Int_t    GetClusMaxThresh()                       const { return fClusMaxThresh; };
115   virtual Int_t    GetClusSigThresh()                       const { return fClusSigThresh; };
116
117           Int_t    ExBOn()                                  const { return fExBOn;         };
118           Int_t    PRFOn()                                  const { return fPRFOn;         };
119           Int_t    TRFOn()                                  const { return fTRFOn;         };
120           Int_t    ElAttachOn()                             const { return fElAttachOn;    }; 
121           Int_t    DiffusionOn()                            const { return fDiffusionOn;   };
122           Int_t    CTOn()                                   const { return fCTOn;          };
123           Int_t    TCOn()                                   const { return fTCOn;          };
124           Int_t    LUTOn()                                  const { return fLUTOn;         };
125
126   virtual Int_t    Diffusion(Float_t driftlength, Float_t *xyz);
127   virtual Int_t    ExB(Float_t driftlength, Float_t *xyz) const;  
128   virtual Float_t  Col0Tilted(Float_t col0, Float_t rowOffset, Int_t plane);
129   virtual Int_t    PadResponse(Float_t signal, Float_t dist, Int_t plane, Float_t *pad) const;
130   virtual Float_t  CrossTalk(Float_t time) const; 
131   virtual Float_t  TimeResponse(Float_t time) const;  
132   virtual Double_t LUTposition(Int_t iplane, Double_t ampL, Double_t ampC, Double_t ampR) const;
133
134  protected:
135
136   AliTRDgeometry      *fGeo;                                //! TRD geometry       
137
138   // Pad plane geometry
139   Int_t                fRowMax[kNplan][kNcham][kNsect];     //  Number of pad-rows
140   Int_t                fColMax[kNplan];                     //  Number of pad-columns
141   Int_t                fTimeMax;                            //  Number of timebins in the drift region
142   Int_t                fTimeBefore;                         //  Number of timebins before the drift region
143   Int_t                fTimeAfter;                          //  Number of timebins after the drift region
144
145   Float_t              fRow0[kNplan][kNcham][kNsect];       //  Row-position of pad 0
146   Float_t              fCol0[kNplan];                       //  Column-position of pad 0
147   Float_t              fTime0[kNplan];                      //  Time-position of pad 0
148
149   Float_t              fRowPadSize[kNplan][kNcham][kNsect]; //  Pad size in z-direction
150   Float_t              fColPadSize[kNplan];                 //  Pad size in rphi-direction
151   Float_t              fTimeBinSize;                        //  Size of the time buckets
152
153   // Digitization parameter
154   Float_t              fField;                              //  Magnetic field
155   Float_t              fGasGain;                            //  Gas gain
156   Float_t              fNoise;                              //  Electronics noise
157   Float_t              fChipGain;                           //  Electronics gain
158   Float_t              fADCoutRange;                        //  ADC output range (number of channels)
159   Float_t              fADCinRange;                         //  ADC input range (input charge)
160   Int_t                fADCthreshold;                       //  ADC threshold in ADC channel
161   Int_t                fADCbaseline;                        //  ADC baseline in ADC chann
162   Int_t                fDiffusionOn;                        //  Switch for the diffusion
163   Float_t              fDiffusionT;                         //  Diffusion in transverse direction
164   Float_t              fDiffusionL;                         //  Diffusion in longitudinal direction
165   Int_t                fElAttachOn;                         //  Switch for the electron attachment
166   Float_t              fElAttachProp;                       //  Propability for electron attachment (for 1m)
167   Int_t                fExBOn;                              //  Switch for the ExB effects
168   Float_t              fOmegaTau;                           //  Tangens of the Lorentz angle 
169   Float_t              fLorentzFactor;                      //  Factor due to Lorentz force
170   Int_t                fPRFOn;                              //  Switch for the pad response
171   Float_t             *fPRFsmp;                             //! Sampled pad response
172   Int_t                fPRFbin;                             //  Number of bins for the PRF
173   Float_t              fPRFlo;                              //  Lower boundary of the PRF
174   Float_t              fPRFhi;                              //  Higher boundary of the PRF
175   Float_t              fPRFwid;                             //  Bin width of the sampled PRF
176   Int_t                fPRFpad;                             //  Distance to next pad in PRF
177   Int_t                fTRFOn;                              //  Switch for the time response
178   Float_t             *fTRFsmp;                             //! Integrated time response
179   Int_t                fTRFbin;                             //  Number of bins for the TRF
180   Float_t              fTRFlo;                              //  Lower boundary of the TRF
181   Float_t              fTRFhi;                              //  Higher boundary of the TRF
182   Float_t              fTRFwid;                             //  Bin width of the integrated TRF
183   Int_t                fCTOn;                               //  Switch for cross talk
184   Float_t             *fCTsmp;                              //! Integrated cross talk
185   Int_t                fTCOn;                               //  Switch for the tail cancelation
186   Int_t                fTCnexp;                             //  Number of exponential of the digital filter
187   Float_t              fDriftVelocity;                      //  Drift velocity (cm / mus)
188   Float_t              fTimeBinWidth;                       //  Time bin width in ns
189   Float_t              fPadCoupling;                        //  Pad coupling factor
190   Float_t              fTimeCoupling;                       //  Time coupling factor (image charge of moving ions)
191   Float_t              fTiltingAngle;                       //  Tilting angle of the readout pads
192
193   // Clusterization parameter
194   Int_t                fClusMaxThresh;                      //  Threshold value for cluster maximum
195   Int_t                fClusSigThresh;                      //  Threshold value for cluster signal
196   Int_t                fLUTOn;                              //  Switch for the lookup table method
197   Int_t                fLUTbin;                             //  Number of bins of the LUT
198   Float_t             *fLUT;                                //! The lookup table
199
200  private:
201
202   virtual void         SamplePRF();
203   virtual void         SampleTRF();
204   virtual void         FillLUT();
205
206   ClassDef(AliTRDparameter,3)                               //  TRD parameter class
207
208 };
209
210 #endif