]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/EBYE/NetParticle/AliAnalysisTaskNetParticle.h
651e260fa55d5a2430c58db772709013b194eaff
[u/mrichter/AliRoot.git] / PWGCF / EBYE / NetParticle / AliAnalysisTaskNetParticle.h
1 //-*- Mode: C++ -*-
2
3 #ifndef ALIANALYSISTASKNETPARTICLE_H
4 #define ALIANALYSISTASKNETPARTICLE_H
5
6 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7  * See cxx source for full Copyright notice                               */
8  
9 // Task for NetParticle Distributions
10 // Authors: Jochen Thaeder <jochen@thaeder.de>
11
12 #include "AliAnalysisTaskSE.h"
13 #include "TList.h"
14 #include "THnSparse.h"
15
16 #include "AliAnalysisNetParticleHelper.h"
17 #include "AliAnalysisNetParticleEffCont.h"
18 #include "AliAnalysisNetParticleDCA.h"
19 #include "AliAnalysisNetParticleDistribution.h"
20
21 class AliESDEvent;
22 class AliESDInputHandler;
23 class AliAODEvent;
24 class AliAODInputHandler;
25 class AliMCEvent;
26 class AliStack;
27 class AliPIDResponse;
28 class AliESDResponse;
29
30 class AliAnalysisTaskNetParticle : public AliAnalysisTaskSE {
31
32  public:
33
34   /*
35    * ---------------------------------------------------------------------------------
36    *                            Constructor / Destructor
37    * ---------------------------------------------------------------------------------
38    */
39
40   AliAnalysisTaskNetParticle(const char *name = "AliAnalysisTaskNetParticle");
41   virtual ~AliAnalysisTaskNetParticle();
42   
43   /*
44    * ---------------------------------------------------------------------------------
45    *                                  Task Methods
46    * ---------------------------------------------------------------------------------
47    */
48
49   virtual void UserCreateOutputObjects();
50   virtual void UserExec(Option_t *option);
51   virtual void Terminate(Option_t *);
52
53   /*
54    * ---------------------------------------------------------------------------------
55    *                                 Public Methods
56    * ---------------------------------------------------------------------------------
57    */
58
59   /** Initialize Task */
60   Int_t Initialize();
61
62   /*
63    * ---------------------------------------------------------------------------------
64    *                                    Setter
65    * ---------------------------------------------------------------------------------
66    */
67
68   void SetIsMC()                             {fIsMC             = kTRUE;}
69   void SetIsAOD(Bool_t b)                    {fIsAOD            = b;}
70   
71   void SetESDTrackCutMode(Int_t i)           {fESDTrackCutMode  = i;}
72   void SetModeEffCreation(Int_t i)           {fModeEffCreation  = i;}
73   void SetModeDCACreation(Int_t i)           {fModeDCACreation  = i;}
74   void SetModeDistCreation(Int_t i)          {fModeDistCreation = i;}
75   void SetModeQACreation(Int_t i)            {fModeQACreation   = i;}
76  
77   void SetEtaMax(Float_t f)                  {fEtaMax           = f;}
78   void SetPtRange(Float_t f1, Float_t f2)    {fPtRange[0]       = f1; fPtRange[1]    = f2;}
79   void SetPtRangeEff(Float_t f1, Float_t f2) {fPtRangeEff[0]    = f1; fPtRangeEff[1] = f2;}
80
81   void SetTrackFilterBit(Int_t i)            {fAODtrackCutBit   = i;}
82   
83   void SetNetParticleHelper(AliAnalysisNetParticleHelper *helper) {
84     if (fHelper) 
85       delete fHelper;
86     fHelper = helper;
87   }
88
89   ///////////////////////////////////////////////////////////////////////////////////
90
91  private:
92
93   AliAnalysisTaskNetParticle(const AliAnalysisTaskNetParticle&); // not implemented
94   AliAnalysisTaskNetParticle& operator=(const AliAnalysisTaskNetParticle&); // not implemented
95
96   /*
97    * ---------------------------------------------------------------------------------
98    *                            Setup/Reset Methods - private
99    * ---------------------------------------------------------------------------------
100    */
101   
102   /** Setup Event */
103   Int_t SetupEvent();
104
105   /** Setup ESD Event */
106   Int_t SetupESDEvent();
107
108   /** Setup AOD Event */
109   Int_t SetupAODEvent();
110
111   /** Setup MC Event */
112   Int_t SetupMCEvent();
113
114   /** Reset Event */
115   void ResetEvent();
116
117   /*
118    * ---------------------------------------------------------------------------------
119    *                           Helper Methods - private
120    * ---------------------------------------------------------------------------------
121    */
122   /** Create QA histograms */
123   void CreateQAHists();
124
125   /**  Process ESD tracks and fill QA histograms */
126   void FillQAHists();
127
128   /*
129    * ---------------------------------------------------------------------------------
130    *                             Members - private
131    * ---------------------------------------------------------------------------------
132    */
133   
134   AliAnalysisNetParticleHelper       *fHelper;  // Helper class
135   AliAnalysisNetParticleEffCont      *fEffCont; //! Efficiency and Contamination class
136   AliAnalysisNetParticleDCA          *fDCA;     //! DCA class
137   AliAnalysisNetParticleDistribution *fDist;    //! Distributions class
138
139   // --- OutLists ----------------------------------------------------------
140
141   TList              *fOutList;                 //! Ptr to output data container
142   TList              *fOutListEff;              //! Ptr to output data container - efficiency
143   TList              *fOutListCont;             //! Ptr to output data container - contamination
144   TList              *fOutListDCA;              //! Ptr to output data container - DCA
145   TList              *fOutListQA;               //! Ptr to QA output data container
146
147   // --- ESD only ----------------------------------------------------------
148
149   AliESDEvent        *fESD;                     //! Ptr to ESD event
150   AliESDInputHandler *fESDHandler;              //! Ptr to ESD Handler
151
152   AliESDtrackCuts    *fESDTrackCutsBase;        //! ESD cuts - base settings
153   AliESDtrackCuts    *fESDTrackCuts;            //! ESD cuts  
154   AliESDtrackCuts    *fESDTrackCutsBkg;         //! ESD cuts for Bkg
155   AliESDtrackCuts    *fESDTrackCutsEff;         //! ESD cuts for efficiency determination -> larger pt Range
156
157   // --- AOD only ----------------------------------------------------------
158
159   AliAODEvent        *fAOD;                     //! Ptr to AOD event
160   AliAODInputHandler *fAODHandler;              //! Ptr to AOD Handler
161   
162   // --- Flags -------------------------------------------------------------
163
164   Bool_t              fIsMC;                   //  Is MC event
165   Bool_t              fIsAOD;                  //  analysis mode            : 0 = ESDs  | 1 = AODs
166   Int_t               fESDTrackCutMode;        //  ESD track cut mode       : 0 = clean | 1 dirty
167   Int_t               fModeEffCreation ;       //  Correction creation mode : 1 = on | 0 = off
168   Int_t               fModeDCACreation;        //  DCA creation mode        : 1 = on | 0 = off
169   Int_t               fModeDistCreation;       //  Dist creation mode       : 1 = on | 0 = off
170   Int_t               fModeQACreation;         //  QA creation mode         : 1 = on | 0 = off
171
172   // --- MC only -----------------------------------------------------------
173
174   AliMCEvent         *fMCEvent;                //! Ptr to MC event
175   AliStack           *fMCStack;                //! Ptr to MC stack
176
177   // -----------------------------------------------------------------------
178
179   THnSparseF         *fHnQA;                   //! THnSparseF : tracks for QA
180   
181   // -----------------------------------------------------------------------
182
183   Float_t             fEtaMax;                 //  Max, absolut eta 
184   Float_t             fPtRange[2];             //  Array of pt [min,max]
185   Float_t             fPtRangeEff[2];          //  Array of pt [min,max] for efficiency
186
187   Int_t               fAODtrackCutBit;         //  Track filter bit for AOD tracks
188
189   // -----------------------------------------------------------------------
190   
191   ClassDef(AliAnalysisTaskNetParticle, 1);
192 };
193
194 #endif