80983f33b2db2ec9fb3a76b10ad48d3c8668bae4
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliAnalysisTaskGammaConvV1.h
1 #ifndef ALIANLYSISTASKGAMMACONVV1_cxx
2 #define ALIANLYSISTASKGAMMACONVV1_cxx
3
4 #include "AliAnalysisTaskSE.h"
5 #include "AliESDtrack.h"
6 #include "AliV0ReaderV1.h"
7 #include "AliKFConversionPhoton.h"
8 #include "AliGammaConversionAODBGHandler.h"
9 #include "AliConversionAODBGHandlerRP.h"
10 #include "AliConversionMesonCuts.h"
11 #include "TH3.h"
12 #include "TH3F.h"
13
14 class AliAnalysisTaskGammaConvV1 : public AliAnalysisTaskSE {
15  public:
16
17    AliAnalysisTaskGammaConvV1();
18    AliAnalysisTaskGammaConvV1(const char *name);
19    virtual ~AliAnalysisTaskGammaConvV1();
20
21    virtual void   UserCreateOutputObjects();
22    virtual void   UserExec(Option_t *);
23    virtual void   Terminate(const Option_t*);
24    void InitBack();
25
26    void SetIsHeavyIon(Bool_t flag){fIsHeavyIon = flag;}
27    void SetDoMesonAnalysis(Bool_t flag){fDoMesonAnalysis = flag;}
28    void ProcessPhotonCandidates();
29    void CalculatePi0Candidates();
30    void CalculateBackground();
31    void CalculateBackgroundRP();
32    void ProcessMCParticles();
33    void ProcessTruePhotonCandidates( AliAODConversionPhoton* TruePhotonCandidate);
34    void ProcessTrueMesonCandidates( AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
35    void RotateParticle(AliAODConversionPhoton *gamma);
36    void SetConversionCutList(Int_t nCuts, TList *CutArray){
37       fnCuts = nCuts;
38       fCutArray = CutArray;
39    }
40    void SetMesonCutList(Int_t nCuts, TList *CutArray){
41       fnCuts = nCuts;
42       fMesonCutArray = CutArray;
43    }
44
45    // BG HandlerSettings
46    void SetMoveParticleAccordingToVertex(Bool_t flag){fMoveParticleAccordingToVertex = flag;}
47    void CountESDTracks();
48    void MoveParticleAccordingToVertex(AliAODConversionPhoton* particle,const AliGammaConversionAODBGHandler::GammaConversionVertex *vertex);
49    void UpdateEventByEventData();
50
51  protected:
52    AliV0ReaderV1 *fV0Reader;
53    AliGammaConversionAODBGHandler **fBGHandler;
54    AliConversionAODBGHandlerRP    **fBGHandlerRP;
55    AliVEvent *fInputEvent;
56    AliMCEvent *fMCEvent;
57    AliStack *fMCStack;
58    TList **fCutFolder;
59    TList **fESDList;
60    TList **fBackList;
61    TList **fMotherList;
62    TList **fTrueList;
63    TList **fMCList;
64    TList **fHeaderNameList;
65    TList *fOutputContainer;
66    TClonesArray *fReaderGammas;
67    TList *fGoodGammas;
68    TList *fCutArray;
69    AliConversionCuts *fConversionCuts;
70    TList *fMesonCutArray;
71    AliConversionMesonCuts *fMesonCuts;
72    TH1F **hESDConvGammaPt;
73    TH1F **hESDConvGammaR;
74    TH2F **hESDMotherInvMassPt;
75    THnSparseF **sESDMotherInvMassPtZM;
76    TH2F **hESDMotherBackInvMassPt;
77    THnSparseF **sESDMotherBackInvMassPtZM;
78    TH2F **hESDMotherInvMassEalpha;
79    TH1F **hMCAllGammaPt;
80    TH1F **hMCDecayGammaPi0Pt;
81    TH1F **hMCDecayGammaRhoPt;
82    TH1F **hMCDecayGammaEtaPt;
83    TH1F **hMCDecayGammaOmegaPt;
84    TH1F **hMCDecayGammaEtapPt;
85    TH1F **hMCDecayGammaPhiPt;
86    TH1F **hMCDecayGammaSigmaPt;
87    TH1F **hMCConvGammaPt;
88    TH1F **hMCConvGammaR;
89    TH1F **hMCConvGammaEta;
90    TH1F **hMCConvGammaRSPt;
91    TH1F **hMCConvGammaRSR;
92    TH1F **hMCConvGammaRSEta;
93    TH1F **hMCPi0Pt;
94    TH1F **hMCEtaPt;
95    TH1F **hMCPi0InAccPt;
96    TH1F **hMCEtaInAccPt;
97    TH2F **hESDTrueMotherInvMassPt;
98    TH2F **hESDTruePi0FromEtaInvMassPt;
99    TH2F **hESDTruePrimaryMotherInvMassMCPt;
100    TH2F **hESDTruePrimaryPi0ESDPtMCPt;
101    TH2F **hESDTrueSecondaryMotherInvMassPt;
102    TH2F **hESDTrueSecondaryMotherFromK0sInvMassPt;
103    TH1F **hESDTrueK0sWithPi0DaughterMCPt;
104    TH2F **hESDTrueSecondaryMotherFromEtaInvMassPt;
105    TH1F **hESDTrueEtaWithPi0DaughterMCPt;
106    TH2F **hESDTrueBckGGInvMassPt;
107    TH2F **hESDTrueBckContInvMassPt;
108    TH2F **hESDTrueMotherDalitzInvMassPt;
109    TH1F **hESDTrueConvGammaPt;
110    TH2F **hESDCombinatorialPt;
111    TH1F **hESDTruePrimaryConvGammaPt;
112    TH1F **hESDTruePrimaryConvGammaR;
113    TH1F **hESDTruePrimaryConvGammaEta;
114    TH2F **hESDTruePrimaryConvGammaESDPtMCPt;
115    TH2F **hESDTruePrimaryConvGammaRSESDPtMCPt;
116    TH1F **hESDTrueSecondaryConvGammaPt;
117    TH1F **hESDTrueSecondaryConvGammaR;
118    TH1F **hESDTrueSecondaryConvGammaFromXFromK0sPt;
119    TH1F **hESDPi0Alpha;
120    TH1F **hESDBackAlpha;
121    TH1F **hESDTruePi0Alpha;
122    TH1I **hNEvents;
123    TH1I **hNGoodESDTracks;
124    TH1I **hNV0Tracks;
125
126    TRandom3 fRandom;
127    Int_t fnGoodGammas;
128    Double_t *fUnsmearedPx; //[fnGoodGammas]
129    Double_t *fUnsmearedPy; //[fnGoodGammas]
130    Double_t *fUnsmearedPz; //[fnGoodGammas]
131    Double_t *fUnsmearedE;  //[fnGoodGammas]
132    Int_t fnCuts;
133    Int_t fiCut;
134    Int_t fNumberOfESDTracks;
135    Bool_t fMoveParticleAccordingToVertex;
136    Bool_t fIsHeavyIon;
137    Bool_t fDoMesonAnalysis;
138    Bool_t fIsFromBGEvent;
139
140    ClassDef(AliAnalysisTaskGammaConvV1, 2);
141 };
142
143 #endif