]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/FORWARD/analysis2/AliForwardFlowTaskQC.h
Attempt to enable monitor objects in Proof(Lite) - doesn't work
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliForwardFlowTaskQC.h
index a67473b559a9f76c7d80e921acd1726648248acb..7a39fa2f0fbaa71b23f866a3cb28bce2c2fa0db1 100644 (file)
@@ -14,6 +14,7 @@
  */
 #include "AliAnalysisTaskSE.h"
 #include "TString.h"
+#include "TArrayI.h"
 class AliAODForwardMult;
 class TH1D;
 class TH2F;
@@ -89,23 +90,13 @@ public:
    */
   TList* GetOutputList() { return fOutputList; }
   /**
-   * Set which harmonics to calculate. @f$ v_{1}@f$ to @f$ v_{4}@f$ is
-   * available and calculated as default
+   * Set which flow moments to calculate.
    * 
-   * @param  v2 Do @f$ v_{2}@f$
-   * @param  v3 Do @f$ v_{3}@f$
-   * @param  v4 Do @f$ v_{4}@f$
-   * @param  v5 Do @f$ v_{5}@f$
-   * @param  v6 Do @f$ v_{6}@f$
+   * @param  n Do @f$ v_{n}@f$
    * 
    * @return void 
    */
-  void SetDoHarmonics(Bool_t v2 = kTRUE, 
-                     Bool_t v3 = kTRUE, Bool_t v4 = kTRUE,
-                     Bool_t v5 = kTRUE, Bool_t v6 = kTRUE) 
-  { 
-    fv[2] = v2; fv[3] = v3; fv[4] = v4; fv[5] = v5; fv[6] = v6;
-  }
+  void AddFlowMoment(Short_t n); 
   /**
    * Set non-default vertex binning and range
    *
@@ -119,6 +110,37 @@ public:
    * @param spdCut SPD sigma cut
    */
   void SetDetectorCuts(Double_t fmdCut, Double_t spdCut) { fFMDCut = fmdCut; fSPDCut = spdCut; }
+  /**
+   * Set flow flags, @f$\eta@f$-gap, sym. around @f$\eta=0@f$ or
+   * sat. vtx. interactions
+   *
+   * @param flags EFlowFlags 
+   */
+  void SetFlowFlags(UShort_t flags) { fFlowFlags = flags; }
+  /**
+   * Enum for flow flags
+   */
+  enum EFlowFlags {
+    kEtaGap  = 0x1,
+    kSymEta  = 0x2,
+    kSatVtx  = 0x4
+  };
+  /**
+   *  Set @f$|\eta|@f$ value to make cut for @f$\eta@f$ gap at
+   *
+   * @param eg gap value
+   */
+  void SetEtaGapValue(Double_t eg) { fEtaGap = eg; }
+protected:
+  /**
+   * Enum for reference flow (eta-gap) mode
+   */
+  enum EFillFlow {
+    kFillRef  = 0x1,
+    kFillDiff = 0x2,
+    kFillBoth = 0x3
+  };
+  // ----------------- Being nested class ---------------------
   /**
    * Nested class to handle cumulant calculations in vertex bins
    */
@@ -136,12 +158,14 @@ public:
      * @param vHigh Max vertex z-coordinate
      * @param moment Flow moment
      * @param type Data type (FMD/SPD/FMDTR/SPDTR/MC)
-     * @param sym Data is symmetric in eta
+     * @param flags Flags
      * @param cut Cut value 
+     * @param etaGap @f$\eta@f$ gap 
      */
     VertexBin(Int_t vLow, Int_t vHigh, 
               UShort_t moment, TString type,
-              Bool_t sym = kTRUE, Double_t cut = -1);
+              UShort_t flags = kSymEta, 
+              Double_t cut = -1, Double_t etaGap = 2.);
     /**
      * Copy constructor 
      * 
@@ -174,20 +198,22 @@ public:
      * Fill reference and differential flow histograms for analysis
      *
      * @param dNdetadphi 2D data histogram
-     * @param fCent Centrality
+     * @param cent Centrality
+     * @param mode fill ref/diff or both
      *
      * @return false if bad event (det. hotspot)
      */
-    Bool_t FillHists(const TH2D& dNdetadphi, Double_t fCent);
+    Bool_t FillHists(const TH2D& dNdetadphi, Double_t cent, EFillFlow mode = kFillBoth);
     /**
      * Do cumulants calculations for current event with 
      * centrality cent
      * 
      * @param cent Event centrality
-     * 
+     * @param skipFourP Skip ?
+     *
      * @return void 
      */
