1 #ifndef ALITRDCOMMONPARAM_H
2 #define ALITRDCOMMONPARAM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 ///////////////////////////////////////////////////////////////////////////////
8 // Class containing constant common parameters //
10 ///////////////////////////////////////////////////////////////////////////////
16 #include "AliTRDSimParam.h"
22 class AliTRDCommonParam : public TObject
35 AliTRDCommonParam(TRootIoCtor *);
36 AliTRDCommonParam(const AliTRDCommonParam &p);
37 AliTRDCommonParam &operator=(const AliTRDCommonParam &p);
38 virtual ~AliTRDCommonParam();
40 static AliTRDCommonParam *Instance();
41 static void Terminate();
43 virtual void Copy(TObject &p) const;
45 void SetExB(Int_t exbOn = 1) { fExBOn = exbOn; }
46 void SetSamplingFrequency(Float_t freq) { fSamplingFrequency = freq; }
47 void SetXenon() { fGasMixture = kXenon;
48 AliTRDSimParam::Instance()->ReInit(); }
49 void SetArgon() { fGasMixture = kArgon;
50 AliTRDSimParam::Instance()->ReInit(); }
52 Bool_t ExBOn() const { return fExBOn; }
53 Bool_t IsXenon() const { return (fGasMixture == kXenon)
55 Bool_t IsArgon() const { return (fGasMixture == kArgon)
58 Int_t GetGasMixture() const { return fGasMixture; }
59 Float_t GetSamplingFrequency() const { return fSamplingFrequency; }
61 Float_t GetOmegaTau(Float_t vdrift);
62 Bool_t GetDiffCoeff(Float_t &dl, Float_t &dt, Float_t vdrift);
64 Double_t TimeStruct(Float_t vdrift, Double_t xd, Double_t z);
68 void SampleTimeStruct(Float_t vdrift);
70 static AliTRDCommonParam *fgInstance; // Instance of this class (singleton implementation)
71 static Bool_t fgTerminated; // Defines if this class has already been terminated
73 Int_t fExBOn; // Switch for the ExB effects
75 Float_t fDiffusionT; // Transverse drift coefficient
76 Float_t fDiffusionL; // Longitudinal drift coefficient
77 Float_t fDiffLastVdrift; // The structures are valid for fLastVdrift (caching)
79 Float_t *fTimeStruct1; //! Time Structure of Drift Cells
80 Float_t *fTimeStruct2; //! Time Structure of Drift Cells
81 Float_t fVDlo; // Lower drift velocity, for interpolation
82 Float_t fVDhi; // Higher drift velocity, for interpolation
83 Float_t fTimeLastVdrift; // The structures are valid for fLastVdrift (caching)
85 Float_t fSamplingFrequency; // Sampling Frequency in MHz
87 Int_t fGasMixture; // Gas mixture: 0-Xe/C02 1-Ar/CO2.
91 // This is a singleton, constructor is private!
94 ClassDef(AliTRDCommonParam,7) // The constant parameters common to simulation and reconstruction