]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/vertexingHF/AliHFSystErr.cxx
Correction Framework updated: 1) new variable definition and binning, 2) swicth betwe...
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliHFSystErr.cxx
CommitLineData
0233abe6 1/**************************************************************************
2 * Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
27de2dfb 16/* $Id$ */
17
0233abe6 18/////////////////////////////////////////////////////////////
19//
20// Class to handle systematic errors for charm hadrons
21//
22// Usage:
5541b811 23// AliHFSystEff syst; // DECAY = 1 for D0, 2, for D+, 3 for D*
24// syst.SetRunNumber(YEAR); // YEAR = two last numbers of the year (is 10 for 2010)
25// syst.SetCollisionType(TYPE); // TYPE = 0 is pp, 1 is PbPb
26// syst.SetCentrality(CENT); // CENT is centrality, 0100 for MB, 020 (4080) for 0-20 (40-80) CC...
27// syst.Init(DECAY); // DECAY = 1 for D0, 2, for D+, 3 for D*
0233abe6 28// syst.DrawErrors(); // to see a plot of the error contributions
29// syst.GetTotalSystErr(pt); // to get the total err at pt
30//
31// Author: A.Dainese, andrea.dainese@pd.infn.it
32/////////////////////////////////////////////////////////////
33
34#include <TStyle.h>
35#include <TGraphAsymmErrors.h>
36#include <TMath.h>
37#include <TCanvas.h>
38#include <TH2F.h>
39#include <TLegend.h>
5ad8ad40 40#include <TColor.h>
0233abe6 41
5541b811 42#include "AliLog.h"
0233abe6 43#include "AliHFSystErr.h"
44
45
46ClassImp(AliHFSystErr)
47
48//--------------------------------------------------------------------------
49AliHFSystErr::AliHFSystErr(const Char_t* name, const Char_t* title) :
50TNamed(name,title),
51fNorm(0),
52fRawYield(0),
53fTrackingEff(0),
54fBR(0),
55fCutsEff(0),
56fPIDEff(0),
57fMCPtShape(0),
5541b811 58fPartAntipart(0),
59fRunNumber(10),
60fCollisionType(0),
a8c3295d 61fCentralityClass("0100"),
62fIsLowEnergy(false)
0233abe6 63{
64 //
65 // Default Constructor
66 //
67}
5541b811 68
0233abe6 69//--------------------------------------------------------------------------
5541b811 70AliHFSystErr::~AliHFSystErr() {
71 //
72 // Default Destructor
0233abe6 73 //
a8c3295d 74 /*
5541b811 75
76 if(fNorm) { delete fNorm; fNorm=0; }
77 if(fRawYield) { delete fRawYield; fRawYield=0; }
78 if(fTrackingEff) { delete fTrackingEff; fTrackingEff=0; }
79 if(fBR) { delete fBR; fBR=0; }
80 if(fCutsEff) { delete fCutsEff; fCutsEff=0; }
81 if(fPIDEff) { delete fPIDEff; fPIDEff=0; }
82 if(fMCPtShape) { delete fMCPtShape; fMCPtShape=0; }
83 if(fPartAntipart) { delete fPartAntipart; fPartAntipart=0; }
a8c3295d 84 */
5541b811 85}
86
87//--------------------------------------------------------------------------
88void AliHFSystErr::Init(Int_t decay){
89 //
90 // Variables/histos initialization
0233abe6 91 //
92
a8c3295d 93 if (fRunNumber!=10 && fIsLowEnergy==false) {
94 AliError("Only settings for 2010 and the low energy runs are implemented so far");
5541b811 95 }
aebba8df 96 if (fCentralityClass!="020" && fCentralityClass!="4080" && fCentralityClass!="0100"){
5541b811 97 AliError("Only settings for MB2010 are implemented so far");
98 }
99
0233abe6 100 switch(decay) {
101 case 1: // D0->Kpi
a8c3295d 102 if (fCollisionType==0) {
103 if (fIsLowEnergy) InitD0toKpi2010ppLowEn();
104 else InitD0toKpi2010pp();
105 } else if (fCollisionType==1) {
aebba8df 106 if (fCentralityClass=="020") InitD0toKpi2010PbPb020();
107 else if (fCentralityClass=="4080") InitD0toKpi2010PbPb4080();
5541b811 108 else AliError("Not yet implemented");
109 }
a8c3295d 110 // else if (fCollisionType==2) InitD0toKpi2010ppLowEn();
0233abe6 111 break;
112 case 2: // D+->Kpipi
a8c3295d 113 if (fCollisionType==0) {
114 if (fIsLowEnergy) InitDplustoKpipi2010ppLowEn();
115 else InitDplustoKpipi2010pp();
116 } else if (fCollisionType==1) {
aebba8df 117 if (fCentralityClass=="020") InitDplustoKpipi2010PbPb020();
118 else if (fCentralityClass=="4080") InitDplustoKpipi2010PbPb4080();
5541b811 119 else AliError("Not yet implemented");
120 }
0233abe6 121 break;
122 case 3: // D*->D0pi
fa2be30c 123 if (fCollisionType==0) {
124 if(fIsLowEnergy) InitDstartoD0pi2010ppLowEn();
125 else InitDstartoD0pi2010pp();
126 }else if (fCollisionType==1) {
127 if (fCentralityClass=="020") InitDstartoD0pi2010PbPb020();
128 if (fCentralityClass=="2040") InitDstartoD0pi2010PbPb2040();
129 if (fCentralityClass=="4080") InitDstartoD0pi2010PbPb4080();
130 if (fCentralityClass!="4080" && fCentralityClass!="2040" && fCentralityClass!="020") AliError("Not yet implemented");
5541b811 131 }
0233abe6 132 break;
66247513 133 case 4: // D+s->KKpi
134 if (fCollisionType==0) InitDstoKKpi2010pp();
135 else AliError("Not yet implemented");
136 break;
137
0233abe6 138 default:
139 printf("Invalid decay type: %d\n",decay);
140 break;
141 }
142
0233abe6 143}
5541b811 144
0233abe6 145//--------------------------------------------------------------------------
5541b811 146void AliHFSystErr::InitD0toKpi2010pp() {
147 //
148 // D0->Kpi syst errors. Responsible: A. Rossi
149 // 2010 pp sample
0233abe6 150 //
151
5541b811 152 // Normalization
f1d72175 153 fNorm = new TH1F("fNorm","fNorm",24,0,24);
f8bc42d3 154 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.04); // 4% error on sigmaV0and
5541b811 155
156 // Branching ratio
f1d72175 157 fBR = new TH1F("fBR","fBR",24,0,24);
158 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.012); // 1.2% PDG2010
5541b811 159
160 // Tracking efficiency
f1d72175 161 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);
f8bc42d3 162 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.08); // 8% (4% per track)
5541b811 163
164 // Raw yield extraction
f1d72175 165 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
5541b811 166 fRawYield->SetBinContent(1,1);
d2e5959f 167 fRawYield->SetBinContent(2,0.22);
168 fRawYield->SetBinContent(3,0.1);
169 for(Int_t i=4;i<=7;i++) fRawYield->SetBinContent(i,0.04);
170 for(Int_t i=8;i<=12;i++) fRawYield->SetBinContent(i,0.07);
f1d72175 171 for(Int_t i=13;i<=16;i++) fRawYield->SetBinContent(i,0.10);
172 for(Int_t i=17;i<=24;i++) fRawYield->SetBinContent(i,1);
0233abe6 173
5541b811 174 // Cuts efficiency (from cuts variation)
f1d72175 175 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
176 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
5541b811 177
178 // PID efficiency (from PID/noPID)
f1d72175 179 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
180 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.03); // 3%
dc80fe6b 181 fPIDEff->SetBinContent(2,0.05); // 5%
5541b811 182
183 // MC dN/dpt
f1d72175 184 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
578bfbba 185 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0);
186 fMCPtShape->SetBinContent(1,0.03);
187 fMCPtShape->SetBinContent(2,0.03);
5541b811 188
189 // particle-antiparticle
f1d72175 190 // fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",24,0,24);
191 // fPartAntipart->SetBinContent(1,1);
192 // for(Int_t i=2;i<=24;i++) fPartAntipart->SetBinContent(i,0.05);
5541b811 193
194 return;
0233abe6 195}
196//--------------------------------------------------------------------------
5541b811 197void AliHFSystErr::InitD0toKpi2010PbPb020() {
0233abe6 198 //
aebba8df 199 // D0->Kpi syst errors. Responsible: A. Rossi
5541b811 200 // 2010 PbPb sample, 0-20 CC
0233abe6 201 //
5541b811 202
203 // Normalization
204 fNorm = new TH1F("fNorm","fNorm",20,0,20);
205 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.10); // 10% error on sigmaV0and
206
207 // Branching ratio
208 fBR = new TH1F("fBR","fBR",20,0,20);
209 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.012); // 1.2% PDG2010
210
211 // Tracking efficiency
212 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
aebba8df 213 for(Int_t i=2;i<=12;i++) fTrackingEff->SetBinContent(i,0.05+0.005*(Float_t)i);
666cf569 214
5541b811 215
216 // Raw yield extraction
217 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
218 fRawYield->SetBinContent(1,0);
219 fRawYield->SetBinContent(2,0);
aebba8df 220 fRawYield->SetBinContent(3,0.05);
221 fRawYield->SetBinContent(4,0.05);
222 fRawYield->SetBinContent(5,0.10);
223 fRawYield->SetBinContent(6,0.10);
224 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
666cf569 225 // for(Int_t i=13;i<=20;i++) fRawYield->SetBinContent(i,0);
5541b811 226
227 // Cuts efficiency (from cuts variation)
228 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
aebba8df 229 fCutsEff->SetBinContent(1,0.);
230 fCutsEff->SetBinContent(2,0.);
666cf569 231 fCutsEff->SetBinContent(3,0.18);
aebba8df 232 fCutsEff->SetBinContent(4,0.18);
233 fCutsEff->SetBinContent(5,0.18);
234 fCutsEff->SetBinContent(6,0.15);
235 fCutsEff->SetBinContent(7,0.15);
236 fCutsEff->SetBinContent(8,0.15);
666cf569 237fCutsEff->SetBinContent(9,0.15);
238 fCutsEff->SetBinContent(10,0.15);
aebba8df 239 fCutsEff->SetBinContent(11,0.15);
240 fCutsEff->SetBinContent(12,0.15);
666cf569 241 // for(Int_t i=13;i<=20;i++) fCutsEff->SetBinContent(i,0.);
5541b811 242
243 // PID efficiency (from PID/noPID)
244 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
aebba8df 245 for(Int_t i=3;i<=12;i++) fPIDEff->SetBinContent(i,0.05);
246 fPIDEff->SetBinContent(5,0.10);
247 fPIDEff->SetBinContent(6,0.10);
5541b811 248
249 // MC dN/dpt
250 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 251 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0);
252 fMCPtShape->SetBinContent(1,0.03);
253 fMCPtShape->SetBinContent(2,0.03);
254
5541b811 255
256 // particle-antiparticle
257 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
aebba8df 258 for(Int_t i=3;i<=12;i++) fPartAntipart->SetBinContent(i,0.05);
666cf569 259 fPartAntipart->SetBinContent(3,0.10);
aebba8df 260 fPartAntipart->SetBinContent(4,0.10);
261 fPartAntipart->SetBinContent(7,0.10);
262 fPartAntipart->SetBinContent(8,0.10);
0233abe6 263
5541b811 264 return;
265}
266//--------------------------------------------------------------------------
267void AliHFSystErr::InitD0toKpi2010PbPb4080() {
268 //
aebba8df 269 // D0->Kpi syst errors. Responsible: A. Rossi
5541b811 270 // 2010 PbPb sample, 40-80 CC
271 //
272
0233abe6 273 // Normalization
274 fNorm = new TH1F("fNorm","fNorm",20,0,20);
844405bc 275 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.10); // 10% error on sigmaV0and
0233abe6 276
277 // Branching ratio
278 fBR = new TH1F("fBR","fBR",20,0,20);
844405bc 279 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.012); // 1.2% PDG2010
0233abe6 280
aebba8df 281 // Tracking efficiency
282 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
283 for(Int_t i=2;i<=12;i++) fTrackingEff->SetBinContent(i,0.5*(0.05+0.005*(Float_t)i));
284
285
0233abe6 286 // Raw yield extraction
287 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
5541b811 288 fRawYield->SetBinContent(1,0);
289 fRawYield->SetBinContent(2,0);
46cfcb37 290 for(Int_t i=3;i<=12;i++) fRawYield->SetBinContent(i,0.05);
666cf569 291 //for(Int_t i=13;i<=20;i++) fRawYield->SetBinContent(i,0);
0233abe6 292
293 // Cuts efficiency (from cuts variation)
294 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
aebba8df 295 fCutsEff->SetBinContent(1,0.);
296 fCutsEff->SetBinContent(2,0.);
666cf569 297 fCutsEff->SetBinContent(3,0.15);
46cfcb37 298 fCutsEff->SetBinContent(4,0.15);
299 fCutsEff->SetBinContent(5,0.15);
aebba8df 300 fCutsEff->SetBinContent(6,0.15);
301 fCutsEff->SetBinContent(7,0.15);
302 fCutsEff->SetBinContent(8,0.15);
303 fCutsEff->SetBinContent(9,0.15);
304 fCutsEff->SetBinContent(10,0.15);
305 fCutsEff->SetBinContent(11,0.15);
306 fCutsEff->SetBinContent(12,0.15);
666cf569 307 // for(Int_t i=13;i<=20;i++) fCutsEff->SetBinContent(i,0.);
0233abe6 308
309 // PID efficiency (from PID/noPID)
310 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
aebba8df 311 for(Int_t i=3;i<=12;i++) fPIDEff->SetBinContent(i,0.05);
0233abe6 312
313 // MC dN/dpt
314 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 315 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0);
316 fMCPtShape->SetBinContent(1,0.03);
317 fMCPtShape->SetBinContent(2,0.03);
0233abe6 318
319 // particle-antiparticle
320 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
aebba8df 321 for(Int_t i=3;i<=12;i++) fPartAntipart->SetBinContent(i,0.05);
0233abe6 322
323 return;
324}
a8c3295d 325
326//--------------------------------------------------------------------------
327void AliHFSystErr::InitD0toKpi2010ppLowEn() {
328 //
329 // D0->Kpi syst errors. Low energy run
330 // 2011 2.76 TeV pp sample
331 //
332 AliInfo(" Settings for D0 --> K pi, p-p collisions at 2.76 TeV");
333
334 // Normalization
335 fNorm = new TH1F("fNorm","fNorm",20,0,20);
336 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.10); // 10% error on sigmaV0and
337
338 // Branching ratio
339 fBR = new TH1F("fBR","fBR",20,0,20);
340 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.012); // 1.2% PDG2010
341
342 // Tracking efficiency
343 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
344 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.10); //10% (5% per track)
345
346 // Raw yield extraction
347 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
348 fRawYield->SetBinContent(1,1);
349 fRawYield->SetBinContent(2,1);
350 fRawYield->SetBinContent(3,0.2);
351 fRawYield->SetBinContent(4,0.2);
352 fRawYield->SetBinContent(5,0.1);
353 fRawYield->SetBinContent(6,0.1);
354 fRawYield->SetBinContent(7,0.2);
355 fRawYield->SetBinContent(8,0.2);
356 for(Int_t i=9;i<=20;i++) fRawYield->SetBinContent(i,0.065);
357
358 // Cuts efficiency (from cuts variation)
359 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
360 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.18); // 10%
361
362 // PID efficiency (from PID/noPID)
363 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
364 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.20); // 10%
365 fPIDEff->SetBinContent(3,0.25); // 10%
366 fPIDEff->SetBinContent(4,0.25); // 10%
367 fPIDEff->SetBinContent(7,0.25); // 10%
368 fPIDEff->SetBinContent(8,0.25); // 10%
369
370 // MC dN/dpt
371 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 372 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0);
373 fMCPtShape->SetBinContent(1,0.03);
374 fMCPtShape->SetBinContent(2,0.03);
a8c3295d 375
376 // particle-antiparticle
377 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
378 fPartAntipart->SetBinContent(1,1);
379 fPartAntipart->SetBinContent(2,1);
380 for(Int_t i=3;i<=6;i++) fPartAntipart->SetBinContent(i,0.08);
381
382 return;
383}
384
0233abe6 385//--------------------------------------------------------------------------
5541b811 386void AliHFSystErr::InitDplustoKpipi2010pp() {
0233abe6 387 //
388 // D+->Kpipi syst errors. Responsible: R. Bala
5541b811 389 // 2010 pp sample
0233abe6 390 //
391
1f91ef56 392
393// Normalization
394 fNorm = new TH1F("fNorm","fNorm",24,0,24);
f8bc42d3 395 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.04); // 4% error on sigmaV0and
626bcf57 396
397 // Branching ratio
1f91ef56 398 fBR = new TH1F("fBR","fBR",24,0,24);
399 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.04); // 4% PDG2010
626bcf57 400
401 // Tracking efficiency
1f91ef56 402 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);
f8bc42d3 403 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.12); // 12% (4% per track)
626bcf57 404
405
406 // Raw yield extraction
1f91ef56 407 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
d2e5959f 408 fRawYield->SetBinContent(1,1);
1f91ef56 409 fRawYield->SetBinContent(2,0.25);
410 fRawYield->SetBinContent(3,0.25);
d2e5959f 411 fRawYield->SetBinContent(4,0.20);
1f91ef56 412 fRawYield->SetBinContent(5,0.09);
413 fRawYield->SetBinContent(6,0.09);
d2e5959f 414 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
415 for(Int_t i=12;i<=24;i++) fRawYield->SetBinContent(i,0.10);
1f91ef56 416
626bcf57 417 // Cuts efficiency (from cuts variation)
1f91ef56 418 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
419 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
626bcf57 420
421 // PID efficiency (from PID/noPID)
1f91ef56 422 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
423 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.05); // 5%
424 fPIDEff->SetBinContent(1,0.15); // 15%
425 fPIDEff->SetBinContent(2,0.15); // 15%
426 fPIDEff->SetBinContent(3,0.15); // 15%
427 fPIDEff->SetBinContent(4,0.15); // 15%
428 for(Int_t i=12;i<=16;i++) fPIDEff->SetBinContent(i,0.10); // 5%
429
430 // MC dN/dpt
431 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
432 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0);
578bfbba 433 fMCPtShape->SetBinContent(1,0.03);
434 fMCPtShape->SetBinContent(2,0.03);
626bcf57 435
436
437 // particle-antiparticle
438 /*
439 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
440 fPartAntipart->SetBinContent(1,1);
441 fPartAntipart->SetBinContent(2,1);
442 fPartAntipart->SetBinContent(3,0.12);
443 for(Int_t i=4;i<=20;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
444 */
0233abe6 445 return;
446}
1f91ef56 447
66247513 448//--------------------------------------------------------------------------
449void AliHFSystErr::InitDstoKKpi2010pp() {
450 //
451 // D+s->KKpi syst errors. Responsible: G.M. Innocenti
452 // 2010 pp sample
453 //
454
455
456// Normalization
457 fNorm = new TH1F("fNorm","fNorm",12,0,12);
458 for(Int_t i=1;i<=12;i++) fNorm->SetBinContent(i,0.07); // 7% error on sigmaV0and
459
460 // Branching ratio
461 fBR = new TH1F("fBR","fBR",12,0,12);
462 for(Int_t i=1;i<=12;i++) fBR->SetBinContent(i,0.05); // 5% PDG2010
463
464 // Tracking efficiency
465 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",12,0,12);
466 for(Int_t i=1;i<=12;i++) fTrackingEff->SetBinContent(i,0.03); // 3% (1% per track)
467
468
469 // Raw yield extraction
470 fRawYield = new TH1F("fRawYield","fRawYield",12,0,12);
471 fRawYield->SetBinContent(1,1);
472 fRawYield->SetBinContent(2,1);
473 fRawYield->SetBinContent(3,0.20);
474 fRawYield->SetBinContent(4,0.20);
475 fRawYield->SetBinContent(5,0.15);
476 fRawYield->SetBinContent(6,0.15);
477 fRawYield->SetBinContent(7,0.15);
478 fRawYield->SetBinContent(8,0.15);
479 fRawYield->SetBinContent(9,0.20);
480 fRawYield->SetBinContent(10,0.20);
481 fRawYield->SetBinContent(11,0.20);
482 fRawYield->SetBinContent(12,0.20);
483
484 // Cuts efficiency (from cuts variation)
485 fCutsEff = new TH1F("fCutsEff","fCutsEff",12,0,12);
486 for(Int_t i=1;i<=12;i++) fCutsEff->SetBinContent(i,0.15); // 15%
487
488 // PID efficiency (from PID/noPID)
489 fPIDEff = new TH1F("fPIDEff","fPIDEff",12,0,12);
490 for(Int_t i=1;i<=12;i++) fPIDEff->SetBinContent(i,0.07); // 7%
491
492 // MC dN/dpt (copied from D0 : will update later)
493 //fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",12,0,12);
494 //for(Int_t i=1;i<=12;i++) fMCPtShape->SetBinContent(i,(Float_t)i*0.006);
495
496
497 // particle-antiparticle
498 /*
499 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",12,0,12);
500 fPartAntipart->SetBinContent(1,1);
501 fPartAntipart->SetBinContent(2,1);
502 fPartAntipart->SetBinContent(3,0.12);
503 for(Int_t i=4;i<=12;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
504 */
505 return;
506}
507
508
0233abe6 509//--------------------------------------------------------------------------
5541b811 510void AliHFSystErr::InitDplustoKpipi2010PbPb020() {
511 //
512 // D+->Kpipi syst errors. Responsible: ??
513 // 2010 PbPb sample, 0-20 CC
514 //
aebba8df 515
aebba8df 516 // Normalization
517 fNorm = new TH1F("fNorm","fNorm",20,0,20);
518 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.10); // 10% error on sigmaV0and
519
520 // Branching ratio
521 fBR = new TH1F("fBR","fBR",20,0,20);
522 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.04); // 4% PDG2010
523
524 // Tracking efficiency
525 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
666cf569 526 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,i,0.075+0.005*(Float_t)i);
aebba8df 527
528
529 // Raw yield extraction
530 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
531 for(Int_t i=1;i<=20;i++) fRawYield->SetBinContent(i,1); //5 to 10%
666cf569 532// for(Int_t i=6;i<=7;i++) fRawYield->SetBinContent(i,0.32);
533// for(Int_t i=7;i<=9;i++) fRawYield->SetBinContent(i,0.32);
534// for(Int_t i=9;i<=12;i++) fRawYield->SetBinContent(i,0.05);//31./156.);
a8c3295d 535 fRawYield->SetBinContent(6,0.12);
536 fRawYield->SetBinContent(7,0.17);
537 fRawYield->SetBinContent(8,0.17);
538 fRawYield->SetBinContent(9,0.08);
539 fRawYield->SetBinContent(10,0.08);
540 fRawYield->SetBinContent(11,0.08);
541 fRawYield->SetBinContent(12,0.08);
aebba8df 542
543 // Cuts efficiency (from cuts variation)
544 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
666cf569 545 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.15); // 10%
aebba8df 546
547 // PID efficiency (from PID/noPID)
548 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
549 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 5%
550 fPIDEff->SetBinContent(3,0.13); // 13%
551
552
553 // MC dN/dpt (copied from D0 : will update later)
554 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 555 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.);
556 fMCPtShape->SetBinContent(1,0.03);
557 fMCPtShape->SetBinContent(2,0.03);
aebba8df 558
559
560 // particle-antiparticle
561 /*
562 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
563 fPartAntipart->SetBinContent(1,1);
564 fPartAntipart->SetBinContent(2,1);
565 fPartAntipart->SetBinContent(3,0.12);
566 for(Int_t i=4;i<=20;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
567 */
5541b811 568 return;
569}
570
571//--------------------------------------------------------------------------
572void AliHFSystErr::InitDplustoKpipi2010PbPb4080() {
573 //
574 // D+->Kpipi syst errors. Responsible: ??
575 // 2010 PbPb sample, 40-80 CC
576 //
577
aebba8df 578
579 // Normalization
580 fNorm = new TH1F("fNorm","fNorm",20,0,20);
581 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.10); // 10% error on sigmaV0and
582
583 // Branching ratio
584 fBR = new TH1F("fBR","fBR",20,0,20);
585 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.04); // 4% PDG2010
586
587 // Tracking efficiency
588 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
589 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.03); // 3% (1% per track)
590
591
592 // Raw yield extraction
593 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
594 fRawYield->SetBinContent(1,1);
595 fRawYield->SetBinContent(2,1);
596 fRawYield->SetBinContent(3,1);
597 fRawYield->SetBinContent(4,1.);
598 fRawYield->SetBinContent(5,4./23.);
599 fRawYield->SetBinContent(6,4./23.);
600 fRawYield->SetBinContent(7,5./20.);
601 fRawYield->SetBinContent(8,5./20.);
602 for(Int_t i=9;i<=12;i++) fRawYield->SetBinContent(i,1./16.);
603 for(Int_t i=13;i<=20;i++) fRawYield->SetBinContent(i,1); //5 to 10%
604
605 // Cuts efficiency (from cuts variation)
606 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
607 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.10); // 10%
608
609 // PID efficiency (from PID/noPID)
610 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
611 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 5%
612 fPIDEff->SetBinContent(3,0.13); // 13%
613
614
615 // MC dN/dpt (copied from D0 : will update later)
616 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 617 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0);
618 fMCPtShape->SetBinContent(1,0.03);
619 fMCPtShape->SetBinContent(2,0.03);
aebba8df 620
621
622 // particle-antiparticle
623 /*
624 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
625 fPartAntipart->SetBinContent(1,1);
626 fPartAntipart->SetBinContent(2,1);
627 fPartAntipart->SetBinContent(3,0.12);
628 for(Int_t i=4;i<=20;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
629 */
5541b811 630 return;
631}
632
a8c3295d 633//--------------------------------------------------------------------------
634void AliHFSystErr::InitDplustoKpipi2010ppLowEn() {
635
636 //
637 // D+->Kpipi syst errors. Responsible: R. Bala
638 // 2011 2.76 TeV pp sample
639 //
640 AliInfo(" Settings for D+ --> K pi pi p-p collisions at 2.76 TeV");
641
642 // Normalization
643 fNorm = new TH1F("fNorm","fNorm",20,0,20);
644 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.10); // 10% error on sigmaV0and
645
646 // Branching ratio
647 fBR = new TH1F("fBR","fBR",20,0,20);
648 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.04); // 4% PDG2010
649
650 // Tracking efficiency
651 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
652 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.15); // 3% (1% per track)
653
654 // Raw yield extraction
655 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
656 fRawYield->SetBinContent(1,1);
657 fRawYield->SetBinContent(2,1);
658 fRawYield->SetBinContent(3,0.20);
659 fRawYield->SetBinContent(4,0.20);
660 for(Int_t i=5;i<=20;i++) fRawYield->SetBinContent(i,0.055); //5 to 10%
661
662 // Cuts efficiency (from cuts variation)
663 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
664 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.10); // 10%
665
666 // PID efficiency (from PID/noPID)
667 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
668 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 5%
669 fPIDEff->SetBinContent(3,0.15); // 13%
670 fPIDEff->SetBinContent(4,0.15); // 13%
671
672 // MC dN/dpt (copied from D0 : will update later)
673 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 674 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.);
675 fMCPtShape->SetBinContent(1,0.03);
676 fMCPtShape->SetBinContent(2,0.03);
a8c3295d 677
678 return;
679}
680
5541b811 681//--------------------------------------------------------------------------
682void AliHFSystErr::InitDstartoD0pi2010pp() {
0233abe6 683 //
2cf98d0d 684 // D*+->D0pi syst errors. Responsible: A. Grelli, Y. Wang
5541b811 685 // 2010 pp sample
0233abe6 686 //
687
2cf98d0d 688 // Normalization
fa2be30c 689 fNorm = new TH1F("fNorm","fNorm",24,0,24);
f8bc42d3 690 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.04); // 4% error on sigmaV0and
fa2be30c 691
692 // Branching ratio
693 fBR = new TH1F("fBR","fBR",24,0,24);
694 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
695
696 // Tracking efficiency
697 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);
698 fTrackingEff->SetBinContent(1,1.0);
f8bc42d3 699 fTrackingEff->SetBinContent(2,0.13); // 10% (ITSsa) \oplus 8% (4% per ITSTPC track)
700 fTrackingEff->SetBinContent(3,0.12);
701 fTrackingEff->SetBinContent(3,0.12);
702 for(Int_t i=4;i<=24;i++) fTrackingEff->SetBinContent(i,0.12); // 12% (4% per track)
fa2be30c 703
704
705 // Raw yield extraction
706 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
707 fRawYield->SetBinContent(1,1.0);
d2e5959f 708 fRawYield->SetBinContent(2,0.10);
fa2be30c 709 fRawYield->SetBinContent(3,0.04);
d2e5959f 710 fRawYield->SetBinContent(4,0.03);
fa2be30c 711 fRawYield->SetBinContent(5,0.03);
d2e5959f 712 fRawYield->SetBinContent(6,0.05);
713 fRawYield->SetBinContent(7,0.05);
714 fRawYield->SetBinContent(8,0.05);
715 for(Int_t i=9;i<=12;i++) fRawYield->SetBinContent(i,0.04); //4%
716 for(Int_t i=13;i<=16;i++) fRawYield->SetBinContent(i,0.09); //4%
717 for(Int_t i=17;i<=24;i++) fRawYield->SetBinContent(i,0.2); //4%
fa2be30c 718
719 // Cuts efficiency (from cuts variation)
720 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
721 fCutsEff->SetBinContent(2,0.22);
722 for(Int_t i=3;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
723
724 // PID efficiency (from PID/noPID)
725 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
726 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.04); // 3%
727
728
729 // MC dN/dpt (copied from D0 : will update later)
730 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
578bfbba 731 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0);
732 fMCPtShape->SetBinContent(1,0.03);
733 fMCPtShape->SetBinContent(2,0.03);
fa2be30c 734
735 return;
736
737
738}
739//--------------------------------------------------------------------------
740void AliHFSystErr::InitDstartoD0pi2010ppLowEn() {
741
742 //
743 // D+->Kpipi syst errors. Responsible: A. Grelli
744 // 2011 2.76 TeV pp sample
745 //
746 AliInfo(" Settings for D*+ --> D0 pi p-p collisions at 2.76 TeV");
747
748// Normalization
2cf98d0d 749 fNorm = new TH1F("fNorm","fNorm",20,0,20);
750 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.10); // 10% error on sigmaV0and
751
752 // Branching ratio
753 fBR = new TH1F("fBR","fBR",20,0,20);
8accac87 754 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
2cf98d0d 755
756 // Tracking efficiency
757 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
08ae44d3 758 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.15); //10% (to be checked!!)
2cf98d0d 759
760 // Raw yield extraction
761 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
8accac87 762 fRawYield->SetBinContent(1,1);
fa2be30c 763 fRawYield->SetBinContent(2,1);
764 fRawYield->SetBinContent(3,0.2);
765 fRawYield->SetBinContent(4,0.2);
08ae44d3 766 fRawYield->SetBinContent(5,0.08);
767 fRawYield->SetBinContent(6,0.08);
768 fRawYield->SetBinContent(7,0.1);
769 fRawYield->SetBinContent(8,0.1);
fa2be30c 770 fRawYield->SetBinContent(9,0.2);
771 fRawYield->SetBinContent(10,0.2);
772 for(Int_t i=9;i<=20;i++) fRawYield->SetBinContent(i,0.065);
2cf98d0d 773
774 // Cuts efficiency (from cuts variation)
775 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
fa2be30c 776 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.18);
777 fCutsEff->SetBinContent(3,0.2);
778 fCutsEff->SetBinContent(4,0.2);
779 fCutsEff->SetBinContent(5,0.1);
780 fCutsEff->SetBinContent(6,0.1);
781 fCutsEff->SetBinContent(7,0.12);
782 fCutsEff->SetBinContent(8,0.12);
783 fCutsEff->SetBinContent(9,0.2);
784 fCutsEff->SetBinContent(10,0.2);
066c6b9b 785 fCutsEff->SetBinContent(11,0.2);
786 fCutsEff->SetBinContent(12,0.2);
2cf98d0d 787
788 // PID efficiency (from PID/noPID)
789 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
fa2be30c 790 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 10%
2cf98d0d 791
fa2be30c 792 // MC dN/dpt
2cf98d0d 793 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 794 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.);
795 fMCPtShape->SetBinContent(1,0.03);
796 fMCPtShape->SetBinContent(2,0.03);
2cf98d0d 797
fa2be30c 798
0233abe6 799 return;
800}
fa2be30c 801//------------------------------------------------------------------------
5541b811 802void AliHFSystErr::InitDstartoD0pi2010PbPb020() {
803 //
fa2be30c 804 // D*+->D0pi syst errors. Responsible: A. Grelli
5541b811 805 // 2010 PbPb sample, 0-20 CC
806 //
807
fa2be30c 808 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 0-20 centrality - DUMMY");
809
810 // Normalization
811 fNorm = new TH1F("fNorm","fNorm",24,0,24);
812 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.10); // 10% error on sigmaV0and
813
814 // Branching ratio
815 fBR = new TH1F("fBR","fBR",24,0,24);
816 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
817
818 // Tracking efficiency
819 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);;
820 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.12); // 3% (1% per track)
821
822
823 // Raw yield extraction
824 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
825 for(Int_t i=1;i<=24;i++) fRawYield->SetBinContent(i,0.15); //4%
826
827 // Cuts efficiency (from cuts variation)
828 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
829 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
830
831 // PID efficiency (from PID/noPID)
832 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
833 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.04); // 3%
834
835
836 // MC dN/dpt (copied from D0 : will update later)
837 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
578bfbba 838 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0.);
839 fMCPtShape->SetBinContent(1,0.03);
840 fMCPtShape->SetBinContent(2,0.03);
fa2be30c 841
842 return;
843
844}
845//-------------------------------------------------------------------------
846void AliHFSystErr::InitDstartoD0pi2010PbPb2040() {
847 //
848 // D*+->D0pi syst errors. Responsible: A. Grelli
849 // 2010 PbPb sample, 20-40 CC
850 //
851
852 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 20-40 centrality - DUMMY");
853
854 // Normalization
855 fNorm = new TH1F("fNorm","fNorm",24,0,24);
856 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.10); // 10% error on sigmaV0and
857
858 // Branching ratio
859 fBR = new TH1F("fBR","fBR",24,0,24);
860 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
861
862 // Tracking efficiency
863 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);;
864 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.12); // 3% (1% per track)
865
866
867 // Raw yield extraction
868 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
869 for(Int_t i=1;i<=24;i++) fRawYield->SetBinContent(i,0.15); //4%
870
871 // Cuts efficiency (from cuts variation)
872 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
873 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
874
875 // PID efficiency (from PID/noPID)
876 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
877 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.04); // 3%
878
879
880 // MC dN/dpt (copied from D0 : will update later)
881 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
578bfbba 882 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0.);
883 fMCPtShape->SetBinContent(1,0.03);
884 fMCPtShape->SetBinContent(2,0.03);
fa2be30c 885
5541b811 886 return;
fa2be30c 887
5541b811 888}
889//--------------------------------------------------------------------------
890void AliHFSystErr::InitDstartoD0pi2010PbPb4080() {
891 //
fa2be30c 892 // D*+->D0pi syst errors. Responsible: A. Grelli
5541b811 893 // 2010 PbPb sample, 40-80 CC
894 //
895
fa2be30c 896 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 40-80 centrality - DUMMY");
897
898 // Normalization
899 fNorm = new TH1F("fNorm","fNorm",24,0,24);
900 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.10); // 10% error on sigmaV0and
901
902 // Branching ratio
903 fBR = new TH1F("fBR","fBR",24,0,24);
904 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
905
906 // Tracking efficiency
907 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);;
908 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.12); // 3% (1% per track)
909
910
911 // Raw yield extraction
912 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
913 for(Int_t i=1;i<=24;i++) fRawYield->SetBinContent(i,0.15); //4%
914
915 // Cuts efficiency (from cuts variation)
916 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
917 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
918
919 // PID efficiency (from PID/noPID)
920 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
921 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.04); // 3%
922
923
924 // MC dN/dpt (copied from D0 : will update later)
925 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
578bfbba 926 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0.);
927 fMCPtShape->SetBinContent(1,0.03);
928 fMCPtShape->SetBinContent(2,0.03);
fa2be30c 929
5541b811 930 return;
fa2be30c 931
5541b811 932}
933//--------------------------------------------------------------------------
0233abe6 934Double_t AliHFSystErr::GetCutsEffErr(Double_t pt) const {
935 //
936 // Get error
937 //
938
939 Int_t bin=fCutsEff->FindBin(pt);
940
941 return fCutsEff->GetBinContent(bin);
942}
943//--------------------------------------------------------------------------
944Double_t AliHFSystErr::GetMCPtShapeErr(Double_t pt) const {
945 //
946 // Get error
947 //
948
949 Int_t bin=fMCPtShape->FindBin(pt);
950
951 return fMCPtShape->GetBinContent(bin);
952}
953//--------------------------------------------------------------------------
954Double_t AliHFSystErr::GetSeleEffErr(Double_t pt) const {
955 //
956 // Get error
957 //
958
959 Double_t err=GetCutsEffErr(pt)*GetCutsEffErr(pt)+GetMCPtShapeErr(pt)*GetMCPtShapeErr(pt);
960
961 return TMath::Sqrt(err);
962}
963//--------------------------------------------------------------------------
964Double_t AliHFSystErr::GetPIDEffErr(Double_t pt) const {
965 //
966 // Get error
967 //
968
969 Int_t bin=fPIDEff->FindBin(pt);
970
971 return fPIDEff->GetBinContent(bin);
972}
973//--------------------------------------------------------------------------
974Double_t AliHFSystErr::GetTrackingEffErr(Double_t pt) const {
975 //
976 // Get error
977 //
978
979 Int_t bin=fTrackingEff->FindBin(pt);
980
981 return fTrackingEff->GetBinContent(bin);
982}
983//--------------------------------------------------------------------------
984Double_t AliHFSystErr::GetRawYieldErr(Double_t pt) const {
985 //
986 // Get error
987 //
988
989 Int_t bin=fRawYield->FindBin(pt);
990
991 return fRawYield->GetBinContent(bin);
992}
993//--------------------------------------------------------------------------
994Double_t AliHFSystErr::GetPartAntipartErr(Double_t pt) const {
995 //
996 // Get error
997 //
998
999 Int_t bin=fPartAntipart->FindBin(pt);
1000
1001 return fPartAntipart->GetBinContent(bin);
1002}
1003//--------------------------------------------------------------------------
1004Double_t AliHFSystErr::GetTotalSystErr(Double_t pt,Double_t feeddownErr) const {
1005 //
1006 // Get total syst error (except norm. error)
1007 //
1008
1009 Double_t err=0.;
1010
1011 if(fRawYield) err += GetRawYieldErr(pt)*GetRawYieldErr(pt);
1012 if(fTrackingEff) err += GetTrackingEffErr(pt)*GetTrackingEffErr(pt);
1013 if(fBR) err += GetBRErr()*GetBRErr();
1014 if(fCutsEff) err += GetCutsEffErr(pt)*GetCutsEffErr(pt);
1015 if(fPIDEff) err += GetPIDEffErr(pt)*GetPIDEffErr(pt);
1016 if(fMCPtShape) err += GetMCPtShapeErr(pt)*GetMCPtShapeErr(pt);
1017 if(fPartAntipart) err += GetPartAntipartErr(pt)*GetPartAntipartErr(pt);
1018
1019 err += feeddownErr*feeddownErr;
1020
1021 return TMath::Sqrt(err);
1022}
1023//---------------------------------------------------------------------------
5ad8ad40 1024void AliHFSystErr::DrawErrors(TGraphAsymmErrors *grErrFeeddown) const {
0233abe6 1025 //
1026 // Draw errors
1027 //
1028 gStyle->SetOptStat(0);
1029
a07118d0 1030 TCanvas *cSystErr = new TCanvas("cSystErr","Systematic Errors",300,80,640,500);
1031 cSystErr->Range(0.20,-0.5,18.4,0.34);
1032 cSystErr->SetRightMargin(0.318);
0233abe6 1033 cSystErr->SetFillColor(0);
1034
2ee3afe2 1035 TH2F *hFrame = new TH2F("hFrame","Systematic errors; p_{t} [GeV/c]; Relative Error",20,0,20,100,-1,+1);
f1d72175 1036 hFrame->SetAxisRange(1.,15.9,"X");
a07118d0 1037 hFrame->SetAxisRange(-0.5,0.5,"Y");
0233abe6 1038 hFrame->Draw();
1039
a07118d0 1040 TLegend *leg = new TLegend(0.69,0.44,0.98,0.86,NULL,"brNDC");
1041 leg->SetTextSize(0.03601695);
0233abe6 1042 leg->SetFillStyle(0);
1043 leg->SetBorderSize(0);
2ee3afe2 1044
f1d72175 1045 TH1F *hTotErr=new TH1F("hTotErr","",24,0,24);
2ee3afe2 1046 Int_t nbins = fNorm->GetNbinsX();
1047 TGraphAsymmErrors *gTotErr = new TGraphAsymmErrors(nbins);
f1d72175 1048 for(Int_t i=1;i<=24;i++) {
2ee3afe2 1049 Double_t pt = hTotErr->GetBinCenter(i);
1050 Double_t ptwidth = hTotErr->GetBinWidth(i);
1051
1052 if(grErrFeeddown) {
1053 Double_t x=0., y=0., errxl=0., errxh=0., erryl=0., erryh=0.;
1054 Double_t toterryl=0., toterryh=0.;
1055 for(Int_t j=0; j<grErrFeeddown->GetN(); j++) {
1056 grErrFeeddown->GetPoint(j,x,y);
1057 errxh = grErrFeeddown->GetErrorXhigh(j);
1058 errxl = grErrFeeddown->GetErrorXlow(j);
a07118d0 1059 if ( ( (x-errxl) <= pt) && ( (x+errxl) >= pt) ) {
2ee3afe2 1060 erryh = grErrFeeddown->GetErrorYhigh(j);
1061 erryl = grErrFeeddown->GetErrorYlow(j);
1062 }
1063 }
1064 if (erryl>=1e-3) toterryl = GetTotalSystErr(pt,erryl);
1065 else toterryl = GetTotalSystErr(pt);
1066 if (erryh>=1e-3) toterryh = GetTotalSystErr(pt,erryh);
1067 else toterryh = GetTotalSystErr(pt);
1068
1069 hTotErr->SetBinContent(i,toterryh);
1070 gTotErr->SetPoint(i,pt,0.);
1071 gTotErr->SetPointError(i,ptwidth/2.,ptwidth/2.,toterryl,toterryh); // i, exl, exh, eyl, eyh
1072 }
1073 else {
1074 hTotErr->SetBinContent(i,GetTotalSystErr(pt));
1075 gTotErr->SetPoint(i,pt,0.);
1076 gTotErr->SetPointError(i,ptwidth/2.,ptwidth/2.,GetTotalSystErr(pt),GetTotalSystErr(pt)); // i, exl, exh, eyl, eyh
1077 }
1078
1079 }
f968ef30 1080 gTotErr->SetLineColor(kBlack);
1081 gTotErr->SetFillColor(kRed);
1082 gTotErr->SetFillStyle(3002);
2ee3afe2 1083 gTotErr->Draw("2");
1084 leg->AddEntry(gTotErr,"Total (excl. norm.)","f");
1085// hTotErr->SetLineColor(1);
1086// hTotErr->SetLineWidth(3);
1087// hTotErr->Draw("same");
1088// leg->AddEntry(hTotErr,"Total (excl. norm.)","l");
1089
0233abe6 1090
e373b9f0 1091 fNorm->SetFillColor(1);
1092 fNorm->SetFillStyle(3002);
1093 //fNorm->Draw("same");
1094 //TH1F *hNormRefl = ReflectHisto(fNorm);
1095 //hNormRefl->Draw("same");
1096 leg->AddEntry(fNorm,"Normalization (10%)","");
1097
5ad8ad40 1098 if(grErrFeeddown) {
1099 grErrFeeddown->SetFillColor(kTeal-8);
1100 grErrFeeddown->SetFillStyle(3001);
1101 grErrFeeddown->Draw("2");
1102 leg->AddEntry(grErrFeeddown,"Feed-down from B","f");
1103 }
0233abe6 1104 if(fTrackingEff) {
5ad8ad40 1105 fTrackingEff->SetFillColor(4);
1106 fTrackingEff->SetFillStyle(3006);
0233abe6 1107 fTrackingEff->Draw("same");
f968ef30 1108 TH1F *hTrackingEffRefl = ReflectHisto(fTrackingEff);
1109 hTrackingEffRefl->Draw("same");
0233abe6 1110 leg->AddEntry(fTrackingEff,"Tracking efficiency","f");
1111 }
1112 if(fBR) {
1113 fBR->SetFillColor(6);
1114 fBR->SetFillStyle(3005);
5ad8ad40 1115 //fBR->SetFillStyle(3020);
0233abe6 1116 fBR->Draw("same");
f968ef30 1117 TH1F *hBRRefl = ReflectHisto(fBR);
1118 hBRRefl->Draw("same");
0233abe6 1119 leg->AddEntry(fBR,"Branching ratio","f");
1120 }
1121 if(fRawYield) {
5ad8ad40 1122 Int_t ci; // for color index setting
1123 ci = TColor::GetColor("#00cc00");
1124 fRawYield->SetLineColor(ci);
1125 // fRawYield->SetLineColor(3);
0233abe6 1126 fRawYield->SetLineWidth(3);
1127 fRawYield->Draw("same");
f968ef30 1128 TH1F *hRawYieldRefl = ReflectHisto(fRawYield);
1129 hRawYieldRefl->Draw("same");
844405bc 1130 leg->AddEntry(fRawYield,"Yield extraction","l");
0233abe6 1131 }
1132 if(fCutsEff) {
1133 fCutsEff->SetLineColor(4);
1134 fCutsEff->SetLineWidth(3);
1135 fCutsEff->Draw("same");
f968ef30 1136 TH1F *hCutsEffRefl = ReflectHisto(fCutsEff);
1137 hCutsEffRefl->Draw("same");
0233abe6 1138 leg->AddEntry(fCutsEff,"Cuts efficiency","l");
1139 }
1140 if(fPIDEff) {
1141 fPIDEff->SetLineColor(7);
1142 fPIDEff->SetLineWidth(3);
1143 fPIDEff->Draw("same");
f968ef30 1144 TH1F *hPIDEffRefl = ReflectHisto(fPIDEff);
1145 hPIDEffRefl->Draw("same");
0233abe6 1146 leg->AddEntry(fPIDEff,"PID efficiency","l");
1147 }
1148 if(fMCPtShape) {
5ad8ad40 1149 Int_t ci = TColor::GetColor("#9933ff");
1150 fMCPtShape->SetLineColor(ci);
1151 // fMCPtShape->SetLineColor(8);
0233abe6 1152 fMCPtShape->SetLineWidth(3);
1153 fMCPtShape->Draw("same");
f968ef30 1154 TH1F *hMCPtShapeRefl = ReflectHisto(fMCPtShape);
1155 hMCPtShapeRefl->Draw("same");
0233abe6 1156 leg->AddEntry(fMCPtShape,"MC p_{t} shape","l");
1157 }
1158 if(fPartAntipart) {
5ad8ad40 1159 Int_t ci = TColor::GetColor("#ff6600");
1160 fPartAntipart->SetLineColor(ci);
1161 // fPartAntipart->SetLineColor(9);
0233abe6 1162 fPartAntipart->SetLineWidth(3);
1163 fPartAntipart->Draw("same");
f968ef30 1164 TH1F *hPartAntipartRefl = ReflectHisto(fPartAntipart);
1165 hPartAntipartRefl->Draw("same");
0233abe6 1166 leg->AddEntry(fPartAntipart,"D = #bar{D}","l");
1167 }
0233abe6 1168
0233abe6 1169
1170 leg->Draw();
1171
5ad8ad40 1172 cSystErr->SaveAs("RelativeSystematics.eps");
1173
0233abe6 1174 return;
1175}
f968ef30 1176//-------------------------------------------------------------------------
1177TH1F* AliHFSystErr::ReflectHisto(TH1F *hin) const {
1178 //
1179 // Clones and reflects histogram
1180 //
1181 TH1F *hout=(TH1F*)hin->Clone("hout");
1182 hout->Scale(-1.);
1183
1184 return hout;
1185}