c32aa9ce7677dc3a0be85b4e3a2b1fc9f5ab030f
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliAnalysisTaskConversionQA.h
1 #ifndef AliAnalysisConversionQA_cxx
2 #define AliAnalysisConversionQA_cxx
3
4 #include "AliAnalysisTaskSE.h"
5 #include "AliConversionPhotonBase.h"
6 #include "TH1.h"
7 #include "TH2.h"
8 #include "TTreeStream.h"
9 #include "AliLog.h"
10 #include <vector>
11 #include "AliV0ReaderV1.h"
12 #include "AliConversionCuts.h"
13 #include "TList.h"
14 #include "AliStack.h"
15 #include "TClonesArray.h"
16
17
18 using namespace std;
19
20
21 class AliAnalysisTaskConversionQA : public AliAnalysisTaskSE{
22
23 public:
24
25     AliAnalysisTaskConversionQA(const char *name);
26     virtual ~AliAnalysisTaskConversionQA();
27
28     virtual void   UserCreateOutputObjects();
29     virtual void   UserExec(Option_t *option);
30     virtual void   Terminate(Option_t *);
31
32     void SetV0Reader(AliV0ReaderV1 *v0Reader){fV0Reader=v0Reader;}
33     void SetConversionCuts(AliConversionCuts* conversionCuts,Bool_t IsHeavyIon ){
34        fConversionCuts=conversionCuts;
35        fIsHeavyIon = IsHeavyIon;
36     }
37     void FillType(Bool_t fillTree, Bool_t fillHistorams){
38        ffillTree = fillTree;
39        ffillHistograms = fillHistorams;
40     }
41     
42 private:
43
44     void ProcessQATree();
45     void ProcessQA();
46     void ProcessTrueQA(AliAODConversionPhoton *TruePhotonCandidate, AliESDtrack *elec, AliESDtrack *posi);
47     Bool_t IsTruePhoton(AliAODConversionPhoton *TruePhotonCandidate);
48     void CountESDTracks();
49         
50     AliV0ReaderV1 *fV0Reader;    
51     TClonesArray *fConversionGammas;
52     AliConversionCuts *fConversionCuts; // Cuts used by the V0Reader
53     AliVEvent *fInputEvent;
54     Int_t fNumberOfESDTracks;
55     AliMCEvent *fMCEvent;
56     AliStack *fMCStack;
57     TTreeSRedirector *fStreamQA;
58     Bool_t fIsHeavyIon;
59     Bool_t ffillTree;
60     Bool_t ffillHistograms;
61     TList *fOutputList;
62     TList *fESDList;
63     TH1F *hVertexZ;
64          TH1I *hNGoodESDTracks;
65     TH1I *hNV0Tracks;
66          TH1I *hNContributorsVertex;
67     TH2F *hITSClusterPhi;
68     TH1F *hGammaPt;
69     TH1F *hGammaPhi;
70     TH1F *hGammaEta;
71     TH1F *hGammaChi2perNDF;
72     TH1F *hGammaPsiPair;
73     TH1F *hGammaQt;
74     TH1F *hGammaCosinePointingAngle;
75     TH2F *hGammaXY;
76     TH2F *hGammaZR;
77     TH2F *hElecPt;
78     TH2F *hElecEta;
79     TH2F *hElecPhi;
80     TH1F *hElecNfindableClsTPC;
81     TH1F *hPosiNfindableClsTPC;
82     TList *fTrueList;
83     TH2F *hTrueResoulutionR;
84     TH2F *hTrueResoulutionZ;
85     TH2F *hTrueResoulutionPhi;
86     TH1F *hTrueGammaPt;
87     TH1F *hTrueGammaPhi;
88     TH1F *hTrueGammaEta;
89     TH1F *hTrueGammaMass;
90     TH1F *hTrueGammaChi2perNDF;
91     TH1F *hTrueGammaPsiPair;
92     TH1F *hTrueGammaQt;
93     TH1F *hTrueGammaCosinePointingAngle;
94     TH2F *hTrueGammaXY;
95     TH2F *hTrueGammaZR;
96     TH2F *hTrueElecPt;
97     TH2F *hTrueElecEta;
98     TH2F *hTrueElecPhi;
99     TH1F *hTrueElecNfindableClsTPC;
100     TH1F *hTruePosiNfindableClsTPC;
101     
102     ClassDef(AliAnalysisTaskConversionQA, 1);
103 };
104
105 #endif
106