]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDReconstructor.h
new Tasks by Taku
[u/mrichter/AliRoot.git] / FMD / AliFMDReconstructor.h
index 446b32e3c524bd1436299bdec9a499f5c1266e79..90bfea431c319a27b93b8b8264f463329ed44033 100644 (file)
@@ -25,6 +25,7 @@
 # include <AliReconstructor.h>
 #endif
 #include "AliLog.h"
+#include <AliFMDBoolMap.h>
 
 //____________________________________________________________________
 class TTree;
@@ -33,6 +34,7 @@ class AliFMDDigit;
 class AliRawReader;
 class AliESDEvent;
 class AliESDFMD;
+class AliFMDRecoParam;
 class TH1;
 
 
@@ -117,6 +119,16 @@ public:
    */
   virtual void   FillESD(AliRawReader*, TTree* clusterTree, 
                         AliESDEvent* esd) const;
+
+  /** 
+   * Create SDigits from raw data
+   * 
+   * @param reader  The raw reader
+   * @param sdigits Array to fill with AliFMDSDigit objects. 
+   */  
+  virtual void Digitize(AliRawReader* reader, 
+                       TClonesArray* sdigits) const;
+  
   /** 
    * Not used 
    */
@@ -149,13 +161,14 @@ public:
    * @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. 
    */
-  AliFMDReconstructor(const AliFMDReconstructor& other);
+  AliFMDReconstructor(const AliFMDReconstructor&); //Not implemented
   /** 
    * Assignment operator 
    *
@@ -163,13 +176,15 @@ protected:
    *
    * @return reference to this object 
    */
-  AliFMDReconstructor& operator=(const AliFMDReconstructor& other);
+  AliFMDReconstructor& operator=(const AliFMDReconstructor&); //Not implemented
   /** 
    * 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;
   /** 
    * Process AliFMDDigit objects in @a digits.  For each digit, find
    * the psuedo-rapidity @f$ \eta@f$, azimuthal angle @f$ \varphi@f$,
@@ -199,6 +214,49 @@ protected:
                             UShort_t sec, 
                             UShort_t str, 
                             Short_t  adc) const;
+  /** 
+   * Process the signal from a single strip. 
+   * 
+   * @param sdigits Array to fill
+   * @param det     Detector number 
+   * @param rng     Ring identifier 
+   * @param sec     Sector number
+   * @param str     Strip number 
+   * @param sam     Sample number 
+   * @param adc     Number of ADC counts for this strip
+   */  
+  virtual void DigitizeSignal(TClonesArray* sdigits, 
+                             UShort_t      det, 
+                             Char_t         rng, 
+                             UShort_t       sec, 
+                             UShort_t       str, 
+                             UShort_t       sam,
+                             Short_t        adc) const;
+  /** 
+   * Subtract the pedestal off the ADC counts. 
+   * 
+   * @param det           Detector number
+   * @param rng           Ring identifier
+   * @param sec           Sector number
+   * @param str           Strip number
+   * @param adc           ADC counts
+   * @param noiseFactor   If pedestal substracted pedestal is less then
+   *        this times the noise, then consider this to be 0. 
+   * @param zsEnabled     Whether zero-suppression is on.
+   * @param zsNoiseFactor Noise factor used in on-line pedestal
+   *        subtraction. 
+   * 
+   * @return The pedestal subtracted ADC counts (possibly 0), or @c
+   *         USHRT_MAX in case of problems.
+   */  
+  virtual UShort_t SubtractPedestal(UShort_t det, 
+                                   Char_t   rng, 
+                                   UShort_t sec, 
+                                   UShort_t str, 
+                                   UShort_t adc, 
+                                   Float_t  noiseFactor,
+                                   Bool_t   zsEnabled, 
+                                   UShort_t zsNoiseFactor) const;
   /** 
    * Substract pedestals from raw ADC in @a digit
    * 
@@ -233,6 +291,29 @@ protected:
    *
    * @return Energy deposited @f$ E_i@f$ 
    */
+  virtual Float_t  Adc2Energy(UShort_t det, 
+                             Char_t   rng, 
+                             UShort_t sec, 
+                             UShort_t str, 
+                             UShort_t count) const;
+  /** 
+   * Converts number of ADC counts to energy deposited.   This is
+   * done by 
+   * @f[
+   * E_i = A_i g_i
+   * @f]
+   * where @f$ A_i@f$ is the pedestal subtracted ADC counts, and @f$
+   * g_i@f$ is the gain for the @f$ i^{\mbox{th}}@f$ strip. 
+   * 
+   * @param det          Detector number  
+   * @param rng   Ring identifier 
+   * @param sec   Sector number
+   * @param str   Strip number 
+   * @param eta   Psuedo-rapidity of digit.
+   * @param count Pedestal subtracted ADC counts
+   *
+   * @return Energy deposited @f$ E_i@f$ 
+   */
   virtual Float_t  Adc2Energy(UShort_t det, 
                              Char_t   rng, 
                              UShort_t sec, 
@@ -284,7 +365,36 @@ 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;
+
+  /** 
+   * 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;
+  /** 
+   * 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 
@@ -295,8 +405,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
@@ -307,6 +417,7 @@ 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
 private:
    
   ClassDef(AliFMDReconstructor, 3)  // class for the FMD reconstruction