]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG/EMCAL/AliAnalysisTaskEmcal.h
Removed depricated analysis framework, ie renamed
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliAnalysisTaskEmcal.h
index c8d36aab3a502bcdf754e6822b27ce1a0f5ab729..a61990631ef00509b3d40c2c12f051e75b0b96af 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef ALIANALYSISTASKEMCAL_H
 #define ALIANALYSISTASKEMCAL_H
 
-// $Id: AliAnalysisTaskEmcal.h 56756 2012-05-30 05:03:02Z loizides $
+// $Id: AliAnalysisTaskEmcalDev.h 64518 2013-10-14 12:44:52Z loizides $
 
 class TClonesArray;
 class TString;
@@ -15,19 +15,18 @@ class AliVCaloCells;
 class TH1;
 class TProfile;
 class AliEMCALGeometry;
+class AliParticleContainer;
+class AliClusterContainer;
 class AliGenPythiaEventHeader;
 class AliVCaloTrigger;
+class AliAnalysisUtils;
+
+#include "Rtypes.h"
 
 #include "AliAnalysisTaskSE.h"
 
 class AliAnalysisTaskEmcal : public AliAnalysisTaskSE {
  public:
-  
-  enum EmcalAnaType {
-    kTPC       = 0,     // TPC acceptance
-    kEMCAL     = 1,     // EMCal acceptance
-    kUser      = 2,     // User defined acceptance
-  };
 
   enum BeamType {
     kNA       = -1,
@@ -44,21 +43,10 @@ class AliAnalysisTaskEmcal : public AliAnalysisTaskSE {
   void                        UserCreateOutputObjects();
   Bool_t                      UserNotify();
 
-  void                        SetAnaType(EmcalAnaType type)                         { fAnaType           = type                           ; }
-  void                        SetNCentBins(Int_t n)                                 { fNcentBins         = n                              ; }                             
+  void                        SetNCentBins(Int_t n)                                 { fNcentBins         = n                              ; }  
   void                        SetCentRange(Double_t min, Double_t max)              { fMinCent           = min  ; fMaxCent = max          ; }
-  void                        SetClusName(const char *n)                            { fCaloName          = n                              ; }
-  void                        SetCaloCellsName(const char *n)                       { fCaloCellsName     = n                              ; }
-  void                        SetCaloTriggersName(const char *n)                    { fCaloTriggersName  = n                              ; }
-  void                        SetClusPtCut(Double_t cut)                            { fClusPtCut         = cut                            ; }
-  void                        SetClusTimeCut(Double_t min, Double_t max)            { fClusTimeCutLow    = min  ; fClusTimeCutUp = max    ; }
   void                        SetHistoBins(Int_t nbins, Double_t min, Double_t max) { fNbins = nbins; fMinBinPt = min; fMaxBinPt = max    ; }
   void                        SetOffTrigger(UInt_t t)                               { fOffTrigger        = t                              ; }
-  void                        SetPtCut(Double_t cut)                                { SetClusPtCut(cut)         ; SetTrackPtCut(cut)      ; }
-  void                        SetTrackPtCut(Double_t cut)                           { fTrackPtCut        = cut                            ; }
-  void                        SetTrackEtaLimits(Double_t min, Double_t max)         { fTrackMaxEta       = max  ; fTrackMinEta      = min ; }
-  void                        SetTrackPhiLimits(Double_t min, Double_t max)         { fTrackMaxPhi       = max  ; fTrackMinPhi      = min ; }
-  void                        SetTracksName(const char *n)                          { fTracksName        = n                              ; }
   void                        SetTrigClass(const char *n)                           { fTrigClass         = n                              ; }  
   void                        SetVzRange(Double_t min, Double_t max)                { fMinVz             = min  ; fMaxVz   = max          ; }
   void                        SetForceBeamType(BeamType f)                          { fForceBeamType     = f                              ; }
@@ -66,66 +54,88 @@ class AliAnalysisTaskEmcal : public AliAnalysisTaskSE {
   void                        SetMinPtTrackInEmcal(Double_t min)                    { fMinPtTrackInEmcal = min                            ; }
   void                        SetEventPlaneVsEmcal(Double_t ep)                     { fEventPlaneVsEmcal = ep                             ; }
   void                        SetCentralityEstimator(const char *c)                 { fCentEst           = c                              ; }
-  void                        SetTrackBitMap(UInt_t m)                              { fTrackBitMap       = m                              ; }
-  void                        SetClusterBitMap(UInt_t m)                            { fClusterBitMap     = m                              ; }
-  void                        SetParticleBitMap(UInt_t m)                           { fClusterBitMap     = m    ; fTrackBitMap       = m  ; }
-  void                        SetMCTrackBitMap(UInt_t m)                            { fMCTrackBitMap     = m                              ; }
-  void                        SetMCClusterBitMap(UInt_t m)                          { fMCClusterBitMap   = m                              ; }
-  void                        SetMCParticleBitMap(UInt_t m)                         { fMCClusterBitMap   = m    ; fMCTrackBitMap     = m  ; }
+
+  void                        SetMinNTrack(Int_t min)                               { fMinNTrack         = min                            ; }
+  void                        SetUseAliAnaUtils(Bool_t b)                           { fUseAliAnaUtils    = b                              ; }
+
   void                        SetMinMCLabel(Int_t s)                                { fMinMCLabel        = s                              ; }
   void                        SetIsEmbedded(Bool_t i)                               { fIsEmbedded        = i                              ; }
   void                        SetIsPythia(Bool_t i)                                 { fIsPythia          = i                              ; }
   void                        SetMCLabelShift(Int_t s)                              { fMCLabelShift      = s                              ; }
 
+  void                        SetCaloCellsName(const char *n)                       { fCaloCellsName     = n                              ; }
+  void                        SetCaloTriggersName(const char *n)                    { fCaloTriggersName  = n                              ; }
+
+  void                        SetTracksName(const char *n)                          { AddParticleContainer(n)                             ; }
+  void                        SetClusName(const char *n)                            { AddClusterContainer(n)                              ; }
+
+  void                        SetClusPtCut(Double_t cut, Int_t c=0);
+  void                        SetClusTimeCut(Double_t min, Double_t max, Int_t c=0);
+  void                        SetTrackPtCut(Double_t cut, Int_t c=0);
+  void                        SetTrackEtaLimits(Double_t min, Double_t max, Int_t c=0);
+  void                        SetTrackPhiLimits(Double_t min, Double_t max, Int_t c=0);
+
+  AliParticleContainer       *AddParticleContainer(const char *n);
+  AliClusterContainer        *AddClusterContainer(const char *n);
+  void                        RemoveParticleContainer(Int_t i=0)                      { fParticleCollArray.RemoveAt(i);} 
+  void                        RemoveClusterContainer(Int_t i=0)                       { fClusterCollArray.RemoveAt(i);} 
+
+  AliParticleContainer       *GetParticleContainer(const Int_t i=0)   const;
+  AliClusterContainer        *GetClusterContainer(const Int_t i=0)    const;
+  AliParticleContainer       *GetParticleContainer(const char* name)  const;
+  AliClusterContainer        *GetClusterContainer(const char* name)   const;
+
  protected:
-  Bool_t                      AcceptCluster(AliVCluster        *clus)  const;
-  Bool_t                      AcceptEmcalPart(AliEmcalParticle *part)  const;
-  Bool_t                      AcceptTrack(AliVParticle         *track) const;
-  virtual void                ExecOnce();
-  virtual Bool_t              FillGeneralHistograms();
-  virtual Bool_t              FillHistograms()                                     { return kTRUE                 ; }
   BeamType                    GetBeamType();
   TClonesArray               *GetArrayFromEvent(const char *name, const char *clname=0);
+  Bool_t                      PythiaInfoFromFile(const char* currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard);
+
+  TClonesArray               *GetParticleArray(const Int_t i=0)                  const;
+  TClonesArray               *GetClusterArray(const Int_t i=0)                   const;
+
+  AliVParticle               *GetAcceptParticleFromArray(Int_t p, Int_t c=0)     const;
+  AliVCluster                *GetAcceptClusterFromArray(Int_t cl, Int_t c=0)     const;
+
+  Int_t                       GetNParticles(Int_t i=0)                           const;
+  Int_t                       GetNClusters(Int_t i=0)                            const;
+
+  Bool_t                      AcceptCluster(AliVCluster *clus, Int_t c = 0)      const;
+  Bool_t                      AcceptTrack(AliVParticle *track, Int_t c = 0)      const;
+
+  // Virtual functions, to be overloaded in derived classes
+  virtual void                ExecOnce();
+  virtual Bool_t              FillGeneralHistograms();
   virtual Bool_t              IsEventSelected();
   virtual Bool_t              RetrieveEventObjects();
+  virtual Bool_t              FillHistograms()                                     { return kTRUE                 ; }
   virtual Bool_t              Run()                                                { return kTRUE                 ; }
-  Bool_t                      PythiaInfoFromFile(const char* currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard);
 
-  EmcalAnaType                fAnaType;                    // analysis type
+
   BeamType                    fForceBeamType;              // forced beam type
   Bool_t                      fGeneralHistograms;          // whether or not it should fill some general histograms
   Bool_t                      fInitialized;                // whether or not the task has been already initialized
   Bool_t                      fCreateHisto;                // whether or not create histograms
-  TString                     fTracksName;                 // name of track collection
-  TString                     fCaloName;                   // name of calo cluster collection
   TString                     fCaloCellsName;              // name of calo cell collection
   TString                     fCaloTriggersName;           // name of calo triggers collection
   Double_t                    fMinCent;                    // min centrality for event selection
   Double_t                    fMaxCent;                    // max centrality for event selection
   Double_t                    fMinVz;                      // min vertex for event selection
   Double_t                    fMaxVz;                      // max vertex for event selection
+  Double_t                    fTrackPtCut;                 // cut on track pt in event selection
+  Int_t                       fMinNTrack;                  // minimum nr of tracks in event with pT>fTrackPtCut
+  Bool_t                      fUseAliAnaUtils;             //  used for LHC13* data
+  AliAnalysisUtils           *fAliAnalysisUtils;           //! vertex selection (optional)
+
   UInt_t                      fOffTrigger;                 // offline trigger for event selection
   TString                     fTrigClass;                  // trigger class name for event selection
   Int_t                       fNbins;                      // no. of pt bins
   Double_t                    fMinBinPt;                   // min pt in histograms
   Double_t                    fMaxBinPt;                   // max pt in histograms
-  Double_t                    fClusPtCut;                  // cut on cluster pt
-  Double_t                    fTrackPtCut;                 // cut on track pt
-  Double_t                    fTrackMinEta;                // cut on track eta
-  Double_t                    fTrackMaxEta;                // cut on track eta
-  Double_t                    fTrackMinPhi;                // cut on track phi
-  Double_t                    fTrackMaxPhi;                // cut on track phi
-  Double_t                    fClusTimeCutLow;             // low time cut for clusters
-  Double_t                    fClusTimeCutUp;              // up time cut for clusters
   Double_t                    fMinPtTrackInEmcal;          // min pt track in emcal
   Double_t                    fEventPlaneVsEmcal;          // select events which have a certain event plane wrt the emcal
   Double_t                    fMinEventPlane;              // minimum event plane value
   Double_t                    fMaxEventPlane;              // maximum event plane value
   TString                     fCentEst;                    // name of V0 centrality estimator
-  UInt_t                      fTrackBitMap;                // bit map of accepted tracks (non MC)
-  UInt_t                      fClusterBitMap;              // bit map of accepted clusters (non MC)
-  UInt_t                      fMCTrackBitMap;              // bit map of accepted MC tracks
-  UInt_t                      fMCClusterBitMap;            // bit map of accepted MC clusters
   Bool_t                      fIsEmbedded;                 // trigger, embedded signal
   Bool_t                      fIsPythia;                   // trigger, if it is a PYTHIA production
   Int_t                       fSelectPtHardBin;            // select one pt hard bin for analysis
@@ -152,6 +162,9 @@ class AliAnalysisTaskEmcal : public AliAnalysisTaskSE {
   Int_t                       fPtHardBin;                  //!event pt hard bin
   Int_t                       fNTrials;                    //!event trials
 
+  TObjArray                   fParticleCollArray;          // particle/track collection array
+  TObjArray                   fClusterCollArray;           // cluster collection array
+
   // Histograms
   TList                      *fOutput;                     //!output list
 
@@ -164,14 +177,14 @@ class AliAnalysisTaskEmcal : public AliAnalysisTaskSE {
   TH1                        *fHistPtHard;                 //!pt hard distribution
 
   // General histograms
-  TH1                        *fHistCentrality;             //!Event centrality distribution
-  TH1                        *fHistZVertex;                //!Z vertex position
-  TH1                        *fHistEventPlane;             //!Event plane distribution
+  TH1                        *fHistCentrality;             //!event centrality distribution
+  TH1                        *fHistZVertex;                //!z vertex position
+  TH1                        *fHistEventPlane;             //!event plane distribution
 
  private:
   AliAnalysisTaskEmcal(const AliAnalysisTaskEmcal&);            // not implemented
   AliAnalysisTaskEmcal &operator=(const AliAnalysisTaskEmcal&); // not implemented
 
-  ClassDef(AliAnalysisTaskEmcal, 17) // EMCAL base analysis task
+  ClassDef(AliAnalysisTaskEmcal, 4) // EMCAL base analysis task
 };
 #endif