-    void CumulantsAccumulate(Double_t cent);
+    void CumulantsAccumulate(Double_t cent, Bool_t skipFourP = kFALSE);
     /**
      * Finish cumulants calculations. Takes input and
      * output lists in case Terminate is called separately
@@ -203,7 +229,7 @@ public:
     /*
      * Enumeration for ref/diff histograms
      */
-    enum { kHmult = 1, kHQnRe, kHQnIm, kHQ2nRe, kHQ2nIm };
+    enum { kHmultA = 1, kHmultB, kHQnReA, kHQnImA, kHQnReB, kHQnImB, kHQ2nRe, kHQ2nIm };
     /*
      * Enumeration for cumulant histograms
      */
@@ -211,9 +237,12 @@ public:
           kW2, 
           kW4Four, 
           kW4, 
-          kQnRe, 
-          kQnIm, 
-          kM,
+          kQnReA, 
+          kQnImA, 
+          kMA,
+          kQnReB, 
+          kQnImB, 
+          kMB,
           kCosphi1phi2, 
           kSinphi1phi2, 
           kCosphi1phi2phi3m, 
@@ -246,8 +275,9 @@ public:
     const Int_t    fVzMin;         // z-vertex min must be in whole [cm]
     const Int_t    fVzMax;         // z-vertex max must be in whoe [cm]
     TString        fType;          // data type
-    const Bool_t   fSymEta;        // Use forward-backward symmetry, if detector allows it
+    const UShort_t fFlags;         // Flow flags, e.g., eta-gap sat. vtx
     const Double_t fSigmaCut;      // Detector specific cut for outlier events
+    const Double_t fEtaGap;        // Eta gap value
     TH2D*          fCumuRef;       // histogram for reference flow
     TH2D*          fCumuDiff;      // histogram for differential flow
     TH3D*          fCumuHist;      // histogram for cumulants calculations
@@ -255,12 +285,9 @@ public:
     TH2F*          fOutliers;      // Sigma <M> histogram 
     UShort_t       fDebug;         // Debug flag
 
-    ClassDef(VertexBin, 2); // object for cumulants ananlysis in FMD
+    ClassDef(VertexBin, 3); // object for cumulants ananlysis in FMD
   };
-
-  static Bool_t fgDispVtx;         // static flag for disp vtx
-
-protected:
+  // ---------- End of nested class -------------
   /** 
    * Copy constructor 
    * 
@@ -301,6 +328,18 @@ protected:
    * @return true on success
    */
   Bool_t FillVtxBinList(const TList& list, const TH2D& h, Int_t vtx) const;
+  /**
+   * Loops of vertex bins in list and runs analysis on those for current vertex
+   *
+   * @param list List of vertex bins
+   * @param href dN/detadphi histogram for ref flow
+   * @param hdiff dN/detadphi histogram for diff flow
+   * @param vtx Current vertex bin
+   *
+   * @return true on success
+   */
+  Bool_t FillVtxBinListEtaGap(const TList& list, const TH2D& href, const TH2D& hdiff, Int_t vtx) const;
+
   /**
    * Loops over VertexBin list and calls terminate on each
    *
@@ -352,6 +391,12 @@ protected:
    * @return Bool_t 
    */
   virtual Bool_t GetVertex(const AliAODForwardMult* aodfm);
+  /**
+   * Make diagnostics hitogram
+   *
+   * @return void
+   */
+  void MakeQualityHist(const Char_t* name) const;
   /**
    * Print the setup of the task
    *
@@ -362,18 +407,20 @@ protected:
   TAxis*         fVtxAxis;          //  Axis to control vertex binning
   Double_t       fFMDCut;           //  FMD sigma cut for outlier events
   Double_t       fSPDCut;           //  SPD sigma cut for outlier events
+  UShort_t       fFlowFlags;        //  Flow flags, e.g., eta-gap, sat. vtx.
+  Double_t       fEtaGap;           //  Eta gap value
   TList          fBinsFMD;          //  list with FMD VertexBin objects 
   TList          fBinsSPD;          //  list with SPD VertexBin objects
   TList*         fSumList;          //  sum list
   TList*         fOutputList;       //  Output list
   AliAODEvent*   fAOD;              //  AOD event
-  Bool_t         fv[7];             //  Calculate v_{n} flag
+  TArrayI        fV;                //  Calculate v_{n} flag
   Float_t       fVtx;              //  Z vertex bin
   Double_t       fCent;             //  Centrality
   TH1D*          fHistCent;         //  Diagnostics hist for centrality
   TH1D*          fHistVertexSel;    //  Diagnostics hist for selected vertices
 
-  ClassDef(AliForwardFlowTaskQC, 2); // Analysis task for FMD analysis
+  ClassDef(AliForwardFlowTaskQC, 3); // Analysis task for FMD analysis
 };
 
 #endif