]> 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 93873921408500d3a3e62b5c286b52ef40fd1abb..eab0868cd333889c7db66ae4e06d94c3bac523b5 100644 (file)
@@ -24,6 +24,7 @@ class AliPHOSCalibData;
 class AliESDtrack ;
 class AliESDCaloCluster ;
 class AliEPFlattener;
+class AliAnalysisUtils;
 
 #include "TArrayD.h"
 
@@ -31,7 +32,9 @@ class AliEPFlattener;
 
 class AliAnalysisTaskPi0Flow : public AliAnalysisTaskSE {
 public:
-    enum Period { kUndefinedPeriod, kLHC10h, kLHC11h };
+    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,25 +45,29 @@ 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);
     
     void SetPHOSBadMap(Int_t mod,TH2I * badMapHist);
     //Where to read AODB object with EP calibration if not default
     void SetEPcalibFileName(const TString filename) {fEPcalibFileName = filename; }   
 
-private:
+
+protected:
     AliAnalysisTaskPi0Flow(const AliAnalysisTaskPi0Flow&); // not implemented
     AliAnalysisTaskPi0Flow& operator=(const AliAnalysisTaskPi0Flow&); // not implemented
 
     // Step 0:
     AliVEvent* GetEvent();
-    AliStack* GetMCStack();
 
-    // Step 1:
+    // Step 1 (done once):
     void SetGeometry();
     void SetMisalignment();
     void SetV0Calibration(); //V0 calibration
@@ -69,6 +76,9 @@ private:
     void SetFlatteningData(); // phos flattening
 
     // Step 2:
+    Bool_t RejectTriggerMaskSelection();
+
+    // Step 3:
     void SetVertex();
     Bool_t RejectEventVertex();
 
@@ -84,16 +94,19 @@ private:
     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: Update lists
+    // Step 11: MC
+    virtual void ProcessMC();
+
+    // Step 12: Update lists
     void UpdateLists();
 
     Bool_t AreNeibors(Int_t id1,Int_t id2) ;
@@ -111,6 +124,7 @@ private:
     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);
@@ -130,25 +144,28 @@ private:
     UInt_t GetNumberOfCentralityBins() { return fCentEdges.GetSize()-1; }
     TList* GetCaloPhotonsPHOSList(UInt_t vtxBin, UInt_t centBin, UInt_t rpBin);
     
+    AliAnalysisUtils* GetAnalysisUtils();
 
 
+protected:
+    // transient constants
+    static const Int_t    kNMod = 5;
 
-private:
     // 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;
@@ -156,8 +173,13 @@ private:
 
     // 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
@@ -173,7 +195,6 @@ private:
     AliVEvent* fEvent; //! Current event
     AliESDEvent* fEventESD; //! Current event, if ESD.
     AliAODEvent* fEventAOD; //! Current event, if AOD.
-    AliStack * fMCStack ;
 
     // Step 1: Run Number, Misalignment Matrix, and Calibration
     Int_t fRunNumber; // run number
@@ -191,14 +212,16 @@ private:
     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?
@@ -210,11 +233,11 @@ private:
     // Step 8: Event Photons (PHOS Clusters) selection
     TObjArray * fCaloPhotonsPHOS ;      //PHOS photons in current event
 
-    // Step 11: Update lists for mixing.
+    // Step 12: Update lists for mixing.
     TObjArray* fCaloPhotonsPHOSLists; //! array of TList, Containers for events with PHOS photons
 
 
-    ClassDef(AliAnalysisTaskPi0Flow, 1); // PHOS analysis task
+    ClassDef(AliAnalysisTaskPi0Flow, 3); // PHOS analysis task
 };
 
 #endif