Updated normalization syst unc
[u/mrichter/AliRoot.git] / PWGHF / 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);
d5e15690 205 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
5541b811 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);
69bcc748 213 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.10);// Jacek, 5% per track
5541b811 214
215 // Raw yield extraction
216 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
217 fRawYield->SetBinContent(1,0);
218 fRawYield->SetBinContent(2,0);
6c388dee 219 fRawYield->SetBinContent(3,0.08);
220 for(Int_t i=4;i<=12;i++) fRawYield->SetBinContent(i,0.06);
221 for(Int_t i=13;i<=16;i++) fRawYield->SetBinContent(i,0.10);
5541b811 222
223 // Cuts efficiency (from cuts variation)
224 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
aebba8df 225 fCutsEff->SetBinContent(1,0.);
226 fCutsEff->SetBinContent(2,0.);
cc4bb301 227 fCutsEff->SetBinContent(3,0.13);
228 fCutsEff->SetBinContent(4,0.11);
229 for(Int_t i=5;i<=16;i++) fCutsEff->SetBinContent(i,0.10);
6c388dee 230 for(Int_t i=17;i<=20;i++) fCutsEff->SetBinContent(i,0.);
5541b811 231
232 // PID efficiency (from PID/noPID)
233 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
6c388dee 234 for(Int_t i=3;i<=16;i++) fPIDEff->SetBinContent(i,0.05);
5541b811 235
236 // MC dN/dpt
237 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
cc4bb301 238 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.01);
239 fMCPtShape->SetBinContent(3,0.04);
240 fMCPtShape->SetBinContent(4,0.02);
b797b51b 241 for(Int_t i=13;i<=16;i++) fMCPtShape->SetBinContent(i,0.03);
578bfbba 242
6c388dee 243// // particle-antiparticle
244// fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
245// for(Int_t i=3;i<=12;i++) fPartAntipart->SetBinContent(i,0.05);
246// fPartAntipart->SetBinContent(3,0.10);
247// fPartAntipart->SetBinContent(4,0.10);
248// fPartAntipart->SetBinContent(7,0.10);
249// fPartAntipart->SetBinContent(8,0.10);
0233abe6 250
5541b811 251 return;
252}
253//--------------------------------------------------------------------------
254void AliHFSystErr::InitD0toKpi2010PbPb4080() {
255 //
aebba8df 256 // D0->Kpi syst errors. Responsible: A. Rossi
5541b811 257 // 2010 PbPb sample, 40-80 CC
258 //
259
0233abe6 260 // Normalization
261 fNorm = new TH1F("fNorm","fNorm",20,0,20);
d5e15690 262 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.07); // TAA and pp norm
0233abe6 263
264 // Branching ratio
265 fBR = new TH1F("fBR","fBR",20,0,20);
844405bc 266 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.012); // 1.2% PDG2010
0233abe6 267
aebba8df 268 // Tracking efficiency
269 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
69bcc748 270 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.10); // Jacek, 5% per track
aebba8df 271
272
0233abe6 273 // Raw yield extraction
274 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
5541b811 275 fRawYield->SetBinContent(1,0);
276 fRawYield->SetBinContent(2,0);
6c388dee 277 for(Int_t i=3;i<=16;i++) fRawYield->SetBinContent(i,0.05);
666cf569 278 //for(Int_t i=13;i<=20;i++) fRawYield->SetBinContent(i,0);
0233abe6 279
280 // Cuts efficiency (from cuts variation)
281 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
aebba8df 282 fCutsEff->SetBinContent(1,0.);
283 fCutsEff->SetBinContent(2,0.);
cc4bb301 284 fCutsEff->SetBinContent(3,0.13);
285 fCutsEff->SetBinContent(4,0.11);
286 for(Int_t i=5;i<=16;i++) fCutsEff->SetBinContent(i,0.10);
6c388dee 287 for(Int_t i=17;i<=20;i++) fCutsEff->SetBinContent(i,0.);
0233abe6 288
289 // PID efficiency (from PID/noPID)
290 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
6c388dee 291// for(Int_t i=3;i<=6;i++) fPIDEff->SetBinContent(i,0.10);
292// for(Int_t i=7;i<=16;i++) fPIDEff->SetBinContent(i,0.05);
293 for(Int_t i=3;i<=16;i++) fPIDEff->SetBinContent(i,0.05);
0233abe6 294
295 // MC dN/dpt
296 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
cc4bb301 297 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.01);
298 // fMCPtShape->SetBinContent(3,0.04); Not set for peripherals (Raa Vs pt is flat)
299 // fMCPtShape->SetBinContent(4,0.02);
300 for(Int_t i=13;i<=16;i++) fMCPtShape->SetBinContent(i,0.03);
301
302 // // particle-antiparticle
303 // fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
304 // for(Int_t i=3;i<=12;i++) fPartAntipart->SetBinContent(i,0.05);
0233abe6 305
306 return;
307}
a8c3295d 308
309//--------------------------------------------------------------------------
310void AliHFSystErr::InitD0toKpi2010ppLowEn() {
311 //
312 // D0->Kpi syst errors. Low energy run
313 // 2011 2.76 TeV pp sample
314 //
315 AliInfo(" Settings for D0 --> K pi, p-p collisions at 2.76 TeV");
316
317 // Normalization
318 fNorm = new TH1F("fNorm","fNorm",20,0,20);
f9a85c82 319 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.031); // 4% error on sigmaV0and
a8c3295d 320
321 // Branching ratio
322 fBR = new TH1F("fBR","fBR",20,0,20);
323 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.012); // 1.2% PDG2010
324
325 // Tracking efficiency
326 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
f9a85c82 327 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.12); //10% (5% per track)
a8c3295d 328
329 // Raw yield extraction
330 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
331 fRawYield->SetBinContent(1,1);
f9a85c82 332 for(Int_t i=1;i<=20;i++) fRawYield->SetBinContent(i,0.15);
a8c3295d 333
334 // Cuts efficiency (from cuts variation)
335 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
6c388dee 336 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.10); // 10%
f9a85c82 337 fCutsEff->SetBinContent(2,0.20);
338 for(Int_t i=7;i<=20;i++) fCutsEff->SetBinContent(i,0.15); // 10%
339
a8c3295d 340
341 // PID efficiency (from PID/noPID)
342 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
f9a85c82 343 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.15); // 10%
344 // fPIDEff->SetBinContent(2,0.20);
345 for(Int_t i=7;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 10%
a8c3295d 346
347 // MC dN/dpt
348 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 349 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0);
f9a85c82 350// fMCPtShape->SetBinContent(1,0.03);
351// fMCPtShape->SetBinContent(2,0.03);
a8c3295d 352
f9a85c82 353// // particle-antiparticle
354// fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
355// fPartAntipart->SetBinContent(1,1);
356// fPartAntipart->SetBinContent(2,1);
357// for(Int_t i=3;i<=6;i++) fPartAntipart->SetBinContent(i,0.08);
358// for(Int_t i=1;i<=20;i++) fPartAntipart->SetBinContent(i,0.);
a8c3295d 359
360 return;
361}
362
0233abe6 363//--------------------------------------------------------------------------
5541b811 364void AliHFSystErr::InitDplustoKpipi2010pp() {
0233abe6 365 //
366 // D+->Kpipi syst errors. Responsible: R. Bala
5541b811 367 // 2010 pp sample
0233abe6 368 //
369
1f91ef56 370
371// Normalization
372 fNorm = new TH1F("fNorm","fNorm",24,0,24);
f8bc42d3 373 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.04); // 4% error on sigmaV0and
626bcf57 374
375 // Branching ratio
1f91ef56 376 fBR = new TH1F("fBR","fBR",24,0,24);
f7c8a2f1 377 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.021); // 2.1% PDG2010
626bcf57 378
379 // Tracking efficiency
1f91ef56 380 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);
f8bc42d3 381 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.12); // 12% (4% per track)
626bcf57 382
383
384 // Raw yield extraction
1f91ef56 385 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
d2e5959f 386 fRawYield->SetBinContent(1,1);
1f91ef56 387 fRawYield->SetBinContent(2,0.25);
388 fRawYield->SetBinContent(3,0.25);
d2e5959f 389 fRawYield->SetBinContent(4,0.20);
1f91ef56 390 fRawYield->SetBinContent(5,0.09);
391 fRawYield->SetBinContent(6,0.09);
d2e5959f 392 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
393 for(Int_t i=12;i<=24;i++) fRawYield->SetBinContent(i,0.10);
1f91ef56 394
626bcf57 395 // Cuts efficiency (from cuts variation)
1f91ef56 396 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
397 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
626bcf57 398
399 // PID efficiency (from PID/noPID)
1f91ef56 400 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
401 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.05); // 5%
402 fPIDEff->SetBinContent(1,0.15); // 15%
403 fPIDEff->SetBinContent(2,0.15); // 15%
404 fPIDEff->SetBinContent(3,0.15); // 15%
405 fPIDEff->SetBinContent(4,0.15); // 15%
406 for(Int_t i=12;i<=16;i++) fPIDEff->SetBinContent(i,0.10); // 5%
407
408 // MC dN/dpt
409 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
410 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0);
578bfbba 411 fMCPtShape->SetBinContent(1,0.03);
412 fMCPtShape->SetBinContent(2,0.03);
626bcf57 413
414
415 // particle-antiparticle
416 /*
417 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
418 fPartAntipart->SetBinContent(1,1);
419 fPartAntipart->SetBinContent(2,1);
420 fPartAntipart->SetBinContent(3,0.12);
421 for(Int_t i=4;i<=20;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
422 */
0233abe6 423 return;
424}
1f91ef56 425
66247513 426//--------------------------------------------------------------------------
427void AliHFSystErr::InitDstoKKpi2010pp() {
428 //
429 // D+s->KKpi syst errors. Responsible: G.M. Innocenti
430 // 2010 pp sample
431 //
432
433
434// Normalization
435 fNorm = new TH1F("fNorm","fNorm",12,0,12);
436 for(Int_t i=1;i<=12;i++) fNorm->SetBinContent(i,0.07); // 7% error on sigmaV0and
437
438 // Branching ratio
439 fBR = new TH1F("fBR","fBR",12,0,12);
440 for(Int_t i=1;i<=12;i++) fBR->SetBinContent(i,0.05); // 5% PDG2010
441
442 // Tracking efficiency
443 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",12,0,12);
444 for(Int_t i=1;i<=12;i++) fTrackingEff->SetBinContent(i,0.03); // 3% (1% per track)
445
446
447 // Raw yield extraction
448 fRawYield = new TH1F("fRawYield","fRawYield",12,0,12);
449 fRawYield->SetBinContent(1,1);
450 fRawYield->SetBinContent(2,1);
451 fRawYield->SetBinContent(3,0.20);
452 fRawYield->SetBinContent(4,0.20);
453 fRawYield->SetBinContent(5,0.15);
454 fRawYield->SetBinContent(6,0.15);
455 fRawYield->SetBinContent(7,0.15);
456 fRawYield->SetBinContent(8,0.15);
457 fRawYield->SetBinContent(9,0.20);
458 fRawYield->SetBinContent(10,0.20);
459 fRawYield->SetBinContent(11,0.20);
460 fRawYield->SetBinContent(12,0.20);
461
462 // Cuts efficiency (from cuts variation)
463 fCutsEff = new TH1F("fCutsEff","fCutsEff",12,0,12);
464 for(Int_t i=1;i<=12;i++) fCutsEff->SetBinContent(i,0.15); // 15%
465
466 // PID efficiency (from PID/noPID)
467 fPIDEff = new TH1F("fPIDEff","fPIDEff",12,0,12);
468 for(Int_t i=1;i<=12;i++) fPIDEff->SetBinContent(i,0.07); // 7%
469
470 // MC dN/dpt (copied from D0 : will update later)
471 //fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",12,0,12);
472 //for(Int_t i=1;i<=12;i++) fMCPtShape->SetBinContent(i,(Float_t)i*0.006);
473
474
475 // particle-antiparticle
476 /*
477 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",12,0,12);
478 fPartAntipart->SetBinContent(1,1);
479 fPartAntipart->SetBinContent(2,1);
480 fPartAntipart->SetBinContent(3,0.12);
481 for(Int_t i=4;i<=12;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
482 */
483 return;
484}
485
486
0233abe6 487//--------------------------------------------------------------------------
5541b811 488void AliHFSystErr::InitDplustoKpipi2010PbPb020() {
489 //
490 // D+->Kpipi syst errors. Responsible: ??
491 // 2010 PbPb sample, 0-20 CC
492 //
aebba8df 493
aebba8df 494 // Normalization
495 fNorm = new TH1F("fNorm","fNorm",20,0,20);
d5e15690 496 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
aebba8df 497
498 // Branching ratio
499 fBR = new TH1F("fBR","fBR",20,0,20);
f7c8a2f1 500 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.021); // 2.1% PDG2010
aebba8df 501
502 // Tracking efficiency
503 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
69bcc748 504 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
aebba8df 505
506 // Raw yield extraction
507 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
6c388dee 508 for(Int_t i=1;i<=20;i++) fRawYield->SetBinContent(i,.10); //5 to 10%
509 // fRawYield->SetBinContent(5,0.23);
510 //fRawYield->SetBinContent(6,0.23);
cb142b90 511 fRawYield->SetBinContent(7,0.20);
512 fRawYield->SetBinContent(8,0.20);
513 fRawYield->SetBinContent(9,0.15);
514 fRawYield->SetBinContent(10,0.15);
515 fRawYield->SetBinContent(11,0.15);
516 fRawYield->SetBinContent(12,0.15);
aebba8df 517
518 // Cuts efficiency (from cuts variation)
519 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
666cf569 520 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.15); // 10%
aebba8df 521
522 // PID efficiency (from PID/noPID)
523 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
524 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 5%
aebba8df 525
f7c8a2f1 526 // MC dN/dpt (2/2/2012)
aebba8df 527 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 528 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.);
f7c8a2f1 529 for(Int_t iBin=7; iBin<=8; iBin++) fMCPtShape->SetBinContent(iBin,0.01);
530 for(Int_t iBin=9; iBin<=12; iBin++) fMCPtShape->SetBinContent(iBin,0.05);
531 for(Int_t iBin=13; iBin<=16; iBin++) fMCPtShape->SetBinContent(iBin,0.05);
aebba8df 532
533
534 // particle-antiparticle
535 /*
536 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
537 fPartAntipart->SetBinContent(1,1);
538 fPartAntipart->SetBinContent(2,1);
539 fPartAntipart->SetBinContent(3,0.12);
540 for(Int_t i=4;i<=20;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
541 */
6c388dee 542
5541b811 543 return;
544}
545
546//--------------------------------------------------------------------------
547void AliHFSystErr::InitDplustoKpipi2010PbPb4080() {
548 //
549 // D+->Kpipi syst errors. Responsible: ??
550 // 2010 PbPb sample, 40-80 CC
551 //
552
aebba8df 553
554 // Normalization
555 fNorm = new TH1F("fNorm","fNorm",20,0,20);
d5e15690 556 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.07); // TAA and pp norm
aebba8df 557
558 // Branching ratio
559 fBR = new TH1F("fBR","fBR",20,0,20);
f7c8a2f1 560 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.021); // 2.1%
aebba8df 561
562 // Tracking efficiency
563 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
69bcc748 564 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
aebba8df 565
566
567 // Raw yield extraction
568 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
569 fRawYield->SetBinContent(1,1);
570 fRawYield->SetBinContent(2,1);
571 fRawYield->SetBinContent(3,1);
6970b225 572 fRawYield->SetBinContent(4,0.15);
cb142b90 573 fRawYield->SetBinContent(5,0.05);
574 fRawYield->SetBinContent(6,0.05);
575 fRawYield->SetBinContent(7,0.15);
576 fRawYield->SetBinContent(8,0.15);
6970b225 577 for(Int_t i=9;i<=12;i++) fRawYield->SetBinContent(i,0.15);
aebba8df 578 for(Int_t i=13;i<=20;i++) fRawYield->SetBinContent(i,1); //5 to 10%
579
580 // Cuts efficiency (from cuts variation)
581 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
582 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.10); // 10%
583
584 // PID efficiency (from PID/noPID)
585 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
586 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 5%
587 fPIDEff->SetBinContent(3,0.13); // 13%
588
589
f7c8a2f1 590 // MC dN/dpt (2/2/2012)
aebba8df 591 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 592 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0);
f7c8a2f1 593 for(Int_t iBin=4; iBin<=8; iBin++) fMCPtShape->SetBinContent(iBin,0.01);
594 for(Int_t iBin=9; iBin<=12; iBin++) fMCPtShape->SetBinContent(iBin,0.03);
595 for(Int_t iBin=13; iBin<=16; iBin++) fMCPtShape->SetBinContent(iBin,0.03);
aebba8df 596
597
598 // particle-antiparticle
599 /*
600 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
601 fPartAntipart->SetBinContent(1,1);
602 fPartAntipart->SetBinContent(2,1);
603 fPartAntipart->SetBinContent(3,0.12);
604 for(Int_t i=4;i<=20;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
605 */
5541b811 606 return;
607}
608
a8c3295d 609//--------------------------------------------------------------------------
610void AliHFSystErr::InitDplustoKpipi2010ppLowEn() {
611
612 //
613 // D+->Kpipi syst errors. Responsible: R. Bala
614 // 2011 2.76 TeV pp sample
615 //
616 AliInfo(" Settings for D+ --> K pi pi p-p collisions at 2.76 TeV");
617
618 // Normalization
619 fNorm = new TH1F("fNorm","fNorm",20,0,20);
f9a85c82 620 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.031); // 10% error on sigmaV0and
a8c3295d 621
622 // Branching ratio
623 fBR = new TH1F("fBR","fBR",20,0,20);
f7c8a2f1 624 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.021); // 2.1% PDG2010
a8c3295d 625
626 // Tracking efficiency
627 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
f9a85c82 628 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.18); // 3% (1% per track)
a8c3295d 629
630 // Raw yield extraction
631 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
632 fRawYield->SetBinContent(1,1);
633 fRawYield->SetBinContent(2,1);
f9a85c82 634 for(Int_t i=3;i<=6;i++) fRawYield->SetBinContent(i,0.10); //5 to 10%
635 fRawYield->SetBinContent(7,0.15);
636 fRawYield->SetBinContent(8,0.15);
637 for(Int_t i=9;i<=20;i++) fRawYield->SetBinContent(i,0.055); //5 to 10%
a8c3295d 638
639 // Cuts efficiency (from cuts variation)
640 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
f9a85c82 641 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.15); // 10%
a8c3295d 642
643 // PID efficiency (from PID/noPID)
644 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
645 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 5%
f9a85c82 646 fPIDEff->SetBinContent(3,0.10); // 13%
647 fPIDEff->SetBinContent(4,0.10); // 13%
a8c3295d 648
649 // MC dN/dpt (copied from D0 : will update later)
650 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 651 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.);
652 fMCPtShape->SetBinContent(1,0.03);
653 fMCPtShape->SetBinContent(2,0.03);
a8c3295d 654
655 return;
656}
657
5541b811 658//--------------------------------------------------------------------------
659void AliHFSystErr::InitDstartoD0pi2010pp() {
0233abe6 660 //
2cf98d0d 661 // D*+->D0pi syst errors. Responsible: A. Grelli, Y. Wang
5541b811 662 // 2010 pp sample
0233abe6 663 //
664
2cf98d0d 665 // Normalization
fa2be30c 666 fNorm = new TH1F("fNorm","fNorm",24,0,24);
f8bc42d3 667 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.04); // 4% error on sigmaV0and
fa2be30c 668
669 // Branching ratio
670 fBR = new TH1F("fBR","fBR",24,0,24);
671 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
672
673 // Tracking efficiency
674 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);
675 fTrackingEff->SetBinContent(1,1.0);
f8bc42d3 676 fTrackingEff->SetBinContent(2,0.13); // 10% (ITSsa) \oplus 8% (4% per ITSTPC track)
677 fTrackingEff->SetBinContent(3,0.12);
678 fTrackingEff->SetBinContent(3,0.12);
679 for(Int_t i=4;i<=24;i++) fTrackingEff->SetBinContent(i,0.12); // 12% (4% per track)
fa2be30c 680
681
682 // Raw yield extraction
683 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
684 fRawYield->SetBinContent(1,1.0);
d2e5959f 685 fRawYield->SetBinContent(2,0.10);
fa2be30c 686 fRawYield->SetBinContent(3,0.04);
d2e5959f 687 fRawYield->SetBinContent(4,0.03);
fa2be30c 688 fRawYield->SetBinContent(5,0.03);
d2e5959f 689 fRawYield->SetBinContent(6,0.05);
690 fRawYield->SetBinContent(7,0.05);
691 fRawYield->SetBinContent(8,0.05);
692 for(Int_t i=9;i<=12;i++) fRawYield->SetBinContent(i,0.04); //4%
693 for(Int_t i=13;i<=16;i++) fRawYield->SetBinContent(i,0.09); //4%
694 for(Int_t i=17;i<=24;i++) fRawYield->SetBinContent(i,0.2); //4%
fa2be30c 695
696 // Cuts efficiency (from cuts variation)
697 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
698 fCutsEff->SetBinContent(2,0.22);
699 for(Int_t i=3;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
700
701 // PID efficiency (from PID/noPID)
702 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
703 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.04); // 3%
704
705
706 // MC dN/dpt (copied from D0 : will update later)
707 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
578bfbba 708 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0);
709 fMCPtShape->SetBinContent(1,0.03);
710 fMCPtShape->SetBinContent(2,0.03);
fa2be30c 711
712 return;
713
714
715}
716//--------------------------------------------------------------------------
717void AliHFSystErr::InitDstartoD0pi2010ppLowEn() {
718
719 //
720 // D+->Kpipi syst errors. Responsible: A. Grelli
721 // 2011 2.76 TeV pp sample
722 //
723 AliInfo(" Settings for D*+ --> D0 pi p-p collisions at 2.76 TeV");
724
725// Normalization
2cf98d0d 726 fNorm = new TH1F("fNorm","fNorm",20,0,20);
f9a85c82 727 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.031); // 10% error on sigmaV0and
2cf98d0d 728
729 // Branching ratio
730 fBR = new TH1F("fBR","fBR",20,0,20);
8accac87 731 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
2cf98d0d 732
733 // Tracking efficiency
734 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
f9a85c82 735 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.18); //10% (to be checked!!)
2cf98d0d 736
737 // Raw yield extraction
738 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
8accac87 739 fRawYield->SetBinContent(1,1);
fa2be30c 740 fRawYield->SetBinContent(2,1);
f9a85c82 741 fRawYield->SetBinContent(3,0.14);
742 fRawYield->SetBinContent(4,0.14);
743 fRawYield->SetBinContent(5,0.12);
744 fRawYield->SetBinContent(6,0.12);
745 fRawYield->SetBinContent(7,0.06);
746 fRawYield->SetBinContent(8,0.06);
747 fRawYield->SetBinContent(9,0.08);
748 fRawYield->SetBinContent(10,0.08);
749 fRawYield->SetBinContent(11,0.08);
750 fRawYield->SetBinContent(12,0.08);
fa2be30c 751 for(Int_t i=9;i<=20;i++) fRawYield->SetBinContent(i,0.065);
2cf98d0d 752
753 // Cuts efficiency (from cuts variation)
754 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
f9a85c82 755 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.10);
756 fCutsEff->SetBinContent(3,0.15);
757 fCutsEff->SetBinContent(4,0.15);
758 fCutsEff->SetBinContent(5,0.15);
759 fCutsEff->SetBinContent(6,0.15);
760 fCutsEff->SetBinContent(7,0.10);
761 fCutsEff->SetBinContent(8,0.10);
762 fCutsEff->SetBinContent(9,0.10);
763 fCutsEff->SetBinContent(10,0.10);
764 fCutsEff->SetBinContent(11,0.10);
765 fCutsEff->SetBinContent(12,0.10);
2cf98d0d 766
767 // PID efficiency (from PID/noPID)
768 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
fa2be30c 769 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 10%
2cf98d0d 770
fa2be30c 771 // MC dN/dpt
2cf98d0d 772 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 773 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.);
774 fMCPtShape->SetBinContent(1,0.03);
775 fMCPtShape->SetBinContent(2,0.03);
2cf98d0d 776
0233abe6 777 return;
778}
6c388dee 779
fa2be30c 780//------------------------------------------------------------------------
5541b811 781void AliHFSystErr::InitDstartoD0pi2010PbPb020() {
782 //
fa2be30c 783 // D*+->D0pi syst errors. Responsible: A. Grelli
5541b811 784 // 2010 PbPb sample, 0-20 CC
785 //
786
fa2be30c 787 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 0-20 centrality - DUMMY");
788
789 // Normalization
790 fNorm = new TH1F("fNorm","fNorm",24,0,24);
d5e15690 791 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
fa2be30c 792
793 // Branching ratio
794 fBR = new TH1F("fBR","fBR",24,0,24);
795 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
796
797 // Tracking efficiency
798 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);;
69bcc748 799 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
fa2be30c 800
801
802 // Raw yield extraction
803 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
6c388dee 804 for(Int_t i=1;i<=24;i++) fRawYield->SetBinContent(i,0.1); //4%
805 fRawYield->SetBinContent(3,0.2);
806 fRawYield->SetBinContent(4,0.2);
807 fRawYield->SetBinContent(5,0.2);
808 fRawYield->SetBinContent(6,0.2);
fa2be30c 809
810 // Cuts efficiency (from cuts variation)
811 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
812 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
6fd587a4 813 fCutsEff->SetBinContent(4,0.15);
814 fCutsEff->SetBinContent(5,0.15);
815 fCutsEff->SetBinContent(6,0.15);
fa2be30c 816
817 // PID efficiency (from PID/noPID)
818 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
6c388dee 819 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.05); // 3%
fa2be30c 820
821
6fd587a4 822 // MC dN/dpt (from study on D* pt shape)
fa2be30c 823 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
6fd587a4 824 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0.045);
825 fMCPtShape->SetBinContent(4,0.025);
826 fMCPtShape->SetBinContent(5,0.025);
827 fMCPtShape->SetBinContent(6,0.025);
828 fMCPtShape->SetBinContent(7,0.04);
829 fMCPtShape->SetBinContent(8,0.04);
830 fMCPtShape->SetBinContent(9,0.03);
831 fMCPtShape->SetBinContent(10,0.03);
832 fMCPtShape->SetBinContent(11,0.03);
833 fMCPtShape->SetBinContent(12,0.03);
834
835
fa2be30c 836
837 return;
838
839}
6c388dee 840
fa2be30c 841//-------------------------------------------------------------------------
842void AliHFSystErr::InitDstartoD0pi2010PbPb2040() {
843 //
844 // D*+->D0pi syst errors. Responsible: A. Grelli
845 // 2010 PbPb sample, 20-40 CC
846 //
847
848 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 20-40 centrality - DUMMY");
849
850 // Normalization
851 fNorm = new TH1F("fNorm","fNorm",24,0,24);
852 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.10); // 10% error on sigmaV0and
853
854 // Branching ratio
855 fBR = new TH1F("fBR","fBR",24,0,24);
856 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
857
858 // Tracking efficiency
859 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);;
69bcc748 860 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
fa2be30c 861
862
863 // Raw yield extraction
864 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
865 for(Int_t i=1;i<=24;i++) fRawYield->SetBinContent(i,0.15); //4%
866
867 // Cuts efficiency (from cuts variation)
868 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
869 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
870
871 // PID efficiency (from PID/noPID)
872 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
873 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.04); // 3%
874
875
876 // MC dN/dpt (copied from D0 : will update later)
877 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
578bfbba 878 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0.);
879 fMCPtShape->SetBinContent(1,0.03);
880 fMCPtShape->SetBinContent(2,0.03);
fa2be30c 881
5541b811 882 return;
fa2be30c 883
5541b811 884}
6c388dee 885
5541b811 886//--------------------------------------------------------------------------
887void AliHFSystErr::InitDstartoD0pi2010PbPb4080() {
888 //
fa2be30c 889 // D*+->D0pi syst errors. Responsible: A. Grelli
5541b811 890 // 2010 PbPb sample, 40-80 CC
891 //
892
fa2be30c 893 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 40-80 centrality - DUMMY");
894
895 // Normalization
896 fNorm = new TH1F("fNorm","fNorm",24,0,24);
d5e15690 897 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.07); // TAA and pp norm
fa2be30c 898
899 // Branching ratio
900 fBR = new TH1F("fBR","fBR",24,0,24);
901 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
902
903 // Tracking efficiency
904 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);;
69bcc748 905 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
fa2be30c 906
907
908 // Raw yield extraction
909 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
6c388dee 910 for(Int_t i=1;i<=24;i++) fRawYield->SetBinContent(i,0.2); //4%
911 fRawYield->SetBinContent(1,1);
912 fRawYield->SetBinContent(2,0.15);
913 fRawYield->SetBinContent(3,0.15);
914 fRawYield->SetBinContent(4,0.15);
915 fRawYield->SetBinContent(5,0.15);
916 fRawYield->SetBinContent(6,0.10);
917 fRawYield->SetBinContent(7,0.10);
918 fRawYield->SetBinContent(8,0.10);
919 fRawYield->SetBinContent(9,0.11);
920 fRawYield->SetBinContent(10,0.11);
921 fRawYield->SetBinContent(11,0.11);
922 fRawYield->SetBinContent(12,0.11);
923 fRawYield->SetBinContent(13,0.08);
924 fRawYield->SetBinContent(14,0.08);
925 fRawYield->SetBinContent(15,0.08);
926 fRawYield->SetBinContent(16,0.08);
927
928
fa2be30c 929 // Cuts efficiency (from cuts variation)
930 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
931 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
932
933 // PID efficiency (from PID/noPID)
934 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
6c388dee 935 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.05); // 3%
fa2be30c 936
937
938 // MC dN/dpt (copied from D0 : will update later)
939 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
6fd587a4 940 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0.01);
941 fMCPtShape->SetBinContent(2,0.05);
942 fMCPtShape->SetBinContent(3,0.05);
943 fMCPtShape->SetBinContent(4,0.05);
944 fMCPtShape->SetBinContent(5,0.04);
945 fMCPtShape->SetBinContent(6,0.02);
946 fMCPtShape->SetBinContent(7,0.04);
947 fMCPtShape->SetBinContent(8,0.04);
948
5541b811 949 return;
fa2be30c 950
5541b811 951}
6c388dee 952
414bc6a5 953//--------------------------------------------------------------------------
954void AliHFSystErr::InitD0toKpi2010PbPb010CentScan(){
955 // define errors for RAA vs. centrality
956 InitD0toKpi2010PbPb020();
41cfcd39 957 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
958 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 959}
960//--------------------------------------------------------------------------
961void AliHFSystErr::InitD0toKpi2010PbPb1020CentScan(){
962 // define errors for RAA vs. centrality
963 InitD0toKpi2010PbPb020();
41cfcd39 964 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
965 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 966}
967//--------------------------------------------------------------------------
968void AliHFSystErr::InitD0toKpi2010PbPb2040CentScan(){
969 // define errors for RAA vs. centrality
41cfcd39 970 InitD0toKpi2010PbPb4080();
971 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
972 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 973}
974//--------------------------------------------------------------------------
975void AliHFSystErr::InitD0toKpi2010PbPb4060CentScan(){
41cfcd39 976 // define errors for RAA vs. centrality
414bc6a5 977 InitD0toKpi2010PbPb4080();
41cfcd39 978 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.06);
979 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 980}
981//--------------------------------------------------------------------------
982void AliHFSystErr::InitD0toKpi2010PbPb6080CentScan(){
41cfcd39 983 // define errors for RAA vs. centrality
414bc6a5 984 InitD0toKpi2010PbPb4080();
41cfcd39 985 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.08);
986 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 987}
988//--------------------------------------------------------------------------
989void AliHFSystErr::InitDplustoKpipi2010PbPb010CentScan(){
990 // define errors for RAA vs. centrality
991 InitDplustoKpipi2010PbPb020();
7b03f1ec 992 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.18);
eefab142 993 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.09);
7b03f1ec 994
414bc6a5 995}
996//--------------------------------------------------------------------------
997void AliHFSystErr::InitDplustoKpipi2010PbPb1020CentScan(){
998 // define errors for RAA vs. centrality
999 InitDplustoKpipi2010PbPb020();
7b03f1ec 1000 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.23);
eefab142 1001 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1002}
1003//--------------------------------------------------------------------------
1004void AliHFSystErr::InitDplustoKpipi2010PbPb2040CentScan(){
1005 // define errors for RAA vs. centrality
1006 InitDplustoKpipi2010PbPb020();
7b03f1ec 1007 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.08);
eefab142 1008 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.095);
414bc6a5 1009}
1010//--------------------------------------------------------------------------
1011void AliHFSystErr::InitDplustoKpipi2010PbPb4060CentScan(){
1012 // define errors for RAA vs. centrality
1013 InitDplustoKpipi2010PbPb4080();
7b03f1ec 1014 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.08);
eefab142 1015 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1016}
1017//--------------------------------------------------------------------------
1018void AliHFSystErr::InitDplustoKpipi2010PbPb6080CentScan(){
1019 // define errors for RAA vs. centrality
1020 InitDplustoKpipi2010PbPb4080();
7b03f1ec 1021 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.15);
eefab142 1022 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.07);
414bc6a5 1023}
1024
1025//--------------------------------------------------------------------------
1026void AliHFSystErr::InitDstartoD0pi2010PbPb010CentScan(){
1027 // define errors for RAA vs. centrality
1028 InitDstartoD0pi2010PbPb020();
1029 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.16);
eefab142 1030 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.15);
414bc6a5 1031}
1032//--------------------------------------------------------------------------
1033void AliHFSystErr::InitDstartoD0pi2010PbPb1020CentScan(){
1034 // define errors for RAA vs. centrality
1035 InitDstartoD0pi2010PbPb020();
1036 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
eefab142 1037 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.15);
414bc6a5 1038}
1039//--------------------------------------------------------------------------
1040void AliHFSystErr::InitDstartoD0pi2010PbPb2040CentScan(){
1041 // define errors for RAA vs. centrality
1042 InitDstartoD0pi2010PbPb2040();
1043 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.10);
eefab142 1044 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1045}
1046//--------------------------------------------------------------------------
1047void AliHFSystErr::InitDstartoD0pi2010PbPb4060CentScan(){
1048 // define errors for RAA vs. centrality
1049 InitDstartoD0pi2010PbPb4080();
1050 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.10);
eefab142 1051 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.045);
414bc6a5 1052}
1053//--------------------------------------------------------------------------
1054void AliHFSystErr::InitDstartoD0pi2010PbPb6080CentScan(){
1055 // define errors for RAA vs. centrality
1056 InitDstartoD0pi2010PbPb4080();
1057 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.10);
eefab142 1058 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.045);
414bc6a5 1059}
1060
1061
5541b811 1062//--------------------------------------------------------------------------
0233abe6 1063Double_t AliHFSystErr::GetCutsEffErr(Double_t pt) const {
1064 //
1065 // Get error
1066 //
1067
1068 Int_t bin=fCutsEff->FindBin(pt);
1069
1070 return fCutsEff->GetBinContent(bin);
1071}
1072//--------------------------------------------------------------------------
1073Double_t AliHFSystErr::GetMCPtShapeErr(Double_t pt) const {
1074 //
1075 // Get error
1076 //
1077
1078 Int_t bin=fMCPtShape->FindBin(pt);
1079
1080 return fMCPtShape->GetBinContent(bin);
1081}
1082//--------------------------------------------------------------------------
1083Double_t AliHFSystErr::GetSeleEffErr(Double_t pt) const {
1084 //
1085 // Get error
1086 //
1087
1088 Double_t err=GetCutsEffErr(pt)*GetCutsEffErr(pt)+GetMCPtShapeErr(pt)*GetMCPtShapeErr(pt);
1089
1090 return TMath::Sqrt(err);
1091}
1092//--------------------------------------------------------------------------
1093Double_t AliHFSystErr::GetPIDEffErr(Double_t pt) const {
1094 //
1095 // Get error
1096 //
1097
1098 Int_t bin=fPIDEff->FindBin(pt);
1099
1100 return fPIDEff->GetBinContent(bin);
1101}
1102//--------------------------------------------------------------------------
1103Double_t AliHFSystErr::GetTrackingEffErr(Double_t pt) const {
1104 //
1105 // Get error
1106 //
1107
1108 Int_t bin=fTrackingEff->FindBin(pt);
1109
1110 return fTrackingEff->GetBinContent(bin);
1111}
1112//--------------------------------------------------------------------------
1113Double_t AliHFSystErr::GetRawYieldErr(Double_t pt) const {
1114 //
1115 // Get error
1116 //
1117
1118 Int_t bin=fRawYield->FindBin(pt);
1119
1120 return fRawYield->GetBinContent(bin);
1121}
1122//--------------------------------------------------------------------------
1123Double_t AliHFSystErr::GetPartAntipartErr(Double_t pt) const {
1124 //
1125 // Get error
1126 //
1127
1128 Int_t bin=fPartAntipart->FindBin(pt);
1129
1130 return fPartAntipart->GetBinContent(bin);
1131}
1132//--------------------------------------------------------------------------
1133Double_t AliHFSystErr::GetTotalSystErr(Double_t pt,Double_t feeddownErr) const {
1134 //
1135 // Get total syst error (except norm. error)
1136 //
1137
1138 Double_t err=0.;
1139
1140 if(fRawYield) err += GetRawYieldErr(pt)*GetRawYieldErr(pt);
1141 if(fTrackingEff) err += GetTrackingEffErr(pt)*GetTrackingEffErr(pt);
f9a85c82 1142 // if(fBR) err += GetBRErr()*GetBRErr();
0233abe6 1143 if(fCutsEff) err += GetCutsEffErr(pt)*GetCutsEffErr(pt);
1144 if(fPIDEff) err += GetPIDEffErr(pt)*GetPIDEffErr(pt);
1145 if(fMCPtShape) err += GetMCPtShapeErr(pt)*GetMCPtShapeErr(pt);
1146 if(fPartAntipart) err += GetPartAntipartErr(pt)*GetPartAntipartErr(pt);
1147
1148 err += feeddownErr*feeddownErr;
1149
1150 return TMath::Sqrt(err);
1151}
1152//---------------------------------------------------------------------------
5ad8ad40 1153void AliHFSystErr::DrawErrors(TGraphAsymmErrors *grErrFeeddown) const {
0233abe6 1154 //
1155 // Draw errors
1156 //
1157 gStyle->SetOptStat(0);
1158
a07118d0 1159 TCanvas *cSystErr = new TCanvas("cSystErr","Systematic Errors",300,80,640,500);
1160 cSystErr->Range(0.20,-0.5,18.4,0.34);
1161 cSystErr->SetRightMargin(0.318);
0233abe6 1162 cSystErr->SetFillColor(0);
1163
2ee3afe2 1164 TH2F *hFrame = new TH2F("hFrame","Systematic errors; p_{t} [GeV/c]; Relative Error",20,0,20,100,-1,+1);
f1d72175 1165 hFrame->SetAxisRange(1.,15.9,"X");
a07118d0 1166 hFrame->SetAxisRange(-0.5,0.5,"Y");
0233abe6 1167 hFrame->Draw();
1168
a07118d0 1169 TLegend *leg = new TLegend(0.69,0.44,0.98,0.86,NULL,"brNDC");
1170 leg->SetTextSize(0.03601695);
0233abe6 1171 leg->SetFillStyle(0);
1172 leg->SetBorderSize(0);
2ee3afe2 1173
f1d72175 1174 TH1F *hTotErr=new TH1F("hTotErr","",24,0,24);
2ee3afe2 1175 Int_t nbins = fNorm->GetNbinsX();
1176 TGraphAsymmErrors *gTotErr = new TGraphAsymmErrors(nbins);
f1d72175 1177 for(Int_t i=1;i<=24;i++) {
2ee3afe2 1178 Double_t pt = hTotErr->GetBinCenter(i);
1179 Double_t ptwidth = hTotErr->GetBinWidth(i);
1180
1181 if(grErrFeeddown) {
1182 Double_t x=0., y=0., errxl=0., errxh=0., erryl=0., erryh=0.;
1183 Double_t toterryl=0., toterryh=0.;
1184 for(Int_t j=0; j<grErrFeeddown->GetN(); j++) {
1185 grErrFeeddown->GetPoint(j,x,y);
1186 errxh = grErrFeeddown->GetErrorXhigh(j);
1187 errxl = grErrFeeddown->GetErrorXlow(j);
a07118d0 1188 if ( ( (x-errxl) <= pt) && ( (x+errxl) >= pt) ) {
2ee3afe2 1189 erryh = grErrFeeddown->GetErrorYhigh(j);
1190 erryl = grErrFeeddown->GetErrorYlow(j);
1191 }
1192 }
1193 if (erryl>=1e-3) toterryl = GetTotalSystErr(pt,erryl);
1194 else toterryl = GetTotalSystErr(pt);
1195 if (erryh>=1e-3) toterryh = GetTotalSystErr(pt,erryh);
1196 else toterryh = GetTotalSystErr(pt);
1197
1198 hTotErr->SetBinContent(i,toterryh);
1199 gTotErr->SetPoint(i,pt,0.);
1200 gTotErr->SetPointError(i,ptwidth/2.,ptwidth/2.,toterryl,toterryh); // i, exl, exh, eyl, eyh
1201 }
1202 else {
1203 hTotErr->SetBinContent(i,GetTotalSystErr(pt));
1204 gTotErr->SetPoint(i,pt,0.);
1205 gTotErr->SetPointError(i,ptwidth/2.,ptwidth/2.,GetTotalSystErr(pt),GetTotalSystErr(pt)); // i, exl, exh, eyl, eyh
1206 }
1207
1208 }
f968ef30 1209 gTotErr->SetLineColor(kBlack);
1210 gTotErr->SetFillColor(kRed);
1211 gTotErr->SetFillStyle(3002);
2ee3afe2 1212 gTotErr->Draw("2");
1213 leg->AddEntry(gTotErr,"Total (excl. norm.)","f");
1214// hTotErr->SetLineColor(1);
1215// hTotErr->SetLineWidth(3);
1216// hTotErr->Draw("same");
1217// leg->AddEntry(hTotErr,"Total (excl. norm.)","l");
1218
0233abe6 1219
e373b9f0 1220 fNorm->SetFillColor(1);
1221 fNorm->SetFillStyle(3002);
1222 //fNorm->Draw("same");
1223 //TH1F *hNormRefl = ReflectHisto(fNorm);
1224 //hNormRefl->Draw("same");
1225 leg->AddEntry(fNorm,"Normalization (10%)","");
1226
5ad8ad40 1227 if(grErrFeeddown) {
1228 grErrFeeddown->SetFillColor(kTeal-8);
1229 grErrFeeddown->SetFillStyle(3001);
1230 grErrFeeddown->Draw("2");
1231 leg->AddEntry(grErrFeeddown,"Feed-down from B","f");
1232 }
0233abe6 1233 if(fTrackingEff) {
5ad8ad40 1234 fTrackingEff->SetFillColor(4);
1235 fTrackingEff->SetFillStyle(3006);
0233abe6 1236 fTrackingEff->Draw("same");
f968ef30 1237 TH1F *hTrackingEffRefl = ReflectHisto(fTrackingEff);
1238 hTrackingEffRefl->Draw("same");
0233abe6 1239 leg->AddEntry(fTrackingEff,"Tracking efficiency","f");
1240 }
1241 if(fBR) {
1242 fBR->SetFillColor(6);
1243 fBR->SetFillStyle(3005);
5ad8ad40 1244 //fBR->SetFillStyle(3020);
0233abe6 1245 fBR->Draw("same");
f968ef30 1246 TH1F *hBRRefl = ReflectHisto(fBR);
1247 hBRRefl->Draw("same");
0233abe6 1248 leg->AddEntry(fBR,"Branching ratio","f");
1249 }
1250 if(fRawYield) {
5ad8ad40 1251 Int_t ci; // for color index setting
1252 ci = TColor::GetColor("#00cc00");
1253 fRawYield->SetLineColor(ci);
1254 // fRawYield->SetLineColor(3);
0233abe6 1255 fRawYield->SetLineWidth(3);
1256 fRawYield->Draw("same");
f968ef30 1257 TH1F *hRawYieldRefl = ReflectHisto(fRawYield);
1258 hRawYieldRefl->Draw("same");
844405bc 1259 leg->AddEntry(fRawYield,"Yield extraction","l");
0233abe6 1260 }
1261 if(fCutsEff) {
1262 fCutsEff->SetLineColor(4);
1263 fCutsEff->SetLineWidth(3);
1264 fCutsEff->Draw("same");
f968ef30 1265 TH1F *hCutsEffRefl = ReflectHisto(fCutsEff);
1266 hCutsEffRefl->Draw("same");
0233abe6 1267 leg->AddEntry(fCutsEff,"Cuts efficiency","l");
1268 }
1269 if(fPIDEff) {
1270 fPIDEff->SetLineColor(7);
1271 fPIDEff->SetLineWidth(3);
1272 fPIDEff->Draw("same");
f968ef30 1273 TH1F *hPIDEffRefl = ReflectHisto(fPIDEff);
1274 hPIDEffRefl->Draw("same");
0233abe6 1275 leg->AddEntry(fPIDEff,"PID efficiency","l");
1276 }
1277 if(fMCPtShape) {
5ad8ad40 1278 Int_t ci = TColor::GetColor("#9933ff");
1279 fMCPtShape->SetLineColor(ci);
1280 // fMCPtShape->SetLineColor(8);
0233abe6 1281 fMCPtShape->SetLineWidth(3);
1282 fMCPtShape->Draw("same");
f968ef30 1283 TH1F *hMCPtShapeRefl = ReflectHisto(fMCPtShape);
1284 hMCPtShapeRefl->Draw("same");
0233abe6 1285 leg->AddEntry(fMCPtShape,"MC p_{t} shape","l");
1286 }
1287 if(fPartAntipart) {
5ad8ad40 1288 Int_t ci = TColor::GetColor("#ff6600");
1289 fPartAntipart->SetLineColor(ci);
1290 // fPartAntipart->SetLineColor(9);
0233abe6 1291 fPartAntipart->SetLineWidth(3);
1292 fPartAntipart->Draw("same");
f968ef30 1293 TH1F *hPartAntipartRefl = ReflectHisto(fPartAntipart);
1294 hPartAntipartRefl->Draw("same");
0233abe6 1295 leg->AddEntry(fPartAntipart,"D = #bar{D}","l");
1296 }
0233abe6 1297
0233abe6 1298
1299 leg->Draw();
1300
5ad8ad40 1301 cSystErr->SaveAs("RelativeSystematics.eps");
1302
0233abe6 1303 return;
1304}
f968ef30 1305//-------------------------------------------------------------------------
1306TH1F* AliHFSystErr::ReflectHisto(TH1F *hin) const {
1307 //
1308 // Clones and reflects histogram
1309 //
1310 TH1F *hout=(TH1F*)hin->Clone("hout");
1311 hout->Scale(-1.);
1312
1313 return hout;
1314}