added slewing correction by data
[u/mrichter/AliRoot.git] / TRD / AliTRDltuParam.h
CommitLineData
5e86ff99 1// This class is used in both AliRoot and libTRD. If you update it in
2// one place you have to update also the other.
3
4#ifndef ALITRDLTUPARAM_H
5#define ALITRDLTUPARAM_H
6
7#include "TObject.h"
8
9class AliTRDltuParam : public TObject
10{
11 public:
12 AliTRDltuParam();
13 ~AliTRDltuParam();
14
15 // configuration settings
16 // called with special SCSN commands
17 void SetPtMin(Int_t data) { fPtMin = Float_t(data) / 1000.; }
18 void SetMagField(Int_t data) { fMagField = Float_t(data) / 1000.; }
19 void SetOmegaTau(Int_t data) { fOmegaTau = Float_t(data) / 1.e6; }
20 void SetNtimebins(Int_t data) { fNtimebins = data; }
21 void SetScaleQ0(Int_t data) { fScaleQ0 = data; }
22 void SetScaleQ1(Int_t data) { fScaleQ1 = data; }
23 void SetLengthCorrectionEnable(Int_t data) { fPidTracklengthCorr = Bool_t (data); }
24 void SetTiltCorrectionEnable(Int_t data) { fTiltCorr = Bool_t (data); }
5f7c3c48 25 void SetPIDgainCorrectionEnable(Bool_t data) { fPidGainCorr = data; }
5e86ff99 26
27 // set values directly
28 void SetRawPtMin(Float_t data) { fPtMin = data; }
29 void SetRawMagField(Float_t data) { fMagField = data; }
30 void SetRawOmegaTau(Float_t data) { fOmegaTau = data; }
31 void SetRawNtimebins(Int_t data) { fNtimebins = data; }
32 void SetRawScaleQ0(Int_t data) { fScaleQ0 = data; }
33 void SetRawScaleQ1(Int_t data) { fScaleQ1 = data; }
34 void SetRawLengthCorrectionEnable(Bool_t data) { fPidTracklengthCorr = data; }
35 void SetRawTiltCorrectionEnable(Bool_t data) { fTiltCorr = data; }
5f7c3c48 36 void SetRawPIDgainCorrectionEnable(Bool_t data) { fPidGainCorr = data; }
5e86ff99 37
38 // retrieve the calculated information
39 // which is written to the TRAPs
40 Int_t GetDyCorrection(Int_t det, Int_t rob, Int_t mcm) const;
41 void GetDyRange(Int_t det, Int_t rob, Int_t mcm, Int_t ch, Int_t &dyMinInt, Int_t &dyMaxInt) const;
42 void GetCorrectionFactors(Int_t det, Int_t rob, Int_t mcm, Int_t ch,
5f7c3c48 43 UInt_t &cor0, UInt_t &cor1, Float_t gain = 1.) const;
5e86ff99 44 Int_t GetNtimebins() const;
45
46 Float_t GetX(Int_t det, Int_t rob, Int_t mcm) const;
47 Float_t GetLocalY(Int_t det, Int_t rob, Int_t mcm, Int_t ch) const;
48 Float_t GetLocalZ(Int_t det, Int_t rob, Int_t mcm) const;
49
50 Float_t GetDist(Int_t det, Int_t rob, Int_t mcm, Int_t ch) const;
51 Float_t GetElongation(Int_t det, Int_t rob, Int_t mcm, Int_t ) const;
52 Float_t GetPhi(Int_t det, Int_t rob, Int_t mcm, Int_t ch) const;
53 Float_t GetPerp(Int_t det, Int_t rob, Int_t mcm, Int_t ch) const;
54
55 protected:
56 // geometry constants
57 static Float_t fgZrow[6][5]; // z-position of pad row edge
58 static Float_t fgX[6]; // x-position for all layers
59 static Float_t fgTiltingAngle[6]; // tilting angle for every layer
60 static Float_t fgWidthPad[6]; // pad width for all layers
61 static Float_t fgLengthInnerPadC0; // inner pad length C0 chamber
62 static Float_t fgLengthOuterPadC0; // outer pad length C0 chamber
63 static Float_t fgLengthInnerPadC1[6]; // inner pad length C1 chambers
64 static Float_t fgLengthOuterPadC1[6]; // outer pad length C1 chambers
65 static Float_t fgScalePad; // scaling factor for pad width
66 static Float_t fgDriftLength; // length of the parse gaintbl Krypton_2009-01 drift region
67 static Float_t fgBinDy; // bin in dy (140 um)
68 static Int_t fgDyMax; // max dy for a tracklet (hard limit)
69 static Int_t fgDyMin; // min dy for a tracklet (hard limit)
70
71 // settings
72 Float_t fMagField; // magnetic field
73 Float_t fOmegaTau; // omega tau, i.e. tan(Lorentz angle)
74 Float_t fPtMin; // min. pt for deflection cut
75 Int_t fNtimebins; // drift time in units of timebins << 5n
76 UInt_t fScaleQ0; // scale factor for accumulated charge Q0
77 UInt_t fScaleQ1; // scale factor for accumulated charge Q1
78 Bool_t fPidTracklengthCorr; // enable tracklet length correction
79 Bool_t fTiltCorr; // enable tilt correction
5f7c3c48 80 Bool_t fPidGainCorr; // enable MCM gain correction factor for PID
5e86ff99 81
82 ClassDef(AliTRDltuParam, 1);
83};
84
85#endif