]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDReconstructor.h
Adding a setter for the probabiliy densities (A.Mastroserio)
[u/mrichter/AliRoot.git] / FMD / AliFMDReconstructor.h
index 9ab7083bc14c79452c1e2ca488e06cf510f40051..a2059d3ad8c95409481a52ba1df4ed0e684502ac 100644 (file)
 //-- Authors: Evgeny Karpechev (INR) and Alla Maevskaia (INR)
 //   Latest changes by Christian Holm Christensen <cholm@nbi.dk>
 /* $Id$ */
+/** @file    AliFMDReconstructor.h
+    @author  Christian Holm Christensen <cholm@nbi.dk>
+    @date    Mon Mar 27 12:47:09 2006
+    @brief   FMD reconstruction 
+*/
 
 //____________________________________________________________________
 // Header guards in the header files speeds up the compilation
@@ -28,13 +33,17 @@ class AliRawReader;
 class AliRunLoader;
 class AliESD;
 class AliESDFMD;
+class TH1;
+
 
 /** @defgroup FMD_rec Reconstruction */
 //____________________________________________________________________
-/** This is a class that reconstructs AliFMDRecPoint objects from of
-    Digits.  This class reads either digits from a TClonesArray or raw
-    data from a DDL file (or similar), and applies calibrations to get
+/** @brief This is a class that reconstructs AliFMDRecPoint objects from of
+    Digits.  
+    This class reads either digits from a TClonesArray or raw data
+    from a DDL file (or similar), and applies calibrations to get
     psuedo-inclusive multiplicities per strip.
+
     @ingroup FMD_rec
  */
 class AliFMDReconstructor: public AliReconstructor 
@@ -86,21 +95,25 @@ public:
                         AliESD* esd) const;
   /** Not used */
   virtual void   SetESD(AliESD* esd) { fESD = esd; }
-     
-private:
-  /** Hide base classes unused function */
-  void Reconstruct(AliRawReader*, TTree*) const;
-  /** Hide base classes unused function */
-  void Reconstruct(AliRunLoader*) const;
-  /** Hide base classes unused function */
-  void Reconstruct(AliRunLoader*, AliRawReader*) const;
-  /** Hide base classes unused function */
-  void FillESD(AliRawReader*, TTree*, AliESD*) const;
-  /** Hide base classes unused function */
-  void FillESD(AliRunLoader*, AliESD*) const;
-  /** Hide base classes unused function */
-  void FillESD(AliRunLoader*, AliRawReader*, AliESD*) const;
-  
+  /** Set the noise factor 
+      @param f Factor to use */
+  virtual void SetNoiseFactor(Float_t f=3) { fNoiseFactor = f; }
+  /** Set whether we should do angle correction or nor 
+      @param use If true, do angle correction */
+  virtual void SetAngleCorrect(Bool_t use=kTRUE) { fAngleCorrect = use; }
+  /** Set whether we want to do diagnostics.  If this is enabled, a
+      file named @c FMD.Diag.root will be made.  It contains a set of
+      histograms for each event, filed in separate directories in the
+      file.  The histograms are 
+      @verbatim 
+      diagStep1   Read ADC vs. Noise surpressed ADC 
+      diagStep2   Noise surpressed ADC vs. calculated Energy dep.
+      diagStep3   Energy deposition vs. angle corrected Energy dep.
+      diagStep4   Energy deposition vs. calculated multiplicity
+      diagAll     Read ADC vs. calculated multiplicity
+      @endverbatim 
+      @param use If true, make the diagnostics file */
+  void SetDiagnose(Bool_t use=kTRUE) { fDiagnostics = use; }
 protected:
   /** Copy CTOR 
       @param other Object to copy from. */
@@ -109,6 +122,10 @@ protected:
       @param other Object to assign from
       @return reference to this object */
   AliFMDReconstructor& operator=(const AliFMDReconstructor& other);
+  /** Try to get the vertex from either ESD or generator header.  Sets
+      @c fCurrentVertex to the found Z posistion of the vertex (if 
+      found), and sets the flag @c fVertexType accordingly */
+  virtual void GetVertex() const;
   /** Process AliFMDDigit objects in @a digits.  For each digit, find
       the psuedo-rapidity @f$ \eta@f$, azimuthal angle @f$ \varphi@f$,
       energy deposited @f$ E@f$, and psuedo-inclusive multiplicity @f$
@@ -155,12 +172,40 @@ protected:
   virtual void     PhysicalCoordinates(AliFMDDigit* digit, Float_t& eta, 
                                       Float_t& phi) const;
   
+  enum Vertex_t {
+    kNoVertex,   // Got no vertex
+    kGenVertex,  // Got generator vertex 
+    kESDVertex   // Got ESD vertex 
+  };
   mutable TClonesArray* fMult;          // Cache of RecPoints
   mutable Int_t         fNMult;         // Number of entries in fMult 
   mutable TTree*        fTreeR;         // Output tree 
   mutable Float_t       fCurrentVertex; // Z-coordinate of primary vertex
   mutable AliESDFMD*    fESDObj;        // ESD output object
-  AliESD*               fESD;
+  Float_t               fNoiseFactor;   // Factor of noise to check
+  Bool_t                fAngleCorrect;  // Whether to angle correct
+  mutable Vertex_t      fVertexType;    // What kind of vertex we got
+  AliRunLoader*         fRunLoader;     // Run loader passed to Init  
+  AliESD*               fESD;           // ESD object(?)
+  Bool_t                fDiagnostics;   // Wheter to do diagnostics
+  TH1*                  fDiagStep1;    // Diagnostics histogram
+  TH1*                  fDiagStep2;    // Diagnostics histogram
+  TH1*                  fDiagStep3;    // Diagnostics histogram
+  TH1*                  fDiagStep4;    // Diagnostics histogram
+  TH1*                  fDiagAll;      // Diagnostics histogram
+private:
+  /** Hide base classes unused function */
+  void Reconstruct(AliRawReader*, TTree*) const;
+  /** Hide base classes unused function */
+  void Reconstruct(AliRunLoader*) const;
+  /** Hide base classes unused function */
+  void Reconstruct(AliRunLoader*, AliRawReader*) const;
+  /** Hide base classes unused function */
+  void FillESD(AliRawReader*, TTree*, AliESD*) const;
+  /** Hide base classes unused function */
+  void FillESD(AliRunLoader*, AliESD*) const;
+  /** Hide base classes unused function */
+  void FillESD(AliRunLoader*, AliRawReader*, AliESD*) const;
   
   ClassDef(AliFMDReconstructor, 0)  // class for the FMD reconstruction
 };