changed Resolution, Material, and PhotonQA task to be able to run on the grid
[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){
30 if (flag == 1 || flag ==2 ){
31 fIsHeavyIon = 1;
32 } else {
33 fIsHeavyIon = 0;
34 }
35 }
ae947965 36
37 void SetIsMC(Bool_t isMC){fIsMC=isMC;}
ca91a3e1 38 void SetDoMesonAnalysis(Bool_t flag){fDoMesonAnalysis = flag;}
0a2b2b4b 39 void SetDoMesonQA(Bool_t flag){fDoMesonQA = flag;}
40 void SetDoPhotonQA(Bool_t flag){fDoPhotonQA = flag;}
ca91a3e1 41 void ProcessPhotonCandidates();
42 void CalculatePi0Candidates();
43 void CalculateBackground();
e5b6e8a6 44 void CalculateBackgroundRP();
ca91a3e1 45 void ProcessMCParticles();
ae947965 46 void ProcessAODMCParticles();
47 void RelabelAODPhotonCandidates(Bool_t mode);
ca91a3e1 48 void ProcessTruePhotonCandidates( AliAODConversionPhoton* TruePhotonCandidate);
ae947965 49 void ProcessTruePhotonCandidatesAOD( AliAODConversionPhoton* TruePhotonCandidate);
ca91a3e1 50 void ProcessTrueMesonCandidates( AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
ae947965 51 void ProcessTrueMesonCandidatesAOD(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
ca91a3e1 52 void RotateParticle(AliAODConversionPhoton *gamma);
53 void SetConversionCutList(Int_t nCuts, TList *CutArray){
54 fnCuts = nCuts;
55 fCutArray = CutArray;
56 }
57 void SetMesonCutList(Int_t nCuts, TList *CutArray){
58 fnCuts = nCuts;
59 fMesonCutArray = CutArray;
60 }
2bb2434e 61
ca91a3e1 62 // BG HandlerSettings
63 void SetMoveParticleAccordingToVertex(Bool_t flag){fMoveParticleAccordingToVertex = flag;}
ae947965 64 void FillPhotonCombinatorialBackgroundHist(AliAODConversionPhoton *TruePhotonCandidate, Int_t pdgCode[]);
ca91a3e1 65 void MoveParticleAccordingToVertex(AliAODConversionPhoton* particle,const AliGammaConversionAODBGHandler::GammaConversionVertex *vertex);
66 void UpdateEventByEventData();
67
68 protected:
69 AliV0ReaderV1 *fV0Reader;
70 AliGammaConversionAODBGHandler **fBGHandler;
e5b6e8a6 71 AliConversionAODBGHandlerRP **fBGHandlerRP;
72 AliVEvent *fInputEvent;
ca91a3e1 73 AliMCEvent *fMCEvent;
74 AliStack *fMCStack;
75 TList **fCutFolder;
76 TList **fESDList;
77 TList **fBackList;
78 TList **fMotherList;
4803eb1f 79 TList **fPhotonDCAList;
80 TList **fMesonDCAList;
ca91a3e1 81 TList **fTrueList;
0a2b2b4b 82 TList **fTrueMotherRapList;
ca91a3e1 83 TList **fMCList;
84 TList **fHeaderNameList;
85 TList *fOutputContainer;
86 TClonesArray *fReaderGammas;
a280ac15 87 TList *fGammaCandidates;
ca91a3e1 88 TList *fCutArray;
89 AliConversionCuts *fConversionCuts;
e5b6e8a6 90 TList *fMesonCutArray;
91 AliConversionMesonCuts *fMesonCuts;
ca91a3e1 92 TH1F **hESDConvGammaPt;
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;
1186afd2 111 TH1I **hMCHeaders;
ca91a3e1 112 TH1F **hMCAllGammaPt;
113 TH1F **hMCDecayGammaPi0Pt;
114 TH1F **hMCDecayGammaRhoPt;
115 TH1F **hMCDecayGammaEtaPt;
116 TH1F **hMCDecayGammaOmegaPt;
117 TH1F **hMCDecayGammaEtapPt;
118 TH1F **hMCDecayGammaPhiPt;
e5b6e8a6 119 TH1F **hMCDecayGammaSigmaPt;
ca91a3e1 120 TH1F **hMCConvGammaPt;
121 TH1F **hMCConvGammaR;
122 TH1F **hMCConvGammaEta;
e5b6e8a6 123 TH1F **hMCConvGammaRSPt;
124 TH1F **hMCConvGammaRSR;
125 TH1F **hMCConvGammaRSEta;
ca91a3e1 126 TH1F **hMCPi0Pt;
ae947965 127 TH1F **hMCPi0WOWeightPt;
ca91a3e1 128 TH1F **hMCEtaPt;
129 TH1F **hMCPi0InAccPt;
130 TH1F **hMCEtaInAccPt;
0a2b2b4b 131 TH2F **hMCPi0PtY;
132 TH2F **hMCEtaPtY;
ae947965 133 TH1F **hMCK0sPt;
134 TH1F **hMCK0sWOWeightPt;
135 TH2F **hMCK0sPtY;
ca91a3e1 136 TH2F **hESDTrueMotherInvMassPt;
a280ac15 137 TH2F **hESDTruePrimaryMotherInvMassPt;
526074e4 138 TH2F **hESDTruePrimaryMotherW0WeightingInvMassPt;
139 TProfile2D **pESDTruePrimaryMotherWeightsInvMassPt;
0a2b2b4b 140 TH2F **hESDTruePrimaryPi0MCPtResolPt;
141 TH2F **hESDTruePrimaryEtaMCPtResolPt;
ca91a3e1 142 TH2F **hESDTrueSecondaryMotherInvMassPt;
143 TH2F **hESDTrueSecondaryMotherFromK0sInvMassPt;
e5b6e8a6 144 TH1F **hESDTrueK0sWithPi0DaughterMCPt;
145 TH2F **hESDTrueSecondaryMotherFromEtaInvMassPt;
146 TH1F **hESDTrueEtaWithPi0DaughterMCPt;
ca91a3e1 147 TH2F **hESDTrueBckGGInvMassPt;
148 TH2F **hESDTrueBckContInvMassPt;
149 TH2F **hESDTrueMotherDalitzInvMassPt;
150 TH1F **hESDTrueConvGammaPt;
e5b6e8a6 151 TH2F **hESDCombinatorialPt;
ca91a3e1 152 TH1F **hESDTruePrimaryConvGammaPt;
ca91a3e1 153 TH2F **hESDTruePrimaryConvGammaESDPtMCPt;
e5b6e8a6 154 TH2F **hESDTruePrimaryConvGammaRSESDPtMCPt;
ca91a3e1 155 TH1F **hESDTrueSecondaryConvGammaPt;
ca91a3e1 156 TH1F **hESDTrueSecondaryConvGammaFromXFromK0sPt;
4803eb1f 157 TH1F **hESDTrueSecondaryConvGammaFromXFromLambdaPt;
1390f698 158 TH2F **hESDTrueDalitzPsiPairDeltaPhi;
159 TH2F **hESDTrueGammaPsiPairDeltaPhi;
ca91a3e1 160 TH1I **hNEvents;
161 TH1I **hNGoodESDTracks;
a280ac15 162 TH1I **hNGammaCandidates;
ca91a3e1 163 TH1I **hNV0Tracks;
4803eb1f 164 TProfile **hEtaShift;
165 TTree **tESDMesonsInvMassPtDcazMinDcazMaxFlag;
166 Float_t fInvMass;
167 Float_t fPt;
168 Float_t fDCAzGammaMin;
169 Float_t fDCAzGammaMax;
170 UChar_t iFlag;
171 UChar_t iMesonMCInfo; // 0: garbage,
172 // 1: background
173 // 2: secondary meson not from eta or k0s,
174 // 3: secondary meson from eta,
175 // 4: secondary meson from k0s,
176 // 5: dalitz
177 // 6: primary meson gamma-gamma-channel
ca91a3e1 178 TRandom3 fRandom;
a280ac15 179 Int_t fnGammaCandidates;
180 Double_t *fUnsmearedPx; //[fnGammaCandidates]
181 Double_t *fUnsmearedPy; //[fnGammaCandidates]
182 Double_t *fUnsmearedPz; //[fnGammaCandidates]
183 Double_t *fUnsmearedE; //[fnGammaCandidates]
ae947965 184 Int_t *fMCStackPos; //[fnGammaCandidates]
185 Int_t *fMCStackNeg; //[fnGammaCandidates]
1186afd2 186 Int_t *fESDArrayPos; //[fnGammaCandidates]
187 Int_t *fESDArrayNeg; //[fnGammaCandidates]
ca91a3e1 188 Int_t fnCuts;
189 Int_t fiCut;
ca91a3e1 190 Bool_t fMoveParticleAccordingToVertex;
191 Bool_t fIsHeavyIon;
192 Bool_t fDoMesonAnalysis;
0a2b2b4b 193 Bool_t fDoMesonQA;
194 Bool_t fDoPhotonQA;
a280ac15 195 Bool_t fIsFromMBHeader;
ae947965 196 Bool_t fIsMC;
ca91a3e1 197
a280ac15 198private:
199
200 AliAnalysisTaskGammaConvV1(const AliAnalysisTaskGammaConvV1&); // Prevent copy-construction
201 AliAnalysisTaskGammaConvV1 &operator=(const AliAnalysisTaskGammaConvV1&); // Prevent assignment
202
203
ae947965 204 ClassDef(AliAnalysisTaskGammaConvV1, 7);
2bb2434e 205};
206
207#endif