]>
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> | |
839f7ade | 16 | #include <THn.h> |
17 | ||
c15c23b8 | 18 | //#include <AliAnalysisFilter.h> |
3b77b2d1 | 19 | #include <iostream> |
65ec4890 | 20 | //#include <AliAnaConvCorrBase.h> |
3b77b2d1 | 21 | #include <AliLog.h> |
4267afec | 22 | #include <AliAnalysisCuts.h> |
65ec4890 | 23 | //class AliAnaConvCorrPion; |
3b77b2d1 | 24 | class AliConversionCuts; |
c15c23b8 | 25 | class AliConversionMesonCuts; |
26 | class AliV0ReaderV1; | |
3b77b2d1 | 27 | class TList; |
28 | class TH2I; | |
29 | //class THnSparseF; | |
30 | ||
31 | using namespace std; | |
32 | ||
33 | class AliAnalysisTaskdPhi : public AliAnalysisTaskSE { | |
65ec4890 | 34 | |
3b77b2d1 | 35 | public: |
c15c23b8 | 36 | AliAnalysisTaskdPhi(const char *name="slindal_dPhi"); |
3b77b2d1 | 37 | virtual ~AliAnalysisTaskdPhi(); |
65ec4890 | 38 | |
3b77b2d1 | 39 | virtual void UserCreateOutputObjects(); |
65ec4890 | 40 | //virtual void SetUpCorrObjects(); |
41 | // virtual void SetUpCorrAxes(AliAnaConvCorrBase * corr); | |
42 | virtual void SetUpBins(); | |
3b77b2d1 | 43 | virtual void UserExec(Option_t *option); |
44 | virtual void Terminate(Option_t *); | |
65ec4890 | 45 | |
9e6bd607 | 46 | TAxis& GetAxistPt() { return fAxistPt; } |
47 | TAxis& GetAxiscPt() { return fAxiscPt; } | |
48 | TAxis& GetAxisdEta() { return fAxisdEta; } | |
49 | TAxis& GetAxisTrigEta() { return fAxisTrigEta; } | |
50 | TAxis& GetAxisAssEta() { return fAxisAssEta; } | |
65ec4890 | 51 | TAxis& GetAxisPhi() { return fAxisdPhi; } |
9e6bd607 | 52 | TAxis& GetAxisZ() { return fAxisZ; } |
53 | TAxis& GetAxisCent() { return fAxisCent; } | |
54 | TAxis& GetAxisPiMass() { return fAxisPiM; } | |
65ec4890 | 55 | |
3b77b2d1 | 56 | void SetV0Filter(AliConversionCuts * filter) { fV0Filter = filter; } |
65ec4890 | 57 | void AddV0Filter(TObject * filter, Bool_t high = kTRUE) { fV0Filters[high].AddLast(filter); } |
58 | void AddMesonFilter(TObject * filter, Bool_t high = kTRUE) { fMesonFilters[high].AddLast(filter); } | |
59 | void AddTrackFilter(TObject * filter, Bool_t high = kTRUE) { fTrackFilters[high].AddLast(filter); } | |
839f7ade | 60 | void SetCorrectionMap(THnF * map) { fCorrectionMap = map; } |
61 | ||
c15c23b8 | 62 | void SetMesonFilter(AliConversionMesonCuts * filter) { fMesonFilter = filter; } |
63 | void SetPhotonFilter(AliConversionCuts * filter) { fPhotonFilter = filter; } | |
439cf020 | 64 | void SetV0Reader(AliV0ReaderV1 * reader) { fV0Reader = reader; } |
65 | void SaveReaderHists(Bool_t save = kTRUE) { fSaveReaderHists = save; } | |
65ec4890 | 66 | AliAnalysisCuts * GetTrackCuts() const { return fTrackFilter; } |
67 | void SetTrackFilter( AliAnalysisCuts * cuts) { if (fTrackFilter) delete fTrackFilter; fTrackFilter = cuts; } | |
3b77b2d1 | 68 | |
69 | protected: | |
70 | ||
71 | TClonesArray * GetConversionGammas(Bool_t isAOD); | |
65ec4890 | 72 | |
ca257f2a | 73 | private: |
65ec4890 | 74 | |
75 | //void CorrelateWithTracks(AliAODConversionParticle * particle, TObjArray tracks[], Int_t ntrackfilters, Bool_t ** lowtrackmap, Int_t nltf, Int_t const tIDs[4], Double_t dphiValues[]); | |
76 | //void FillCounters(TObjArray * particles, TObjArray tracks[], Int_t ntrackfilters, Float_t cent, Float_t vtxz); | |
839f7ade | 77 | |
78 | Double_t GetTrackCorrection(Double_t vtxz, AliVTrack * track); | |
79 | ||
65ec4890 | 80 | |
81 | ///Get the distance in phi between trigger particle and correlated particle | |
82 | Float_t GetDPhi(Float_t dPhi) { | |
83 | if ( dPhi < 3*TMath::PiOver2() && dPhi > - TMath::PiOver2() ) return dPhi; | |
84 | else return ( (dPhi>0)? dPhi - TMath::TwoPi() : dPhi + TMath::TwoPi() ); | |
85 | } | |
86 | ||
3b77b2d1 | 87 | THnSparseF * CreateSparse(TString nameString, TString titleString, TList * axesList); |
88 | Int_t GetBin(TAxis &axis, Double_t value); | |
89 | THnSparseF * GetMEHistogram(Int_t binz, Int_t binc, TObjArray * array); | |
65ec4890 | 90 | // AliAnaConvCorrBase * GetCorrObject(Int_t binz, Int_t binc, TObjArray * array); |
6252ea9d | 91 | void Process(TObjArray * gammas, TObjArray * tracks, Float_t cent, Float_t vtxz); |
e3598cd0 | 92 | void FindDeltaAODBranchName(AliVEvent * event); |
3b77b2d1 | 93 | |
65ec4890 | 94 | |
95 | ///Members | |
3b77b2d1 | 96 | TList * fHistograms; //histograms |
65ec4890 | 97 | THnSparseF * fCorrSparse; |
98 | THnSparseF * fTrigSparse; | |
99 | THnSparseF * fTrackSparse; | |
100 | THnSparseF * fMassSparse; | |
92efd725 | 101 | |
c15c23b8 | 102 | AliV0ReaderV1 * fV0Reader; // V0 reader |
6252ea9d | 103 | Bool_t fSaveReaderHists; // save histograms from v0 reader |
c15c23b8 | 104 | AliConversionCuts * fV0Filter; //additional v0 filter on top of v0 reader |
65ec4890 | 105 | TObjArray fV0Filters[2]; // Array of v0 filters, increasingly loose ideally. |
c15c23b8 | 106 | AliConversionCuts * fPhotonFilter; //additional v0 filter for photons only |
107 | AliConversionMesonCuts * fMesonFilter; //additional meson filter behind fv0filter | |
65ec4890 | 108 | TObjArray fMesonFilters[2]; // Array of Meson filters |
109 | AliAnalysisCuts * fTrackFilter; //Cuts for corr tracks | |
110 | TObjArray fTrackFilters[2]; // Array of track cuts | |
111 | ||
112 | TObjArray fGammas; | |
113 | TObjArray fTracks; | |
114 | //Int_t fTFBin; // Axis for track filters | |
3b77b2d1 | 115 | |
3b77b2d1 | 116 | TH2I * hMEvents; //event histrogam |
439cf020 | 117 | TH2I * hTrackCent; //event histrogam |
839f7ade | 118 | TH3F * hTrigPt; // trigger pt |
a8515f2e | 119 | TH2F * hTrackPt; // track pt |
839f7ade | 120 | TH1F * hTrigPhi; // trigger phi |
3b77b2d1 | 121 | |
65ec4890 | 122 | //AliAnaConvCorrBase * fPhotonCorr; //photon |
123 | //AliAnaConvCorrPion * fPionCorr; //poin | |
3b77b2d1 | 124 | |
125 | TString fDeltaAODBranchName; //comment | |
126 | ||
3bff49c3 | 127 | TAxis fAxistPt; //comment |
128 | TAxis fAxiscPt; //comment | |
9e6bd607 | 129 | TAxis fAxisdEta; //comment |
130 | TAxis fAxisTrigEta; //comment | |
131 | TAxis fAxisAssEta; //comment | |
65ec4890 | 132 | TAxis fAxisdPhi; //comment |
3b77b2d1 | 133 | TAxis fAxisCent; //comment |
134 | TAxis fAxisZ; //comment | |
135 | TAxis fAxisPiM; //comment | |
65ec4890 | 136 | TAxis fAxisTrackFilters; //comment |
137 | TAxis fAxisV0Filters; //comment | |
138 | TAxis fAxisMesonFilters; //comment | |
139 | Bool_t fkTrackAxis; // on or off | |
140 | Bool_t fkV0Axis; // on or off | |
141 | Bool_t fkPionAxis; // on or off | |
142 | ||
143 | TList fAxesList; //dphi axes list | |
144 | TList fTrigAxesList; // Trigger axes list | |
145 | TList fTrackAxesList; //Trackociated particles axes list | |
146 | TList fMassAxesList; // Mass vs pt sparse | |
6252ea9d | 147 | |
148 | Bool_t fDoPhoton; // do photon analysis? | |
839f7ade | 149 | THnF * fCorrectionMap; |
150 | ||
3b77b2d1 | 151 | |
152 | AliAnalysisTaskdPhi(const AliAnalysisTaskdPhi&); // not implemented | |
153 | AliAnalysisTaskdPhi& operator=(const AliAnalysisTaskdPhi&); // not implemented | |
154 | ||
839f7ade | 155 | ClassDef(AliAnalysisTaskdPhi, 10); |
3b77b2d1 | 156 | }; |
157 | ||
158 | inline THnSparseF * AliAnalysisTaskdPhi::GetMEHistogram(Int_t binz, Int_t binc, TObjArray * array) { | |
159 | ///Get Mixed Event histogram | |
160 | if(binz < 0 || binz > fAxisZ.GetNbins()) { | |
161 | cout << "error out of z axis range: " << binz << endl; | |
162 | return NULL; | |
163 | } | |
164 | if(binc < 0 || binc >= fAxisCent.GetNbins()) { | |
165 | cout << "error out of centraliy axis range: " << binc << endl; | |
166 | return NULL; | |
167 | } | |
168 | ||
c15c23b8 | 169 | TObjArray * arrayc = static_cast<TObjArray*>(array->At(binc)); |
170 | THnSparseF * histogram = static_cast<THnSparseF*>(arrayc->At(binz)); | |
3b77b2d1 | 171 | return histogram; |
172 | } | |
173 | ||
174 | ||
65ec4890 | 175 | // inline AliAnaConvCorrBase * AliAnalysisTaskdPhi::GetCorrObject(Int_t binz, Int_t binc, TObjArray * array) { |
176 | // ///Get correlation object | |
177 | // if(binc < 0 || binz < 0) { | |
178 | // AliError("We have a bad bin!!!"); | |
179 | // return NULL; | |
180 | // } | |
3b77b2d1 | 181 | |
65ec4890 | 182 | // TObjArray * arrayc = static_cast<TObjArray*>(array->At(binc)); |
183 | // AliAnaConvCorrBase * corrmaker = static_cast<AliAnaConvCorrBase*>(arrayc->At(binz)); | |
184 | // return corrmaker; | |
185 | // } | |
3b77b2d1 | 186 | |
187 | inline Int_t AliAnalysisTaskdPhi::GetBin(TAxis & axis, Double_t value) { | |
188 | //Return bin - 1 if within range, else return -1 | |
189 | Int_t bin = axis.FindFixBin(value); | |
190 | ||
191 | ||
192 | bin = (bin > 0 && bin <= axis.GetNbins()) ? bin -1 : -1; | |
193 | return bin; | |
194 | } | |
195 | ||
196 | #endif | |
197 |