added functionality to PWGGA/GammaConv/AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero.cxx
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliConversionAODBGHandlerRP.h
1 #ifndef __ALICONVERSIONAODBGHANDLERRP_H__
2 #define __ALICONVERSIONAODBGHANDLERRP_H__
3
4 #include "AliLog.h"
5 #include "TObject.h"
6 #include "AliAODConversionPhoton.h"
7 #include "TObjArray.h"
8 #include "TList.h"
9 using namespace std;
10
11 typedef vector<AliAODConversionPhoton*> AliGammaConversionPhotonVector;                                 // Vector containing photons
12 typedef vector<AliGammaConversionPhotonVector> AliGammaConversionBGEventVector;                 // Event contains vector of gammas (AliConversionPhotons)
13 typedef vector<AliGammaConversionBGEventVector> AliGammaConversionMultiplicityVector;   // Multiplicity classes containing event vectors
14 typedef vector<AliGammaConversionMultiplicityVector> AliGammaConversionBGVector;                // z vertex position ...
15
16
17 class AliConversionAODBGHandlerRP: public TObject{
18
19         public:
20
21                 AliConversionAODBGHandlerRP(Bool_t IsHeavyIon=kFALSE,Bool_t UseChargedTrackMult=kTRUE,Int_t NEvents=10);
22                 
23                 virtual ~AliConversionAODBGHandlerRP();
24
25                 Int_t GetZBinIndex(Double_t z) const;
26                 Int_t GetMultiplicityBinIndex(Int_t mult) const;
27                 void Initialize();
28                 Bool_t FindBins(TObjArray * const eventGammas,AliVEvent *fInputEvent,Int_t &zbin,Int_t &mbin);
29                 Bool_t FindBins(TList * const eventGammas,AliVEvent *fInputEvent,Int_t &zbin,Int_t &mbin);
30
31         
32                 AliGammaConversionPhotonVector* GetBGGoodGammas(TObjArray * const eventGammas,AliVEvent *fInputEvent,Int_t event);
33                 AliGammaConversionPhotonVector* GetBGGoodGammas(TList * const eventGammas,AliVEvent *fInputEvent,Int_t event);
34                 void AddEvent(TObjArray * const eventGammas,AliVEvent *fInputEvent);
35                 void AddEvent(TList * const eventGammas,AliVEvent *fInputEvent);
36                 Int_t GetNBGEvents()const {return fNEvents;} // Size of the Pool (20)
37                 Int_t GetNBGEvents(TObjArray * const eventGammas,AliVEvent *fInputEvent);
38                 Int_t GetNBGEvents(TList * const eventGammas,AliVEvent *fInputEvent);
39                 Int_t GetNZBins()const{return fNBinsZ;};
40                 Int_t GetNMultiplicityBins()const{return fNBinsMultiplicity;};
41
42         private:
43                 Bool_t fIsHeavyIon;
44                 Bool_t fUseChargedTrackMult;
45                 Int_t fNEvents;
46                 Int_t **fBGEventCounter; //! bg counter
47                 Int_t **fNBGEvents;
48                 Int_t fNBinsZ; //n z bins
49                 Int_t fNBinsMultiplicity; //n bins multiplicity
50                 Double_t *fBinLimitsArrayZ;//! bin limits z array
51                 Double_t *fBinLimitsArrayMultiplicity;//! bin limit multiplicity array
52                 AliGammaConversionBGVector fBGPool; //background events
53
54                 AliConversionAODBGHandlerRP(AliConversionAODBGHandlerRP &original);
55                 AliConversionAODBGHandlerRP &operator=(const AliConversionAODBGHandlerRP &ref);
56
57         ClassDef(AliConversionAODBGHandlerRP,0);
58
59 };
60 #endif