]>
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> |
6252ea9d | 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 { | |
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); | |
6252ea9d | 69 | void Process(TObjArray * gammas, TObjArray * tracks, Float_t cent, Float_t vtxz); |
e3598cd0 | 70 | void FindDeltaAODBranchName(AliVEvent * event); |
3b77b2d1 | 71 | |
72 | TList * fHistograms; //histograms | |
92efd725 | 73 | |
c15c23b8 | 74 | AliV0ReaderV1 * fV0Reader; // V0 reader |
6252ea9d | 75 | Bool_t fSaveReaderHists; // save histograms from v0 reader |
c15c23b8 | 76 | AliConversionCuts * fV0Filter; //additional v0 filter on top of v0 reader |
77 | AliConversionCuts * fPhotonFilter; //additional v0 filter for photons only | |
78 | AliConversionMesonCuts * fMesonFilter; //additional meson filter behind fv0filter | |
79 | AliAnalysisCuts * fTrackCuts; //Cuts for corr tracks | |
3b77b2d1 | 80 | |
3b77b2d1 | 81 | TH2I * hMEvents; //event histrogam |
439cf020 | 82 | TH2I * hTrackCent; //event histrogam |
3b77b2d1 | 83 | |
6252ea9d | 84 | AliAnaConvCorrBase * fPhotonCorr; //photon |
85 | AliAnaConvCorrPion * fPionCorr; //poin | |
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 | |
6252ea9d | 96 | |
97 | Bool_t fDoPhoton; // do photon analysis? | |
3b77b2d1 | 98 | |
99 | AliAnalysisTaskdPhi(const AliAnalysisTaskdPhi&); // not implemented | |
100 | AliAnalysisTaskdPhi& operator=(const AliAnalysisTaskdPhi&); // not implemented | |
101 | ||
6252ea9d | 102 | ClassDef(AliAnalysisTaskdPhi, 5); |
3b77b2d1 | 103 | }; |
104 | ||
105 | inline THnSparseF * AliAnalysisTaskdPhi::GetMEHistogram(Int_t binz, Int_t binc, TObjArray * array) { | |
106 | ///Get Mixed Event histogram | |
107 | if(binz < 0 || binz > fAxisZ.GetNbins()) { | |
108 | cout << "error out of z axis range: " << binz << endl; | |
109 | return NULL; | |
110 | } | |
111 | if(binc < 0 || binc >= fAxisCent.GetNbins()) { | |
112 | cout << "error out of centraliy axis range: " << binc << endl; | |
113 | return NULL; | |
114 | } | |
115 | ||
c15c23b8 | 116 | TObjArray * arrayc = static_cast<TObjArray*>(array->At(binc)); |
117 | THnSparseF * histogram = static_cast<THnSparseF*>(arrayc->At(binz)); | |
3b77b2d1 | 118 | return histogram; |
119 | } | |
120 | ||
121 | ||
122 | inline AliAnaConvCorrBase * AliAnalysisTaskdPhi::GetCorrObject(Int_t binz, Int_t binc, TObjArray * array) { | |
123 | ///Get correlation object | |
124 | if(binc < 0 || binz < 0) { | |
125 | AliError("We have a bad bin!!!"); | |
126 | return NULL; | |
127 | } | |
128 | ||
c15c23b8 | 129 | TObjArray * arrayc = static_cast<TObjArray*>(array->At(binc)); |
130 | AliAnaConvCorrBase * corrmaker = static_cast<AliAnaConvCorrBase*>(arrayc->At(binz)); | |
92efd725 | 131 | return corrmaker; |
3b77b2d1 | 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 |