]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/EMCAL/AliAnalysisTaskEmcal.h
3944e1d6f5164466a5e338b8674eb0cf259a4ba6
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliAnalysisTaskEmcal.h
1 #ifndef ALIANALYSISTASKEMCAL_H
2 #define ALIANALYSISTASKEMCAL_H
3
4 // $Id: AliAnalysisTaskEmcal.h 56756 2012-05-30 05:03:02Z loizides $
5
6 class TClonesArray;
7 class TString;
8 class TList;
9 class AliEmcalParticle;
10 class AliMCParticle;
11 class AliVCluster;
12 class AliVTrack;
13 class AliVParticle;
14 class AliVCaloCells;
15 class TH1F;
16 class AliEMCALGeometry;
17
18 #include "AliAnalysisTaskSE.h"
19
20 class AliAnalysisTaskEmcal : public AliAnalysisTaskSE {
21  public:
22   
23   enum EmcalAnaType {
24     kTPC       = 0,     // TPC acceptance
25     kEMCAL     = 1,     // EMCal acceptance
26     kUser      = 2,     // User defined acceptance
27   };
28
29   enum BeamType {
30     kNA       = -1,
31     kpp       = 0,
32     kAA       = 1,
33     kpA       = 2
34   };
35
36   AliAnalysisTaskEmcal();
37   AliAnalysisTaskEmcal(const char *name, Bool_t histo=kFALSE); 
38   virtual ~AliAnalysisTaskEmcal();
39
40   void                        UserExec(Option_t *option);
41   void                        UserCreateOutputObjects();
42
43   void                        SetAnaType(EmcalAnaType type)                         { fAnaType           = type ;                         ; }
44   void                        SetCentRange(Double_t min, Double_t max)              { fMinCent           = min  ; fMaxCent = max          ; }
45   void                        SetClusName(const char *n)                            { fCaloName          = n                              ; }
46   void                        SetCaloCellsName(const char *n)                       { fCaloCellsName     = n                              ; }
47   void                        SetClusPtCut(Double_t cut)                            { fClusPtCut         = cut                            ; }
48   void                        SetClusTimeCut(Double_t min, Double_t max)            { fClusTimeCutLow    = min  ; fClusTimeCutUp = max    ; }
49   void                        SetHistoBins(Int_t nbins, Double_t min, Double_t max) { fNbins = nbins; fMinBinPt = min; fMaxBinPt = max    ; }
50   void                        SetOffTrigger(UInt_t t)                               { fOffTrigger        = t                              ; }
51   void                        SetPtCut(Double_t cut)                                { SetClusPtCut(cut)         ; SetTrackPtCut(cut)      ; }
52   void                        SetTrackPtCut(Double_t cut)                           { fTrackPtCut        = cut                            ; }
53   void                        SetTrackEtaLimits(Double_t min, Double_t max)         { fTrackMaxEta       = max  ; fTrackMinEta      = min ; }
54   void                        SetTrackPhiLimits(Double_t min, Double_t max)         { fTrackMaxPhi       = max  ; fTrackMinPhi      = min ; }
55   void                        SetTracksName(const char *n)                          { fTracksName        = n                              ; }
56   void                        SetTrigClass(const char *n)                           { fTrigClass         = n                              ; }  
57   void                        SetVzRange(Double_t min, Double_t max)                { fMinVz             = min  ; fMaxVz   = max          ; }
58   void                        SetForceBeamType(BeamType f)                          { fForceBeamType     = f                              ; }
59   void                        SetMakeGeneralHistograms(Bool_t g)                    { fGeneralHistograms = g                              ; }
60   void                        SetMinPtTrackInEmcal(Double_t min)                    { fMinPtTrackInEmcal = min                            ; }
61   void                        SetEventPlaneVsEmcal(Double_t ep)                     { fEventPlaneVsEmcal = ep                             ; }
62   void                        SetCentralityEstimator(const char *c)                 { fCentEst           = c                              ; }
63   void                        SetTrackBitMap(UInt_t m)                              { fTrackBitMap       = m                              ; }
64   void                        SetClusterBitMap(UInt_t m)                            { fClusterBitMap     = m                              ; }
65   void                        SetParticleBitMap(UInt_t m)                           { fClusterBitMap     = m    ; fTrackBitMap       = m  ; }
66
67  protected:
68   Bool_t                      AcceptCluster(AliVCluster        *clus)  const;
69   Bool_t                      AcceptEmcalPart(AliEmcalParticle *part)  const;
70   Bool_t                      AcceptTrack(AliVParticle         *track) const;
71   virtual void                ExecOnce();
72   virtual Bool_t              FillGeneralHistograms();
73   virtual Bool_t              FillHistograms()                                     { return kTRUE                 ; }
74   BeamType                    GetBeamType();
75   TClonesArray               *GetArrayFromEvent(const char *name, const char *clname=0);
76   virtual Bool_t              IsEventSelected();
77   virtual Bool_t              RetrieveEventObjects();
78   virtual Bool_t              Run()                                                { return kTRUE                 ; }
79
80   EmcalAnaType                fAnaType;                    // analysis type
81   BeamType                    fForceBeamType;              // forced beam type
82   Bool_t                      fGeneralHistograms;          // whether or not it should fill some general histograms
83   Bool_t                      fInitialized;                // whether or not the task has been already initialized
84   Bool_t                      fCreateHisto;                // whether or not create histograms
85   TString                     fTracksName;                 // name of track collection
86   TString                     fCaloName;                   // name of calo cluster collection
87   TString                     fCaloCellsName;              // name of calo cell collection
88   Double_t                    fMinCent;                    // min centrality for event selection
89   Double_t                    fMaxCent;                    // max centrality for event selection
90   Double_t                    fMinVz;                      // min vertex for event selection
91   Double_t                    fMaxVz;                      // max vertex for event selection
92   UInt_t                      fOffTrigger;                 // offline trigger for event selection
93   TString                     fTrigClass;                  // trigger class name for event selection
94   Int_t                       fNbins;                      // no. of pt bins
95   Double_t                    fMinBinPt;                   // min pt in histograms
96   Double_t                    fMaxBinPt;                   // max pt in histograms
97   Double_t                    fClusPtCut;                  // cut on cluster pt
98   Double_t                    fTrackPtCut;                 // cut on track pt
99   Double_t                    fTrackMinEta;                // cut on track eta
100   Double_t                    fTrackMaxEta;                // cut on track eta
101   Double_t                    fTrackMinPhi;                // cut on track phi
102   Double_t                    fTrackMaxPhi;                // cut on track phi
103   Double_t                    fClusTimeCutLow;             // low time cut for clusters
104   Double_t                    fClusTimeCutUp;              // up time cut for clusters
105   Double_t                    fMinPtTrackInEmcal;          // min pt track in emcal
106   Double_t                    fEventPlaneVsEmcal;          // select events which have a certain event plane wrt the emcal
107   Double_t                    fMinEventPlane;              // minimum event plane value
108   Double_t                    fMaxEventPlane;              // maximum event plane value
109   TString                     fCentEst;                    // name of V0 centrality estimator
110   UInt_t                      fTrackBitMap;                // bit map of accepted tracks
111   UInt_t                      fClusterBitMap;              // bit map of accepted clusters
112   Int_t                       fNcentBins;                  //!how many centrality bins
113   AliEMCALGeometry           *fGeom;                       //!emcal geometry
114   TClonesArray               *fTracks;                     //!tracks
115   TClonesArray               *fCaloClusters;               //!clusters
116   AliVCaloCells              *fCaloCells;                  //!cells
117   Double_t                    fCent;                       //!event centrality
118   Int_t                       fCentBin;                    //!event centrality bin
119   Double_t                    fEPV0;                       //!event plane V0
120   Double_t                    fEPV0A;                      //!event plane V0A
121   Double_t                    fEPV0C;                      //!event plane V0C
122   Double_t                    fVertex[3];                  //!event vertex
123   Int_t                       fNVertCont;                  //!event vertex number of contributors
124   BeamType                    fBeamType;                   //!event beam type
125   TList                      *fOutput;                     //!output list
126
127   TH1F                       *fHistCentrality;             //!Event centrality distribution
128   TH1F                       *fHistZVertex;                //!Z vertex position
129   TH1F                       *fHistEventPlane;             //!Event plane distribution
130
131  private:
132   AliAnalysisTaskEmcal(const AliAnalysisTaskEmcal&);            // not implemented
133   AliAnalysisTaskEmcal &operator=(const AliAnalysisTaskEmcal&); // not implemented
134
135   ClassDef(AliAnalysisTaskEmcal, 11) // EMCAL base analysis task
136 };
137 #endif