Net Particle fluctuation task including efficiency correction (by Jochen Thaeder)
[u/mrichter/AliRoot.git] / PWGCF / EBYE / NetParticle / AliAnalysisNetParticleEffCont.h
1 //-*- Mode: C++ -*-
2
3 #ifndef ALIANALYSISNETPARTICLEEFFCONT_H
4 #define ALIANALYSISNETPARTICLEEFFCONT_H
5
6 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7  * See cxx source for full Copyright notice                               */
8  
9 // Efficiency and Contaminations for NetParticle Distributions
10 // Authors: Jochen Thaeder <jochen@thaeder.de>
11
12 #include "THnSparse.h"
13
14 #include "AliAnalysisNetParticleHelper.h"
15
16 class AliESDEvent;
17 class AliESDInputHandler;
18 class AliMCEvent;
19
20 class AliAnalysisNetParticleEffCont : public TNamed {
21
22  public:
23
24   /*
25    * ---------------------------------------------------------------------------------
26    *                            Constructor / Destructor
27    * ---------------------------------------------------------------------------------
28    */
29
30   AliAnalysisNetParticleEffCont();
31   virtual ~AliAnalysisNetParticleEffCont();
32   
33   /*
34    * ---------------------------------------------------------------------------------
35    *                                 Public Methods
36    * ---------------------------------------------------------------------------------
37    */
38
39   /** Initialize */
40   void Initialize(AliESDtrackCuts *cuts, AliAnalysisNetParticleHelper* helper);
41
42   /** Setup Event */
43   Int_t SetupEvent(AliESDInputHandler *esdHandler, AliMCEvent *mcEvent);
44
45   /** Reset Event */
46   void ResetEvent();
47
48   /** Process Event */
49   void Process();
50
51   /*
52    * ---------------------------------------------------------------------------------
53    *                                    Getter
54    * ---------------------------------------------------------------------------------
55    */
56
57   /** Get Ptr to efficiency THnSparse */
58   THnSparseF* GetHnEff()  {return fHnEff;}
59
60   /** Get Ptr to contaminiation THnSparse */
61   THnSparseF* GetHnCont() {return fHnCont;}
62
63   ///////////////////////////////////////////////////////////////////////////////////
64
65  private:
66
67   AliAnalysisNetParticleEffCont(const AliAnalysisNetParticleEffCont&); // not implemented
68   AliAnalysisNetParticleEffCont& operator=(const AliAnalysisNetParticleEffCont&); // not implemented
69
70
71   /*
72    * ---------------------------------------------------------------------------------
73    *                                Methods - private
74    * ---------------------------------------------------------------------------------
75    */
76
77   /** Create the efficiency / contamination THnSparseF */
78   void CreateHistograms();
79
80   /** Fill MC labels */
81   void FillMCLabels(); 
82
83   /** Fill efficiency THnSparse */
84   void FillMCEffHist();
85
86   /** Check if particle is contamination */
87   void CheckContTrack(Int_t label, Float_t sign, Int_t idxTrack);
88       
89   /*
90    * ---------------------------------------------------------------------------------
91    *                             Members - private
92    * ---------------------------------------------------------------------------------
93    */
94
95   AliAnalysisNetParticleHelper *fHelper;      //! Ptr to helper class
96
97   // -----------------------------------------------------------------------
98
99   Int_t               fPdgCode;               // PDG code of particle to be found 
100
101   // --- ESD only ----------------------------------------------------------
102
103   AliESDEvent        *fESD;                   //! ESD object
104   AliESDtrackCuts    *fESDTrackCuts;          //! ESD cuts  
105
106   // -----------------------------------------------------------------------
107
108   Float_t             fCentralityBin;         //  Centrality of current event  
109   Int_t               fNTracks;               //  N Tracks in the current event
110   
111   // --- MC only -----------------------------------------------------------
112
113   AliStack           *fStack;                 //! Ptr to stack
114   AliMCEvent         *fMCEvent;               //! Ptr to MC event
115
116   Int_t             **fLabelsRec;             //! 2x nTracks large array with labels for MC particles
117
118   // -----------------------------------------------------------------------
119
120   THnSparseF         *fHnEff;                 //  THnSparseF efficiency 
121   THnSparseF         *fHnCont;                //  THnSparseF contamination
122
123   // -----------------------------------------------------------------------
124
125   ClassDef(AliAnalysisNetParticleEffCont, 1);
126 };
127
128 #endif