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