]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDCommonParam.h
Changed default values of cuts
[u/mrichter/AliRoot.git] / TRD / AliTRDCommonParam.h
index 43ff2dd99ba38eca7c75f895f60939bbf08ec138..50e5e6c76be5a5443822a6c818d8688ec67beedc 100644 (file)
@@ -1,11 +1,11 @@
-#ifndef AliTRDCOMMONPARAM_H
-#define AliTRDCOMMONPARAM_H
+#ifndef ALITRDCOMMONPARAM_H
+#define ALITRDCOMMONPARAM_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
-// Class containing constant common parameters                           //
+// Class containing constant common parameters                               //
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
 
 #include "TObject.h"
 
+#include "AliTRDSimParam.h"
+
+class TRootIoCtor;
+
 class AliTRDpadPlane;
 
 class AliTRDCommonParam : public TObject
 {
+
   public:
-    static AliTRDCommonParam* Instance();
-    static void Terminate();
   
-    enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
+    enum { kNlayer  = 6
+         , kNstack  = 5
+         , kNsector = 18
+         , kNdet    = 540 };
+
+    enum { kXenon =   0
+        , kArgon =   1   };
     
+    AliTRDCommonParam(TRootIoCtor *);
     AliTRDCommonParam(const AliTRDCommonParam &p);   
     AliTRDCommonParam &operator=(const AliTRDCommonParam &p); 
-    virtual void Copy(TObject &p) const;
-    
-    void SetField(Float_t field)                        { fField          = field;    };
-    
-    void     SetExB(Int_t exbOn = 1)                        { fExBOn          = exbOn;    };
-    
-    Float_t  GetField()                               const { return fField; };
-    
-    Bool_t   ExBOn()                                  const { return fExBOn;         };
+    virtual        ~AliTRDCommonParam();
+
+    static AliTRDCommonParam *Instance();
+    static  void    Terminate();
+
+    virtual void    Copy(TObject &p) const;
     
-    AliTRDpadPlane *GetPadPlane(Int_t p, Int_t c) const;
-    Int_t    GetRowMax(Int_t p, Int_t c, Int_t /*s*/) const;
-    Int_t    GetColMax(Int_t p) const;
-    Double_t GetRow0(Int_t p, Int_t c, Int_t /*s*/) const;
-    Double_t GetCol0(Int_t p) const;
-  
+    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 and therefore does not return instances in GetInstance anymore
-    
-    void Init();
-    
-    Float_t              fField;                              //  Magnetic field
-    
-    Int_t                fExBOn;                              //  Switch for the ExB effects
-  
-    TObjArray  *fPadPlaneArray;                               //!  Array of pad plane objects
+
+    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                   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!  
+
+    // This is a singleton, constructor is private!  
     AliTRDCommonParam();
-    virtual ~AliTRDCommonParam();
   
-    ClassDef(AliTRDCommonParam, 1)
-};
+    ClassDef(AliTRDCommonParam,7)                  // The constant parameters common to simulation and reconstruction
 
+};
 #endif