]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0Flow.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGGA / PHOSTasks / PHOS_PbPb / AliAnalysisTaskPi0Flow.h
index 85d60f51d609585689376b0584bbd26bf113e570..eab0868cd333889c7db66ae4e06d94c3bac523b5 100644 (file)
@@ -24,6 +24,7 @@ class AliPHOSCalibData;
 class AliESDtrack ;
 class AliESDCaloCluster ;
 class AliEPFlattener;
+class AliAnalysisUtils;
 
 #include "TArrayD.h"
 
@@ -32,6 +33,8 @@ class AliEPFlattener;
 class AliAnalysisTaskPi0Flow : public AliAnalysisTaskSE {
 public:
     enum Period { kUndefinedPeriod, kLHC10h, kLHC11h, kLHC13 };
+    enum EventSelection { kTotal, kInternalTriggerMaskSelection, kHasVertex, kHasAbsVertex, kHasCentrality, kCentUnderUpperBinUpperEdge, kCentOverLowerBinLowerEdge, kHasPHOSClusters, kTotalSelected };
+    enum TriggerSelection { kNoSelection, kCentralInclusive, kCentralExclusive, kSemiCentralInclusive, kSemiCentralExclusive, kMBInclusive, kMBExclusive };
 
 public:
     AliAnalysisTaskPi0Flow(const char *name = "AliAnalysisTaskPi0Flow", Period period = kUndefinedPeriod);
@@ -42,9 +45,12 @@ public:
     /* virtual void   Terminate(Option_t *); */
 
     void SetPeriod(Period period) { fPeriod = period;}
+    void SetCentralityEstimator(const char * centr) {fCentralityEstimator = centr;}
+    void EnableTOFCut(Bool_t enable = kTRUE, Double_t TOFCut = 100.e-9, Bool_t fillWide=kFALSE){fTOFCutEnabled=enable; fTOFCut=TOFCut; fFillWideTOF=fillWide;}
     
     void SetCentralityBinning(const TArrayD& edges, const TArrayI& nMixed);
     void SetEventMixingRPBinning(UInt_t nBins) { fNEMRPBins = nBins; }
+    void SetInternalTriggerSelection(TriggerSelection selection) { fInternalTriggerSelection = selection; }
     void SetMaxAbsVertexZ(Float_t z) { fMaxAbsVertexZ = z; }
     void SetManualV0EPCalc(Bool_t manCalc = true) {fManualV0EPCalc = manCalc;}
     void SetEnablePHOSModule(int module, Bool_t enable = true);
@@ -58,12 +64,10 @@ protected:
     AliAnalysisTaskPi0Flow(const AliAnalysisTaskPi0Flow&); // not implemented
     AliAnalysisTaskPi0Flow& operator=(const AliAnalysisTaskPi0Flow&); // not implemented
 
-    virtual void MakeMCHistograms();
-
     // Step 0:
     AliVEvent* GetEvent();
 
-    // Step 1:
+    // Step 1 (done once):
     void SetGeometry();
     void SetMisalignment();
     void SetV0Calibration(); //V0 calibration
@@ -72,6 +76,9 @@ protected:
     void SetFlatteningData(); // phos flattening
 
     // Step 2:
+    Bool_t RejectTriggerMaskSelection();
+
+    // Step 3:
     void SetVertex();
     Bool_t RejectEventVertex();
 
@@ -87,17 +94,17 @@ protected:
     void FillPHOSCellQAHists();
 
     // Step 8: Event Photons (PHOS Clusters) selection
-    void SelectPhotonClusters();
-    void FillSelectedClusterHistograms();
+    virtual void SelectPhotonClusters();
+    virtual void FillSelectedClusterHistograms();
 
     // Step 9: Consider pi0 (photon/cluster) pairs.
-    void ConsiderPi0s();
+    virtual void ConsiderPi0s();
 
     // Step 10; Mixing
-    void ConsiderPi0sMix();
+    virtual void ConsiderPi0sMix();
 
     // Step 11: MC
-    virtual void DoMC();
+    virtual void ProcessMC();
 
     // Step 12: Update lists
     void UpdateLists();
@@ -117,6 +124,7 @@ protected:
     void FillHistogram(const char * key,Double_t x) const ; //Fill 1D histogram witn name key
     void FillHistogram(const char * key,Double_t x, Double_t y) const ; //Fill 2D histogram witn name key
     void FillHistogram(const char * key,Double_t x, Double_t y, Double_t z) const ; //Fill 3D histogram witn name key
+    void FillHistogram(const char * key,Double_t x, Double_t y, Double_t z, Double_t w) const ; //Fill 3D histogram witn name key
 
     TVector3 GetVertexVector(const AliVVertex* vertex);
     Int_t GetCentralityBin(Float_t centralityV0M);
@@ -136,28 +144,28 @@ protected:
     UInt_t GetNumberOfCentralityBins() { return fCentEdges.GetSize()-1; }
     TList* GetCaloPhotonsPHOSList(UInt_t vtxBin, UInt_t centBin, UInt_t rpBin);
     
-
+    AliAnalysisUtils* GetAnalysisUtils();
 
 
 protected:
-    // transiant constants
-    static const Int_t kNMod = 5;
+    // transient constants
+    static const Int_t    kNMod = 5;
 
     // constants:
-    static const Double_t kLogWeight= 4.5 ; // log weight for recalibration.
-    static const Double_t kAlphaCut=0.7 ;
-    static const Bool_t doESDReCalibration = kTRUE;
-    static const Int_t kNCenBins = 9; // see EvalV0ReactionPlane()
+    static const Double_t kLogWeight ; // log weight for recalibration.
+    static const Double_t kAlphaCut ;
+    static const Bool_t   doESDReCalibration;
+    static const Int_t    kNCenBins = 9; // see EvalV0ReactionPlane()
 
     // cluster cut variables:
-    static const Double_t kMinClusterEnergy = 0.3;
-    static const Double_t kMinBCDistance = 2.5;  //distance to nearest bad channel
-    static const Int_t kMinNCells = 3;
-    static const Double_t kMinM02 = 0.2;
+    static const Double_t kMinClusterEnergy;
+    static const Double_t kMinBCDistance;  //distance to nearest bad channel
+    static const Int_t    kMinNCells;
+    static const Double_t kMinM02;
 
     // Binning, [vtx, centrality, reaction-plane]
-    static const Int_t kNVtxZBins = 1;
-    static const Double_t kCentCutoff = 90.; // Ignore Centrality over 90%
+    static const Int_t    kNVtxZBins;
+    static const Double_t kCentCutoff; // Ignore Centrality over 90%
     TArrayD fCentEdges;  // Centrality Bin Lower edges
     TArrayI fCentNMixed; // Number of mixed events for each centrality bin
     UInt_t fNEMRPBins;
@@ -165,9 +173,13 @@ protected:
 
     // Behavior / cuts
     Period fPeriod;
+    TriggerSelection fInternalTriggerSelection;
     Float_t fMaxAbsVertexZ; // in cm
     Bool_t fManualV0EPCalc;
     Bool_t fModuleEnabled[kNMod]; //[kNMod]
+    Bool_t fTOFCutEnabled;
+    Double_t fTOFCut;
+    Bool_t fFillWideTOF;
 
 
     TList * fOutputContainer;        //final histogram container
@@ -200,14 +212,16 @@ protected:
     AliEPFlattener * fV0CFlat ; //Object for flattening of V0C
     
     
-    // Step 2: Vertex
+    // Step 3: Vertex
     Double_t fVertex[3];
     TVector3 fVertexVector;
     Int_t fVtxBin;
 
+
     // Step 4: Centrality
-    Float_t fCentralityV0M ; //!Centrality of the currecnt event
-    Int_t fCentBin ;       //! Current centrality bin
+    TString fCentralityEstimator; //! Centrality estimator ("V0M", "ZNA")
+    Float_t fCentrality ;         //! Centrality of the current event
+    Int_t   fCentBin ;            //! Current centrality bin
 
     // Step 5: Reaction Plane
     Bool_t fHaveTPCRP ; //! Is TPC RP defined?
@@ -223,7 +237,7 @@ protected:
     TObjArray* fCaloPhotonsPHOSLists; //! array of TList, Containers for events with PHOS photons
 
 
-    ClassDef(AliAnalysisTaskPi0Flow, 2); // PHOS analysis task
+    ClassDef(AliAnalysisTaskPi0Flow, 3); // PHOS analysis task
 };
 
 #endif