]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDgtuParam.h
Introduction of online gain factors (Theo)
[u/mrichter/AliRoot.git] / TRD / AliTRDgtuParam.h
index 598e139f357a082b9f15b476bee99493b88391ea..f8fa205912baf8e2bf7098be9920a6863fea57ea 100644 (file)
@@ -6,14 +6,13 @@
 /* $Id: AliTRDgtuParam.h 27496 2008-07-22 08:35:45Z cblume $ */
 
 // --------------------------------------------------------
-// 
-// Singleton class to hold the parameters steering the GTU 
+//
+// Singleton class to hold the parameters steering the GTU
 // tracking
 //
 // --------------------------------------------------------
 
 #include "TObject.h"
-#include "TVectorD.h"
 
 class AliTRDgeometry;
 
@@ -22,46 +21,52 @@ class AliTRDgtuParam : public TObject {
   virtual ~AliTRDgtuParam();
 
   static AliTRDgtuParam *Instance(); // Singleton
-  static void Terminate(); 
+  static void Terminate();
 
-  static inline Int_t GetNLinks() { return fgkNLinks; }
-  static inline Int_t GetNLayers() { return fgkNLinks/2; }
-  static inline Int_t GetNZChannels() { return fgkNZChannels; }
-  static inline Int_t GetNRefLayers() { return fgkNRefLayers; }
+  static Int_t GetNLinks() { return fgkNLinks; }
+  static Int_t GetNLayers() { return fgkNLinks/2; }
+  static Int_t GetNZChannels() { return fgkNZChannels; }
+  static Int_t GetNRefLayers() { return fgkNRefLayers; }
 
-  static inline Float_t GetChamberThickness() { return 3.0; }
+  static Float_t GetChamberThickness() { return 3.0; }
 
   // ----- Bin widths (granularity) -----
-  static inline Float_t GetBinWidthY() { return fgkBinWidthY; }
-  static inline Float_t GetBinWidthdY() { return fgkBinWidthdY; }
+  static Float_t GetBinWidthY() { return fgkBinWidthY; }
+  static Float_t GetBinWidthdY() { return fgkBinWidthdY; }
 
   // ----- Bit Widths (used for internal representation) -----
-  static inline Int_t GetBitWidthY() { return fgkBitWidthY; }
-  static inline Int_t GetBitWidthdY() { return fgkBitWidthdY; }
-  static inline Int_t GetBitWidthYProj() { return fgkBitWidthYProj; }
-  static inline Int_t GetBitExcessY() { return fgkBitExcessY; }
-  static inline Int_t GetBitExcessAlpha() { return fgkBitExcessAlpha; }
-  static inline Int_t GetBitExcessYProj() { return fgkBitExcessYProj; }
+  static Int_t GetBitWidthY() { return fgkBitWidthY; }
+  static Int_t GetBitWidthdY() { return fgkBitWidthdY; }
+  static Int_t GetBitWidthYProj() { return fgkBitWidthYProj; }
+  static Int_t GetBitExcessY() { return fgkBitExcessY; }
+  static Int_t GetBitExcessAlpha() { return fgkBitExcessAlpha; }
+  static Int_t GetBitExcessYProj() { return fgkBitExcessYProj; }
 
   AliTRDgeometry* GetGeo() const { return fGeo; }
   Float_t GetVertexSize() const { return fVertexSize; }
   Int_t GetCiAlpha(Int_t layer) const;
   Int_t GetCiYProj(Int_t layer) const;
   Int_t GetYt(Int_t stack, Int_t layer, Int_t zrow) const;
-  Int_t GetDeltaY() const { return fgkDeltaY; }
-  Int_t GetDeltaAlpha() const { return fgkDeltaAlpha; }
+  Int_t GetDeltaY() const { return fgDeltaY; }
+  Int_t GetDeltaAlpha() const { return fgDeltaAlpha; }
   Int_t GetZSubchannel(Int_t stack, Int_t layer, Int_t zchannel, Int_t zpos) const;
-  Int_t GetRefLayer(Int_t refLayerIdx) const;
+  static Int_t GetRefLayer(Int_t refLayerIdx);
 //  Bool_t GetFitParams(TVectorD &rhs, Int_t k); // const
   Bool_t GetIntersectionPoints(Int_t k, Float_t &x1, Float_t &x2); // const
-  Float_t GetRadius(Int_t a, Float_t b, Float_t x1, Float_t x2); // const
+  static Int_t GetPt(Int_t layerMask, Int_t a, Float_t b, Float_t x1, Float_t x2, Float_t magField);
 
   Bool_t IsInZChannel(Int_t stack, Int_t layer, Int_t zchannel, Int_t zpos) const;
 
   void SetVertexSize(Float_t vertexsize) { fVertexSize = vertexsize; }
 
+  static void SetDeltaY(Int_t dy) { fgDeltaY = dy; }
+  static void SetDeltaAlpha(Int_t da) { fgDeltaAlpha = da; }
+
+  static void SetUseGTUconst(Bool_t b) { fgUseGTUconst = b; }
+  static Bool_t GetUseGTUconst() { return fgUseGTUconst; }
+
   // z-channel map
-  Int_t zChannelGen(); // could have different modes (for beam-beam, cosmics, ...)
+  Int_t GenerateZChannelMap(); // could have different modes (for beam-beam, cosmics, ...)
   Bool_t DisplayZChannelMap(Int_t zchannel = -1, Int_t subch = 0) const;
 
   // variables for pt-reconstruction (not used at the moment)
@@ -71,35 +76,46 @@ class AliTRDgtuParam : public TObject {
   Float_t GetCki(Int_t k, Int_t i);
 //  Float_t GetD(Int_t k) const;
 
- protected:
+  // B-field
+  void SetMagField(Float_t field) { fMagField = field; }
+  Float_t GetMagField() const { return fMagField; }
+
   static const Int_t fgkNZChannels = 3; // No. of z-channels
   static const Int_t fgkNLinks = 12;   // No. of links
   static const Int_t fgkFixLayer = 2;  // which layer is fixed for the generation of the z-channel map
-  static const Int_t fgkDeltaY = 39;   // accepted deviation in y_proj, default: 9
-  static const Int_t fgkDeltaAlpha = 31; // accepted deviation in alpha, default: 11
   static const Int_t fgkNRefLayers = 3;         // no. of reference layers
 
-  static const Float_t fgkBinWidthY;
-  static const Float_t fgkBinWidthdY;
+  static const Float_t fgkBinWidthY; // bin width for y-position
+  static const Float_t fgkBinWidthdY; // bin width for deflection length
+
+  static const Int_t fgkBitWidthY; // bit width for y-position
+  static const Int_t fgkBitWidthdY; // bit width for deflection length
+  static const Int_t fgkBitWidthYProj; // bit width for projected y-position
+  static const Int_t fgkBitExcessY; // excess bits for y-position
+  static const Int_t fgkBitExcessAlpha; // excess bits for alpha
+  static const Int_t fgkBitExcessYProj; // excess bits for projected y-position
+
+ protected:
+  static       Int_t fgDeltaY;         // accepted deviation in y_proj, default: 9
+  static       Int_t fgDeltaAlpha;      // accepted deviation in alpha, default: 11
+
+  static       Int_t fgRefLayers[3];    // reference layers for track finding
+
+  static       Bool_t fgUseGTUconst;    // use constants as in the GTU for the calculations
+                                              // instead of geometry derived quantities
+  static const Bool_t fgZChannelMap[5][16][6][16]; // z-channel tables as in GTU
 
-  static const Int_t fgkBitWidthY;
-  static const Int_t fgkBitWidthdY;
-  static const Int_t fgkBitWidthYProj;
-  static const Int_t fgkBitExcessY;
-  static const Int_t fgkBitExcessAlpha;
-  static const Int_t fgkBitExcessYProj;
   Float_t fVertexSize;         // assumed vertex size (z-dir.) for the z-channel map
 
   Int_t fZChannelMap[5][16][6][16];              // must be changed
   Int_t fZSubChannel[5][fgkNZChannels][6][16];    // must be changed
 
-  Int_t fCurrTrackletMask;
-  Float_t fAki[6];
-  Float_t fBki[6];
-  Float_t fCki[6];
+  Int_t fCurrTrackletMask; // current tracklet mask for which the coefficients have been calculated
+  Float_t fAki[6]; // coefficients used for the fit, calculated for the current tracklet mask
+  Float_t fBki[6]; // coefficients used for the fit, calculated for the current tracklet mask
+  Float_t fCki[6]; // coefficients used for the fit, calculated for the current tracklet mask
 
-  Int_t *fRefLayers;           //[fgkNRefLayers] reference layers for track finding
+  Float_t fMagField;            // magnetic field in T
 
   AliTRDgeometry *fGeo;                //! pointer to the TRD geometry