]>
Commit | Line | Data |
---|---|---|
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 | |
52c19022 | 24 | |
36dc3337 | 25 | static Int_t GetNLinks() { return fgkNLinks; } |
26 | static Int_t GetNLayers() { return fgkNLinks/2; } | |
27 | static Int_t GetNZChannels() { return fgkNZChannels; } | |
28 | static Int_t GetNRefLayers() { return fgkNRefLayers; } | |
52c19022 | 29 | |
36dc3337 | 30 | static Float_t GetChamberThickness() { return 3.0; } |
52c19022 | 31 | |
32 | // ----- Bin widths (granularity) ----- | |
36dc3337 | 33 | static Float_t GetBinWidthY() { return fgkBinWidthY; } |
34 | static Float_t GetBinWidthdY() { return fgkBinWidthdY; } | |
52c19022 | 35 | |
36 | // ----- Bit Widths (used for internal representation) ----- | |
36dc3337 | 37 | static Int_t GetBitWidthY() { return fgkBitWidthY; } |
38 | static Int_t GetBitWidthdY() { return fgkBitWidthdY; } | |
39 | static Int_t GetBitWidthYProj() { return fgkBitWidthYProj; } | |
40 | static Int_t GetBitExcessY() { return fgkBitExcessY; } | |
41 | static Int_t GetBitExcessAlpha() { return fgkBitExcessAlpha; } | |
42 | static Int_t GetBitExcessYProj() { return fgkBitExcessYProj; } | |
52c19022 | 43 | |
ec5db61b | 44 | Float_t GetInnerPadLength(Int_t stack, Int_t layer) const { |
45 | return (stack == 2) ? 9. : fgkInnerPadLength[layer]; | |
46 | } | |
47 | Float_t GetOuterPadLength(Int_t stack, Int_t layer) const { | |
48 | return (stack == 2) ? 8. : fgkOuterPadLength[layer]; | |
49 | } | |
50 | Float_t GetZrow(Int_t stack, Int_t layer, Int_t padrow) const { | |
51 | Float_t zRowCorrected = fgkRow0Pos[layer][stack] - GetOuterPadLength(stack, layer) + GetInnerPadLength(stack, layer); | |
52 | return zRowCorrected - (0.5 + padrow) * GetInnerPadLength(stack, layer); | |
53 | } | |
54 | ||
52c19022 | 55 | AliTRDgeometry* GetGeo() const { return fGeo; } |
56 | Float_t GetVertexSize() const { return fVertexSize; } | |
57 | Int_t GetCiAlpha(Int_t layer) const; | |
58 | Int_t GetCiYProj(Int_t layer) const; | |
59 | Int_t GetYt(Int_t stack, Int_t layer, Int_t zrow) const; | |
2cf67435 | 60 | Int_t GetDeltaY() const { return fgDeltaY; } |
61 | Int_t GetDeltaAlpha() const { return fgDeltaAlpha; } | |
52c19022 | 62 | Int_t GetZSubchannel(Int_t stack, Int_t layer, Int_t zchannel, Int_t zpos) const; |
d2c8b010 | 63 | static Int_t GetRefLayer(Int_t refLayerIdx); |
52c19022 | 64 | // Bool_t GetFitParams(TVectorD &rhs, Int_t k); // const |
65 | Bool_t GetIntersectionPoints(Int_t k, Float_t &x1, Float_t &x2); // const | |
d2c8b010 | 66 | static Int_t GetPt(Int_t layerMask, Int_t a, Float_t b, Float_t x1, Float_t x2, Float_t magField); |
52c19022 | 67 | |
68 | Bool_t IsInZChannel(Int_t stack, Int_t layer, Int_t zchannel, Int_t zpos) const; | |
69 | ||
70 | void SetVertexSize(Float_t vertexsize) { fVertexSize = vertexsize; } | |
71 | ||
2cf67435 | 72 | static void SetDeltaY(Int_t dy) { fgDeltaY = dy; } |
73 | static void SetDeltaAlpha(Int_t da) { fgDeltaAlpha = da; } | |
74 | ||
44eafcf2 | 75 | static void SetUseGTUconst(Bool_t b) { fgUseGTUconst = b; } |
76 | static Bool_t GetUseGTUconst() { return fgUseGTUconst; } | |
77 | ||
ec5db61b | 78 | static void SetUseGTUmerge(Bool_t b) { fgUseGTUmerge = b; } |
79 | static Bool_t GetUseGTUmerge() { return fgUseGTUmerge; } | |
80 | ||
81 | static void SetLimitNoTracklets(Bool_t b) { fgLimitNoTracklets = b; } | |
82 | static Bool_t GetLimitNoTracklets() { return fgLimitNoTracklets; } | |
83 | ||
a3461d38 | 84 | static void SetMaxNoTracklets(Int_t max) { fgMaxNoTracklets = max; } |
85 | static Int_t GetMaxNoTracklets() { return fgMaxNoTracklets; } | |
86 | ||
52c19022 | 87 | // z-channel map |
36dc3337 | 88 | Int_t GenerateZChannelMap(); // could have different modes (for beam-beam, cosmics, ...) |
52c19022 | 89 | Bool_t DisplayZChannelMap(Int_t zchannel = -1, Int_t subch = 0) const; |
90 | ||
91 | // variables for pt-reconstruction (not used at the moment) | |
92 | Bool_t GenerateRecoCoefficients(Int_t trackletMask); | |
ec5db61b | 93 | Int_t GetAki(Int_t k, Int_t i); |
52c19022 | 94 | Float_t GetBki(Int_t k, Int_t i); |
95 | Float_t GetCki(Int_t k, Int_t i); | |
96 | // Float_t GetD(Int_t k) const; | |
97 | ||
b491d23b | 98 | // B-field |
99 | void SetMagField(Float_t field) { fMagField = field; } | |
100 | Float_t GetMagField() const { return fMagField; } | |
101 | ||
52c19022 | 102 | static const Int_t fgkNZChannels = 3; // No. of z-channels |
103 | static const Int_t fgkNLinks = 12; // No. of links | |
104 | static const Int_t fgkFixLayer = 2; // which layer is fixed for the generation of the z-channel map | |
52c19022 | 105 | static const Int_t fgkNRefLayers = 3; // no. of reference layers |
106 | ||
4cc89512 | 107 | static const Float_t fgkBinWidthY; // bin width for y-position |
108 | static const Float_t fgkBinWidthdY; // bin width for deflection length | |
109 | ||
110 | static const Int_t fgkBitWidthY; // bit width for y-position | |
111 | static const Int_t fgkBitWidthdY; // bit width for deflection length | |
112 | static const Int_t fgkBitWidthYProj; // bit width for projected y-position | |
113 | static const Int_t fgkBitExcessY; // excess bits for y-position | |
114 | static const Int_t fgkBitExcessAlpha; // excess bits for alpha | |
115 | static const Int_t fgkBitExcessYProj; // excess bits for projected y-position | |
5f006bd7 | 116 | |
ec5db61b | 117 | static const Int_t fgkPtInfinity; // infinite pt as obtained when a == 0 |
118 | ||
44eafcf2 | 119 | protected: |
120 | static Int_t fgDeltaY; // accepted deviation in y_proj, default: 9 | |
121 | static Int_t fgDeltaAlpha; // accepted deviation in alpha, default: 11 | |
122 | ||
d2c8b010 | 123 | static Int_t fgRefLayers[3]; // reference layers for track finding |
124 | ||
44eafcf2 | 125 | static Bool_t fgUseGTUconst; // use constants as in the GTU for the calculations |
126 | // instead of geometry derived quantities | |
ec5db61b | 127 | static Bool_t fgUseGTUmerge; // use merge algorithm exactly as in hardware |
128 | static Bool_t fgLimitNoTracklets; // limit the number of tracklets per layer | |
a3461d38 | 129 | static Int_t fgMaxNoTracklets; // max number of tracklets per layer if limited |
44eafcf2 | 130 | static const Bool_t fgZChannelMap[5][16][6][16]; // z-channel tables as in GTU |
ec5db61b | 131 | static const Float_t fgkRadius[6]; // layer radius as used in the GTU code |
132 | static const Float_t fgkThickness; // drift length as used in the GTU code | |
133 | static const Float_t fgkRow0Pos[6][5]; // geometry constant from GTU implementation | |
134 | static const Float_t fgkInnerPadLength[6]; // geometry constant from GTU implementation | |
135 | static const Float_t fgkOuterPadLength[6]; // geometry constant from GTU implementation | |
136 | static const Float_t fgkAcoeff[32][6]; // geometry constant from GTU implementation | |
137 | static const Int_t fgkMaskID[64]; // geometry constant from GTU implementation | |
44eafcf2 | 138 | |
52c19022 | 139 | Float_t fVertexSize; // assumed vertex size (z-dir.) for the z-channel map |
140 | ||
141 | Int_t fZChannelMap[5][16][6][16]; // must be changed | |
142 | Int_t fZSubChannel[5][fgkNZChannels][6][16]; // must be changed | |
143 | ||
4cc89512 | 144 | Int_t fCurrTrackletMask; // current tracklet mask for which the coefficients have been calculated |
145 | Float_t fAki[6]; // coefficients used for the fit, calculated for the current tracklet mask | |
146 | Float_t fBki[6]; // coefficients used for the fit, calculated for the current tracklet mask | |
147 | Float_t fCki[6]; // coefficients used for the fit, calculated for the current tracklet mask | |
52c19022 | 148 | |
b491d23b | 149 | Float_t fMagField; // magnetic field in T |
150 | ||
52c19022 | 151 | AliTRDgeometry *fGeo; //! pointer to the TRD geometry |
152 | ||
52c19022 | 153 | private: |
154 | AliTRDgtuParam(); // instance only via Instance() | |
155 | AliTRDgtuParam(const AliTRDgtuParam &rhs); // not implemented | |
156 | AliTRDgtuParam& operator=(const AliTRDgtuParam &rhs); // not implemented | |
157 | ||
158 | ClassDef(AliTRDgtuParam, 1); | |
159 | }; | |
160 | ||
161 | #endif |