]>
Commit | Line | Data |
---|---|---|
3b77b2d1 | 1 | //////////////////////////////////////////////// |
2 | //--------------------------------------------- | |
3 | // Class doing conversion gamma dPhi correlations | |
4 | // Gamma Conversion analysis | |
5 | //--------------------------------------------- | |
6 | //////////////////////////////////////////////// | |
7 | ||
8 | #ifndef AliAnalysisTaskdPhi_cxx | |
9 | #define AliAnalysisTaskdPhi_cxx | |
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 | |
49 | void SetV0Filter(AliConversionCuts * filter) { fV0Filter = filter; } | |
4267afec | 50 | AliAnalysisCuts * GetTrackCuts() const { return fTrackCuts; } |
51 | void SetTrackCuts( AliAnalysisCuts * cuts) { if (fTrackCuts) delete fTrackCuts; fTrackCuts = cuts; } | |
3b77b2d1 | 52 | |
3b77b2d1 | 53 | |
54 | protected: | |
55 | ||
56 | TClonesArray * GetConversionGammas(Bool_t isAOD); | |
57 | ||
58 | private: | |
59 | ||
60 | THnSparseF * CreateSparse(TString nameString, TString titleString, TList * axesList); | |
61 | Int_t GetBin(TAxis &axis, Double_t value); | |
62 | THnSparseF * GetMEHistogram(Int_t binz, Int_t binc, TObjArray * array); | |
63 | AliAnaConvCorrBase * GetCorrObject(Int_t binz, Int_t binc, TObjArray * array); | |
64 | void Process(TObjArray * gammas, TObjArray * tracks, Int_t vertexBin, Int_t centBin); | |
e3598cd0 | 65 | void FindDeltaAODBranchName(AliVEvent * event); |
3b77b2d1 | 66 | |
67 | TList * fHistograms; //histograms | |
68 | TList * fHistoGamma; //gamma histo | |
69 | TList * fHistoPion; //pion histo | |
70 | ||
3b77b2d1 | 71 | AliConversionCuts * fV0Filter; //v0 filter |
4267afec | 72 | AliAnalysisCuts * fTrackCuts; |
3b77b2d1 | 73 | |
74 | TObjArray * fGammas; //gammas | |
75 | TObjArray * fPions; //poins | |
76 | ||
77 | TObjArray * hMETracks; //mixed event tracks | |
78 | TObjArray * hMEPhotons; //photons | |
79 | TObjArray * hMEPions; //pions | |
80 | TH2I * hMEvents; //event histrogam | |
81 | ||
82 | TObjArray * fPhotonCorr; //photon | |
83 | TObjArray * fPionCorr; //poin | |
84 | AliAnaConvIsolation * fIsoAna; //comment | |
85 | ||
3b77b2d1 | 86 | |
87 | TString fDeltaAODBranchName; //comment | |
88 | ||
3bff49c3 | 89 | TAxis fAxistPt; //comment |
90 | TAxis fAxiscPt; //comment | |
3b77b2d1 | 91 | TAxis fAxisEta; //comment |
92 | TAxis fAxisPhi; //comment | |
93 | TAxis fAxisCent; //comment | |
94 | TAxis fAxisZ; //comment | |
95 | TAxis fAxisPiM; //comment | |
96 | ||
97 | AliAnalysisTaskdPhi(const AliAnalysisTaskdPhi&); // not implemented | |
98 | AliAnalysisTaskdPhi& operator=(const AliAnalysisTaskdPhi&); // not implemented | |
99 | ||
4267afec | 100 | ClassDef(AliAnalysisTaskdPhi, 3); // example of analysis |
3b77b2d1 | 101 | }; |
102 | ||
103 | inline THnSparseF * AliAnalysisTaskdPhi::GetMEHistogram(Int_t binz, Int_t binc, TObjArray * array) { | |
104 | ///Get Mixed Event histogram | |
105 | if(binz < 0 || binz > fAxisZ.GetNbins()) { | |
106 | cout << "error out of z axis range: " << binz << endl; | |
107 | return NULL; | |
108 | } | |
109 | if(binc < 0 || binc >= fAxisCent.GetNbins()) { | |
110 | cout << "error out of centraliy axis range: " << binc << endl; | |
111 | return NULL; | |
112 | } | |
113 | ||
114 | TObjArray * arrayc = static_cast<TObjArray*>(array->At(binz)); | |
115 | THnSparseF * histogram = static_cast<THnSparseF*>(arrayc->At(binc)); | |
116 | return histogram; | |
117 | } | |
118 | ||
119 | ||
120 | inline AliAnaConvCorrBase * AliAnalysisTaskdPhi::GetCorrObject(Int_t binz, Int_t binc, TObjArray * array) { | |
121 | ///Get correlation object | |
122 | if(binc < 0 || binz < 0) { | |
123 | AliError("We have a bad bin!!!"); | |
124 | return NULL; | |
125 | } | |
126 | ||
127 | TObjArray * arrayc = static_cast<TObjArray*>(array->At(binz)); | |
128 | AliAnaConvCorrBase * corrmaker = static_cast<AliAnaConvCorrBase*>(arrayc->At(binc)); | |
129 | return corrmaker; | |
130 | ||
131 | } | |
132 | ||
133 | inline Int_t AliAnalysisTaskdPhi::GetBin(TAxis & axis, Double_t value) { | |
134 | //Return bin - 1 if within range, else return -1 | |
135 | Int_t bin = axis.FindFixBin(value); | |
136 | ||
137 | ||
138 | bin = (bin > 0 && bin <= axis.GetNbins()) ? bin -1 : -1; | |
139 | return bin; | |
140 | } | |
141 | ||
142 | #endif | |
143 |