]>
Commit | Line | Data |
---|---|---|
3b77b2d1 | 1 | //////////////////////////////////////////////// |
2 | //--------------------------------------------- | |
3 | // Class doing conversion gamma dPhi correlations | |
4 | // Gamma Conversion analysis | |
5 | //--------------------------------------------- | |
6 | //////////////////////////////////////////////// | |
7 | ||
92efd725 | 8 | #ifndef AliAnalysisTaskdPhi_cxx |
9 | #define AliAnalysisTaskdPhi_cxx | |
3b77b2d1 | 10 | |
11 | #include "AliAnalysisTaskSE.h" | |
12 | ||
13 | #include <TAxis.h> | |
14 | #include <TH3I.h> | |
15 | #include <THnSparse.h> | |
16 | #include <AliAnalysisFilter.h> | |
17 | #include <iostream> | |
18 | #include <AliAnaConvCorrBase.h> | |
19 | #include <AliLog.h> | |
4267afec | 20 | #include <AliAnalysisCuts.h> |
3b77b2d1 | 21 | class AliAnaConvIsolation; |
3b77b2d1 | 22 | class AliConversionCuts; |
23 | class TList; | |
24 | class TH2I; | |
25 | //class THnSparseF; | |
26 | ||
27 | using namespace std; | |
28 | ||
29 | class AliAnalysisTaskdPhi : public AliAnalysisTaskSE { | |
30 | ||
31 | public: | |
32 | AliAnalysisTaskdPhi(const char *name); | |
33 | virtual ~AliAnalysisTaskdPhi(); | |
34 | ||
35 | virtual void UserCreateOutputObjects(); | |
36 | virtual void SetUpCorrObjects(); | |
37 | virtual void UserExec(Option_t *option); | |
38 | virtual void Terminate(Option_t *); | |
39 | ||
3bff49c3 | 40 | TAxis& GetAxistPt() { return fAxistPt; } |
41 | TAxis& GetAxiscPt() { return fAxiscPt; } | |
3b77b2d1 | 42 | TAxis& GetAxisEta() { return fAxisEta; } |
43 | TAxis& GetAxisPhi() { return fAxisPhi; } | |
44 | TAxis& GetAxisZ() { return fAxisZ; } | |
45 | TAxis& GetAxisCent() { return fAxisCent; } | |
46 | TAxis& GetAxisPiMass() { return fAxisPiM; } | |
47 | ||
3b77b2d1 | 48 | void SetV0Filter(AliConversionCuts * filter) { fV0Filter = filter; } |
4267afec | 49 | AliAnalysisCuts * GetTrackCuts() const { return fTrackCuts; } |
50 | void SetTrackCuts( AliAnalysisCuts * cuts) { if (fTrackCuts) delete fTrackCuts; fTrackCuts = cuts; } | |
3b77b2d1 | 51 | |
52 | protected: | |
53 | ||
54 | TClonesArray * GetConversionGammas(Bool_t isAOD); | |
55 | ||
56 | private: | |
57 | ||
58 | THnSparseF * CreateSparse(TString nameString, TString titleString, TList * axesList); | |
59 | Int_t GetBin(TAxis &axis, Double_t value); | |
60 | THnSparseF * GetMEHistogram(Int_t binz, Int_t binc, TObjArray * array); | |
61 | AliAnaConvCorrBase * GetCorrObject(Int_t binz, Int_t binc, TObjArray * array); | |
62 | void Process(TObjArray * gammas, TObjArray * tracks, Int_t vertexBin, Int_t centBin); | |
e3598cd0 | 63 | void FindDeltaAODBranchName(AliVEvent * event); |
3b77b2d1 | 64 | |
65 | TList * fHistograms; //histograms | |
66 | TList * fHistoGamma; //gamma histo | |
67 | TList * fHistoPion; //pion histo | |
68 | ||
92efd725 | 69 | |
3b77b2d1 | 70 | AliConversionCuts * fV0Filter; //v0 filter |
4267afec | 71 | AliAnalysisCuts * fTrackCuts; |
3b77b2d1 | 72 | |
73 | TObjArray * fGammas; //gammas | |
74 | TObjArray * fPions; //poins | |
75 | ||
76 | TObjArray * hMETracks; //mixed event tracks | |
77 | TObjArray * hMEPhotons; //photons | |
78 | TObjArray * hMEPions; //pions | |
79 | TH2I * hMEvents; //event histrogam | |
80 | ||
81 | TObjArray * fPhotonCorr; //photon | |
82 | TObjArray * fPionCorr; //poin | |
83 | AliAnaConvIsolation * fIsoAna; //comment | |
84 | ||
92efd725 | 85 | Int_t fL1; //comment |
86 | Int_t fL2; //comment | |
3b77b2d1 | 87 | |
88 | TString fDeltaAODBranchName; //comment | |
89 | ||
3bff49c3 | 90 | TAxis fAxistPt; //comment |
91 | TAxis fAxiscPt; //comment | |
3b77b2d1 | 92 | TAxis fAxisEta; //comment |
93 | TAxis fAxisPhi; //comment | |
94 | TAxis fAxisCent; //comment | |
95 | TAxis fAxisZ; //comment | |
96 | TAxis fAxisPiM; //comment | |
97 | ||
98 | AliAnalysisTaskdPhi(const AliAnalysisTaskdPhi&); // not implemented | |
99 | AliAnalysisTaskdPhi& operator=(const AliAnalysisTaskdPhi&); // not implemented | |
100 | ||
92efd725 | 101 | ClassDef(AliAnalysisTaskdPhi, 2); // example of analysis |
3b77b2d1 | 102 | }; |
103 | ||
104 | inline THnSparseF * AliAnalysisTaskdPhi::GetMEHistogram(Int_t binz, Int_t binc, TObjArray * array) { | |
105 | ///Get Mixed Event histogram | |
106 | if(binz < 0 || binz > fAxisZ.GetNbins()) { | |
107 | cout << "error out of z axis range: " << binz << endl; | |
108 | return NULL; | |
109 | } | |
110 | if(binc < 0 || binc >= fAxisCent.GetNbins()) { | |
111 | cout << "error out of centraliy axis range: " << binc << endl; | |
112 | return NULL; | |
113 | } | |
114 | ||
115 | TObjArray * arrayc = static_cast<TObjArray*>(array->At(binz)); | |
116 | THnSparseF * histogram = static_cast<THnSparseF*>(arrayc->At(binc)); | |
117 | return histogram; | |
118 | } | |
119 | ||
120 | ||
121 | inline AliAnaConvCorrBase * AliAnalysisTaskdPhi::GetCorrObject(Int_t binz, Int_t binc, TObjArray * array) { | |
122 | ///Get correlation object | |
123 | if(binc < 0 || binz < 0) { | |
124 | AliError("We have a bad bin!!!"); | |
125 | return NULL; | |
126 | } | |
127 | ||
92efd725 | 128 | TObjArray * arrayc = static_cast<TObjArray*>(array->At(binz)); |
129 | AliAnaConvCorrBase * corrmaker = static_cast<AliAnaConvCorrBase*>(arrayc->At(binc)); | |
130 | return corrmaker; | |
3b77b2d1 | 131 | |
132 | } | |
133 | ||
134 | inline Int_t AliAnalysisTaskdPhi::GetBin(TAxis & axis, Double_t value) { | |
135 | //Return bin - 1 if within range, else return -1 | |
136 | Int_t bin = axis.FindFixBin(value); | |
137 | ||
138 | ||
139 | bin = (bin > 0 && bin <= axis.GetNbins()) ? bin -1 : -1; | |
140 | return bin; | |
141 | } | |
142 | ||
143 | #endif | |
144 |