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