X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TRD%2FAliTRDCommonParam.h;h=9e734e4472c9eccf8187a3e9af2b3becf02f3253;hb=f1c1204db4914a19f49337ab4cfbca57ad086d96;hp=3590982cc50f1e7206b1bb35a2acd0e9f62ea493;hpb=053767a494091eeffd93c81d4c088dde743b7fdb;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/AliTRDCommonParam.h b/TRD/AliTRDCommonParam.h index 3590982cc50..9e734e4472c 100644 --- a/TRD/AliTRDCommonParam.h +++ b/TRD/AliTRDCommonParam.h @@ -13,6 +13,8 @@ #include "TObject.h" +#include "AliTRDSimParam.h" + class TRootIoCtor; class AliTRDpadPlane; @@ -22,7 +24,13 @@ class AliTRDCommonParam : public TObject public: - enum { kNlayer = 6, kNstack = 5, kNsector = 18, kNdet = 540 }; + enum { kNlayer = 6 + , kNstack = 5 + , kNsector = 18 + , kNdet = 540 }; + + enum { kXenon = 0 + , kArgon = 1 }; AliTRDCommonParam(TRootIoCtor *); AliTRDCommonParam(const AliTRDCommonParam &p); @@ -34,31 +42,56 @@ class AliTRDCommonParam : public TObject virtual void Copy(TObject &p) const; - void SetExB(Int_t exbOn = 1) { fExBOn = exbOn; } - void SetSamplingFrequency(Float_t freq) { fSamplingFrequency = freq; } - - Bool_t ExBOn() const { return fExBOn; } - - Float_t GetSamplingFrequency() const { return fSamplingFrequency; } + void SetExB(Int_t exbOn = 1) { fExBOn = exbOn; } + void SetSamplingFrequency(Float_t freq) { fSamplingFrequency = freq; } + void SetXenon() { fGasMixture = kXenon; + AliTRDSimParam::Instance()->ReInit(); } + void SetArgon() { fGasMixture = kArgon; + AliTRDSimParam::Instance()->ReInit(); } + + Bool_t ExBOn() const { return fExBOn; } + Bool_t IsXenon() const { return (fGasMixture == kXenon) + ? kTRUE : kFALSE; } + Bool_t IsArgon() const { return (fGasMixture == kArgon) + ? kTRUE : kFALSE; } + + Int_t GetGasMixture() const { return fGasMixture; } + Float_t GetSamplingFrequency() const { return fSamplingFrequency; } + + Float_t GetOmegaTau(Float_t vdrift); + Bool_t GetDiffCoeff(Float_t &dl, Float_t &dt, Float_t vdrift); + + Double_t TimeStruct(Float_t vdrift, Double_t xd, Double_t z); protected: - static AliTRDCommonParam *fgInstance; // Instance of this class (singleton implementation) - static Bool_t fgTerminated; // Defines if this class has already been terminated - - void Init(); - - Int_t fExBOn; // Switch for the ExB effects + void SampleTimeStruct(Float_t vdrift); + + static AliTRDCommonParam *fgInstance; // Instance of this class (singleton implementation) + static Bool_t fgTerminated; // Defines if this class has already been terminated + + Int_t fExBOn; // Switch for the ExB effects - Float_t fSamplingFrequency; // Sampling Frequency in MHz + Float_t fDiffusionT; // Transverse drift coefficient + Float_t fDiffusionL; // Longitudinal drift coefficient + Float_t fDiffLastVdrift; // The structures are valid for fLastVdrift (caching) + + Float_t *fTimeStruct1; //! Time Structure of Drift Cells + Float_t *fTimeStruct2; //! Time Structure of Drift Cells + Float_t fVDlo; // Lower drift velocity, for interpolation + Float_t fVDhi; // Higher drift velocity, for interpolation + Float_t fTimeLastVdrift; // The structures are valid for fLastVdrift (caching) + + Float_t fSamplingFrequency; // Sampling Frequency in MHz + + Int_t fGasMixture; // Gas mixture: 0-Xe/C02 1-Ar/CO2. private: // This is a singleton, constructor is private! AliTRDCommonParam(); - ClassDef(AliTRDCommonParam,4) // The constant parameters common to simulation and reconstruction + ClassDef(AliTRDCommonParam,7) // The constant parameters common to simulation and reconstruction }; - #endif