AliPhysics  master (3d17d9d)
AliAnalysisTaskRhoBase.cxx
Go to the documentation of this file.
1 /************************************************************************************
2  * Copyright (C) 2012, Copyright Holders of the ALICE Collaboration *
3  * All rights reserved. *
4  * *
5  * Redistribution and use in source and binary forms, with or without *
6  * modification, are permitted provided that the following conditions are met: *
7  * * Redistributions of source code must retain the above copyright *
8  * notice, this list of conditions and the following disclaimer. *
9  * * Redistributions in binary form must reproduce the above copyright *
10  * notice, this list of conditions and the following disclaimer in the *
11  * documentation and/or other materials provided with the distribution. *
12  * * Neither the name of the <organization> nor the *
13  * names of its contributors may be used to endorse or promote products *
14  * derived from this software without specific prior written permission. *
15  * *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND *
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
19  * DISCLAIMED. IN NO EVENT SHALL ALICE COLLABORATION BE LIABLE FOR ANY *
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
26  ************************************************************************************/
27 #include <TFile.h>
28 #include <TF1.h>
29 #include <TH1F.h>
30 #include <TH2F.h>
31 #include <TH3F.h>
32 #include <TClonesArray.h>
33 #include <TGrid.h>
34 
35 #include "AliLog.h"
36 #include "AliRhoParameter.h"
37 #include "AliEmcalJet.h"
38 #include "AliParticleContainer.h"
39 #include "AliClusterContainer.h"
40 #include "AliVVZERO.h"
41 
42 #include "AliAnalysisTaskRhoBase.h"
43 
44 ClassImp(AliAnalysisTaskRhoBase)
45 
48  fOutRhoName(),
49  fOutRhoScaledName(),
50  fCompareRhoName(),
51  fCompareRhoScaledName(),
52  fRhoFunction(0),
53  fScaleFunction(0),
54  fInEventSigmaRho(35.83),
55  fAttachToEvent(kTRUE),
56  fIsPbPb(kTRUE),
57  fOutRho(0),
58  fOutRhoScaled(0),
59  fCompareRho(0),
60  fCompareRhoScaled(0),
61  fHistJetPtvsCent(0),
62  fHistJetAreavsCent(0),
63  fHistJetRhovsCent(0),
64  fHistNjetvsCent(0),
65  fHistJetPtvsNtrack(0),
66  fHistJetAreavsNtrack(0),
67  fHistNjetvsNtrack(0),
68  fHistRhovsCent(0),
69  fHistRhoScaledvsCent(0),
70  fHistDeltaRhovsCent(0),
71  fHistDeltaRhoScalevsCent(0),
72  fHistRhovsNtrackvsV0Mult(0),
73  fHistRhoScaledvsNtrackvsV0Mult(0),
74  fHistDeltaRhovsNtrack(0),
75  fHistDeltaRhoScalevsNtrack(0),
76  fHistRhovsNcluster(0),
77  fHistRhoScaledvsNcluster(0)
78 {
79  for (Int_t i = 0; i < 4; i++) {
80  fHistJetNconstVsPt[i] = 0;
81  fHistJetRhovsEta[i] = 0;
82  }
83  for (Int_t i = 0; i < 12; i++) {
84  fHistNjUEoverNjVsNj[i] = 0;
85  }
86 }
87 
89  AliAnalysisTaskEmcalJet(name, histo),
90  fOutRhoName(),
91  fOutRhoScaledName(),
92  fCompareRhoName(),
93  fCompareRhoScaledName(),
94  fRhoFunction(0),
95  fScaleFunction(0),
96  fInEventSigmaRho(35.83),
97  fAttachToEvent(kTRUE),
98  fIsPbPb(kTRUE),
99  fOutRho(0),
100  fOutRhoScaled(0),
101  fCompareRho(0),
102  fCompareRhoScaled(0),
103  fHistJetPtvsCent(0),
104  fHistJetAreavsCent(0),
105  fHistJetRhovsCent(0),
106  fHistNjetvsCent(0),
107  fHistJetPtvsNtrack(0),
108  fHistJetAreavsNtrack(0),
109  fHistNjetvsNtrack(0),
110  fHistRhovsCent(0),
111  fHistRhoScaledvsCent(0),
112  fHistDeltaRhovsCent(0),
113  fHistDeltaRhoScalevsCent(0),
114  fHistRhovsNtrackvsV0Mult(0),
115  fHistRhoScaledvsNtrackvsV0Mult(0),
116  fHistDeltaRhovsNtrack(0),
117  fHistDeltaRhoScalevsNtrack(0),
118  fHistRhovsNcluster(0),
119  fHistRhoScaledvsNcluster(0)
120 {
121  for (Int_t i = 0; i < 4; i++) {
122  fHistJetNconstVsPt[i] = 0;
123  fHistJetRhovsEta[i] = 0;
124  }
125  for (Int_t i = 0; i < 12; i++) {
126  fHistNjUEoverNjVsNj[i] = 0;
127  }
129 }
130 
132 {
133  if (!fCreateHisto)
134  return;
135 
137  //ranges for PbPb
138  Float_t Ntrackrange[2] = {0, 6000};
139  Float_t V0Mult[2] = {0.,25000.};
140  if(!fIsPbPb){
141  //set multiplicity related axes to a smaller max value
142  Ntrackrange[1] = 200.;
143  V0Mult[1] = 2000.;
144  }
145 
146  fHistRhovsCent = new TH2F("fHistRhovsCent", "fHistRhovsCent", 101, -1, 100, fNbins, fMinBinPt, fMaxBinPt*2);
147  fHistRhovsCent->GetXaxis()->SetTitle("Centrality (%)");
148  fHistRhovsCent->GetYaxis()->SetTitle("#rho (GeV/c * rad^{-1})");
149  fOutput->Add(fHistRhovsCent);
150 
151  if (fParticleCollArray.GetEntriesFast()>0) {
152  fHistRhovsNtrackvsV0Mult = new TH3F("fHistRhovsNtrackvsV0Mult", "fHistRhovsNtrackvsV0Mult", 150, Ntrackrange[0], Ntrackrange[1], fNbins, fMinBinPt, fMaxBinPt*2,100, V0Mult[0], V0Mult[1]);
153  fHistRhovsNtrackvsV0Mult->GetXaxis()->SetTitle("No. of tracks");
154  fHistRhovsNtrackvsV0Mult->GetYaxis()->SetTitle("#rho (GeV/c * rad^{-1})");
155  fHistRhovsNtrackvsV0Mult->GetZaxis()->SetTitle("V0 mult");
157  }
158 
159  if (fClusterCollArray.GetEntriesFast()>0) {
160  fHistRhovsNcluster = new TH2F("fHistRhovsNcluster", "fHistRhovsNcluster", 50, 0, 1500, fNbins, fMinBinPt, fMaxBinPt*2);
161  fHistRhovsNcluster->GetXaxis()->SetTitle("No. of clusters");
162  fHistRhovsNcluster->GetYaxis()->SetTitle("#rho (GeV/c * rad^{-1})");
164  }
165 
166  if (fJetCollArray.GetEntriesFast()>0) {
167  fHistJetPtvsCent = new TH2F("fHistJetPtvsCent", "fHistJetPtvsCent", 101, -1, 100, fNbins, fMinBinPt, fMaxBinPt);
168  fHistJetPtvsCent->GetXaxis()->SetTitle("Centrality (%)");
169  fHistJetPtvsCent->GetYaxis()->SetTitle("#it{p}_{T,jet} (GeV/c)");
171 
172  fHistJetAreavsCent = new TH2F("fHistJetAreavsCent", "fHistJetAreavsCent", 101, -1, 100, 100, 0, 1);
173  fHistJetAreavsCent->GetXaxis()->SetTitle("Centrality (%)");
174  fHistJetAreavsCent->GetYaxis()->SetTitle("Jet area");
176 
177  fHistJetRhovsCent = new TH2F("fHistJetRhovsCent", "fHistJetRhovsCent", 101, -1, 100, fNbins, fMinBinPt, fMaxBinPt*2);
178  fHistJetRhovsCent->GetXaxis()->SetTitle("Centrality (%)");
179  fHistJetRhovsCent->GetYaxis()->SetTitle("Jet #rho (GeV/c)");
181 
182  fHistNjetvsCent = new TH2F("fHistNjetvsCent", "fHistNjetvsCent", 101, -1, 100, 150, -0.5, 149.5);
183  fHistNjetvsCent->GetXaxis()->SetTitle("Centrality (%)");
184  fHistNjetvsCent->GetYaxis()->SetTitle("No. of jets");
185  fOutput->Add(fHistNjetvsCent);
186 
187 
188  if (fParticleCollArray.GetEntriesFast()>0) {
189  fHistJetPtvsNtrack = new TH2F("fHistJetPtvsNtrack", "fHistJetPtvsNtrack", 150, Ntrackrange[0], Ntrackrange[1], fNbins, fMinBinPt, fMaxBinPt);
190  fHistJetPtvsNtrack->GetXaxis()->SetTitle("No. of tracks");
191  fHistJetPtvsNtrack->GetYaxis()->SetTitle("#it{p}_{T,jet} (GeV/c)");
193 
194  fHistJetAreavsNtrack = new TH2F("fHistJetAreavsNtrack", "fHistJetAreavsNtrack", 150, Ntrackrange[0], Ntrackrange[1], 100, 0, 1);
195  fHistJetAreavsNtrack->GetXaxis()->SetTitle("No. of tracks");
196  fHistJetAreavsNtrack->GetYaxis()->SetTitle("Jet area");
198 
199  fHistNjetvsNtrack = new TH2F("fHistNjetvsNtrack", "fHistNjetvsNtrack", 150, Ntrackrange[0], Ntrackrange[1], 150, -0.5, 149.5);
200  fHistNjetvsNtrack->GetXaxis()->SetTitle("No. of tracks");
201  fHistNjetvsNtrack->GetYaxis()->SetTitle("No. of jets");
203  }
204 
205 
206  TString name;
207  for (Int_t i = 0; i < 4; i++) {
208  name = Form("fHistJetNconstVsPt_%d",i);
209  fHistJetNconstVsPt[i] = new TH2F(name, name, 150, -0.5, 149.5, fNbins, fMinBinPt, fMaxBinPt);
210  fHistJetNconstVsPt[i]->GetXaxis()->SetTitle("No. of constituents");
211  fHistJetNconstVsPt[i]->GetYaxis()->SetTitle("p_{T,jet} (GeV/c)");
212  fOutput->Add(fHistJetNconstVsPt[i]);
213 
214  name = Form("fHistJetRhovsEta_%d",i);
215  fHistJetRhovsEta[i] = new TH2F(name, name, fNbins, fMinBinPt, fMaxBinPt*2, 16, -0.8, 0.8);
216  fHistJetRhovsEta[i]->GetXaxis()->SetTitle("#rho (GeV/c * rad^{-1})");
217  fHistJetRhovsEta[i]->GetYaxis()->SetTitle("#eta");
218  fOutput->Add(fHistJetRhovsEta[i]);
219 
220  for (Int_t j = 0; j < 3; j++) {
221  name = Form("NjUEoverNjVsNj_%d_%d",i,j+1);
222  fHistNjUEoverNjVsNj[i*3+j] = new TH2F(name, name, 150, -0.5, 149.5, 120, 0.01, 1.21);
223  fHistNjUEoverNjVsNj[i*3+j]->GetXaxis()->SetTitle("N_{jet}");
224  fHistNjUEoverNjVsNj[i*3+j]->GetYaxis()->SetTitle("N_{jet_{UE}} / N_{jet}");
225  fOutput->Add(fHistNjUEoverNjVsNj[i*3+j]);
226  }
227  }
228  }
229 
230  if (!fCompareRhoName.IsNull()) {
231  fHistDeltaRhovsCent = new TH2F("fHistDeltaRhovsCent", "fHistDeltaRhovsCent", 101, -1, 100, fNbins, -fMaxBinPt, fMaxBinPt);
232  fHistDeltaRhovsCent->GetXaxis()->SetTitle("Centrality (%)");
233  fHistDeltaRhovsCent->GetYaxis()->SetTitle("#Delta#rho (GeV/c * rad^{-1})");
235 
236  if (fParticleCollArray.GetEntriesFast()>0) {
237  fHistDeltaRhovsNtrack = new TH2F("fHistDeltaRhovsNtrack", "fHistDeltaRhovsNtrack", 150, Ntrackrange[0], Ntrackrange[1], fNbins, -fMaxBinPt, fMaxBinPt);
238  fHistDeltaRhovsNtrack->GetXaxis()->SetTitle("No. of tracks");
239  fHistDeltaRhovsNtrack->GetYaxis()->SetTitle("#Delta#rho (GeV/c * rad^{-1})");
241  }
242  }
243 
244  if (fScaleFunction) {
245  fHistRhoScaledvsCent = new TH2F("fHistRhoScaledvsCent", "fHistRhoScaledvsCent", 101, -1, 100, fNbins, fMinBinPt , fMaxBinPt*2);
246  fHistRhoScaledvsCent->GetXaxis()->SetTitle("Centrality (%)");
247  fHistRhoScaledvsCent->GetYaxis()->SetTitle("#rho_{scaled} (GeV/c * rad^{-1})");
249 
250  if (fParticleCollArray.GetEntriesFast()>0) {
251  fHistRhoScaledvsNtrackvsV0Mult = new TH3F("fHistRhoScaledvsNtrackvsV0Mult", "fHistRhoScaledvsNtrackvsV0Mult", 150, Ntrackrange[0], Ntrackrange[1], fNbins, fMinBinPt, fMaxBinPt*2,100, V0Mult[0], V0Mult[1]);
252  fHistRhoScaledvsNtrackvsV0Mult->GetXaxis()->SetTitle("No. of tracks");
253  fHistRhoScaledvsNtrackvsV0Mult->GetYaxis()->SetTitle("#rho (GeV/c * rad^{-1})");
254  fHistRhoScaledvsNtrackvsV0Mult->GetZaxis()->SetTitle("V0 mult");
256  }
257 
258  if (fClusterCollArray.GetEntriesFast()>0) {
259  fHistRhoScaledvsNcluster = new TH2F("fHistRhoScaledvsNcluster", "fHistRhoScaledvsNcluster", 50, 0, 1500, fNbins, fMinBinPt, fMaxBinPt*2);
260  fHistRhoScaledvsNcluster->GetXaxis()->SetTitle("No. of clusters");
261  fHistRhoScaledvsNcluster->GetYaxis()->SetTitle("#rho_{scaled} (GeV/c * rad^{-1})");
263  }
264 
265  if (!fCompareRhoScaledName.IsNull()) {
266  fHistDeltaRhoScalevsCent = new TH2F("fHistDeltaRhoScalevsCent", "fHistDeltaRhoScalevsCent", 101, -1, 100, fNbins, -fMaxBinPt, fMaxBinPt);
267  fHistDeltaRhoScalevsCent->GetXaxis()->SetTitle("Centrality (%)");
268  fHistDeltaRhoScalevsCent->GetYaxis()->SetTitle("#Delta#rho_{scaled} (GeV/c * rad^{-1})");
270 
271  if (fParticleCollArray.GetEntriesFast()>0) {
272  fHistDeltaRhoScalevsNtrack = new TH2F("fHistDeltaRhoScalevsNtrack", "fHistDeltaRhoScalevsNtrack", 150, Ntrackrange[0], Ntrackrange[1], fNbins, -fMaxBinPt, fMaxBinPt);
273  fHistDeltaRhoScalevsNtrack->GetXaxis()->SetTitle("No. of tracks");
274  fHistDeltaRhoScalevsNtrack->GetYaxis()->SetTitle("#Delta#rho_{scaled} (GeV/c * rad^{-1})");
276  }
277  }
278  }
279 }
280 
282 {
283  Double_t rho = GetRhoFactor(fCent);
284  fOutRho->SetVal(rho);
285 
286  if (fScaleFunction) {
287  Double_t rhoScaled = rho * GetScaleFactor(fCent);
288  fOutRhoScaled->SetVal(rhoScaled);
289  }
290 
291  return kTRUE;
292 }
293 
295 {
296  Int_t Ntracks = 0;
297  Int_t Nclusters = 0;
298 
299  AliVVZERO* vV0 = InputEvent()->GetVZEROData();
300  Float_t multV0A = -1.;
301  Float_t multV0C = -1.;
302  if(vV0) {
303  multV0A = vV0->GetMTotV0A();
304  multV0C = vV0->GetMTotV0C();
305  }
306 
307  // Loop over all possible contianers
308  AliParticleContainer * partCont = 0;
309  TIter nextPartCont(&fParticleCollArray);
310  while ((partCont = static_cast<AliParticleContainer*>(nextPartCont()))) {
311  Ntracks += partCont->GetNAcceptedParticles();
312  }
313  AliClusterContainer * clusCont = 0;
314  TIter nextClusCont(&fClusterCollArray);
315  while ((clusCont = static_cast<AliClusterContainer*>(nextClusCont()))) {
316  Nclusters += clusCont->GetNAcceptedClusters();
317  }
318 
319  if (fJets) {
320  Int_t Njets = fJets->GetEntries();
321  Int_t NjetAcc = 0;
322  Int_t NjetUE1Sigma = 0;
323  Int_t NjetUE2Sigma = 0;
324  Int_t NjetUE3Sigma = 0;
325  Double_t rhoPlus1Sigma = fOutRho->GetVal() + fInEventSigmaRho;
326  Double_t rhoPlus2Sigma = fOutRho->GetVal() + 2*fInEventSigmaRho;
327  Double_t rhoPlus3Sigma = fOutRho->GetVal() + 3*fInEventSigmaRho;
328 
329  for (Int_t i = 0; i < Njets; ++i) {
330 
331  AliEmcalJet *jet = static_cast<AliEmcalJet*>(fJets->At(i));
332  if (!jet) {
333  AliError(Form("%s: Could not receive jet %d", GetName(), i));
334  continue;
335  }
336 
337  if (!AcceptJet(jet))
338  continue;
339 
340  fHistJetPtvsCent->Fill(fCent, jet->Pt());
341  fHistJetAreavsCent->Fill(fCent, jet->Area());
342  fHistJetRhovsCent->Fill(fCent, jet->Pt() / jet->Area());
343  fHistJetRhovsEta[fCentBin]->Fill(jet->Pt() / jet->Area(), jet->Eta());
344 
345  if (fTracks) {
346  fHistJetPtvsNtrack->Fill(Ntracks, jet->Pt());
347  fHistJetAreavsNtrack->Fill(Ntracks, jet->Area());
348  }
349 
350  fHistJetNconstVsPt[fCentBin]->Fill(jet->GetNumberOfConstituents(), jet->Pt());
351 
352  if (jet->Pt() < rhoPlus1Sigma * jet->Area())
353  NjetUE1Sigma++;
354 
355  if (jet->Pt() < rhoPlus2Sigma * jet->Area())
356  NjetUE2Sigma++;
357 
358  if (jet->Pt() < rhoPlus3Sigma * jet->Area())
359  NjetUE3Sigma++;
360 
361  NjetAcc++;
362  }
363 
364  if (NjetAcc>0) {
365  fHistNjUEoverNjVsNj[fCentBin*3 ]->Fill(NjetAcc,1.*NjetUE1Sigma/NjetAcc);
366  fHistNjUEoverNjVsNj[fCentBin*3+1]->Fill(NjetAcc,1.*NjetUE2Sigma/NjetAcc);
367  fHistNjUEoverNjVsNj[fCentBin*3+2]->Fill(NjetAcc,1.*NjetUE3Sigma/NjetAcc);
368  }
369 
370  fHistNjetvsCent->Fill(fCent, NjetAcc);
371  if (fTracks)
372  fHistNjetvsNtrack->Fill(Ntracks, NjetAcc);
373  }
374 
375  fHistRhovsCent->Fill(fCent, fOutRho->GetVal());
376 
377  if (fTracks)
378  fHistRhovsNtrackvsV0Mult->Fill(Ntracks, fOutRho->GetVal(),multV0A+multV0C);
379  if (fCaloClusters)
380  fHistRhovsNcluster->Fill(Nclusters, fOutRho->GetVal());
381  if (fCompareRho) {
382  fHistDeltaRhovsCent->Fill(fCent, fOutRho->GetVal() - fCompareRho->GetVal());
383  if (fTracks)
384  fHistDeltaRhovsNtrack->Fill(Ntracks, fOutRho->GetVal() - fCompareRho->GetVal());
385  }
386 
387  if (fOutRhoScaled) {
388  fHistRhoScaledvsCent->Fill(fCent, fOutRhoScaled->GetVal());
389  if (fTracks)
390  fHistRhoScaledvsNtrackvsV0Mult->Fill(Ntracks, fOutRhoScaled->GetVal(),multV0A+multV0C);
391  if (fCaloClusters)
392  fHistRhoScaledvsNcluster->Fill(Nclusters, fOutRhoScaled->GetVal());
393  if (fCompareRhoScaled) {
394  fHistDeltaRhoScalevsCent->Fill(fCent, fOutRhoScaled->GetVal() - fCompareRhoScaled->GetVal());
395  if (fTracks)
396  fHistDeltaRhoScalevsNtrack->Fill(Ntracks, fOutRhoScaled->GetVal() - fCompareRhoScaled->GetVal());
397  }
398  }
399 
400  return kTRUE;
401 }
402 
403 
405 {
406  if (!fOutRho) {
408 
409  if (fAttachToEvent) {
410  if (!(InputEvent()->FindListObject(fOutRhoName))) {
411  InputEvent()->AddObject(fOutRho);
412  } else {
413  AliFatal(Form("%s: Container with same name %s already present. Aborting", GetName(), fOutRhoName.Data()));
414  return;
415  }
416  }
417  }
418 
419  if (fScaleFunction && !fOutRhoScaled) {
421 
422  if (fAttachToEvent) {
423  if (!(InputEvent()->FindListObject(fOutRhoScaledName))) {
424  InputEvent()->AddObject(fOutRhoScaled);
425  } else {
426  AliFatal(Form("%s: Container with same name %s already present. Aborting", GetName(), fOutRhoScaledName.Data()));
427  return;
428  }
429  }
430  }
431 
432  if (!fCompareRhoName.IsNull() && !fCompareRho) {
433  fCompareRho = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(fCompareRhoName));
434  if (!fCompareRho) {
435  AliWarning(Form("%s: Could not retrieve rho %s!", GetName(), fCompareRhoName.Data()));
436  }
437  }
438 
439  if (!fCompareRhoScaledName.IsNull() && !fCompareRhoScaled) {
440  fCompareRhoScaled = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(fCompareRhoScaledName));
441  if (!fCompareRhoScaled) {
442  AliWarning(Form("%s: Could not retrieve rho %s!", GetName(), fCompareRhoScaledName.Data()));
443  }
444  }
445 
447 }
448 
450 {
451  Double_t rho = 0;
452  if (fRhoFunction)
453  rho = fRhoFunction->Eval(cent);
454  return rho;
455 }
456 
458 {
459  Double_t scale = 1;
460  if (fScaleFunction)
461  scale = fScaleFunction->Eval(cent);
462  return scale;
463 }
464 
465 TF1* AliAnalysisTaskRhoBase::LoadRhoFunction(const char* path, const char* name)
466 {
467  TString fname(path);
468  if (fname.BeginsWith("alien://")) {
469  TGrid::Connect("alien://");
470  }
471 
472  TFile* file = TFile::Open(path);
473 
474  if (!file || file->IsZombie()) {
475  ::Error("AddTaskRho", "Could not open scale function file");
476  return 0;
477  }
478 
479  TF1* sfunc = dynamic_cast<TF1*>(file->Get(name));
480 
481  if (sfunc) {
482  ::Info("AliAnalysisTaskRhoBase::LoadRhoFunction", "Scale function %s loaded from file %s.", name, path);
483  }
484  else {
485  ::Error("AliAnalysisTaskRhoBase::LoadRhoFunction", "Scale function %s not found in file %s.", name, path);
486  return 0;
487  }
488 
489  fScaleFunction = static_cast<TF1*>(sfunc->Clone());
490 
491  file->Close();
492  delete file;
493 
494  return fScaleFunction;
495 }
AliRhoParameter * fCompareRho
! rho object to compare
Double_t Area() const
Definition: AliEmcalJet.h:130
TObjArray fClusterCollArray
cluster collection array
TH2F * fHistDeltaRhovsNtrack
rhoscaled vs. no. of tracks vs V0mult
double Double_t
Definition: External.C:58
Definition: External.C:260
TH2F * fHistDeltaRhoScalevsNtrack
delta rho vs. no. of tracks
TH2F * fHistNjetvsNtrack
! no. of jets vs. no. of tracks
Double_t fInEventSigmaRho
in-event sigma rho
Definition: External.C:236
Double_t Eta() const
Definition: AliEmcalJet.h:121
TString fCompareRhoScaledName
name of scaled rho object to compare
TString fOutRhoName
name of output rho object
TH2F * fHistNjetvsCent
! no. of jets vs. centrality
Double_t fMinBinPt
min pt in histograms
Int_t fCentBin
!event centrality bin
TF1 * LoadRhoFunction(const char *path, const char *name)
Load the scale function from a file.
void UserCreateOutputObjects()
User create output objects, called at the beginning of the analysis.
TH2F * fHistJetRhovsCent
! jet pt/area vs. centrality
Bool_t fAttachToEvent
whether or not attach rho to the event objects list
TH2F * fHistJetPtvsNtrack
! jet pt vs. no. of tracks
UShort_t GetNumberOfConstituents() const
Definition: AliEmcalJet.h:140
Container for particles within the EMCAL framework.
virtual Double_t GetRhoFactor(Double_t cent)
Access rho valie per centrality.
TObjArray fParticleCollArray
particle/track collection array
AliRhoParameter * fOutRhoScaled
! output scaled rho object
TClonesArray * fCaloClusters
!clusters
AliRhoParameter * fCompareRhoScaled
! scaled rho object to compare
int Int_t
Definition: External.C:63
TString fOutRhoScaledName
name of output scaled rho object
float Float_t
Definition: External.C:68
TString fCompareRhoName
name of rho object to compare
TH2F * fHistJetRhovsEta[4]
! rho vs. eta
Int_t GetNAcceptedClusters() const
Double_t fCent
!event centrality
Bool_t fIsPbPb
different histogram ranges for pp/pPb and PbPb
TH2F * fHistJetAreavsNtrack
! jet area vs. no. of tracks
TObjArray fJetCollArray
jet collection array
TClonesArray * fJets
! jets
TH3F * fHistRhovsNtrackvsV0Mult
! rho vs. no. of tracks vs V0mult
Double_t Pt() const
Definition: AliEmcalJet.h:109
TH2F * fHistRhoScaledvsCent
! rhoscaled vs. centrality
TH2F * fHistRhovsNcluster
delta rho scaled vs. no. of tracks
virtual Double_t GetScaleFactor(Double_t cent)
Get scale factor per centrality.
AliEmcalList * fOutput
!output list
TF1 * fRhoFunction
pre-computed rho as a function of centrality
Double_t fMaxBinPt
max pt in histograms
TH2F * fHistNjUEoverNjVsNj[12]
! ratio no. of jets below rho*A+sigma_rho over. no. of jets vs. no. of jets
TH2F * fHistJetAreavsCent
! jet area vs. centrality
TClonesArray * fTracks
!tracks
TH2F * fHistJetNconstVsPt[4]
! jet no. of constituents vs. pt
TF1 * fScaleFunction
pre-computed scale factor as a function of centrality
Bool_t Run()
Run the analysis.
TH2F * fHistRhoScaledvsNcluster
rho vs. no. of clusters
TH2F * fHistRhovsCent
! rho vs. centrality
TH2F * fHistJetPtvsCent
! jet pt vs. centrality
Bool_t fCreateHisto
whether or not create histograms
TFile * file
TList with histograms for a given trigger.
void SetMakeGeneralHistograms(Bool_t g)
Enable general histograms.
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
Bool_t FillHistograms()
Fill histograms.
void UserCreateOutputObjects()
Main initialization function on the worker.
virtual Bool_t AcceptJet(AliEmcalJet *jet, Int_t c=0)
bool Bool_t
Definition: External.C:53
Base class for rho calculation.
void ExecOnce()
Init the analysis.
Int_t GetNAcceptedParticles() const
AliRhoParameter * fOutRho
! output rho object
TH2F * fHistDeltaRhoScalevsCent
! delta rhoscaled vs. centrality
Container structure for EMCAL clusters.
Int_t fNbins
no. of pt bins
TH2F * fHistDeltaRhovsCent
! delta rho vs. centrality
AliAnalysisTaskRhoBase()
Dummy constructor, for ROOT I/O.