updated task to make it possible to run on the grid
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliAnalysisTaskGammaConvDalitzV1.h
1 #ifndef ALIANALYSISTASKGAMMACONVDALITZV1_H
2 #define ALIANALYSISTASKGAMMACONVDALITZV1_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 // Analysis task for pi0->e+e-gamma (Dalitz decay)
8
9 #include "AliAnalysisTaskSE.h"
10 #include "AliV0ReaderV1.h"
11 #include "AliKFConversionPhoton.h"
12 #include "AliDalitzElectronSelector.h"
13 #include "AliConversionMesonCuts.h"
14 #include "AliGammaConversionAODBGHandler.h"
15
16 class AliESDInputHandler;
17 class AliMCEventHandler;
18 class AliESDEvent;
19 class AliESDtrack;
20 class AliESDtrackCuts;
21 class AliESDpidCuts;
22 class AliV0Reader;
23 class AliGammaConversionHistograms;
24 class AliTriggerAnalysis;
25
26 class AliAnalysisTaskGammaConvDalitzV1: public AliAnalysisTaskSE
27 {
28   public:
29
30         AliAnalysisTaskGammaConvDalitzV1();
31         AliAnalysisTaskGammaConvDalitzV1( const char* name );
32         virtual ~AliAnalysisTaskGammaConvDalitzV1();
33
34         virtual void UserExec(Option_t *);
35         virtual void UserCreateOutputObjects();
36         virtual void Terminate(const Option_t *);
37
38
39
40          
41          void SetMoveParticleAccordingToVertex(Bool_t flag){fMoveParticleAccordingToVertex = flag;}
42          void SetIsHeavyIon(Bool_t flag){fIsHeavyIon = flag;}
43          void SetConversionCutList(Int_t nCuts, TList *CutArray){
44                         fnCuts= nCuts;
45                         fCutGammaArray = CutArray;
46                 }
47          void SetElectronCutList(TList *CutArray){
48                         fCutElectronArray = CutArray;
49                 }
50          void SetMesonCutList(TList *CutArray){
51                         fCutMesonArray = CutArray;
52                 }
53                 
54
55         private:
56
57                 void InitBack();
58                 void ProcessPhotonCandidates();
59                 void ProcessTruePhotonCandidates(AliAODConversionPhoton*);
60                 void ProcessTrueMesonCandidates(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate, AliAODConversionPhoton *TrueVirtualGammaCandidate);
61                 void MoveParticleAccordingToVertex(AliAODConversionPhoton* particle,const AliGammaConversionAODBGHandler::GammaConversionVertex *vertex);
62                 void ProcessElectronCandidates();
63                 void ProcessMCParticles();
64                 void CountESDTracks();
65                 void CalculatePi0DalitzCandidates();
66                 void CalculateBackground();
67                 void UpdateEventByEventData();
68                 Double_t GetPsiPair( const AliESDtrack *trackPos, const AliESDtrack *trackNeg ) const;
69
70                 
71                 
72
73     AliV0ReaderV1 *fV0Reader;
74     AliDalitzElectronSelector* fElecSelector;
75     AliGammaConversionAODBGHandler **fBGHandler;
76     AliESDEvent *fESDEvent;
77     AliMCEvent *fMCEvent;
78     AliStack *fMCStack;
79     TList **fCutFolder;
80     TList **fESDList;
81     TList **fBackList;
82     TList **fTrueList;
83     TList **fMCList;
84     TList *fOutputContainer;
85     TClonesArray *fReaderGammas;
86     vector<Int_t> fSelectorElectronIndex;
87     vector<Int_t> fSelectorPositronIndex;
88     TList *fGoodGammas;
89     TList *fGoodVirtualGammas;
90     TList *fGoodElectrons;
91     TList *fGoodPositrons;
92     TList *fCutGammaArray;
93     TList *fCutElectronArray;
94     TList *fCutMesonArray;
95     TList **fGammasPool;
96     AliConversionCuts *fConversionCuts;
97     TH1F **hESDConvGammaPt;
98     TH1F **hESDDalitzElectronPt;
99     TH1F **hESDDalitzPositronPt;
100     TH2F **hESDEposEnegPsiPairDPhi;
101     TH2F **hESDEposEnegInvMassPt;
102     TH2F **hESDMotherInvMassPt;
103     TH2F **hESDPi0MotherInvMassPt;
104     TH2F **hESDPi0MotherDiffInvMassPt;
105     THnSparseF **sESDMotherInvMassPtZM;
106     TH2F **hESDMotherBackInvMassPt;
107     THnSparseF **sESDMotherBackInvMassPtZM;
108     TH1F **hMCPi0Pt;
109     TH1F **hMCPi0GGPt;
110     TH1F **hMCEtaPt;
111     TH1F **hMCEtaGGPt;
112     TH1F **hMCPi0InAccPt;
113     TH1F **hMCEtaInAccPt;
114     TH2F **hESDTrueMotherInvMassPt;
115     TH2F **hESDTrueMotherPi0GGInvMassPt;
116     TH2F **hESDTruePrimaryMotherInvMassMCPt;
117     TH2F **hESDTruePrimaryPi0DalitzESDPtMCPt;
118     TH2F **hESDTrueSecondaryMotherInvMassPt;
119     TH2F **hESDTrueSecondaryMotherFromK0sInvMassPt;
120     TH2F **hESDTrueBckGGInvMassPt;
121     TH2F **hESDTrueBckContInvMassPt;
122     TH2F **hESDTrueMotherGGInvMassPt;
123     TH1F **hESDTrueConvGammaPt;
124     TH1I **hNEvents;
125     TH1I **hNGoodESDTracks;
126         
127     TRandom3 fRandom;
128     Double_t *fUnsmearedPx;
129     Double_t *fUnsmearedPy;
130     Double_t *fUnsmearedPz;
131     Double_t *fUnsmearedE;
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    
139         private:
140                 AliAnalysisTaskGammaConvDalitzV1( const AliAnalysisTaskGammaConvDalitzV1& ); // Not implemented
141                 AliAnalysisTaskGammaConvDalitzV1& operator=( const AliAnalysisTaskGammaConvDalitzV1& ); // Not implemented
142
143                 ClassDef( AliAnalysisTaskGammaConvDalitzV1, 2 );
144 };
145
146 #endif // ALIANALYSISTASKGAMMACONVDALITZV1_H
147