]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDReconstructor.h
additional protection
[u/mrichter/AliRoot.git] / FMD / AliFMDReconstructor.h
index a04989d0c16086ea7816d6bfab3dc4c07fed568e..6553f6c892e4805d3d0e0c17e29ba8bf1cfce989 100644 (file)
 # include <AliReconstructor.h>
 #endif
 #include "AliLog.h"
+#include <AliFMDBoolMap.h>
 
 //____________________________________________________________________
 class TTree;
 class TClonesArray;
 class AliFMDDigit;
 class AliRawReader;
+class AliFMDRawReader;
 class AliESDEvent;
 class AliESDFMD;
+class AliFMDRecoParam;
 class TH1;
 
 
@@ -80,8 +83,11 @@ public:
    * AliFMDAltroReader.  The digits are put in the passed TTree @a
    * digitsTree. 
    *
-   * @param reader     Raw reader. 
-   * @param digitsTree Tree to store read digits in. 
+   * @note This is the first part of the reconstruction as done by the
+   * offical steering class AliReconstruction.
+   *
+   * @param reader Raw reader.  @param digitsTree Tree to store read
+   * digits in.
    */
   virtual void   ConvertDigits(AliRawReader* reader, TTree* digitsTree) const;
   /** 
@@ -90,6 +96,9 @@ public:
    * them on the output tree @a clusterTree.  An FMD ESD object is
    * created in parallel. 
    *
+   * @note This is the second part of the reconstruction as done by
+   * the offical steering class AliReconstruction.
+   *
    * @param digitsTree  Tree holding the digits of this event
    * @param clusterTree Tree to store AliFMDRecPoint objects in. 
    */
@@ -101,10 +110,22 @@ public:
    *       TClonesArray of AliFMDDigits
    */
   virtual void   Reconstruct(AliRawReader *, TTree*) const;
+  /** 
+   * Not used.
+   *
+   * @todo This is called by the above same member function but with a
+   * pointer to a AliRawReader object and a pointer to a TTree object.
+   *
+   * @param reader Reader object 
+   */
+  virtual void Reconstruct(AliFMDRawReader& reader) const;
   /** 
    * Put in the ESD data, the FMD ESD data.  The object created by
    * the Reconstruct member function is copied to the ESD object. 
    *
+   * @note This is the third part of the reconstruction as done by
+   * the offical steering class AliReconstruction.
+   *
    * @param digitsTree   Tree of digits for this event - not used
    * @param clusterTree  Tree of reconstructed points for this event -
    *        not used.
@@ -117,7 +138,12 @@ public:
    */
   virtual void   FillESD(AliRawReader*, TTree* clusterTree, 
                         AliESDEvent* esd) const;
-
+  /** 
+   * Return the filled FMD ESD object
+   * 
+   * @return FMD ESD object
+   */
+  AliESDFMD* GetESDObject() const { return fESDObj; }
   /** 
    * Create SDigits from raw data
    * 
@@ -159,13 +185,25 @@ public:
    * @param use If true, make the diagnostics file 
    */
   void SetDiagnose(Bool_t use=kTRUE) { fDiagnostics = use; }
+  /** 
+   * 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$
+   * M@f$.
+   * 
+   * @param digits  Array of digits. 
+   * @param rawRead Raw reader used 
+   */
+  virtual void ProcessDigits(TClonesArray* digits,
+                            const AliFMDRawReader& rawRead) const;
+    
 protected:
   /** 
    * Copy CTOR 
    *
    * @param other Object to copy from. 
    */
-  AliFMDReconstructor(const AliFMDReconstructor& other);
+  AliFMDReconstructor(const AliFMDReconstructor&); //Not implemented
   /** 
    * Assignment operator 
    *
@@ -173,13 +211,29 @@ protected:
    *
    * @return reference to this object 
    */
-  AliFMDReconstructor& operator=(const AliFMDReconstructor& other);
+  AliFMDReconstructor& operator=(const AliFMDReconstructor&); //Not implemented
+  /** 
+   * Run some checks before reconstruction, clear internal arrays, etc. 
+   * 
+   * @return true on success 
+   */
+  Bool_t PreReconstruct() const;
   /** 
    * 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 
+   *
+   * @param esd ESD structure to get Vz from
    */
-  virtual void GetVertex() const;
+  virtual void GetVertex(AliESDEvent* esd) const;
+  /** 
+   * Set-up reconstructor to use values from reconstruction
+   * parameters, if present, for this event.   If the argument @a set
+   * is @c false, then restore preset values. 
+   * 
+   * @param set 
+   */  
+  virtual void UseRecoParam(Bool_t set=kTRUE) const;
   /** 
    * Process AliFMDDigit objects in @a digits.  For each digit, find
    * the psuedo-rapidity @f$ \eta@f$, azimuthal angle @f$ \varphi@f$,
@@ -188,7 +242,7 @@ protected:
    * 
    * @param digits Array of digits. 
    */
-  virtual void     ProcessDigits(TClonesArray* digits) const;
+  virtual void ProcessDigits(TClonesArray* digits) const;
   /** 
    * Process a single digit 
    * 
@@ -360,7 +414,28 @@ protected:
                                       UShort_t str, 
                                       Float_t& eta, 
                                       Float_t& phi) const;
-  
+  /** 
+   * Mark dead channels as invalid, and those that are marked as invalid 
+   * but are not dead, get the zero signal. 
+   * 
+   * @param esd ESD object to modify. 
+   */
+  void MarkDeadChannels(AliESDFMD* esd) const;
+
+  /** 
+   * Utility member function to get the reconstruction parameters for 
+   * this event
+   * 
+   * @return Pointer to AliFMDRecoParam object or null if not
+   * available. 
+   */
+  const AliFMDRecoParam* GetParameters() const;
+  /** 
+   * Get the numeric identifier of this detector
+   * 
+   * @return Should be 12
+   */  
+  Int_t GetIdentifier() const;
   enum Vertex_t {
     kNoVertex,   // Got no vertex
     kGenVertex,  // Got generator vertex 
@@ -371,8 +446,8 @@ protected:
   mutable TTree*        fTreeR;         // Output tree 
   mutable Float_t       fCurrentVertex; // Z-coordinate of primary vertex
   mutable AliESDFMD*    fESDObj;        // ESD output object
-  Float_t               fNoiseFactor;   // Factor of noise to check
-  Bool_t                fAngleCorrect;  // Whether to angle correct
+  mutable Float_t       fNoiseFactor;   // Factor of noise to check
+  mutable Bool_t        fAngleCorrect;  // Whether to angle correct
   mutable Vertex_t      fVertexType;    // What kind of vertex we got
   AliESDEvent*          fESD;           // ESD object(?)
   Bool_t                fDiagnostics;   // Wheter to do diagnostics
@@ -383,6 +458,8 @@ protected:
   TH1*                  fDiagAll;      // Diagnostics histogram
   mutable Bool_t        fZS[3];         // Zero-suppredded?
   mutable UShort_t      fZSFactor[3];   // Noise factor for Zero-suppression
+  mutable AliFMDBoolMap fBad;           // Strip marked bad
+  Bool_t                fZombie;        // Are we a zombie?
 private:
    
   ClassDef(AliFMDReconstructor, 3)  // class for the FMD reconstruction