]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/EBYE/NetParticle/AliAnalysisTaskNetParticle.h
flat friends update
[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 /**
10  * Class for NetParticle Distributions
11  * -- AnalysisTask
12  * Authors: Jochen Thaeder <jochen@thaeder.de>
13  *          Michael Weber <m.weber@cern.ch>
14  */
15
16 #include "AliAnalysisTaskSE.h"
17 #include "TList.h"
18 #include "THnSparse.h"
19
20 #include "AliAnalysisNetParticleHelper.h"
21 #include "AliAnalysisNetParticleEffCont.h"
22 #include "AliAnalysisNetParticleDCA.h"
23 #include "AliAnalysisNetParticleDistribution.h"
24 #include "AliAnalysisNetParticleQA.h"
25
26 class AliESDEvent;
27 class AliESDInputHandler;
28 class AliAODEvent;
29 class AliAODInputHandler;
30 class AliMCEvent;
31 class AliStack;
32 class AliPIDResponse;
33 class AliESDResponse;
34
35 class AliAnalysisTaskNetParticle : public AliAnalysisTaskSE {
36
37  public:
38
39   AliAnalysisTaskNetParticle(const char *name = "AliAnalysisTaskNetParticle");
40   virtual ~AliAnalysisTaskNetParticle();
41   
42   /*
43    * ---------------------------------------------------------------------------------
44    *                                  Task Methods
45    * ---------------------------------------------------------------------------------
46    */
47
48   virtual void UserCreateOutputObjects();
49   virtual void UserExec(Option_t *option);
50   virtual void Terminate(Option_t *);
51
52   /*
53    * ---------------------------------------------------------------------------------
54    *                                 Public Methods
55    * ---------------------------------------------------------------------------------
56    */
57
58   /** Initialize Task */
59   Int_t Initialize();
60
61   /*
62    * ---------------------------------------------------------------------------------
63    *                                    Setter
64    * ---------------------------------------------------------------------------------
65    */
66
67   void SetIsMC()                             {fIsMC             = kTRUE;}
68   void SetIsAOD(Bool_t b)                    {fIsAOD            = b;}
69   
70   void SetESDTrackCutMode(Int_t i)           {fESDTrackCutMode  = i;}
71   void SetModeEffCreation(Int_t i)           {fModeEffCreation  = i;}
72   void SetModeDCACreation(Int_t i)           {fModeDCACreation  = i;}
73   void SetModeDistCreation(Int_t i)          {fModeDistCreation = i;}
74   void SetModeQACreation(Int_t i)            {fModeQACreation   = i;}
75  
76   void SetEtaMax(Float_t f)                  {fEtaMax           = f;}
77   void SetEtaMaxEff(Float_t f)               {fEtaMaxEff        = 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    *                             Members - private
120    * ---------------------------------------------------------------------------------
121    */
122   
123   AliAnalysisNetParticleHelper       *fHelper;  //  Helper class
124   AliAnalysisNetParticleEffCont      *fEffCont; //! Efficiency and Contamination class
125   AliAnalysisNetParticleDCA          *fDCA;     //! DCA class
126   AliAnalysisNetParticleDistribution *fDist;    //! Distributions class
127   AliAnalysisNetParticleQA           *fQA;      //! QA class
128
129   // --- OutLists ----------------------------------------------------------
130   TList              *fOutList;                 //! Ptr to output data container
131   TList              *fOutListEff;              //! Ptr to output data container - efficiency
132   TList              *fOutListCont;             //! Ptr to output data container - contamination
133   TList              *fOutListDCA;              //! Ptr to output data container - DCA
134   TList              *fOutListQA;               //! Ptr to output data container - QA
135
136   // --- ESD only ----------------------------------------------------------
137   AliESDEvent        *fESD;                     //! Ptr to ESD event
138   AliESDInputHandler *fESDHandler;              //! Ptr to ESD Handler
139   // -----------------------------------------------------------------------
140   AliESDtrackCuts    *fESDTrackCutsBase;        //! ESD cuts - base settings
141   AliESDtrackCuts    *fESDTrackCuts;            //! ESD cuts  
142   AliESDtrackCuts    *fESDTrackCutsBkg;         //! ESD cuts for Bkg
143   AliESDtrackCuts    *fESDTrackCutsEff;         //! ESD cuts for efficiency determination -> larger pt Range
144
145   // --- AOD only ----------------------------------------------------------
146   AliAODEvent        *fAOD;                     //! Ptr to AOD event
147   AliAODInputHandler *fAODHandler;              //! Ptr to AOD Handler
148   
149   // --- Flags -------------------------------------------------------------
150   Bool_t              fIsMC;                    //  Is MC event
151   Bool_t              fIsAOD;                   //  analysis mode            : 0 = ESDs  | 1 = AODs
152   Int_t               fESDTrackCutMode;         //  ESD track cut mode       : 0 = clean | 1 = dirty
153   Int_t               fModeEffCreation ;        //  Correction creation mode : 1 = on    | 0 = off
154   Int_t               fModeDCACreation;         //  DCA creation mode        : 1 = on    | 0 = off
155   Int_t               fModeDistCreation;        //  Dist creation mode       : 1 = on    | 0 = off
156   Int_t               fModeQACreation;          //  QA creation mode         : 1 = on    | 0 = off
157
158   // --- MC only -----------------------------------------------------------
159   AliMCEvent         *fMCEvent;                 //! Ptr to MC event
160   AliStack           *fMCStack;                 //! Ptr to MC stack
161   // -----------------------------------------------------------------------
162   Float_t             fEtaMax;                  //  Max, absolut eta 
163   Float_t             fEtaMaxEff;               //  Max, absolut eta for efficiency
164   Float_t             fPtRange[2];              //  Array of pt [min,max]
165   Float_t             fPtRangeEff[2];           //  Array of pt [min,max] for efficiency
166   // -----------------------------------------------------------------------
167   Int_t               fAODtrackCutBit;          //  Track filter bit for AOD tracks
168   // =======================================================================
169
170   
171   ClassDef(AliAnalysisTaskNetParticle, 1);
172 };
173
174 #endif