Changed AddTasks
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliAnalysisTaskGammaConvV1.h
CommitLineData
2bb2434e 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"
e5b6e8a6 9#include "AliConversionAODBGHandlerRP.h"
ca91a3e1 10#include "AliConversionMesonCuts.h"
11c1e680 11#include "AliAnalysisManager.h"
526074e4 12#include "TProfile2D.h"
2bb2434e 13#include "TH3.h"
e5b6e8a6 14#include "TH3F.h"
2bb2434e 15
16class AliAnalysisTaskGammaConvV1 : public AliAnalysisTaskSE {
ca91a3e1 17 public:
2bb2434e 18
ca91a3e1 19 AliAnalysisTaskGammaConvV1();
20 AliAnalysisTaskGammaConvV1(const char *name);
21 virtual ~AliAnalysisTaskGammaConvV1();
2bb2434e 22
ca91a3e1 23 virtual void UserCreateOutputObjects();
11c1e680 24 virtual Bool_t Notify();
ca91a3e1 25 virtual void UserExec(Option_t *);
26 virtual void Terminate(const Option_t*);
27 void InitBack();
2bb2434e 28
0a2b2b4b 29 void SetIsHeavyIon(Int_t flag){
75f195f2
FB
30 fIsHeavyIon = flag;
31
0a2b2b4b 32 }
ae947965 33
34 void SetIsMC(Bool_t isMC){fIsMC=isMC;}
ca91a3e1 35 void SetDoMesonAnalysis(Bool_t flag){fDoMesonAnalysis = flag;}
ae4f2cfb 36 void SetDoMesonQA(Int_t flag){fDoMesonQA = flag;}
37 void SetDoPhotonQA(Int_t flag){fDoPhotonQA = flag;}
ca91a3e1 38 void ProcessPhotonCandidates();
39 void CalculatePi0Candidates();
40 void CalculateBackground();
e5b6e8a6 41 void CalculateBackgroundRP();
ca91a3e1 42 void ProcessMCParticles();
ae947965 43 void ProcessAODMCParticles();
44 void RelabelAODPhotonCandidates(Bool_t mode);
ca91a3e1 45 void ProcessTruePhotonCandidates( AliAODConversionPhoton* TruePhotonCandidate);
ae947965 46 void ProcessTruePhotonCandidatesAOD( AliAODConversionPhoton* TruePhotonCandidate);
ca91a3e1 47 void ProcessTrueMesonCandidates( AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
ae947965 48 void ProcessTrueMesonCandidatesAOD(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
ca91a3e1 49 void RotateParticle(AliAODConversionPhoton *gamma);
ae4f2cfb 50 void RotateParticleAccordingToEP(AliAODConversionPhoton *gamma, Double_t previousEventEP, Double_t thisEventEP);
ca91a3e1 51 void SetConversionCutList(Int_t nCuts, TList *CutArray){
52 fnCuts = nCuts;
53 fCutArray = CutArray;
54 }
55 void SetMesonCutList(Int_t nCuts, TList *CutArray){
56 fnCuts = nCuts;
57 fMesonCutArray = CutArray;
58 }
2bb2434e 59
ca91a3e1 60 // BG HandlerSettings
61 void SetMoveParticleAccordingToVertex(Bool_t flag){fMoveParticleAccordingToVertex = flag;}
ae947965 62 void FillPhotonCombinatorialBackgroundHist(AliAODConversionPhoton *TruePhotonCandidate, Int_t pdgCode[]);
ca91a3e1 63 void MoveParticleAccordingToVertex(AliAODConversionPhoton* particle,const AliGammaConversionAODBGHandler::GammaConversionVertex *vertex);
64 void UpdateEventByEventData();
d8b864f8
FB
65 void SetLogBinningXTH2(TH2* histoRebin);
66
ca91a3e1 67 protected:
68 AliV0ReaderV1 *fV0Reader;
69 AliGammaConversionAODBGHandler **fBGHandler;
e5b6e8a6 70 AliConversionAODBGHandlerRP **fBGHandlerRP;
71 AliVEvent *fInputEvent;
ca91a3e1 72 AliMCEvent *fMCEvent;
73 AliStack *fMCStack;
74 TList **fCutFolder;
75 TList **fESDList;
76 TList **fBackList;
77 TList **fMotherList;
4803eb1f 78 TList **fPhotonDCAList;
79 TList **fMesonDCAList;
ca91a3e1 80 TList **fTrueList;
81 TList **fMCList;
82 TList **fHeaderNameList;
83 TList *fOutputContainer;
84 TClonesArray *fReaderGammas;
a280ac15 85 TList *fGammaCandidates;
ca91a3e1 86 TList *fCutArray;
87 AliConversionCuts *fConversionCuts;
e5b6e8a6 88 TList *fMesonCutArray;
89 AliConversionMesonCuts *fMesonCuts;
ca91a3e1 90 TH1F **hESDConvGammaPt;
ae4f2cfb 91 TH1F **hESDConvGammaR;
92 TH1F **hESDConvGammaEta;
4803eb1f 93 TTree **tESDConvGammaPtDcazCat;
94 Float_t fPtGamma;
95 Float_t fDCAzPhoton;
96 Float_t fRConvPhoton;
97 Float_t fEtaPhoton;
98 UChar_t iCatPhoton;
99 UChar_t iPhotonMCInfo; // 0: garbage,
100 // 1: background
101 // 2: secondary photon not from eta or k0s,
102 // 3: secondary photon from eta,
103 // 4: secondary photon from k0s,
104 // 5: dalitz
105 // 6: primary gamma
ca91a3e1 106 TH2F **hESDMotherInvMassPt;
107 THnSparseF **sESDMotherInvMassPtZM;
108 TH2F **hESDMotherBackInvMassPt;
109 THnSparseF **sESDMotherBackInvMassPtZM;
110 TH2F **hESDMotherInvMassEalpha;
ae4f2cfb 111 TH2F **hESDMotherPi0PtY;
112 TH2F **hESDMotherEtaPtY;
113 TH2F **hESDMotherPi0PtAlpha;
114 TH2F **hESDMotherEtaPtAlpha;
ca9152d4
FB
115 TH2F **hESDMotherPi0PtOpenAngle;
116 TH2F **hESDMotherEtaPtOpenAngle;
1186afd2 117 TH1I **hMCHeaders;
ca91a3e1 118 TH1F **hMCAllGammaPt;
119 TH1F **hMCDecayGammaPi0Pt;
120 TH1F **hMCDecayGammaRhoPt;
121 TH1F **hMCDecayGammaEtaPt;
122 TH1F **hMCDecayGammaOmegaPt;
123 TH1F **hMCDecayGammaEtapPt;
124 TH1F **hMCDecayGammaPhiPt;
e5b6e8a6 125 TH1F **hMCDecayGammaSigmaPt;
ca91a3e1 126 TH1F **hMCConvGammaPt;
127 TH1F **hMCConvGammaR;
128 TH1F **hMCConvGammaEta;
129 TH1F **hMCPi0Pt;
ae947965 130 TH1F **hMCPi0WOWeightPt;
ca91a3e1 131 TH1F **hMCEtaPt;
d0a4ea74 132 TH1F **hMCEtaWOWeightPt;
ca91a3e1 133 TH1F **hMCPi0InAccPt;
134 TH1F **hMCEtaInAccPt;
0a2b2b4b 135 TH2F **hMCPi0PtY;
136 TH2F **hMCEtaPtY;
ae947965 137 TH1F **hMCK0sPt;
138 TH1F **hMCK0sWOWeightPt;
139 TH2F **hMCK0sPtY;
ca91a3e1 140 TH2F **hESDTrueMotherInvMassPt;
a280ac15 141 TH2F **hESDTruePrimaryMotherInvMassPt;
526074e4 142 TH2F **hESDTruePrimaryMotherW0WeightingInvMassPt;
143 TProfile2D **pESDTruePrimaryMotherWeightsInvMassPt;
0a2b2b4b 144 TH2F **hESDTruePrimaryPi0MCPtResolPt;
145 TH2F **hESDTruePrimaryEtaMCPtResolPt;
ca91a3e1 146 TH2F **hESDTrueSecondaryMotherInvMassPt;
147 TH2F **hESDTrueSecondaryMotherFromK0sInvMassPt;
e5b6e8a6 148 TH1F **hESDTrueK0sWithPi0DaughterMCPt;
149 TH2F **hESDTrueSecondaryMotherFromEtaInvMassPt;
150 TH1F **hESDTrueEtaWithPi0DaughterMCPt;
ca91a3e1 151 TH2F **hESDTrueBckGGInvMassPt;
152 TH2F **hESDTrueBckContInvMassPt;
ae4f2cfb 153 TH2F **hESDTruePi0PtY;
154 TH2F **hESDTrueEtaPtY;
155 TH2F **hESDTruePi0PtAlpha;
156 TH2F **hESDTrueEtaPtAlpha;
ca9152d4
FB
157 TH2F **hESDTruePi0PtOpenAngle;
158 TH2F **hESDTrueEtaPtOpenAngle;
ca91a3e1 159 TH2F **hESDTrueMotherDalitzInvMassPt;
160 TH1F **hESDTrueConvGammaPt;
e5b6e8a6 161 TH2F **hESDCombinatorialPt;
ca91a3e1 162 TH1F **hESDTruePrimaryConvGammaPt;
ca91a3e1 163 TH2F **hESDTruePrimaryConvGammaESDPtMCPt;
164 TH1F **hESDTrueSecondaryConvGammaPt;
ca91a3e1 165 TH1F **hESDTrueSecondaryConvGammaFromXFromK0sPt;
4803eb1f 166 TH1F **hESDTrueSecondaryConvGammaFromXFromLambdaPt;
1390f698 167 TH2F **hESDTrueDalitzPsiPairDeltaPhi;
168 TH2F **hESDTrueGammaPsiPairDeltaPhi;
ca91a3e1 169 TH1I **hNEvents;
170 TH1I **hNGoodESDTracks;
a280ac15 171 TH1I **hNGammaCandidates;
ca91a3e1 172 TH1I **hNV0Tracks;
4803eb1f 173 TProfile **hEtaShift;
174 TTree **tESDMesonsInvMassPtDcazMinDcazMaxFlag;
175 Float_t fInvMass;
176 Float_t fPt;
177 Float_t fDCAzGammaMin;
178 Float_t fDCAzGammaMax;
179 UChar_t iFlag;
180 UChar_t iMesonMCInfo; // 0: garbage,
181 // 1: background
182 // 2: secondary meson not from eta or k0s,
183 // 3: secondary meson from eta,
184 // 4: secondary meson from k0s,
185 // 5: dalitz
186 // 6: primary meson gamma-gamma-channel
ae4f2cfb 187 Double_t fEventPlaneAngle; // EventPlaneAngle
ca91a3e1 188 TRandom3 fRandom;
a280ac15 189 Int_t fnGammaCandidates;
190 Double_t *fUnsmearedPx; //[fnGammaCandidates]
191 Double_t *fUnsmearedPy; //[fnGammaCandidates]
192 Double_t *fUnsmearedPz; //[fnGammaCandidates]
193 Double_t *fUnsmearedE; //[fnGammaCandidates]
ae947965 194 Int_t *fMCStackPos; //[fnGammaCandidates]
195 Int_t *fMCStackNeg; //[fnGammaCandidates]
1186afd2 196 Int_t *fESDArrayPos; //[fnGammaCandidates]
197 Int_t *fESDArrayNeg; //[fnGammaCandidates]
ca91a3e1 198 Int_t fnCuts;
199 Int_t fiCut;
ca91a3e1 200 Bool_t fMoveParticleAccordingToVertex;
75f195f2 201 Int_t fIsHeavyIon;
ca91a3e1 202 Bool_t fDoMesonAnalysis;
ae4f2cfb 203 Int_t fDoMesonQA;
204 Int_t fDoPhotonQA;
a280ac15 205 Bool_t fIsFromMBHeader;
ae947965 206 Bool_t fIsMC;
ca91a3e1 207
a280ac15 208private:
209
210 AliAnalysisTaskGammaConvV1(const AliAnalysisTaskGammaConvV1&); // Prevent copy-construction
211 AliAnalysisTaskGammaConvV1 &operator=(const AliAnalysisTaskGammaConvV1&); // Prevent assignment
212
213
75f195f2 214 ClassDef(AliAnalysisTaskGammaConvV1, 10);
2bb2434e 215};
216
217#endif