#ifndef ALITRDGTUPARAM_H
#define ALITRDGTUPARAM_H
#include "TObject.h"
class AliTRDgeometry;
class AliTRDgtuParam : public TObject {
public:
virtual ~AliTRDgtuParam();
static AliTRDgtuParam *Instance();
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 Float_t GetChamberThickness() { return 3.0; }
static Float_t GetBinWidthY() { return fgkBinWidthY; }
static Float_t GetBinWidthdY() { return fgkBinWidthdY; }
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; }
Float_t GetInnerPadLength(Int_t stack, Int_t layer) const {
return (stack == 2) ? 9. : fgkInnerPadLength[layer];
}
Float_t GetOuterPadLength(Int_t stack, Int_t layer) const {
return (stack == 2) ? 8. : fgkOuterPadLength[layer];
}
Float_t GetZrow(Int_t stack, Int_t layer, Int_t padrow) const {
Float_t zRowCorrected = fgkRow0Pos[layer][stack] - GetOuterPadLength(stack, layer) + GetInnerPadLength(stack, layer);
return zRowCorrected - (0.5 + padrow) * GetInnerPadLength(stack, layer);
}
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 fgDeltaY; }
Int_t GetDeltaAlpha() const { return fgDeltaAlpha; }
Int_t GetZSubchannel(Int_t stack, Int_t layer, Int_t zchannel, Int_t zpos) const;
static Int_t GetRefLayer(Int_t refLayerIdx);
Bool_t GetIntersectionPoints(Int_t k, Float_t &x1, Float_t &x2);
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; }
static void SetUseGTUmerge(Bool_t b) { fgUseGTUmerge = b; }
static Bool_t GetUseGTUmerge() { return fgUseGTUmerge; }
static void SetLimitNoTracklets(Bool_t b) { fgLimitNoTracklets = b; }
static Bool_t GetLimitNoTracklets() { return fgLimitNoTracklets; }
static void SetMaxNoTracklets(Int_t max) { fgMaxNoTracklets = max; }
static Int_t GetMaxNoTracklets() { return fgMaxNoTracklets; }
Int_t GenerateZChannelMap();
Bool_t DisplayZChannelMap(Int_t zchannel = -1, Int_t subch = 0) const;
Bool_t GenerateRecoCoefficients(Int_t trackletMask);
Int_t GetAki(Int_t k, Int_t i);
Float_t GetBki(Int_t k, Int_t i);
Float_t GetCki(Int_t k, Int_t i);
void SetMagField(Float_t field) { fMagField = field; }
Float_t GetMagField() const { return fMagField; }
static const Int_t fgkNZChannels = 3;
static const Int_t fgkNLinks = 12;
static const Int_t fgkFixLayer = 2;
static const Int_t fgkNRefLayers = 3;
static const Float_t fgkBinWidthY;
static const Float_t fgkBinWidthdY;
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;
static const Int_t fgkPtInfinity;
protected:
static Int_t fgDeltaY;
static Int_t fgDeltaAlpha;
static Int_t fgRefLayers[3];
static Bool_t fgUseGTUconst;
static Bool_t fgUseGTUmerge;
static Bool_t fgLimitNoTracklets;
static Int_t fgMaxNoTracklets;
static const Bool_t fgZChannelMap[5][16][6][16];
static const Float_t fgkRadius[6];
static const Float_t fgkThickness;
static const Float_t fgkRow0Pos[6][5];
static const Float_t fgkInnerPadLength[6];
static const Float_t fgkOuterPadLength[6];
static const Float_t fgkAcoeff[32][6];
static const Int_t fgkMaskID[64];
Float_t fVertexSize;
Int_t fZChannelMap[5][16][6][16];
Int_t fZSubChannel[5][fgkNZChannels][6][16];
Int_t fCurrTrackletMask;
Float_t fAki[6];
Float_t fBki[6];
Float_t fCki[6];
Float_t fMagField;
AliTRDgeometry *fGeo;
private:
AliTRDgtuParam();
AliTRDgtuParam(const AliTRDgtuParam &rhs);
AliTRDgtuParam& operator=(const AliTRDgtuParam &rhs);
ClassDef(AliTRDgtuParam, 1);
};
#endif