Net Particle fluctuation task including efficiency correction (by Jochen Thaeder)
[u/mrichter/AliRoot.git] / PWGCF / EBYE / NetParticle / AliAnalysisNetParticleDistribution.h
1 //-*- Mode: C++ -*-
2
3 #ifndef ALIANALYSISNETPARTICLEDISTRIBUTION_H
4 #define ALIANALYSISNETPARTICLEDISTRIBUTION_H
5
6 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7  * See cxx source for full Copyright notice                               */
8  
9 // Helper Class for for NetParticle Distributions
10 // Authors: Jochen Thaeder <jochen@thaeder.de>
11
12 #include "THnSparse.h"
13 #include "TH1F.h"
14 #include "TF1.h"
15
16 #include "AliAnalysisNetParticleHelper.h"
17
18 class AliESDtrack;
19 class AliMCEvent;
20 class AliStack;
21 class AliPIDResponse;
22 class AliESDInputHandler;
23 class AliESDtrackCuts;
24
25 class AliAnalysisNetParticleDistribution : public TNamed {
26
27  public:
28
29   /*
30    * ---------------------------------------------------------------------------------
31    *                            Constructor / Destructor
32    * ---------------------------------------------------------------------------------
33    */
34
35   AliAnalysisNetParticleDistribution();
36   virtual ~AliAnalysisNetParticleDistribution();
37
38   /*
39    * ---------------------------------------------------------------------------------
40    *                                 Public Methods
41    * ---------------------------------------------------------------------------------
42    */
43
44   /** Initialize */
45   Int_t Initialize(AliAnalysisNetParticleHelper* helper, AliESDtrackCuts* cuts, Bool_t isMC, Float_t *ptRange, Float_t etaMax);
46
47   /** Add histograms to outlist */
48   void CreateHistograms(TList *outList);
49
50   /** Setup Event */
51   Int_t SetupEvent(AliESDInputHandler *esdHandler, AliMCEvent *mcEvent);
52
53   /** Resre Event */
54   void ResetEvent();
55
56   /** Process NetParticle Distributions */ 
57   Int_t Process();
58
59   ///////////////////////////////////////////////////////////////////////////////////
60
61  private:
62
63   AliAnalysisNetParticleDistribution(const AliAnalysisNetParticleDistribution&); // not implemented
64   AliAnalysisNetParticleDistribution& operator=(const AliAnalysisNetParticleDistribution&); // not implemented
65
66   /*
67    * ---------------------------------------------------------------------------------
68    *                           Process - Private
69    * ---------------------------------------------------------------------------------
70    */
71    /** Process ESD tracks and fill histograms */
72   Int_t ProcessESDTracks();
73
74   /** Process primary particles from the stack and fill histograms */
75   Int_t ProcessStackParticles();
76
77   /** Process control particles from the stack and fill histograms */
78   Int_t ProcessStackControlParticles();
79   
80  /*
81    * ---------------------------------------------------------------------------------
82    *                            Helper Methods - private
83    * ---------------------------------------------------------------------------------
84    */
85
86   /** Add set of histograms */
87   void AddHistSet(const Char_t *name, const Char_t *title);
88
89   /** Fill set of histograms */
90   void FillHistSet(const Char_t *name, Float_t *np, Int_t controlIdx = -1);
91
92   /*
93    * ---------------------------------------------------------------------------------
94    *                             Members - private
95    * ---------------------------------------------------------------------------------
96    */
97
98   AliAnalysisNetParticleHelper *fHelper;        //! Ptr to helper class
99
100   TList                *fOutList;               //! Output data container
101   // -----------------------------------------------------------------------
102   AliESDInputHandler   *fESDHandler;            //! Ptr to ESD handler 
103   AliPIDResponse       *fPIDResponse;           //! Ptr to PID response Object
104   AliESDEvent          *fESD;                   //! Ptr to ESD event
105
106   Bool_t                fIsMC;                  //  Is MC event
107
108   AliMCEvent           *fMCEvent;               //! Ptr to MC event
109   AliStack             *fStack;                 //! Ptr to stack
110
111   AliESDtrackCuts      *fESDTrackCuts;          //! ESD cuts  
112   // -----------------------------------------------------------------------
113   Float_t               fEtaMax;                //  Max, absolut eta
114   Float_t              *fPtRange;               //  Array of pt [min,max]
115   // -----------------------------------------------------------------------
116   Float_t              *fNp;                    //  Array of particle/anti-particle counts
117
118   Int_t                 fNCorrNp;               //  N sets of arrays of corrected particle/anti-particle counts
119   Float_t             **fCorrNp;                //  Array of corrected particle/anti-particle counts
120
121   Int_t                 fNMCNp;                 //  N sets of arrays of MC particle/anti-particle counts
122   Float_t             **fMCNp;                  //  Array of MC particle/anti-particle counts
123
124   Int_t                 fNControlMCNp;          //  N sets of arrays of control MC particle/anti-particle counts
125   Float_t             **fControlMCNp;           //  Array of control MC particle/anti-particle counts
126   // -----------------------------------------------------------------------
127   THnSparseF           *fHnTrackUnCorr;         //  THnSparseF : uncorrected probe particles
128   // -----------------------------------------------------------------------
129
130   ClassDef(AliAnalysisNetParticleDistribution, 1);
131 };
132
133 #endif