52c19022 |
1 | #ifndef ALITRDGTUPARAM_H |
2 | #define ALITRDGTUPARAM_H |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ |
5 | |
6 | /* $Id: AliTRDgtuParam.h 27496 2008-07-22 08:35:45Z cblume $ */ |
7 | |
8 | // -------------------------------------------------------- |
5f006bd7 |
9 | // |
10 | // Singleton class to hold the parameters steering the GTU |
52c19022 |
11 | // tracking |
12 | // |
13 | // -------------------------------------------------------- |
14 | |
15 | #include "TObject.h" |
52c19022 |
16 | |
17 | class AliTRDgeometry; |
18 | |
19 | class AliTRDgtuParam : public TObject { |
20 | public: |
21 | virtual ~AliTRDgtuParam(); |
22 | |
23 | static AliTRDgtuParam *Instance(); // Singleton |
5f006bd7 |
24 | static void Terminate(); |
52c19022 |
25 | |
36dc3337 |
26 | static Int_t GetNLinks() { return fgkNLinks; } |
27 | static Int_t GetNLayers() { return fgkNLinks/2; } |
28 | static Int_t GetNZChannels() { return fgkNZChannels; } |
29 | static Int_t GetNRefLayers() { return fgkNRefLayers; } |
52c19022 |
30 | |
36dc3337 |
31 | static Float_t GetChamberThickness() { return 3.0; } |
52c19022 |
32 | |
33 | // ----- Bin widths (granularity) ----- |
36dc3337 |
34 | static Float_t GetBinWidthY() { return fgkBinWidthY; } |
35 | static Float_t GetBinWidthdY() { return fgkBinWidthdY; } |
52c19022 |
36 | |
37 | // ----- Bit Widths (used for internal representation) ----- |
36dc3337 |
38 | static Int_t GetBitWidthY() { return fgkBitWidthY; } |
39 | static Int_t GetBitWidthdY() { return fgkBitWidthdY; } |
40 | static Int_t GetBitWidthYProj() { return fgkBitWidthYProj; } |
41 | static Int_t GetBitExcessY() { return fgkBitExcessY; } |
42 | static Int_t GetBitExcessAlpha() { return fgkBitExcessAlpha; } |
43 | static Int_t GetBitExcessYProj() { return fgkBitExcessYProj; } |
52c19022 |
44 | |
45 | AliTRDgeometry* GetGeo() const { return fGeo; } |
46 | Float_t GetVertexSize() const { return fVertexSize; } |
47 | Int_t GetCiAlpha(Int_t layer) const; |
48 | Int_t GetCiYProj(Int_t layer) const; |
49 | Int_t GetYt(Int_t stack, Int_t layer, Int_t zrow) const; |
2cf67435 |
50 | Int_t GetDeltaY() const { return fgDeltaY; } |
51 | Int_t GetDeltaAlpha() const { return fgDeltaAlpha; } |
52c19022 |
52 | Int_t GetZSubchannel(Int_t stack, Int_t layer, Int_t zchannel, Int_t zpos) const; |
d2c8b010 |
53 | static Int_t GetRefLayer(Int_t refLayerIdx); |
52c19022 |
54 | // Bool_t GetFitParams(TVectorD &rhs, Int_t k); // const |
55 | Bool_t GetIntersectionPoints(Int_t k, Float_t &x1, Float_t &x2); // const |
d2c8b010 |
56 | static Int_t GetPt(Int_t layerMask, Int_t a, Float_t b, Float_t x1, Float_t x2, Float_t magField); |
52c19022 |
57 | |
58 | Bool_t IsInZChannel(Int_t stack, Int_t layer, Int_t zchannel, Int_t zpos) const; |
59 | |
60 | void SetVertexSize(Float_t vertexsize) { fVertexSize = vertexsize; } |
61 | |
2cf67435 |
62 | static void SetDeltaY(Int_t dy) { fgDeltaY = dy; } |
63 | static void SetDeltaAlpha(Int_t da) { fgDeltaAlpha = da; } |
64 | |
44eafcf2 |
65 | static void SetUseGTUconst(Bool_t b) { fgUseGTUconst = b; } |
66 | static Bool_t GetUseGTUconst() { return fgUseGTUconst; } |
67 | |
52c19022 |
68 | // z-channel map |
36dc3337 |
69 | Int_t GenerateZChannelMap(); // could have different modes (for beam-beam, cosmics, ...) |
52c19022 |
70 | Bool_t DisplayZChannelMap(Int_t zchannel = -1, Int_t subch = 0) const; |
71 | |
72 | // variables for pt-reconstruction (not used at the moment) |
73 | Bool_t GenerateRecoCoefficients(Int_t trackletMask); |
74 | Float_t GetAki(Int_t k, Int_t i); |
75 | Float_t GetBki(Int_t k, Int_t i); |
76 | Float_t GetCki(Int_t k, Int_t i); |
77 | // Float_t GetD(Int_t k) const; |
78 | |
b491d23b |
79 | // B-field |
80 | void SetMagField(Float_t field) { fMagField = field; } |
81 | Float_t GetMagField() const { return fMagField; } |
82 | |
52c19022 |
83 | static const Int_t fgkNZChannels = 3; // No. of z-channels |
84 | static const Int_t fgkNLinks = 12; // No. of links |
85 | static const Int_t fgkFixLayer = 2; // which layer is fixed for the generation of the z-channel map |
52c19022 |
86 | static const Int_t fgkNRefLayers = 3; // no. of reference layers |
87 | |
4cc89512 |
88 | static const Float_t fgkBinWidthY; // bin width for y-position |
89 | static const Float_t fgkBinWidthdY; // bin width for deflection length |
90 | |
91 | static const Int_t fgkBitWidthY; // bit width for y-position |
92 | static const Int_t fgkBitWidthdY; // bit width for deflection length |
93 | static const Int_t fgkBitWidthYProj; // bit width for projected y-position |
94 | static const Int_t fgkBitExcessY; // excess bits for y-position |
95 | static const Int_t fgkBitExcessAlpha; // excess bits for alpha |
96 | static const Int_t fgkBitExcessYProj; // excess bits for projected y-position |
5f006bd7 |
97 | |
44eafcf2 |
98 | protected: |
99 | static Int_t fgDeltaY; // accepted deviation in y_proj, default: 9 |
100 | static Int_t fgDeltaAlpha; // accepted deviation in alpha, default: 11 |
101 | |
d2c8b010 |
102 | static Int_t fgRefLayers[3]; // reference layers for track finding |
103 | |
44eafcf2 |
104 | static Bool_t fgUseGTUconst; // use constants as in the GTU for the calculations |
105 | // instead of geometry derived quantities |
106 | static const Bool_t fgZChannelMap[5][16][6][16]; // z-channel tables as in GTU |
107 | |
52c19022 |
108 | Float_t fVertexSize; // assumed vertex size (z-dir.) for the z-channel map |
109 | |
110 | Int_t fZChannelMap[5][16][6][16]; // must be changed |
111 | Int_t fZSubChannel[5][fgkNZChannels][6][16]; // must be changed |
112 | |
4cc89512 |
113 | Int_t fCurrTrackletMask; // current tracklet mask for which the coefficients have been calculated |
114 | Float_t fAki[6]; // coefficients used for the fit, calculated for the current tracklet mask |
115 | Float_t fBki[6]; // coefficients used for the fit, calculated for the current tracklet mask |
116 | Float_t fCki[6]; // coefficients used for the fit, calculated for the current tracklet mask |
52c19022 |
117 | |
b491d23b |
118 | Float_t fMagField; // magnetic field in T |
119 | |
52c19022 |
120 | AliTRDgeometry *fGeo; //! pointer to the TRD geometry |
121 | |
122 | static AliTRDgtuParam *fgInstance; // instance pointer |
123 | |
124 | private: |
125 | AliTRDgtuParam(); // instance only via Instance() |
126 | AliTRDgtuParam(const AliTRDgtuParam &rhs); // not implemented |
127 | AliTRDgtuParam& operator=(const AliTRDgtuParam &rhs); // not implemented |
128 | |
129 | ClassDef(AliTRDgtuParam, 1); |
130 | }; |
131 | |
132 | #endif |