]>
Commit | Line | Data |
---|---|---|
00514d01 | 1 | // $Id$ |
91f4b7c5 | 2 | // |
297edd60 | 3 | // Jet analysis task. |
91f4b7c5 | 4 | // |
297edd60 | 5 | // Author: S.Aiola |
25283b37 | 6 | |
b5ee47fb | 7 | #include <TObject.h> |
25283b37 | 8 | #include <TChain.h> |
9 | #include <TClonesArray.h> | |
10 | #include <TH1F.h> | |
11 | #include <TH2F.h> | |
12 | #include <TList.h> | |
13 | #include <TLorentzVector.h> | |
a55e4f1d | 14 | #include <TRandom3.h> |
226f511d | 15 | #include <TParameter.h> |
25283b37 | 16 | |
17 | #include "AliAnalysisManager.h" | |
18 | #include "AliCentrality.h" | |
f0a0fd33 | 19 | #include "AliVCluster.h" |
df43b607 | 20 | #include "AliVParticle.h" |
6fd5039f | 21 | #include "AliVTrack.h" |
25283b37 | 22 | #include "AliEmcalJet.h" |
23 | #include "AliVEventHandler.h" | |
55264f20 | 24 | #include "AliLog.h" |
25283b37 | 25 | |
00514d01 | 26 | #include "AliAnalysisTaskSAJF.h" |
25283b37 | 27 | |
00514d01 | 28 | ClassImp(AliAnalysisTaskSAJF) |
25283b37 | 29 | |
30 | //________________________________________________________________________ | |
00514d01 | 31 | AliAnalysisTaskSAJF::AliAnalysisTaskSAJF() : |
6fd5039f | 32 | AliAnalysisTaskEmcalJet("AliAnalysisTaskSAJF"), |
b12a85c3 | 33 | fMinRC2LJ(1.0), |
2bee31e9 | 34 | fEmbJetsName("EmbJets"), |
b12a85c3 | 35 | fRandTracksName("TracksRandomized"), |
36 | fRandCaloName("CaloClustersRandomized"), | |
226f511d | 37 | fRhoName("Rho"), |
6fd5039f | 38 | fSkipEventsWithNoJets(kTRUE), |
2bee31e9 | 39 | fEmbJets(0), |
b12a85c3 | 40 | fRandTracks(0), |
41 | fRandCaloClusters(0), | |
b12a85c3 | 42 | fRho(0), |
f0a0fd33 | 43 | fHistCentrality(0), |
fb9ac42f | 44 | fHistRejectedEvents(0), |
b12a85c3 | 45 | fHistRhoVSleadJetPt(0), |
46 | fHistRCPhiEta(0), | |
47 | fHistRCPtExLJVSDPhiLJ(0), | |
48 | fHistRhoVSRCPt(0), | |
b5ee47fb | 49 | fHistEmbJetPhiEta(0), |
50 | fHistEmbPartPhiEta(0), | |
b12a85c3 | 51 | fHistRhoVSEmbBkg(0) |
226f511d | 52 | |
25283b37 | 53 | { |
54 | // Default constructor. | |
f0a0fd33 | 55 | |
56 | for (Int_t i = 0; i < 4; i++) { | |
df43b607 | 57 | fHistJetPhiEta[i] = 0; |
55264f20 | 58 | fHistJetsPt[i] = 0; |
df43b607 | 59 | fHistJetsPtArea[i] = 0; |
55264f20 | 60 | fHistLeadingJetPt[i] = 0; |
61 | fHist2LeadingJetPt[i] = 0; | |
b12a85c3 | 62 | fHistJetsNEFvsPt[i] = 0; |
63 | fHistJetsZvsPt[i] = 0; | |
b12a85c3 | 64 | fHistRho[i] = 0; |
65 | fHistCorrJetsPt[i] = 0; | |
b12a85c3 | 66 | fHistCorrLeadingJetPt[i] = 0; |
a55e4f1d | 67 | fHistRCPt[i] = 0; |
68 | fHistRCPtExLJ[i] = 0; | |
b12a85c3 | 69 | fHistRCPtRand[i] = 0; |
70 | fHistDeltaPtRC[i] = 0; | |
71 | fHistDeltaPtRCExLJ[i] = 0; | |
72 | fHistDeltaPtRCRand[i] = 0; | |
2bee31e9 | 73 | fHistEmbJets[i] = 0; |
74 | fHistEmbPart[i] = 0; | |
b12a85c3 | 75 | fHistDeltaPtEmb[i] = 0; |
f0a0fd33 | 76 | } |
25283b37 | 77 | } |
78 | ||
79 | //________________________________________________________________________ | |
00514d01 | 80 | AliAnalysisTaskSAJF::AliAnalysisTaskSAJF(const char *name) : |
6fd5039f | 81 | AliAnalysisTaskEmcalJet(name), |
b12a85c3 | 82 | fMinRC2LJ(1.0), |
2bee31e9 | 83 | fEmbJetsName("EmbJets"), |
b12a85c3 | 84 | fRandTracksName("TracksRandomized"), |
85 | fRandCaloName("CaloClustersRandomized"), | |
226f511d | 86 | fRhoName("Rho"), |
6fd5039f | 87 | fSkipEventsWithNoJets(kTRUE), |
2bee31e9 | 88 | fEmbJets(0), |
b12a85c3 | 89 | fRandTracks(0), |
90 | fRandCaloClusters(0), | |
b12a85c3 | 91 | fRho(0), |
f0a0fd33 | 92 | fHistCentrality(0), |
fb9ac42f | 93 | fHistRejectedEvents(0), |
b12a85c3 | 94 | fHistRhoVSleadJetPt(0), |
95 | fHistRCPhiEta(0), | |
96 | fHistRCPtExLJVSDPhiLJ(0), | |
97 | fHistRhoVSRCPt(0), | |
b5ee47fb | 98 | fHistEmbJetPhiEta(0), |
99 | fHistEmbPartPhiEta(0), | |
b12a85c3 | 100 | fHistRhoVSEmbBkg(0) |
25283b37 | 101 | { |
102 | // Standard constructor. | |
103 | ||
f0a0fd33 | 104 | for (Int_t i = 0; i < 4; i++) { |
df43b607 | 105 | fHistJetPhiEta[i] = 0; |
55264f20 | 106 | fHistJetsPt[i] = 0; |
df43b607 | 107 | fHistJetsPtArea[i] = 0; |
55264f20 | 108 | fHistLeadingJetPt[i] = 0; |
109 | fHist2LeadingJetPt[i] = 0; | |
b12a85c3 | 110 | fHistJetsNEFvsPt[i] = 0; |
111 | fHistJetsZvsPt[i] = 0; | |
b12a85c3 | 112 | fHistRho[i] = 0; |
113 | fHistCorrJetsPt[i] = 0; | |
b12a85c3 | 114 | fHistCorrLeadingJetPt[i] = 0; |
a55e4f1d | 115 | fHistRCPt[i] = 0; |
116 | fHistRCPtExLJ[i] = 0; | |
b12a85c3 | 117 | fHistRCPtRand[i] = 0; |
118 | fHistDeltaPtRC[i] = 0; | |
119 | fHistDeltaPtRCExLJ[i] = 0; | |
120 | fHistDeltaPtRCRand[i] = 0; | |
2bee31e9 | 121 | fHistEmbJets[i] = 0; |
122 | fHistEmbPart[i] = 0; | |
b12a85c3 | 123 | fHistDeltaPtEmb[i] = 0; |
f0a0fd33 | 124 | } |
25283b37 | 125 | } |
126 | ||
127 | //________________________________________________________________________ | |
00514d01 | 128 | AliAnalysisTaskSAJF::~AliAnalysisTaskSAJF() |
25283b37 | 129 | { |
16d143bd | 130 | // Destructor. |
25283b37 | 131 | } |
132 | ||
133 | //________________________________________________________________________ | |
00514d01 | 134 | void AliAnalysisTaskSAJF::UserCreateOutputObjects() |
25283b37 | 135 | { |
16d143bd | 136 | // Create user output. |
df43b607 | 137 | |
16d143bd | 138 | AliAnalysisTaskEmcalJet::UserCreateOutputObjects(); |
11d4d636 | 139 | |
6fd5039f | 140 | const Float_t binWidth = (fMaxBinPt - fMinBinPt) / fNbins; |
25283b37 | 141 | |
226f511d | 142 | OpenFile(1); |
25283b37 | 143 | fOutput = new TList(); |
226f511d | 144 | fOutput->SetOwner(); |
25283b37 | 145 | |
fb9ac42f | 146 | fHistCentrality = new TH1F("fHistCentrality","fHistCentrality", fNbins, 0, 100); |
f0a0fd33 | 147 | fHistCentrality->GetXaxis()->SetTitle("Centrality (%)"); |
148 | fHistCentrality->GetYaxis()->SetTitle("counts"); | |
149 | fOutput->Add(fHistCentrality); | |
25283b37 | 150 | |
6fd5039f | 151 | fHistRejectedEvents = new TH1F("fHistRejectedEvents","fHistRejectedEvents", 6, 0, 6); |
fb9ac42f | 152 | fHistRejectedEvents->GetXaxis()->SetTitle("Reason"); |
153 | fHistRejectedEvents->GetYaxis()->SetTitle("counts"); | |
154 | fHistRejectedEvents->GetXaxis()->SetBinLabel(1, "Rho <= 0"); | |
155 | fHistRejectedEvents->GetXaxis()->SetBinLabel(2, "Max Jet <= 0"); | |
156 | fHistRejectedEvents->GetXaxis()->SetBinLabel(3, "Max Jet not found"); | |
6fd5039f | 157 | fHistRejectedEvents->GetXaxis()->SetBinLabel(4, "No jets"); |
fb9ac42f | 158 | fOutput->Add(fHistRejectedEvents); |
159 | ||
6fd5039f | 160 | fHistRhoVSleadJetPt = new TH2F("fHistRhoVSleadJetPt","fHistRhoVSleadJetPt", fNbins, fMinBinPt, fMaxBinPt, fNbins, fMinBinPt, fMaxBinPt); |
b12a85c3 | 161 | fHistRhoVSleadJetPt->GetXaxis()->SetTitle("#rho * area [GeV/c]"); |
162 | fHistRhoVSleadJetPt->GetYaxis()->SetTitle("Leading jet p_{T} [GeV/c]"); | |
163 | fOutput->Add(fHistRhoVSleadJetPt); | |
b5ee47fb | 164 | |
6fd5039f | 165 | fHistRCPhiEta = new TH2F("fHistRCPhiEta","Phi-Eta distribution of rigid cones", 40, -2, 2, 64, 0, 6.4); |
b12a85c3 | 166 | fHistRCPhiEta->GetXaxis()->SetTitle("#eta"); |
167 | fHistRCPhiEta->GetYaxis()->SetTitle("#phi"); | |
168 | fOutput->Add(fHistRCPhiEta); | |
b5ee47fb | 169 | |
6fd5039f | 170 | fHistRCPtExLJVSDPhiLJ = new TH2F("fHistRCPtExLJVSDPhiLJ","fHistRCPtExLJVSDPhiLJ", fNbins, fMinBinPt, fMaxBinPt, 128, -1.6, 4.8); |
b12a85c3 | 171 | fHistRCPtExLJVSDPhiLJ->GetXaxis()->SetTitle("rigid cone p_{T} [GeV/c]"); |
b5ee47fb | 172 | fHistRCPtExLJVSDPhiLJ->GetYaxis()->SetTitle("#Delta#phi"); |
173 | fOutput->Add(fHistRCPtExLJVSDPhiLJ); | |
174 | ||
6fd5039f | 175 | fHistRhoVSRCPt = new TH2F("fHistRhoVSRCPt","fHistRhoVSRCPt", fNbins, fMinBinPt, fMaxBinPt, fNbins, fMinBinPt, fMaxBinPt); |
b12a85c3 | 176 | fHistRhoVSRCPt->GetXaxis()->SetTitle("#rho * area [GeV/c]"); |
177 | fHistRhoVSRCPt->GetYaxis()->SetTitle("rigid cone p_{T} [GeV/c]"); | |
178 | fOutput->Add(fHistRhoVSRCPt); | |
179 | ||
6fd5039f | 180 | fHistEmbJetPhiEta = new TH2F("fHistEmbJetPhiEta","Phi-Eta distribution of embedded jets", 40, -2, 2, 64, 0, 6.4); |
b12a85c3 | 181 | fHistEmbJetPhiEta->GetXaxis()->SetTitle("#eta"); |
182 | fHistEmbJetPhiEta->GetYaxis()->SetTitle("#phi"); | |
183 | fOutput->Add(fHistEmbJetPhiEta); | |
184 | ||
6fd5039f | 185 | fHistEmbPartPhiEta = new TH2F("fHistEmbPartPhiEta","Phi-Eta distribution of embedded particles", 40, -2, 2, 64, 0, 6.4); |
b12a85c3 | 186 | fHistEmbPartPhiEta->GetXaxis()->SetTitle("#eta"); |
187 | fHistEmbPartPhiEta->GetYaxis()->SetTitle("#phi"); | |
188 | fOutput->Add(fHistEmbPartPhiEta); | |
189 | ||
6fd5039f | 190 | fHistRhoVSEmbBkg = new TH2F("fHistRhoVSEmbBkg","fHistRhoVSEmbBkg", fNbins, fMinBinPt, fMaxBinPt, fNbins, fMinBinPt, fMaxBinPt); |
b12a85c3 | 191 | fHistRhoVSEmbBkg->GetXaxis()->SetTitle("rho * area [GeV/c]"); |
192 | fHistRhoVSEmbBkg->GetYaxis()->SetTitle("background of embedded track [GeV/c]"); | |
193 | fOutput->Add(fHistRhoVSEmbBkg); | |
b5ee47fb | 194 | |
f0a0fd33 | 195 | TString histname; |
196 | ||
197 | for (Int_t i = 0; i < 4; i++) { | |
df43b607 | 198 | histname = "fHistJetPhiEta_"; |
199 | histname += i; | |
6fd5039f | 200 | fHistJetPhiEta[i] = new TH2F(histname.Data(), histname.Data(), 40, -2, 2, 64, 0, 6.4); |
df43b607 | 201 | fHistJetPhiEta[i]->GetXaxis()->SetTitle("#eta"); |
202 | fHistJetPhiEta[i]->GetYaxis()->SetTitle("#phi"); | |
203 | fOutput->Add(fHistJetPhiEta[i]); | |
204 | ||
55264f20 | 205 | histname = "fHistJetsPt_"; |
f0a0fd33 | 206 | histname += i; |
6fd5039f | 207 | fHistJetsPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt); |
b12a85c3 | 208 | fHistJetsPt[i]->GetXaxis()->SetTitle("p_{T} [GeV/c]"); |
55264f20 | 209 | fHistJetsPt[i]->GetYaxis()->SetTitle("counts"); |
210 | fOutput->Add(fHistJetsPt[i]); | |
226f511d | 211 | |
df43b607 | 212 | histname = "fHistJetsPtArea_"; |
213 | histname += i; | |
6fd5039f | 214 | fHistJetsPtArea[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt, 20, 0, fJetRadius * fJetRadius * TMath::Pi() * 1.5); |
df43b607 | 215 | fHistJetsPtArea[i]->GetXaxis()->SetTitle("p_{T} [GeV/c]"); |
216 | fHistJetsPtArea[i]->GetYaxis()->SetTitle("area"); | |
217 | fOutput->Add(fHistJetsPtArea[i]); | |
218 | ||
55264f20 | 219 | histname = "fHistLeadingJetPt_"; |
f0a0fd33 | 220 | histname += i; |
6fd5039f | 221 | fHistLeadingJetPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt); |
b12a85c3 | 222 | fHistLeadingJetPt[i]->GetXaxis()->SetTitle("p_{T} [GeV]"); |
55264f20 | 223 | fHistLeadingJetPt[i]->GetYaxis()->SetTitle("counts"); |
224 | fOutput->Add(fHistLeadingJetPt[i]); | |
b5ee47fb | 225 | |
226 | histname = "fHist2LeadingJetPt_"; | |
227 | histname += i; | |
6fd5039f | 228 | fHist2LeadingJetPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt); |
b12a85c3 | 229 | fHist2LeadingJetPt[i]->GetXaxis()->SetTitle("p_{T} [GeV]"); |
b5ee47fb | 230 | fHist2LeadingJetPt[i]->GetYaxis()->SetTitle("counts"); |
231 | fOutput->Add(fHist2LeadingJetPt[i]); | |
232 | ||
b12a85c3 | 233 | histname = "fHistJetsZvsPt_"; |
b5ee47fb | 234 | histname += i; |
6fd5039f | 235 | fHistJetsZvsPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins, 0, 1.2, fNbins, fMinBinPt, fMaxBinPt); |
b12a85c3 | 236 | fHistJetsZvsPt[i]->GetXaxis()->SetTitle("Z"); |
237 | fHistJetsZvsPt[i]->GetYaxis()->SetTitle("p_{T} [GeV/c]"); | |
238 | fOutput->Add(fHistJetsZvsPt[i]); | |
239 | ||
240 | if (fAnaType == kEMCAL) { | |
241 | histname = "fHistJetsNEFvsPt_"; | |
242 | histname += i; | |
6fd5039f | 243 | fHistJetsNEFvsPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins, 0, 1.2, fNbins, fMinBinPt, fMaxBinPt); |
b12a85c3 | 244 | fHistJetsNEFvsPt[i]->GetXaxis()->SetTitle("NEF"); |
245 | fHistJetsNEFvsPt[i]->GetYaxis()->SetTitle("p_{T} [GeV/c]"); | |
246 | fOutput->Add(fHistJetsNEFvsPt[i]); | |
b12a85c3 | 247 | } |
248 | ||
b12a85c3 | 249 | histname = "fHistRho_"; |
250 | histname += i; | |
6fd5039f | 251 | fHistRho[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt * 2); |
b12a85c3 | 252 | fHistRho[i]->GetXaxis()->SetTitle("p_{T} [GeV/c]"); |
253 | fHistRho[i]->GetYaxis()->SetTitle("counts"); | |
254 | fOutput->Add(fHistRho[i]); | |
255 | ||
256 | histname = "fHistCorrJetsPt_"; | |
257 | histname += i; | |
6fd5039f | 258 | fHistCorrJetsPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt); |
b12a85c3 | 259 | fHistCorrJetsPt[i]->GetXaxis()->SetTitle("p_{T} [GeV/c]"); |
260 | fHistCorrJetsPt[i]->GetYaxis()->SetTitle("counts"); | |
261 | fOutput->Add(fHistCorrJetsPt[i]); | |
262 | ||
b12a85c3 | 263 | histname = "fHistCorrLeadingJetPt_"; |
264 | histname += i; | |
6fd5039f | 265 | fHistCorrLeadingJetPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt); |
b12a85c3 | 266 | fHistCorrLeadingJetPt[i]->GetXaxis()->SetTitle("p_{T} [GeV/c]"); |
267 | fHistCorrLeadingJetPt[i]->GetYaxis()->SetTitle("counts"); | |
268 | fOutput->Add(fHistCorrLeadingJetPt[i]); | |
269 | ||
270 | histname = "fHistRCPt_"; | |
c554a987 | 271 | histname += i; |
6fd5039f | 272 | fHistRCPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt * 2); |
b12a85c3 | 273 | fHistRCPt[i]->GetXaxis()->SetTitle("rigid cone p_{T} [GeV/c]"); |
274 | fHistRCPt[i]->GetYaxis()->SetTitle("counts"); | |
275 | fOutput->Add(fHistRCPt[i]); | |
c554a987 | 276 | |
b12a85c3 | 277 | histname = "fHistRCPtExLJ_"; |
c554a987 | 278 | histname += i; |
6fd5039f | 279 | fHistRCPtExLJ[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt * 2); |
b12a85c3 | 280 | fHistRCPtExLJ[i]->GetXaxis()->SetTitle("rigid cone p_{T} [GeV/c]"); |
281 | fHistRCPtExLJ[i]->GetYaxis()->SetTitle("counts"); | |
282 | fOutput->Add(fHistRCPtExLJ[i]); | |
c554a987 | 283 | |
b12a85c3 | 284 | histname = "fHistRCPtRand_"; |
c554a987 | 285 | histname += i; |
6fd5039f | 286 | fHistRCPtRand[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt * 2); |
b12a85c3 | 287 | fHistRCPtRand[i]->GetXaxis()->SetTitle("rigid cone p_{T} [GeV/c]"); |
288 | fHistRCPtRand[i]->GetYaxis()->SetTitle("counts"); | |
289 | fOutput->Add(fHistRCPtRand[i]); | |
a55e4f1d | 290 | |
291 | histname = "fHistDeltaPtRC_"; | |
292 | histname += i; | |
6fd5039f | 293 | fHistDeltaPtRC[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt - fMaxBinPt / 2 + binWidth / 2, fMinBinPt + fMaxBinPt / 2 + binWidth / 2); |
b12a85c3 | 294 | fHistDeltaPtRC[i]->GetXaxis()->SetTitle("#deltap_{T} [GeV/c]"); |
a55e4f1d | 295 | fHistDeltaPtRC[i]->GetYaxis()->SetTitle("counts"); |
296 | fOutput->Add(fHistDeltaPtRC[i]); | |
297 | ||
298 | histname = "fHistDeltaPtRCExLJ_"; | |
299 | histname += i; | |
6fd5039f | 300 | fHistDeltaPtRCExLJ[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt - fMaxBinPt / 2 + binWidth / 2, fMinBinPt + fMaxBinPt / 2 + binWidth / 2); |
b12a85c3 | 301 | fHistDeltaPtRCExLJ[i]->GetXaxis()->SetTitle("#deltap_{T} [GeV/c]"); |
a55e4f1d | 302 | fHistDeltaPtRCExLJ[i]->GetYaxis()->SetTitle("counts"); |
303 | fOutput->Add(fHistDeltaPtRCExLJ[i]); | |
304 | ||
b12a85c3 | 305 | histname = "fHistDeltaPtRCRand_"; |
a55e4f1d | 306 | histname += i; |
6fd5039f | 307 | fHistDeltaPtRCRand[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt - fMaxBinPt / 2 + binWidth / 2, fMinBinPt + fMaxBinPt / 2 + binWidth / 2); |
b12a85c3 | 308 | fHistDeltaPtRCRand[i]->GetXaxis()->SetTitle("#deltap_{T} [GeV/c]"); |
309 | fHistDeltaPtRCRand[i]->GetYaxis()->SetTitle("counts"); | |
310 | fOutput->Add(fHistDeltaPtRCRand[i]); | |
2bee31e9 | 311 | |
312 | histname = "fHistEmbJets_"; | |
313 | histname += i; | |
6fd5039f | 314 | fHistEmbJets[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt); |
b12a85c3 | 315 | fHistEmbJets[i]->GetXaxis()->SetTitle("embedded jet p_{T} [GeV/c]"); |
2bee31e9 | 316 | fHistEmbJets[i]->GetYaxis()->SetTitle("counts"); |
317 | fOutput->Add(fHistEmbJets[i]); | |
318 | ||
319 | histname = "fHistEmbPart_"; | |
320 | histname += i; | |
6fd5039f | 321 | fHistEmbPart[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt); |
b12a85c3 | 322 | fHistEmbPart[i]->GetXaxis()->SetTitle("embedded particle p_{T} [GeV/c]"); |
2bee31e9 | 323 | fHistEmbPart[i]->GetYaxis()->SetTitle("counts"); |
324 | fOutput->Add(fHistEmbPart[i]); | |
325 | ||
b12a85c3 | 326 | histname = "fHistDeltaPtEmb_"; |
2bee31e9 | 327 | histname += i; |
6fd5039f | 328 | fHistDeltaPtEmb[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt - fMaxBinPt / 2 + binWidth / 2, fMinBinPt + fMaxBinPt / 2 + binWidth / 2); |
b12a85c3 | 329 | fHistDeltaPtEmb[i]->GetXaxis()->SetTitle("#deltap_{T} [GeV/c]"); |
330 | fHistDeltaPtEmb[i]->GetYaxis()->SetTitle("counts"); | |
331 | fOutput->Add(fHistDeltaPtEmb[i]); | |
e82e282c | 332 | } |
333 | ||
25283b37 | 334 | PostData(1, fOutput); // Post data for ALL output slots >0 here, to get at least an empty histogram |
335 | } | |
336 | ||
55264f20 | 337 | //________________________________________________________________________ |
6fd5039f | 338 | Bool_t AliAnalysisTaskSAJF::RetrieveEventObjects() |
25283b37 | 339 | { |
16d143bd | 340 | // Retrieve event objects. |
341 | ||
342 | if (!AliAnalysisTaskEmcalJet::RetrieveEventObjects()) | |
6fd5039f | 343 | return kFALSE; |
344 | ||
345 | fRho = -1; | |
346 | ||
347 | if (strcmp(fRhoName,"")) { | |
348 | TParameter<Double_t> *rho = dynamic_cast<TParameter<Double_t>*>(InputEvent()->FindListObject(fRhoName)); | |
349 | ||
350 | if (rho) { | |
351 | fRho = rho->GetVal(); | |
352 | } | |
353 | else { | |
354 | AliWarning(Form("Could not retrieve rho %s!", fRhoName.Data())); | |
355 | } | |
356 | } | |
df43b607 | 357 | |
2bee31e9 | 358 | if (strcmp(fEmbJetsName,"")) { |
359 | fEmbJets = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject(fEmbJetsName)); | |
360 | if (!fEmbJets) { | |
b12a85c3 | 361 | AliWarning(Form("Could not retrieve emb jets %s!", fEmbJetsName.Data())); |
362 | } | |
363 | } | |
364 | ||
365 | if (strcmp(fRandCaloName,"") && fAnaType == kEMCAL) { | |
366 | fRandCaloClusters = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject(fRandCaloName)); | |
367 | if (!fRandCaloClusters) { | |
368 | AliWarning(Form("Could not retrieve randomized clusters %s!", fRandCaloName.Data())); | |
369 | } | |
370 | } | |
371 | ||
372 | if (strcmp(fRandTracksName,"")) { | |
373 | fRandTracks = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject(fRandTracksName)); | |
374 | if (!fRandTracks) { | |
375 | AliWarning(Form("Could not retrieve randomized tracks %s!", fRandTracksName.Data())); | |
2bee31e9 | 376 | } |
377 | } | |
f0a0fd33 | 378 | |
6fd5039f | 379 | return kTRUE; |
2bee31e9 | 380 | } |
381 | ||
55264f20 | 382 | //________________________________________________________________________ |
6fd5039f | 383 | Bool_t AliAnalysisTaskSAJF::FillHistograms() |
25283b37 | 384 | { |
16d143bd | 385 | // Fill histograms. |
386 | ||
df43b607 | 387 | if (fRho < 0) { |
6fd5039f | 388 | fHistRejectedEvents->Fill("Rho <= 0", 1); |
389 | return kFALSE; | |
df43b607 | 390 | } |
391 | ||
55264f20 | 392 | Int_t maxJetIndex = -1; |
393 | Int_t max2JetIndex = -1; | |
25283b37 | 394 | |
b12a85c3 | 395 | // ************ |
396 | // General histograms | |
397 | // _________________________________ | |
398 | ||
6fd5039f | 399 | GetLeadingJets(maxJetIndex, max2JetIndex); |
55264f20 | 400 | |
6fd5039f | 401 | if (fSkipEventsWithNoJets && maxJetIndex < 0) { |
402 | fHistRejectedEvents->Fill("No jets", 1); | |
403 | return kFALSE; | |
fb9ac42f | 404 | } |
c554a987 | 405 | |
df43b607 | 406 | AliEmcalJet* jet = dynamic_cast<AliEmcalJet*>(fJets->At(maxJetIndex)); |
6fd5039f | 407 | if (fSkipEventsWithNoJets && !jet) { |
408 | fHistRejectedEvents->Fill("Max Jet not found", 1); | |
409 | return kFALSE; | |
fb9ac42f | 410 | } |
c554a987 | 411 | |
6fd5039f | 412 | Float_t maxJetCorrPt = 0; |
413 | ||
414 | if (jet) | |
415 | maxJetCorrPt = jet->Pt() - fRho * jet->Area(); | |
11d4d636 | 416 | |
6fd5039f | 417 | if (fSkipEventsWithNoJets && maxJetCorrPt <= 0) { |
418 | fHistRejectedEvents->Fill("Max Jet <= 0", 1); | |
419 | return kFALSE; | |
420 | } | |
b12a85c3 | 421 | |
6fd5039f | 422 | fHistCentrality->Fill(fCent); |
423 | fHistRho[fCentBin]->Fill(fRho); | |
424 | ||
425 | if (jet) { | |
426 | fHistLeadingJetPt[fCentBin]->Fill(jet->Pt()); | |
427 | fHistRhoVSleadJetPt->Fill(fRho * jet->Area(), jet->Pt()); | |
428 | fHistCorrLeadingJetPt[fCentBin]->Fill(maxJetCorrPt); | |
429 | } | |
55264f20 | 430 | |
431 | AliEmcalJet* jet2 = 0; | |
432 | if (max2JetIndex >= 0) | |
df43b607 | 433 | jet2 = dynamic_cast<AliEmcalJet*>(fJets->At(max2JetIndex)); |
55264f20 | 434 | |
6fd5039f | 435 | if (jet2) |
b5ee47fb | 436 | fHist2LeadingJetPt[fCentBin]->Fill(jet2->Pt()); |
b5ee47fb | 437 | |
6fd5039f | 438 | DoJetLoop(); |
55264f20 | 439 | |
b12a85c3 | 440 | // ************ |
441 | // Random cones | |
442 | // _________________________________ | |
a55e4f1d | 443 | |
d41a0b1c | 444 | const Float_t rcArea = fJetRadius * fJetRadius * TMath::Pi(); |
445 | ||
b12a85c3 | 446 | // Simple random cones |
447 | Float_t RCpt = 0; | |
448 | Float_t RCeta = 0; | |
449 | Float_t RCphi = 0; | |
450 | GetRigidCone(RCpt, RCeta, RCphi, kFALSE, 0); | |
451 | if (RCpt > 0) { | |
d41a0b1c | 452 | fHistRCPt[fCentBin]->Fill(RCpt / rcArea); |
453 | fHistDeltaPtRC[fCentBin]->Fill(RCpt - rcArea * fRho); | |
b12a85c3 | 454 | } |
455 | ||
456 | // Random cones far from leading jet | |
457 | Float_t RCptExLJ = 0; | |
458 | Float_t RCetaExLJ = 0; | |
459 | Float_t RCphiExLJ = 0; | |
460 | GetRigidCone(RCptExLJ, RCetaExLJ, RCphiExLJ, kFALSE, jet); | |
461 | if (RCptExLJ > 0) { | |
462 | fHistRCPhiEta->Fill(RCetaExLJ, RCphiExLJ); | |
d41a0b1c | 463 | fHistRhoVSRCPt->Fill(fRho, RCptExLJ / rcArea); |
b5ee47fb | 464 | |
465 | Float_t dphi = RCphiExLJ - jet->Phi(); | |
466 | if (dphi > 4.8) dphi -= TMath::Pi() * 2; | |
467 | if (dphi < -1.6) dphi += TMath::Pi() * 2; | |
468 | fHistRCPtExLJVSDPhiLJ->Fill(RCptExLJ, dphi); | |
b12a85c3 | 469 | |
d41a0b1c | 470 | fHistRCPtExLJ[fCentBin]->Fill(RCptExLJ / rcArea); |
471 | fHistDeltaPtRCExLJ[fCentBin]->Fill(RCptExLJ - rcArea * fRho); | |
b12a85c3 | 472 | } |
473 | ||
474 | // Random cones with randomized particles | |
475 | Float_t RCptRand = 0; | |
476 | Float_t RCetaRand = 0; | |
477 | Float_t RCphiRand = 0; | |
478 | GetRigidCone(RCptRand, RCetaRand, RCphiRand, kTRUE, 0, fRandTracks, fRandCaloClusters); | |
479 | if (RCptRand > 0) { | |
d41a0b1c | 480 | fHistRCPtRand[fCentBin]->Fill(RCptRand / rcArea); |
481 | fHistDeltaPtRCRand[fCentBin]->Fill(RCptRand - rcArea * fRho); | |
a55e4f1d | 482 | } |
2bee31e9 | 483 | |
b12a85c3 | 484 | // ************ |
485 | // Embedding | |
486 | // _________________________________ | |
487 | ||
df43b607 | 488 | if (!fEmbJets) |
6fd5039f | 489 | return kTRUE; |
df43b607 | 490 | |
b12a85c3 | 491 | AliEmcalJet *embJet = 0; |
b5ee47fb | 492 | TObject *maxPart = 0; |
2bee31e9 | 493 | |
b12a85c3 | 494 | DoEmbJetLoop(embJet, maxPart); |
2bee31e9 | 495 | |
fb9ac42f | 496 | if (embJet) { |
497 | ||
498 | fHistEmbJets[fCentBin]->Fill(embJet->Pt()); | |
499 | fHistEmbPart[fCentBin]->Fill(embJet->MCPt()); | |
500 | fHistEmbJetPhiEta->Fill(embJet->Eta(), embJet->Phi()); | |
501 | fHistDeltaPtEmb[fCentBin]->Fill(embJet->Pt() - embJet->Area() * fRho - embJet->MCPt()); | |
502 | fHistRhoVSEmbBkg->Fill(embJet->Area() * fRho, embJet->Pt() - embJet->MCPt()); | |
b12a85c3 | 503 | |
504 | AliVCluster *cluster = dynamic_cast<AliVCluster*>(maxPart); | |
b5ee47fb | 505 | if (cluster) { |
b5ee47fb | 506 | Float_t pos[3]; |
507 | cluster->GetPosition(pos); | |
508 | TVector3 clusVec(pos); | |
509 | ||
fb9ac42f | 510 | fHistEmbPartPhiEta->Fill(clusVec.Eta(), clusVec.Phi()); |
b5ee47fb | 511 | } |
b5ee47fb | 512 | else { |
6fd5039f | 513 | AliVTrack *track = dynamic_cast<AliVTrack*>(maxPart); |
b12a85c3 | 514 | if (track) { |
fb9ac42f | 515 | fHistEmbPartPhiEta->Fill(track->Eta(), track->Phi()); |
b12a85c3 | 516 | } |
517 | else { | |
6fd5039f | 518 | AliWarning(Form("%s - Embedded particle type not found or not recognized (neither AliVCluster nor AliVTrack)!", GetName())); |
519 | return kTRUE; | |
b12a85c3 | 520 | } |
b5ee47fb | 521 | } |
b12a85c3 | 522 | |
2bee31e9 | 523 | } |
524 | else { | |
fb9ac42f | 525 | AliWarning(Form("%s - Embedded jet not found in the event!", GetName())); |
2bee31e9 | 526 | } |
6fd5039f | 527 | |
528 | return kTRUE; | |
55264f20 | 529 | } |
530 | ||
531 | //________________________________________________________________________ | |
6fd5039f | 532 | void AliAnalysisTaskSAJF::GetLeadingJets(Int_t &maxJetIndex, Int_t &max2JetIndex) |
55264f20 | 533 | { |
16d143bd | 534 | // Get the leading jets. |
535 | ||
df43b607 | 536 | if (!fJets) |
537 | return; | |
538 | ||
16d143bd | 539 | const Int_t njets = fJets->GetEntriesFast(); |
55264f20 | 540 | |
541 | Float_t maxJetPt = 0; | |
542 | Float_t max2JetPt = 0; | |
25283b37 | 543 | for (Int_t ij = 0; ij < njets; ij++) { |
f0a0fd33 | 544 | |
df43b607 | 545 | AliEmcalJet* jet = dynamic_cast<AliEmcalJet*>(fJets->At(ij)); |
f0a0fd33 | 546 | |
25283b37 | 547 | if (!jet) { |
a55e4f1d | 548 | AliError(Form("Could not receive jet %d", ij)); |
25283b37 | 549 | continue; |
550 | } | |
f0a0fd33 | 551 | |
91f4b7c5 | 552 | if (!AcceptJet(jet)) |
553 | continue; | |
554 | ||
226f511d | 555 | Float_t corrPt = jet->Pt() - fRho * jet->Area(); |
556 | ||
6fd5039f | 557 | if (maxJetIndex == -1 || maxJetPt < corrPt) { |
558 | max2JetPt = maxJetPt; | |
559 | max2JetIndex = maxJetIndex; | |
560 | maxJetPt = corrPt; | |
561 | maxJetIndex = ij; | |
b12a85c3 | 562 | } |
6fd5039f | 563 | else if (max2JetIndex == -1 || max2JetPt < corrPt) { |
564 | max2JetPt = corrPt; | |
565 | max2JetIndex = ij; | |
b12a85c3 | 566 | } |
16d143bd | 567 | } |
6fd5039f | 568 | } |
569 | ||
6fd5039f | 570 | //________________________________________________________________________ |
571 | void AliAnalysisTaskSAJF::DoJetLoop() | |
572 | { | |
16d143bd | 573 | // Do the jet loop. |
574 | ||
6fd5039f | 575 | if (!fJets) |
576 | return; | |
577 | ||
16d143bd | 578 | const Int_t njets = fJets->GetEntriesFast(); |
6fd5039f | 579 | |
580 | for (Int_t ij = 0; ij < njets; ij++) { | |
581 | ||
582 | AliEmcalJet* jet = dynamic_cast<AliEmcalJet*>(fJets->At(ij)); | |
583 | ||
584 | if (!jet) { | |
585 | AliError(Form("Could not receive jet %d", ij)); | |
586 | continue; | |
587 | } | |
588 | ||
589 | if (!AcceptJet(jet)) | |
590 | continue; | |
591 | ||
592 | Float_t corrPt = jet->Pt() - fRho * jet->Area(); | |
226f511d | 593 | |
11d4d636 | 594 | fHistJetsPt[fCentBin]->Fill(jet->Pt()); |
df43b607 | 595 | fHistJetsPtArea[fCentBin]->Fill(corrPt, jet->Area()); |
11d4d636 | 596 | fHistCorrJetsPt[fCentBin]->Fill(corrPt); |
f0a0fd33 | 597 | |
df43b607 | 598 | fHistJetPhiEta[fCentBin]->Fill(jet->Eta(), jet->Phi()); |
b12a85c3 | 599 | |
600 | if (fAnaType == kEMCAL) | |
601 | fHistJetsNEFvsPt[fCentBin]->Fill(jet->NEF(), jet->Pt()); | |
226f511d | 602 | |
6e8d91c9 | 603 | if (fTracks) { |
604 | for (Int_t it = 0; it < jet->GetNumberOfTracks(); it++) { | |
605 | AliVParticle *track = jet->TrackAt(it, fTracks); | |
606 | if (track) | |
607 | fHistJetsZvsPt[fCentBin]->Fill(track->Pt() / jet->Pt(), jet->Pt()); | |
608 | } | |
35789a2d | 609 | } |
a55e4f1d | 610 | |
6e8d91c9 | 611 | if (fCaloClusters) { |
612 | for (Int_t ic = 0; ic < jet->GetNumberOfClusters(); ic++) { | |
613 | AliVCluster *cluster = jet->ClusterAt(ic, fCaloClusters); | |
614 | ||
615 | if (cluster) { | |
616 | TLorentzVector nPart; | |
617 | cluster->GetMomentum(nPart, fVertex); | |
df43b607 | 618 | fHistJetsZvsPt[fCentBin]->Fill(nPart.Et() / jet->Pt(), jet->Pt()); |
6e8d91c9 | 619 | } |
55264f20 | 620 | } |
f0a0fd33 | 621 | } |
25283b37 | 622 | } //jet loop |
55264f20 | 623 | } |
e82e282c | 624 | |
55264f20 | 625 | //________________________________________________________________________ |
b12a85c3 | 626 | void AliAnalysisTaskSAJF::DoEmbJetLoop(AliEmcalJet* &embJet, TObject* &maxPart) |
55264f20 | 627 | { |
16d143bd | 628 | // Do the embedded jet loop. |
629 | ||
df43b607 | 630 | if (!fEmbJets) |
631 | return; | |
632 | ||
fb9ac42f | 633 | TLorentzVector maxClusVect; |
2bee31e9 | 634 | |
df43b607 | 635 | Int_t nembjets = fEmbJets->GetEntriesFast(); |
2bee31e9 | 636 | |
2bee31e9 | 637 | for (Int_t ij = 0; ij < nembjets; ij++) { |
638 | ||
df43b607 | 639 | AliEmcalJet* jet = dynamic_cast<AliEmcalJet*>(fEmbJets->At(ij)); |
2bee31e9 | 640 | |
641 | if (!jet) { | |
642 | AliError(Form("Could not receive jet %d", ij)); | |
643 | continue; | |
644 | } | |
645 | ||
df43b607 | 646 | if (!AcceptJet(jet)) |
647 | continue; | |
2bee31e9 | 648 | |
fb9ac42f | 649 | if (!jet->IsMC()) |
650 | continue; | |
651 | ||
df43b607 | 652 | AliVParticle *maxTrack = 0; |
2bee31e9 | 653 | |
b12a85c3 | 654 | for (Int_t it = 0; it < jet->GetNumberOfTracks(); it++) { |
df43b607 | 655 | AliVParticle *track = jet->TrackAt(it, fTracks); |
b12a85c3 | 656 | |
fb9ac42f | 657 | if (!track) |
658 | continue; | |
659 | ||
1f6fff78 | 660 | if (track->GetLabel() != 100) |
fb9ac42f | 661 | continue; |
b12a85c3 | 662 | |
663 | if (!maxTrack || track->Pt() > maxTrack->Pt()) | |
664 | maxTrack = track; | |
2bee31e9 | 665 | } |
2bee31e9 | 666 | |
b12a85c3 | 667 | AliVCluster *maxClus = 0; |
2bee31e9 | 668 | |
b12a85c3 | 669 | for (Int_t ic = 0; ic < jet->GetNumberOfClusters(); ic++) { |
670 | AliVCluster *cluster = jet->ClusterAt(ic, fCaloClusters); | |
671 | ||
fb9ac42f | 672 | if (!cluster) |
673 | continue; | |
674 | ||
675 | if (cluster->Chi2() != 100) | |
676 | continue; | |
b12a85c3 | 677 | |
678 | TLorentzVector nPart; | |
679 | cluster->GetMomentum(nPart, fVertex); | |
680 | ||
fb9ac42f | 681 | if (!maxClus || nPart.Et() > maxClusVect.Et()) { |
682 | new (&maxClusVect) TLorentzVector(nPart); | |
b12a85c3 | 683 | maxClus = cluster; |
684 | } | |
685 | } | |
2bee31e9 | 686 | |
fb9ac42f | 687 | if ((maxClus && maxTrack && maxClusVect.Et() > maxTrack->Pt()) || (maxClus && !maxTrack)) { |
688 | maxPart = maxClus; | |
689 | embJet = jet; | |
b12a85c3 | 690 | } |
691 | else if (maxTrack) { | |
fb9ac42f | 692 | maxPart = maxTrack; |
693 | embJet = jet; | |
b12a85c3 | 694 | } |
b12a85c3 | 695 | |
fb9ac42f | 696 | return; // MC jets found, exit |
697 | } | |
2bee31e9 | 698 | } |
699 | ||
a55e4f1d | 700 | //________________________________________________________________________ |
b12a85c3 | 701 | void AliAnalysisTaskSAJF::GetRigidCone(Float_t &pt, Float_t &eta, Float_t &phi, Bool_t acceptMC, |
702 | AliEmcalJet *jet, TClonesArray* tracks, TClonesArray* clusters) const | |
a55e4f1d | 703 | { |
16d143bd | 704 | // Get rigid cone. |
705 | ||
b12a85c3 | 706 | if (!tracks) |
707 | tracks = fTracks; | |
a55e4f1d | 708 | |
b12a85c3 | 709 | if (!clusters) |
710 | clusters = fCaloClusters; | |
a55e4f1d | 711 | |
df43b607 | 712 | if (!tracks && !clusters) |
713 | return; | |
714 | ||
b5ee47fb | 715 | eta = 0; |
716 | phi = 0; | |
b12a85c3 | 717 | pt = 0; |
a55e4f1d | 718 | |
719 | Float_t LJeta = 999; | |
720 | Float_t LJphi = 999; | |
721 | ||
722 | if (jet) { | |
723 | LJeta = jet->Eta(); | |
724 | LJphi = jet->Phi(); | |
725 | } | |
726 | ||
1f6fff78 | 727 | Float_t maxEta = fMaxEta; |
728 | Float_t minEta = fMinEta; | |
729 | Float_t maxPhi = fMaxPhi; | |
730 | Float_t minPhi = fMinPhi; | |
b5ee47fb | 731 | |
732 | if (maxPhi > TMath::Pi() * 2) maxPhi = TMath::Pi() * 2; | |
733 | if (minPhi < 0) minPhi = 0; | |
734 | ||
a55e4f1d | 735 | Float_t dLJ = 0; |
b12a85c3 | 736 | Int_t repeats = 0; |
a55e4f1d | 737 | do { |
b12a85c3 | 738 | eta = gRandom->Rndm() * (maxEta - minEta) + minEta; |
739 | phi = gRandom->Rndm() * (maxPhi - minPhi) + minPhi; | |
a55e4f1d | 740 | dLJ = TMath::Sqrt((LJeta - eta) * (LJeta - eta) + (LJphi - phi) * (LJphi - phi)); |
b12a85c3 | 741 | repeats++; |
742 | } while (dLJ < fMinRC2LJ && repeats < 999); | |
743 | ||
744 | if (repeats == 999) | |
745 | return; | |
b5ee47fb | 746 | |
df43b607 | 747 | if (fAnaType == kEMCAL && clusters) { |
b12a85c3 | 748 | Int_t nclusters = clusters->GetEntriesFast(); |
b5ee47fb | 749 | for (Int_t iClusters = 0; iClusters < nclusters; iClusters++) { |
b12a85c3 | 750 | AliVCluster* cluster = dynamic_cast<AliVCluster*>(clusters->At(iClusters)); |
b5ee47fb | 751 | if (!cluster) { |
752 | AliError(Form("Could not receive cluster %d", iClusters)); | |
753 | continue; | |
754 | } | |
755 | ||
756 | if (!(cluster->IsEMCAL())) continue; | |
757 | ||
b12a85c3 | 758 | if (!AcceptCluster(cluster, acceptMC)) continue; |
b5ee47fb | 759 | |
760 | TLorentzVector nPart; | |
b12a85c3 | 761 | cluster->GetMomentum(nPart, const_cast<Double_t*>(fVertex)); |
b5ee47fb | 762 | |
763 | Float_t pos[3]; | |
764 | cluster->GetPosition(pos); | |
765 | TVector3 clusVec(pos); | |
766 | ||
767 | Float_t d = TMath::Sqrt((clusVec.Eta() - eta) * (clusVec.Eta() - eta) + (clusVec.Phi() - phi) * (clusVec.Phi() - phi)); | |
768 | ||
769 | if (d <= fJetRadius) | |
770 | pt += nPart.Pt(); | |
771 | } | |
a55e4f1d | 772 | } |
773 | ||
df43b607 | 774 | if (tracks) { |
775 | Int_t ntracks = tracks->GetEntriesFast(); | |
776 | for(Int_t iTracks = 0; iTracks < ntracks; iTracks++) { | |
6fd5039f | 777 | AliVTrack* track = dynamic_cast<AliVTrack*>(tracks->At(iTracks)); |
df43b607 | 778 | if(!track) { |
779 | AliError(Form("Could not retrieve track %d",iTracks)); | |
780 | continue; | |
781 | } | |
782 | ||
783 | if (!AcceptTrack(track, acceptMC)) continue; | |
784 | ||
785 | Float_t tracketa = track->Eta(); | |
786 | Float_t trackphi = track->Phi(); | |
787 | ||
788 | if (TMath::Abs(trackphi - phi) > TMath::Abs(trackphi - phi + 2 * TMath::Pi())) | |
789 | trackphi += 2 * TMath::Pi(); | |
790 | if (TMath::Abs(trackphi - phi) > TMath::Abs(trackphi - phi - 2 * TMath::Pi())) | |
791 | trackphi -= 2 * TMath::Pi(); | |
792 | ||
793 | Float_t d = TMath::Sqrt((tracketa - eta) * (tracketa - eta) + (trackphi - phi) * (trackphi - phi)); | |
a55e4f1d | 794 | |
df43b607 | 795 | if (d <= fJetRadius) |
796 | pt += track->Pt(); | |
797 | } | |
25283b37 | 798 | } |
f0a0fd33 | 799 | } |
a55e4f1d | 800 | //________________________________________________________________________ |
df43b607 | 801 | void AliAnalysisTaskSAJF::Init() |
25283b37 | 802 | { |
16d143bd | 803 | // Initialize the analysis. |
804 | ||
6fd5039f | 805 | AliAnalysisTaskEmcalJet::Init(); |
25283b37 | 806 | |
16d143bd | 807 | const Float_t semiDiag = TMath::Sqrt((fMaxPhi - fMinPhi) * (fMaxPhi - fMinPhi) + |
808 | (fMaxEta - fMinEta) * (fMaxEta - fMinEta)) / 2; | |
df43b607 | 809 | if (fMinRC2LJ > semiDiag * 0.5) { |
16d143bd | 810 | AliWarning(Form("The parameter fMinRC2LJ = %f is too large for the considered acceptance. " |
811 | "Will use fMinRC2LJ = %f", fMinRC2LJ, semiDiag * 0.5)); | |
df43b607 | 812 | fMinRC2LJ = semiDiag * 0.5; |
b12a85c3 | 813 | } |
25283b37 | 814 | } |
815 | ||
816 | //________________________________________________________________________ | |
00514d01 | 817 | void AliAnalysisTaskSAJF::Terminate(Option_t *) |
25283b37 | 818 | { |
819 | // Called once at the end of the analysis. | |
820 | } |