First update for AOD compatibility (distributions and efficiency), still missing...
[u/mrichter/AliRoot.git] / PWGCF / EBYE / NetParticle / AliAnalysisNetParticleEffCont.h
CommitLineData
cb68eb1d 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
16class AliESDEvent;
17class AliESDInputHandler;
9be43c8e 18class AliAODInputHandler;
cb68eb1d 19class AliMCEvent;
20
21class AliAnalysisNetParticleEffCont : public TNamed {
22
23 public:
24
25 /*
26 * ---------------------------------------------------------------------------------
27 * Constructor / Destructor
28 * ---------------------------------------------------------------------------------
29 */
30
31 AliAnalysisNetParticleEffCont();
32 virtual ~AliAnalysisNetParticleEffCont();
33
34 /*
35 * ---------------------------------------------------------------------------------
36 * Public Methods
37 * ---------------------------------------------------------------------------------
38 */
39
40 /** Initialize */
9be43c8e 41 void Initialize(AliESDtrackCuts *cuts, AliAnalysisNetParticleHelper* helper, Int_t trackCutBit);
cb68eb1d 42
43 /** Setup Event */
9be43c8e 44 Int_t SetupEvent(AliESDInputHandler *esdHandler, AliMCEvent *mcEvent);
45 Int_t SetupEvent(AliAODInputHandler *esdHandler); // MC particles are stored in AOD
cb68eb1d 46
47 /** Reset Event */
48 void ResetEvent();
49
50 /** Process Event */
51 void Process();
52
53 /*
54 * ---------------------------------------------------------------------------------
55 * Getter
56 * ---------------------------------------------------------------------------------
57 */
58
59 /** Get Ptr to efficiency THnSparse */
60 THnSparseF* GetHnEff() {return fHnEff;}
61
62 /** Get Ptr to contaminiation THnSparse */
63 THnSparseF* GetHnCont() {return fHnCont;}
64
65 ///////////////////////////////////////////////////////////////////////////////////
66
67 private:
68
69 AliAnalysisNetParticleEffCont(const AliAnalysisNetParticleEffCont&); // not implemented
70 AliAnalysisNetParticleEffCont& operator=(const AliAnalysisNetParticleEffCont&); // not implemented
71
72
73 /*
74 * ---------------------------------------------------------------------------------
75 * Methods - private
76 * ---------------------------------------------------------------------------------
77 */
78
79 /** Create the efficiency / contamination THnSparseF */
80 void CreateHistograms();
81
82 /** Fill MC labels */
83 void FillMCLabels();
9be43c8e 84 void FillMCLabelsAOD();
cb68eb1d 85
86 /** Fill efficiency THnSparse */
87 void FillMCEffHist();
9be43c8e 88 void FillMCEffHistAOD();
cb68eb1d 89
90 /** Check if particle is contamination */
91 void CheckContTrack(Int_t label, Float_t sign, Int_t idxTrack);
9be43c8e 92 void CheckContTrackAOD(Int_t label, Float_t sign, Int_t idxTrack);
cb68eb1d 93
94 /*
95 * ---------------------------------------------------------------------------------
96 * Members - private
97 * ---------------------------------------------------------------------------------
98 */
99
100 AliAnalysisNetParticleHelper *fHelper; //! Ptr to helper class
101
102 // -----------------------------------------------------------------------
103
104 Int_t fPdgCode; // PDG code of particle to be found
105
106 // --- ESD only ----------------------------------------------------------
107
108 AliESDEvent *fESD; //! ESD object
109 AliESDtrackCuts *fESDTrackCuts; //! ESD cuts
110
9be43c8e 111 // --- AOD only ----------------------------------------------------------
112
113 AliAODEvent *fAOD; //! AOD object
114 TClonesArray *fArrayMC; //! array of MC particles
115
cb68eb1d 116 // -----------------------------------------------------------------------
117
118 Float_t fCentralityBin; // Centrality of current event
119 Int_t fNTracks; // N Tracks in the current event
120
9be43c8e 121 Int_t fAODtrackCutBit; // Track filter bit for AOD tracks
122
cb68eb1d 123 // --- MC only -----------------------------------------------------------
124
125 AliStack *fStack; //! Ptr to stack
126 AliMCEvent *fMCEvent; //! Ptr to MC event
127
128 Int_t **fLabelsRec; //! 2x nTracks large array with labels for MC particles
129
130 // -----------------------------------------------------------------------
131
132 THnSparseF *fHnEff; // THnSparseF efficiency
133 THnSparseF *fHnCont; // THnSparseF contamination
134
135 // -----------------------------------------------------------------------
136
137 ClassDef(AliAnalysisNetParticleEffCont, 1);
138};
139
140#endif