]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/FORWARD/analysis2/AliFMDCorrector.h
Modified QA script to allow creating QA results (Sans energy loss)
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliFMDCorrector.h
index d1e052492ba841ee8b56e56b018388d3ee0bf763..de21c055f1d60209d78b02c6ba58640dc9814292 100644 (file)
 #include <TList.h>
 #include "AliForwardUtil.h"
 class TH2D;
-
+class TH2;
 /** 
  * @defgroup pwglf_forward_algo Algorithms 
  *
+ * Various sub-algorithms used in the analysis 
+ *
  * @ingroup pwglf_forward 
  */
 /** 
@@ -79,7 +81,7 @@ public:
    *
    * @param etaAxis Eta axis to use  -- not used
    */
-  virtual void Init(const TAxis& etaAxis);
+  virtual void SetupForData(const TAxis& etaAxis);
   /**
    * Do the calculations 
    * 
@@ -93,15 +95,16 @@ public:
    * Scale the histograms to the total number of events 
    * 
    * @param dir     Where the output is stored
+   * @param output  Output list 
    * @param nEvents Number of events 
    */
-  virtual void ScaleHistograms(const TList* dir, Int_t nEvents);
+  virtual void Terminate(const TList* dir, TList* output, Int_t nEvents);
   /** 
    * Output diagnostic histograms to directory 
    * 
    * @param dir List to write in
    */  
-  virtual void DefineOutput(TList* dir);
+  virtual void CreateOutputObjects(TList* dir);
   /** 
    * Set the debug level.  The higher the value the more output 
    * 
@@ -208,16 +211,16 @@ protected:
      * 
      * @param dir Where to put it 
      */
-    void Output(TList* dir);
+    void CreateOutputObjects(TList* dir);
     /** 
      * Scale the histograms to the total number of events 
      * 
      * @param dir     where the output is stored
      * @param nEvents Number of events 
      */
-    void ScaleHistograms(TList* dir, Int_t nEvents);
+    void Terminate(TList* dir, Int_t nEvents);
     TH2D*     fDensity;      // Distribution primary Nch
-    ClassDef(RingHistos,1);
+    ClassDef(RingHistos,2);
   };
   /** 
    * Get the ring histogram container 
@@ -228,7 +231,16 @@ protected:
    * @return Ring histogram container 
    */
   RingHistos* GetRingHistos(UShort_t d, Char_t r) const;
-
+  /** 
+   * Divide a map with another map.  This is a reimplementation of
+   * TH1::Divide, but we assume compatible histograms, and the under-
+   * and overflow bins are only divided if the third argument is true.
+   * 
+   * @param num             Numerator. On return contains the result 
+   * @param denom           Denominator
+   * @param alsoUnderOver   If true, also divide under/overflow bins
+   */
+  void DivideMap(TH2* num, const TH2* denom, Bool_t alsoUnderOver=false) const;
   TList    fRingHistos;           // List of histogram containers
   Bool_t   fUseSecondaryMap;      // Whether to do correction for secondaries
   Bool_t   fUseVertexBias;        // Whether to do correction for vertex bias
@@ -236,7 +248,7 @@ protected:
   Bool_t   fUseMergingEfficiency; // Whether to use the merging efficiency
   Int_t    fDebug;                //  Debug level 
 
-  ClassDef(AliFMDCorrector,2); // Correct the inclusive d2N/detadphi
+  ClassDef(AliFMDCorrector,4); // Correct the inclusive d2N/detadphi
 };
 
 #endif