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