]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDdigitizer.h
Move the tail cancellation from the digitizer to the clusterizer (Christian)
[u/mrichter/AliRoot.git] / TRD / AliTRDdigitizer.h
index 3433e90f1be9c2dfe7df95741f6542667e6f6f83..bb7f824c755ce25419f0b38fef3cce27620d6341 100644 (file)
@@ -11,6 +11,7 @@ class TFile;
 class TF1;
 
 class AliRunDigitizer;
+class AliRunLoader;
 
 class AliTRD;
 class AliTRDdigitsManager;
@@ -33,11 +34,11 @@ class AliTRDdigitizer : public AliDigitizer {
   virtual ~AliTRDdigitizer();
   AliTRDdigitizer &operator=(const AliTRDdigitizer &d);
 
-  virtual void         Copy(TObject &d);
+  virtual void         Copy(TObject &d) const;
   virtual Bool_t       InitDetector();
   virtual void         Exec(Option_t* option = 0);  
   virtual Bool_t       Open(const Char_t *file, Int_t nEvent = 0);
-  virtual Bool_t       MakeBranch(const Char_t *file = 0) const;
+  virtual Bool_t       MakeBranch(TTree* tree) const;
   virtual Bool_t       MakeDigits();
   virtual void         AddSDigitsManager(AliTRDdigitsManager *manager);
   virtual void         DeleteSDigitsManager();
@@ -46,7 +47,7 @@ class AliTRDdigitizer : public AliDigitizer {
   virtual Bool_t       SDigits2Digits();
   virtual Bool_t       WriteDigits() const;
 
-          void         InitOutput(TFile *file, Int_t iEvent);
+          void         InitOutput(Int_t iEvent);
  
   virtual void         SetCompress(Int_t c = 1)             { fCompress        = c;   };
   virtual void         SetDebug(Int_t v = 1)                { fDebug           = v;   };
@@ -60,20 +61,29 @@ class AliTRDdigitizer : public AliDigitizer {
 
   AliTRDdigitsManager *Digits()                       const { return fDigitsManager; };
 
-          Bool_t       GetCompress()                  const { return fCompress;      };
-          Bool_t       GetSDigits()                   const { return fSDigits;       };
-          Float_t      GetSDigitsScale()              const { return fSDigitsScale;  };
+  Bool_t               GetCompress()                  const { return fCompress;      };
+  Bool_t               GetSDigits()                   const { return fSDigits;       };
+  Float_t              GetSDigitsScale()              const { return fSDigitsScale;  };
   AliTRDparameter     *GetParameter()                 const { return fPar;           };
 
+  virtual Double_t     TimeStruct(Float_t vdrift, Double_t time, Double_t z);  
+
+          Float_t      GetDiffusionT(Float_t vdrift);
+          Float_t      GetDiffusionL(Float_t vdrift);
+  virtual Int_t        Diffusion(Float_t vdrift, Double_t driftlength, Double_t *xyz);
+
+          Float_t      GetLorentzFactor(Float_t vdrift);
+  virtual Int_t        ExB(Float_t vdrift, Double_t driftlength, Double_t *xyz);  
+  
  protected:
 
-  TFile               *fInputFile;          //! ALIROOT-file
+  AliRunLoader        *fRunLoader;          //! Local pointer
   AliTRDdigitsManager *fDigitsManager;      //! Manager for the output digits
   AliTRDdigitsManager *fSDigitsManager;     //! Manager for the summed input s-digits
   TList               *fSDigitsManagerList; //! List of managers of input s-digits
   AliTRD              *fTRD;                //! TRD detector class
   AliTRDgeometry      *fGeo;                //! TRD geometry
-  AliTRDparameter     *fPar;                //  TRD digitization parameter object
+  AliTRDparameter     *fPar;                //  TRD common parameter object
   Int_t                fEvent;              //! Event number
   Int_t               *fMasks;              //! Masks for the merging
   Bool_t               fCompress;           //  Switch to keep only compressed data in memory
@@ -81,13 +91,36 @@ class AliTRDdigitizer : public AliDigitizer {
   Bool_t               fSDigits;            //  Switch for the summable digits
   Float_t              fSDigitsScale;       //  Scale factor for the summable digits 
   Bool_t               fMergeSignalOnly;    //  Merge only detectors that contain a signal
-
+  Bool_t               fFixedGeometry;      //  Switch for the fixed geometry, i.e. without alignment
+
+          void         SampleTimeStruct(Float_t vdrift);
+          void         RecalcDiffusion(Float_t vdrift);
+  
+  struct
+  {
+    Float_t fLastVdrift;                                      //  the structures are valid for fLastVdrift (caching)
+    Float_t fDiffusionT;
+    Float_t fDiffusionL;
+    Float_t              fOmegaTau;                           //  Tangens of the Lorentz angle
+    Float_t              fLorentzFactor;                      //  Factor due to Lorentz force
+  } fDiffusionInfo;
+    
+  struct 
+  {
+    Float_t fLastVdrift;                                      //  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
+  } fTimeStructInfo;
+  
  private:
-
-  virtual void         DeConvExp(Double_t *source, Double_t *target, Int_t n, Int_t nexp);
+    
+  virtual Bool_t       Init();
+    
   virtual Bool_t       CheckDetector(Int_t plane, Int_t chamber, Int_t sector);
 
-  ClassDef(AliTRDdigitizer,7)               //  Produces TRD-Digits
+  ClassDef(AliTRDdigitizer,9)               //  Produces TRD-Digits
 
 };