]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDgtuParam.h
fix info in debug stream
[u/mrichter/AliRoot.git] / TRD / AliTRDgtuParam.h
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 // --------------------------------------------------------
9 // 
10 // Singleton class to hold the parameters steering the GTU 
11 // tracking
12 //
13 // --------------------------------------------------------
14
15 #include "TObject.h"
16 #include "TVectorD.h"
17
18 class AliTRDgeometry;
19
20 class AliTRDgtuParam : public TObject {
21  public:
22   virtual ~AliTRDgtuParam();
23
24   static AliTRDgtuParam *Instance(); // Singleton
25   static void Terminate(); 
26
27   static inline Int_t GetNLinks() { return fgkNLinks; }
28   static inline Int_t GetNLayers() { return fgkNLinks/2; }
29   static inline Int_t GetNZChannels() { return fgkNZChannels; }
30   static inline Int_t GetNRefLayers() { return fgkNRefLayers; }
31
32   static inline Float_t GetChamberThickness() { return 3.0; }
33
34   // ----- Bin widths (granularity) -----
35   static inline Float_t GetBinWidthY() { return fgkBinWidthY; }
36   static inline Float_t GetBinWidthdY() { return fgkBinWidthdY; }
37
38   // ----- Bit Widths (used for internal representation) -----
39   static inline Int_t GetBitWidthY() { return fgkBitWidthY; }
40   static inline Int_t GetBitWidthdY() { return fgkBitWidthdY; }
41   static inline Int_t GetBitWidthYProj() { return fgkBitWidthYProj; }
42   static inline Int_t GetBitExcessY() { return fgkBitExcessY; }
43   static inline Int_t GetBitExcessAlpha() { return fgkBitExcessAlpha; }
44   static inline Int_t GetBitExcessYProj() { return fgkBitExcessYProj; }
45
46   AliTRDgeometry* GetGeo() const { return fGeo; }
47   Float_t GetVertexSize() const { return fVertexSize; }
48   Int_t GetCiAlpha(Int_t layer) const;
49   Int_t GetCiYProj(Int_t layer) const;
50   Int_t GetYt(Int_t stack, Int_t layer, Int_t zrow) const;
51   Int_t GetDeltaY() const { return fgkDeltaY; }
52   Int_t GetDeltaAlpha() const { return fgkDeltaAlpha; }
53   Int_t GetZSubchannel(Int_t stack, Int_t layer, Int_t zchannel, Int_t zpos) const;
54   Int_t GetRefLayer(Int_t refLayerIdx) const;
55 //  Bool_t GetFitParams(TVectorD &rhs, Int_t k); // const
56   Bool_t GetIntersectionPoints(Int_t k, Float_t &x1, Float_t &x2); // const
57   Float_t GetRadius(Int_t a, Float_t b, Float_t x1, Float_t x2); // const
58
59   Bool_t IsInZChannel(Int_t stack, Int_t layer, Int_t zchannel, Int_t zpos) const;
60
61   void SetVertexSize(Float_t vertexsize) { fVertexSize = vertexsize; }
62
63   // z-channel map
64   Int_t zChannelGen(); // could have different modes (for beam-beam, cosmics, ...)
65   Bool_t DisplayZChannelMap(Int_t zchannel = -1, Int_t subch = 0) const;
66
67   // variables for pt-reconstruction (not used at the moment)
68   Bool_t GenerateRecoCoefficients(Int_t trackletMask);
69   Float_t GetAki(Int_t k, Int_t i);
70   Float_t GetBki(Int_t k, Int_t i);
71   Float_t GetCki(Int_t k, Int_t i);
72 //  Float_t GetD(Int_t k) const;
73
74  protected:
75   static const Int_t fgkNZChannels = 3; // No. of z-channels
76   static const Int_t fgkNLinks = 12;    // No. of links
77   static const Int_t fgkFixLayer = 2;   // which layer is fixed for the generation of the z-channel map
78   static const Int_t fgkDeltaY = 39;    // accepted deviation in y_proj, default: 9
79   static const Int_t fgkDeltaAlpha = 31; // accepted deviation in alpha, default: 11
80   static const Int_t fgkNRefLayers = 3;  // no. of reference layers
81
82   static const Float_t fgkBinWidthY; // bin width for y-position
83   static const Float_t fgkBinWidthdY; // bin width for deflection length
84
85   static const Int_t fgkBitWidthY; // bit width for y-position
86   static const Int_t fgkBitWidthdY; // bit width for deflection length
87   static const Int_t fgkBitWidthYProj; // bit width for projected y-position
88   static const Int_t fgkBitExcessY; // excess bits for y-position
89   static const Int_t fgkBitExcessAlpha; // excess bits for alpha
90   static const Int_t fgkBitExcessYProj; // excess bits for projected y-position
91  
92   Float_t fVertexSize;          // assumed vertex size (z-dir.) for the z-channel map
93
94   Int_t fZChannelMap[5][16][6][16];               // must be changed
95   Int_t fZSubChannel[5][fgkNZChannels][6][16];    // must be changed
96
97   Int_t fCurrTrackletMask; // current tracklet mask for which the coefficients have been calculated
98   Float_t fAki[6]; // coefficients used for the fit, calculated for the current tracklet mask
99   Float_t fBki[6]; // coefficients used for the fit, calculated for the current tracklet mask
100   Float_t fCki[6]; // coefficients used for the fit, calculated for the current tracklet mask
101
102   Int_t *fRefLayers;            //[fgkNRefLayers] reference layers for track finding
103
104   AliTRDgeometry *fGeo;         //! pointer to the TRD geometry
105
106   static AliTRDgtuParam *fgInstance; // instance pointer
107
108  private:
109   AliTRDgtuParam();                          // instance only via Instance()
110   AliTRDgtuParam(const AliTRDgtuParam &rhs); // not implemented
111   AliTRDgtuParam& operator=(const AliTRDgtuParam &rhs); // not implemented
112
113   ClassDef(AliTRDgtuParam, 1);
114 };
115
116 #endif