]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDReconstructor.h
08-mar-2006 NvE Time offset correction in IceF2k extended to allow also a user define...
[u/mrichter/AliRoot.git] / FMD / AliFMDReconstructor.h
index c8cbb31b384c9e5bb9d0449f69f39933bf36b3a7..85793bd7f0ff27c173773bc6f692d5e2a7d11f31 100644 (file)
@@ -1,6 +1,5 @@
 #ifndef ALIFMDRECONSTRUCTOR_H
 #define ALIFMDRECONSTRUCTOR_H
-// -*- mode: c++ -*- 
 //
 //  Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
 //  reserved. 
   */
 /* $Id$ */
 
-#include <AliReconstructor.h>
-#include <AliFMDMap.h>
+//____________________________________________________________________
+//
+// Class to do reconstruction of events based on the FMD data.  The
+// class will do two kinds of reconstruction, one based on energy
+// deposition, and one using hit patterns. 
+//
+
+// Header guards in the header files speeds up the compilation
+// considerably.  Please leave them in. 
+#ifndef ALIRECONSTRUCTOR_H
+# include <AliReconstructor.h>
+#endif
+#ifndef ROOT_TObjArray
+# include <TObjArray.h>
+#endif
 
 //____________________________________________________________________
+class TTree;
 class TClonesArray;
-class AliFMD;
-class AliLoader;
-class AliRunLoader;
 class AliFMDDigit;
 class AliRawReader;
-typedef AliFMDMap<UShort_t> AliFMDAdcMap;
-
+class AliRunLoader;
+class AliESD;
 
 //____________________________________________________________________
 class AliFMDReconstructor: public AliReconstructor 
 {
-protected:
-  mutable AliFMDAdcMap  fAdcs;
-  mutable AliRunLoader* fRunLoader;
-  mutable AliLoader*    fFMDLoader;
-  mutable TClonesArray* fParticles;
-  mutable AliFMD*       fFMD;
-  
-  Float_t               fDeltaEta;
-  Float_t               fDeltaPhi;
-  UShort_t              fThreshold;
-  Float_t               fPedestal;
-  Float_t               fPedestalWidth;
-  mutable Int_t         fEmptyStrips;
-  mutable Int_t         fTotalStrips;
-  
-  enum { 
-    kMaxDetectors = 3, 
-    kMaxRings     = 2, 
-    kMaxSectors   = 20, 
-    kMaxStrips    = 512
-  };
-  
 public:
   AliFMDReconstructor();
-  virtual ~AliFMDReconstructor() {}
+  AliFMDReconstructor(const AliFMDReconstructor& other);
+  virtual ~AliFMDReconstructor();
+  AliFMDReconstructor& operator=(const AliFMDReconstructor& other);
 
-  void         SetDeltaEta(Float_t deta=.1)  { fDeltaEta = deta;  }
-  void         SetDeltaPhi(Float_t dphi=360) { fDeltaPhi = dphi;  } 
-  void         SetThreshold(UShort_t t=6)    { fThreshold = t; }
-  void         SetPedestal(Float_t mean=10, Float_t width=1);
+  virtual void   Init(AliRunLoader* runLoader);
+  virtual Bool_t HasDigitConversion() const { return kTRUE; }
+  virtual void   ConvertDigits(AliRawReader* reader, TTree* digitsTree) const;
+  virtual Bool_t HasLocalReconstruction() const { return kTRUE; }
+  virtual void   Reconstruct(TTree* digitsTree, TTree* clusterTree) const;
+  virtual void   FillESD(TTree* digitsTree, TTree* clusterTree, 
+                        AliESD* esd) const;
+  virtual void   SetESD(AliESD* esd) { fESD = esd; }
      
-  virtual void Reconstruct(AliRunLoader* runLoader) const;
-  virtual void Reconstruct(AliRunLoader* runLoader,  
-                          AliRawReader* rawReader) const;
-  virtual void FillESD(AliRunLoader* runLoader, AliESD* esd) const;
+private:
+  void Reconstruct(AliRawReader*, TTree*) const;
+  void Reconstruct(AliRunLoader*) const;
+  void Reconstruct(AliRunLoader*, AliRawReader*) const;
+  void FillESD(AliRawReader*, TTree*, AliESD*) const;
+  void FillESD(AliRunLoader*, AliESD*) const;
+  void FillESD(AliRunLoader*, AliRawReader*, AliESD*) const;
   
 protected:
-  virtual void     ProcessEvent(Int_t event, 
-                               AliRawReader* rawReader, 
-                               TClonesArray* digits) const;
-  virtual Bool_t   ReadAdcs(TClonesArray* digits) const;
-  virtual Bool_t   ReadAdcs(AliRawReader* rawReader) const;
-  virtual void     ProcessDigit(AliFMDDigit* digit) const;
+  virtual void     ProcessDigits(TClonesArray* digits) const;
   virtual UShort_t SubtractPedestal(AliFMDDigit* digit) const;
-  virtual void     ReconstructFromCache(Float_t zVertex) const;
+  
+  TObjArray            fAlgorithms;    // Array of algorithms
+  Float_t               fPedestal;      // Pedestal to subtract
+  Float_t               fPedestalWidth; // Width of pedestal
+  Float_t               fPedestalFactor;// Number of pedestal widths 
+  mutable Float_t       fCurrentVertex; // Z-coordinate of primary vertex
+  AliESD*               fESD;
+  
   ClassDef(AliFMDReconstructor, 0)  // class for the FMD reconstruction
 }; 
 #endif
 //____________________________________________________________________
 //
+// Local Variables:
+//   mode: C++
+// End:
+//
 // EOF
 //