Systematic errors for Ds PbPb 2011 (Gian Michele)
[u/mrichter/AliRoot.git] / PWGHF / vertexingHF / AliHFSystErr.cxx
CommitLineData
ada850b0 1
0233abe6 2/**************************************************************************
3 * Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. *
4 * *
5 * Author: The ALICE Off-line Project. *
6 * Contributors are mentioned in the code where appropriate. *
7 * *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
16
27de2dfb 17/* $Id$ */
18
0233abe6 19/////////////////////////////////////////////////////////////
20//
21// Class to handle systematic errors for charm hadrons
22//
23// Usage:
5541b811 24// AliHFSystEff syst; // DECAY = 1 for D0, 2, for D+, 3 for D*
25// syst.SetRunNumber(YEAR); // YEAR = two last numbers of the year (is 10 for 2010)
26// syst.SetCollisionType(TYPE); // TYPE = 0 is pp, 1 is PbPb
27// syst.SetCentrality(CENT); // CENT is centrality, 0100 for MB, 020 (4080) for 0-20 (40-80) CC...
28// syst.Init(DECAY); // DECAY = 1 for D0, 2, for D+, 3 for D*
0233abe6 29// syst.DrawErrors(); // to see a plot of the error contributions
30// syst.GetTotalSystErr(pt); // to get the total err at pt
31//
32// Author: A.Dainese, andrea.dainese@pd.infn.it
33/////////////////////////////////////////////////////////////
34
35#include <TStyle.h>
36#include <TGraphAsymmErrors.h>
37#include <TMath.h>
38#include <TCanvas.h>
39#include <TH2F.h>
40#include <TLegend.h>
5ad8ad40 41#include <TColor.h>
0233abe6 42
5541b811 43#include "AliLog.h"
0233abe6 44#include "AliHFSystErr.h"
45
46
47ClassImp(AliHFSystErr)
48
49//--------------------------------------------------------------------------
50AliHFSystErr::AliHFSystErr(const Char_t* name, const Char_t* title) :
51TNamed(name,title),
52fNorm(0),
53fRawYield(0),
54fTrackingEff(0),
55fBR(0),
56fCutsEff(0),
57fPIDEff(0),
58fMCPtShape(0),
5541b811 59fPartAntipart(0),
60fRunNumber(10),
61fCollisionType(0),
a8c3295d 62fCentralityClass("0100"),
cede55f5 63fIsLowEnergy(false),
64fIsCentScan(false)
0233abe6 65{
66 //
67 // Default Constructor
68 //
69}
5541b811 70
0233abe6 71//--------------------------------------------------------------------------
5541b811 72AliHFSystErr::~AliHFSystErr() {
73 //
74 // Default Destructor
0233abe6 75 //
a8c3295d 76 /*
5541b811 77
78 if(fNorm) { delete fNorm; fNorm=0; }
79 if(fRawYield) { delete fRawYield; fRawYield=0; }
80 if(fTrackingEff) { delete fTrackingEff; fTrackingEff=0; }
81 if(fBR) { delete fBR; fBR=0; }
82 if(fCutsEff) { delete fCutsEff; fCutsEff=0; }
83 if(fPIDEff) { delete fPIDEff; fPIDEff=0; }
84 if(fMCPtShape) { delete fMCPtShape; fMCPtShape=0; }
85 if(fPartAntipart) { delete fPartAntipart; fPartAntipart=0; }
a8c3295d 86 */
5541b811 87}
88
89//--------------------------------------------------------------------------
90void AliHFSystErr::Init(Int_t decay){
91 //
92 // Variables/histos initialization
0233abe6 93 //
94
a8c3295d 95 if (fRunNumber!=10 && fIsLowEnergy==false) {
27360a0e 96 AliFatal("Only settings for 2010 and the low energy runs are implemented so far");
5541b811 97 }
98
0233abe6 99 switch(decay) {
100 case 1: // D0->Kpi
a8c3295d 101 if (fCollisionType==0) {
102 if (fIsLowEnergy) InitD0toKpi2010ppLowEn();
103 else InitD0toKpi2010pp();
104 } else if (fCollisionType==1) {
9a8b5080 105 if (fCentralityClass=="07half") InitD0toKpi2011PbPb07half();
106 else if (fCentralityClass=="010") InitD0toKpi2010PbPb010CentScan();
cede55f5 107 else if (fCentralityClass=="1020") InitD0toKpi2010PbPb1020CentScan();
108 else if (fCentralityClass=="020") InitD0toKpi2010PbPb020();
109 else if (fCentralityClass=="2040") InitD0toKpi2010PbPb2040CentScan();
110 else if (fCentralityClass=="4060") InitD0toKpi2010PbPb4060CentScan();
111 else if (fCentralityClass=="6080") InitD0toKpi2010PbPb6080CentScan();
aebba8df 112 else if (fCentralityClass=="4080") InitD0toKpi2010PbPb4080();
27360a0e 113 else AliFatal("Not yet implemented");
5541b811 114 }
a8c3295d 115 // else if (fCollisionType==2) InitD0toKpi2010ppLowEn();
0233abe6 116 break;
117 case 2: // D+->Kpipi
a8c3295d 118 if (fCollisionType==0) {
119 if (fIsLowEnergy) InitDplustoKpipi2010ppLowEn();
120 else InitDplustoKpipi2010pp();
121 } else if (fCollisionType==1) {
436b185f 122 if (fCentralityClass=="07half") InitDplustoKpipi2011PbPb07half();
123 else if (fCentralityClass=="010") InitDplustoKpipi2010PbPb010CentScan();
cede55f5 124 else if (fCentralityClass=="1020") InitDplustoKpipi2010PbPb1020CentScan();
125 else if (fCentralityClass=="020") InitDplustoKpipi2010PbPb020();
126 else if (fCentralityClass=="2040") InitDplustoKpipi2010PbPb2040CentScan();
127 else if (fCentralityClass=="4060") InitDplustoKpipi2010PbPb4060CentScan();
128 else if (fCentralityClass=="6080") InitDplustoKpipi2010PbPb6080CentScan();
aebba8df 129 else if (fCentralityClass=="4080") InitDplustoKpipi2010PbPb4080();
27360a0e 130 else AliFatal("Not yet implemented");
5541b811 131 }
0233abe6 132 break;
133 case 3: // D*->D0pi
fa2be30c 134 if (fCollisionType==0) {
135 if(fIsLowEnergy) InitDstartoD0pi2010ppLowEn();
136 else InitDstartoD0pi2010pp();
137 }else if (fCollisionType==1) {
cede55f5 138 if (fCentralityClass=="010") InitDstartoD0pi2010PbPb010CentScan();
9a8b5080 139 else if (fCentralityClass=="07half") InitDstartoD0pi2011PbPb07half();
cede55f5 140 else if (fCentralityClass=="1020") InitDstartoD0pi2010PbPb1020CentScan();
141 else if (fCentralityClass=="020") InitDstartoD0pi2010PbPb020();
142 else if (fCentralityClass=="2040" && fIsCentScan) InitDstartoD0pi2010PbPb2040CentScan();
143 else if (fCentralityClass=="2040") InitDstartoD0pi2010PbPb2040();
144 else if (fCentralityClass=="4060") InitDstartoD0pi2010PbPb4060CentScan();
145 else if (fCentralityClass=="6080") InitDstartoD0pi2010PbPb6080CentScan();
146 else if (fCentralityClass=="4080") InitDstartoD0pi2010PbPb4080();
27360a0e 147 else AliFatal("Not yet implemented");
5541b811 148 }
0233abe6 149 break;
66247513 150 case 4: // D+s->KKpi
151 if (fCollisionType==0) InitDstoKKpi2010pp();
46988859 152 else if (fCollisionType==1) {
153 if (fCentralityClass=="07half") InitDstoKKpi2011PbPb07half();
154 else AliFatal("Not yet implemented");
155 }
27360a0e 156 else AliFatal("Not yet implemented");
66247513 157 break;
158
0233abe6 159 default:
160 printf("Invalid decay type: %d\n",decay);
161 break;
162 }
163
0233abe6 164}
5541b811 165
0233abe6 166//--------------------------------------------------------------------------
5541b811 167void AliHFSystErr::InitD0toKpi2010pp() {
168 //
169 // D0->Kpi syst errors. Responsible: A. Rossi
170 // 2010 pp sample
0233abe6 171 //
172
5541b811 173 // Normalization
f1d72175 174 fNorm = new TH1F("fNorm","fNorm",24,0,24);
27360a0e 175 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.035); // 4% error on sigmaV0and
5541b811 176
177 // Branching ratio
f1d72175 178 fBR = new TH1F("fBR","fBR",24,0,24);
179 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.012); // 1.2% PDG2010
5541b811 180
181 // Tracking efficiency
f1d72175 182 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);
f8bc42d3 183 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.08); // 8% (4% per track)
5541b811 184
185 // Raw yield extraction
f1d72175 186 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
5541b811 187 fRawYield->SetBinContent(1,1);
d2e5959f 188 fRawYield->SetBinContent(2,0.22);
189 fRawYield->SetBinContent(3,0.1);
190 for(Int_t i=4;i<=7;i++) fRawYield->SetBinContent(i,0.04);
191 for(Int_t i=8;i<=12;i++) fRawYield->SetBinContent(i,0.07);
f1d72175 192 for(Int_t i=13;i<=16;i++) fRawYield->SetBinContent(i,0.10);
193 for(Int_t i=17;i<=24;i++) fRawYield->SetBinContent(i,1);
0233abe6 194
5541b811 195 // Cuts efficiency (from cuts variation)
f1d72175 196 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
197 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
5541b811 198
199 // PID efficiency (from PID/noPID)
f1d72175 200 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
201 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.03); // 3%
dc80fe6b 202 fPIDEff->SetBinContent(2,0.05); // 5%
5541b811 203
204 // MC dN/dpt
f1d72175 205 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
578bfbba 206 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0);
207 fMCPtShape->SetBinContent(1,0.03);
208 fMCPtShape->SetBinContent(2,0.03);
5541b811 209
210 // particle-antiparticle
f1d72175 211 // fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",24,0,24);
212 // fPartAntipart->SetBinContent(1,1);
213 // for(Int_t i=2;i<=24;i++) fPartAntipart->SetBinContent(i,0.05);
5541b811 214
215 return;
0233abe6 216}
217//--------------------------------------------------------------------------
5541b811 218void AliHFSystErr::InitD0toKpi2010PbPb020() {
0233abe6 219 //
aebba8df 220 // D0->Kpi syst errors. Responsible: A. Rossi
5541b811 221 // 2010 PbPb sample, 0-20 CC
0233abe6 222 //
5541b811 223
224 // Normalization
225 fNorm = new TH1F("fNorm","fNorm",20,0,20);
d5e15690 226 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
5541b811 227
228 // Branching ratio
229 fBR = new TH1F("fBR","fBR",20,0,20);
230 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.012); // 1.2% PDG2010
231
232 // Tracking efficiency
233 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
69bcc748 234 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.10);// Jacek, 5% per track
5541b811 235
236 // Raw yield extraction
237 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
238 fRawYield->SetBinContent(1,0);
239 fRawYield->SetBinContent(2,0);
6c388dee 240 fRawYield->SetBinContent(3,0.08);
241 for(Int_t i=4;i<=12;i++) fRawYield->SetBinContent(i,0.06);
242 for(Int_t i=13;i<=16;i++) fRawYield->SetBinContent(i,0.10);
5541b811 243
244 // Cuts efficiency (from cuts variation)
245 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
aebba8df 246 fCutsEff->SetBinContent(1,0.);
247 fCutsEff->SetBinContent(2,0.);
cc4bb301 248 fCutsEff->SetBinContent(3,0.13);
249 fCutsEff->SetBinContent(4,0.11);
250 for(Int_t i=5;i<=16;i++) fCutsEff->SetBinContent(i,0.10);
6c388dee 251 for(Int_t i=17;i<=20;i++) fCutsEff->SetBinContent(i,0.);
5541b811 252
253 // PID efficiency (from PID/noPID)
254 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
6c388dee 255 for(Int_t i=3;i<=16;i++) fPIDEff->SetBinContent(i,0.05);
5541b811 256
257 // MC dN/dpt
258 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
cc4bb301 259 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.01);
260 fMCPtShape->SetBinContent(3,0.04);
261 fMCPtShape->SetBinContent(4,0.02);
b797b51b 262 for(Int_t i=13;i<=16;i++) fMCPtShape->SetBinContent(i,0.03);
578bfbba 263
6c388dee 264// // particle-antiparticle
265// fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
266// for(Int_t i=3;i<=12;i++) fPartAntipart->SetBinContent(i,0.05);
267// fPartAntipart->SetBinContent(3,0.10);
268// fPartAntipart->SetBinContent(4,0.10);
269// fPartAntipart->SetBinContent(7,0.10);
270// fPartAntipart->SetBinContent(8,0.10);
0233abe6 271
5541b811 272 return;
273}
274//--------------------------------------------------------------------------
9a8b5080 275//--------------------------------------------------------------------------
276void AliHFSystErr::InitD0toKpi2011PbPb07half() {
277 //
278 // D0->Kpi syst errors. Responsible: A. Rossi
279 // 2011 PbPb sample, 0-7.5 CC
280 //
281
282 // Normalization
283 fNorm = new TH1F("fNorm","fNorm",36,0,36);
284 for(Int_t i=1;i<36;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
285
286 // Branching ratio
287 fBR = new TH1F("fBR","fBR",36,0,36);
288 for(Int_t i=1;i<=36;i++) fBR->SetBinContent(i,0.012); // 1.2% PDG2010
289
290 // Tracking efficiency
291 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",36,0,36);
292 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.10);// Jacek, 5% per track
293 for(Int_t i=25;i<=36;i++) fTrackingEff->SetBinContent(i,0.);// OUT OF MEASUREMENT RANGE
294
295 // Raw yield extraction
296 fRawYield = new TH1F("fRawYield","fRawYield",36,0,36);
297 fRawYield->SetBinContent(1,0);
298 fRawYield->SetBinContent(2,0.1);
299 fRawYield->SetBinContent(3,0.05);
fd8ae434 300 for(Int_t i=4;i<=12;i++) fRawYield->SetBinContent(i,0.05);
301 for(Int_t i=13;i<=16;i++) fRawYield->SetBinContent(i,0.10);
9a8b5080 302 for(Int_t i=17;i<=24;i++) fRawYield->SetBinContent(i,0.30);
303 for(Int_t i=25;i<=36;i++) fRawYield->SetBinContent(i,0.);// OUT OF MEASUREMENT RANGE
304
305 // Cuts efficiency (from cuts variation)
306 fCutsEff = new TH1F("fCutsEff","fCutsEff",36,0,36);
307 fCutsEff->SetBinContent(1,0.);
308 fCutsEff->SetBinContent(2,0.15);
309 fCutsEff->SetBinContent(3,0.13);
310 fCutsEff->SetBinContent(4,0.11);
311 fCutsEff->SetBinContent(5,0.08);
312 for(Int_t i=6;i<=24;i++) fCutsEff->SetBinContent(i,0.06);
313 for(Int_t i=25;i<=36;i++) fCutsEff->SetBinContent(i,0.0);// OUT OF MEASUREMENT RANGE
314
315 // PID efficiency (from PID/noPID)
316 fPIDEff = new TH1F("fPIDEff","fPIDEff",36,0,36);
317 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.05);
318 for(Int_t i=25;i<=36;i++) fPIDEff->SetBinContent(i,0.0);// OUT OF MEASUREMENT RANGE
319
320 // MC dN/dpt
321 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",36,0,36);
322 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0.01);
323 fMCPtShape->SetBinContent(2,0.06);
324 fMCPtShape->SetBinContent(3,0.04);
325 fMCPtShape->SetBinContent(4,0.02);
326 for(Int_t i=13;i<=16;i++) fMCPtShape->SetBinContent(i,0.03);
327 for(Int_t i=17;i<=24;i++) fMCPtShape->SetBinContent(i,0.05);
328 for(Int_t i=25;i<=36;i++) fMCPtShape->SetBinContent(i,0.0);// OUT OF MEASUREMENT RANGE
329
330// // particle-antiparticle
331// fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",36,0,36);
332// for(Int_t i=3;i<=12;i++) fPartAntipart->SetBinContent(i,0.05);
333// fPartAntipart->SetBinContent(3,0.10);
334// fPartAntipart->SetBinContent(4,0.10);
335// fPartAntipart->SetBinContent(7,0.10);
336// fPartAntipart->SetBinContent(8,0.10);
337
338 return;
339}
340//--------------------------------------------------------------------------
5541b811 341void AliHFSystErr::InitD0toKpi2010PbPb4080() {
342 //
aebba8df 343 // D0->Kpi syst errors. Responsible: A. Rossi
5541b811 344 // 2010 PbPb sample, 40-80 CC
345 //
346
0233abe6 347 // Normalization
348 fNorm = new TH1F("fNorm","fNorm",20,0,20);
d5e15690 349 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.07); // TAA and pp norm
0233abe6 350
351 // Branching ratio
352 fBR = new TH1F("fBR","fBR",20,0,20);
844405bc 353 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.012); // 1.2% PDG2010
0233abe6 354
355 // Tracking efficiency
356 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
69bcc748 357 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.10); // Jacek, 5% per track
aebba8df 358
359
0233abe6 360 // Raw yield extraction
361 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
5541b811 362 fRawYield->SetBinContent(1,0);
363 fRawYield->SetBinContent(2,0);
6c388dee 364 for(Int_t i=3;i<=16;i++) fRawYield->SetBinContent(i,0.05);
666cf569 365 //for(Int_t i=13;i<=20;i++) fRawYield->SetBinContent(i,0);
0233abe6 366
367 // Cuts efficiency (from cuts variation)
368 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
aebba8df 369 fCutsEff->SetBinContent(1,0.);
370 fCutsEff->SetBinContent(2,0.);
cc4bb301 371 fCutsEff->SetBinContent(3,0.13);
372 fCutsEff->SetBinContent(4,0.11);
373 for(Int_t i=5;i<=16;i++) fCutsEff->SetBinContent(i,0.10);
6c388dee 374 for(Int_t i=17;i<=20;i++) fCutsEff->SetBinContent(i,0.);
0233abe6 375
376 // PID efficiency (from PID/noPID)
377 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
6c388dee 378// for(Int_t i=3;i<=6;i++) fPIDEff->SetBinContent(i,0.10);
379// for(Int_t i=7;i<=16;i++) fPIDEff->SetBinContent(i,0.05);
380 for(Int_t i=3;i<=16;i++) fPIDEff->SetBinContent(i,0.05);
0233abe6 381
382 // MC dN/dpt
383 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
cc4bb301 384 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.01);
385 // fMCPtShape->SetBinContent(3,0.04); Not set for peripherals (Raa Vs pt is flat)
386 // fMCPtShape->SetBinContent(4,0.02);
387 for(Int_t i=13;i<=16;i++) fMCPtShape->SetBinContent(i,0.03);
388
389 // // particle-antiparticle
390 // fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
391 // for(Int_t i=3;i<=12;i++) fPartAntipart->SetBinContent(i,0.05);
0233abe6 392
393 return;
394}
a8c3295d 395
396//--------------------------------------------------------------------------
397void AliHFSystErr::InitD0toKpi2010ppLowEn() {
398 //
399 // D0->Kpi syst errors. Low energy run
400 // 2011 2.76 TeV pp sample
401 //
402 AliInfo(" Settings for D0 --> K pi, p-p collisions at 2.76 TeV");
403
404 // Normalization
405 fNorm = new TH1F("fNorm","fNorm",20,0,20);
f9a85c82 406 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.031); // 4% error on sigmaV0and
a8c3295d 407
408 // Branching ratio
409 fBR = new TH1F("fBR","fBR",20,0,20);
410 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.012); // 1.2% PDG2010
411
412 // Tracking efficiency
413 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
27360a0e 414 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.10); //10% (5% per track)
a8c3295d 415
416 // Raw yield extraction
417 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
418 fRawYield->SetBinContent(1,1);
f9a85c82 419 for(Int_t i=1;i<=20;i++) fRawYield->SetBinContent(i,0.15);
a8c3295d 420
421 // Cuts efficiency (from cuts variation)
422 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
6c388dee 423 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.10); // 10%
f9a85c82 424 fCutsEff->SetBinContent(2,0.20);
425 for(Int_t i=7;i<=20;i++) fCutsEff->SetBinContent(i,0.15); // 10%
426
a8c3295d 427
428 // PID efficiency (from PID/noPID)
429 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
f9a85c82 430 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.15); // 10%
431 // fPIDEff->SetBinContent(2,0.20);
432 for(Int_t i=7;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 10%
a8c3295d 433
434 // MC dN/dpt
435 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
27360a0e 436 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.01);
437 fMCPtShape->SetBinContent(1,0.03);
438 fMCPtShape->SetBinContent(2,0.03);
a8c3295d 439
f9a85c82 440// // particle-antiparticle
441// fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
442// fPartAntipart->SetBinContent(1,1);
443// fPartAntipart->SetBinContent(2,1);
444// for(Int_t i=3;i<=6;i++) fPartAntipart->SetBinContent(i,0.08);
445// for(Int_t i=1;i<=20;i++) fPartAntipart->SetBinContent(i,0.);
a8c3295d 446
447 return;
448}
449
0233abe6 450//--------------------------------------------------------------------------
5541b811 451void AliHFSystErr::InitDplustoKpipi2010pp() {
0233abe6 452 //
453 // D+->Kpipi syst errors. Responsible: R. Bala
5541b811 454 // 2010 pp sample
0233abe6 455 //
456
1f91ef56 457
458// Normalization
459 fNorm = new TH1F("fNorm","fNorm",24,0,24);
27360a0e 460 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.035); // 4% error on sigmaV0and
626bcf57 461
462 // Branching ratio
1f91ef56 463 fBR = new TH1F("fBR","fBR",24,0,24);
f7c8a2f1 464 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.021); // 2.1% PDG2010
626bcf57 465
466 // Tracking efficiency
1f91ef56 467 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);
f8bc42d3 468 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.12); // 12% (4% per track)
626bcf57 469
470
471 // Raw yield extraction
1f91ef56 472 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
d2e5959f 473 fRawYield->SetBinContent(1,1);
1f91ef56 474 fRawYield->SetBinContent(2,0.25);
475 fRawYield->SetBinContent(3,0.25);
d2e5959f 476 fRawYield->SetBinContent(4,0.20);
1f91ef56 477 fRawYield->SetBinContent(5,0.09);
478 fRawYield->SetBinContent(6,0.09);
d2e5959f 479 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
480 for(Int_t i=12;i<=24;i++) fRawYield->SetBinContent(i,0.10);
1f91ef56 481
626bcf57 482 // Cuts efficiency (from cuts variation)
1f91ef56 483 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
484 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
626bcf57 485
486 // PID efficiency (from PID/noPID)
1f91ef56 487 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
488 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.05); // 5%
489 fPIDEff->SetBinContent(1,0.15); // 15%
490 fPIDEff->SetBinContent(2,0.15); // 15%
491 fPIDEff->SetBinContent(3,0.15); // 15%
492 fPIDEff->SetBinContent(4,0.15); // 15%
493 for(Int_t i=12;i<=16;i++) fPIDEff->SetBinContent(i,0.10); // 5%
494
495 // MC dN/dpt
496 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
497 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0);
578bfbba 498 fMCPtShape->SetBinContent(1,0.03);
499 fMCPtShape->SetBinContent(2,0.03);
626bcf57 500
501
502 // particle-antiparticle
503 /*
504 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
505 fPartAntipart->SetBinContent(1,1);
506 fPartAntipart->SetBinContent(2,1);
507 fPartAntipart->SetBinContent(3,0.12);
508 for(Int_t i=4;i<=20;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
509 */
0233abe6 510 return;
511}
1f91ef56 512
0233abe6 513//--------------------------------------------------------------------------
66247513 514void AliHFSystErr::InitDstoKKpi2010pp() {
515 //
516 // D+s->KKpi syst errors. Responsible: G.M. Innocenti
517 // 2010 pp sample
518 //
519
520
521// Normalization
522 fNorm = new TH1F("fNorm","fNorm",12,0,12);
494408cc 523 for(Int_t i=1;i<=12;i++) fNorm->SetBinContent(i,0.035); // 3.5% error on sigmaV0and
66247513 524
525 // Branching ratio
526 fBR = new TH1F("fBR","fBR",12,0,12);
494408cc 527 for(Int_t i=1;i<=12;i++) fBR->SetBinContent(i,0.06); // 0.14/2.32 PDG2010
66247513 528
529 // Tracking efficiency
530 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",12,0,12);
494408cc 531 for(Int_t i=1;i<=12;i++) fTrackingEff->SetBinContent(i,0.12); // 12% (4% per track)
66247513 532
533
534 // Raw yield extraction
535 fRawYield = new TH1F("fRawYield","fRawYield",12,0,12);
536 fRawYield->SetBinContent(1,1);
537 fRawYield->SetBinContent(2,1);
538 fRawYield->SetBinContent(3,0.20);
539 fRawYield->SetBinContent(4,0.20);
540 fRawYield->SetBinContent(5,0.15);
541 fRawYield->SetBinContent(6,0.15);
542 fRawYield->SetBinContent(7,0.15);
543 fRawYield->SetBinContent(8,0.15);
544 fRawYield->SetBinContent(9,0.20);
545 fRawYield->SetBinContent(10,0.20);
546 fRawYield->SetBinContent(11,0.20);
547 fRawYield->SetBinContent(12,0.20);
548
549 // Cuts efficiency (from cuts variation)
550 fCutsEff = new TH1F("fCutsEff","fCutsEff",12,0,12);
551 for(Int_t i=1;i<=12;i++) fCutsEff->SetBinContent(i,0.15); // 15%
552
553 // PID efficiency (from PID/noPID)
554 fPIDEff = new TH1F("fPIDEff","fPIDEff",12,0,12);
555 for(Int_t i=1;i<=12;i++) fPIDEff->SetBinContent(i,0.07); // 7%
556
494408cc 557 // MC dN/dpt
558 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",12,0,12);
559 for(Int_t i=1; i<=2; i++) fMCPtShape->SetBinContent(i,1.);
560 for(Int_t i=3; i<=4; i++) fMCPtShape->SetBinContent(i,0.03);
561 for(Int_t i=5; i<=6; i++) fMCPtShape->SetBinContent(i,0.03);
562 for(Int_t i=7; i<=8; i++) fMCPtShape->SetBinContent(i,0.02);
563 for(Int_t i=9; i<=12; i++) fMCPtShape->SetBinContent(i,0.02);
66247513 564
565
566 // particle-antiparticle
567 /*
568 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",12,0,12);
569 fPartAntipart->SetBinContent(1,1);
570 fPartAntipart->SetBinContent(2,1);
571 fPartAntipart->SetBinContent(3,0.12);
572 for(Int_t i=4;i<=12;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
573 */
574 return;
575}
576
577
578//--------------------------------------------------------------------------
436b185f 579void AliHFSystErr::InitDplustoKpipi2011PbPb07half() {
580 //
581 // D+->Kpipi syst errors. Responsible: E. Bruna
582 // 2011 PbPb sample, 0-7.5% CC
583 //
584
585 // Normalization
586 fNorm = new TH1F("fNorm","fNorm",36,0,36);
587 for(Int_t i=1;i<=36;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
588
589 // Branching ratio
590 fBR = new TH1F("fBR","fBR",36,0,36);
591 for(Int_t i=1;i<=36;i++) fBR->SetBinContent(i,0.021); // 2.1% PDG2010
592
593 // Tracking efficiency
594 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",36,0,36);
595 for(Int_t i=1;i<=36;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
596
597 // Raw yield extraction
598 fRawYield = new TH1F("fRawYield","fRawYield",36,0,36);
599 for(Int_t i=1;i<=36;i++) fRawYield->SetBinContent(i,.10); //5 to 10%
600 fRawYield->SetBinContent(4,0.20);
601 fRawYield->SetBinContent(5,0.15);
602 fRawYield->SetBinContent(6,0.15);
603 for(Int_t i=7; i<=8; i++) fRawYield->SetBinContent(i,0.12);
604 for(Int_t i=9; i<=12; i++) fRawYield->SetBinContent(i,0.10);
605 for(Int_t i=13; i<=16; i++) fRawYield->SetBinContent(i,0.05);
606 for(Int_t i=17; i<=24; i++) fRawYield->SetBinContent(i,0.07);
607 for(Int_t i=25; i<=36; i++) fRawYield->SetBinContent(i,0.20);
608
609
610 // Cuts efficiency (from cuts variation)
611 fCutsEff = new TH1F("fCutsEff","fCutsEff",36,0,36);
612 for(Int_t i=1;i<=36;i++) fCutsEff->SetBinContent(i,0.15); // 15%
613
614 // PID efficiency (from PID/noPID)
615 fPIDEff = new TH1F("fPIDEff","fPIDEff",36,0,36);
616 for(Int_t i=1;i<=36;i++) fPIDEff->SetBinContent(i,0.05); // 5%
617
618 // MC dN/dpt (2/2/2012)
619 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",36,0,36);
620 for(Int_t i=1;i<=36;i++) fMCPtShape->SetBinContent(i,0.);
621 for(Int_t iBin=7; iBin<=8; iBin++) fMCPtShape->SetBinContent(iBin,0.01);
622 for(Int_t iBin=9; iBin<=12; iBin++) fMCPtShape->SetBinContent(iBin,0.05);
623 for(Int_t iBin=13; iBin<=36; iBin++) fMCPtShape->SetBinContent(iBin,0.05);
624
625
626 // particle-antiparticle
627 /*
628 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
629 fPartAntipart->SetBinContent(1,1);
630 fPartAntipart->SetBinContent(2,1);
631 fPartAntipart->SetBinContent(3,0.12);
632 for(Int_t i=4;i<=20;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
633 */
634
635 return;
636}
637
638//--------------------------------------------------------------------------
46988859 639void AliHFSystErr::InitDstoKKpi2011PbPb07half() {
640 //
641 // D+s->Kpipi syst errors. Responsible: G.M. Innocenti
642 // 2011 PbPb sample, 0-7.5% CC
643 //
644
645 // Normalization
646 fNorm = new TH1F("fNorm","fNorm",12,0,12);
647 for(Int_t i=1;i<=12;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
648
649 // Branching ratio
650 fBR = new TH1F("fBR","fBR",12,0,12);
651 for(Int_t i=1;i<=12;i++) fBR->SetBinContent(i,06); // 0.14/2.32 PDG2010
652
653 // Tracking efficiency
654 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",12,0,12);
655 for(Int_t i=1;i<=12;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
656
657 // Raw yield extraction
658 fRawYield = new TH1F("fRawYield","fRawYield",12,0,12);
659 for(Int_t i=1;i<=6;i++) fRawYield->SetBinContent(i,.30);
660 for(Int_t i=7; i<=12; i++) fRawYield->SetBinContent(i,0.20);
661
662
663
664 // Cuts efficiency (from cuts variation)
665 fCutsEff = new TH1F("fCutsEff","fCutsEff",12,0,12);
666 for(Int_t i=1;i<=12;i++) fCutsEff->SetBinContent(i,0.20); // 20%
667
668 // PID efficiency (from PID/noPID)
669 fPIDEff = new TH1F("fPIDEff","fPIDEff",12,0,12);
670 for(Int_t i=1;i<=12;i++) fPIDEff->SetBinContent(i,0.1); // 10%
671
672 // MC dN/dpt
673 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",12,0,12);
674 for(Int_t i=1; i<=2; i++) fMCPtShape->SetBinContent(i,1.);
675 for(Int_t i=3; i<=4; i++) fMCPtShape->SetBinContent(i,0.03);
676 for(Int_t i=5; i<=6; i++) fMCPtShape->SetBinContent(i,0.03);
677 for(Int_t i=7; i<=8; i++) fMCPtShape->SetBinContent(i,0.02);
678 for(Int_t i=9; i<=12; i++) fMCPtShape->SetBinContent(i,0.02);
679
680 // particle-antiparticle
681 /*
682 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",12,0,12);
683 fPartAntipart->SetBinContent(1,1);
684 fPartAntipart->SetBinContent(2,1);
685 fPartAntipart->SetBinContent(3,0.12);
686 for(Int_t i=4;i<=12;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
687 */
688
689 return;
690}
691
692//--------------------------------------------------------------------------
5541b811 693void AliHFSystErr::InitDplustoKpipi2010PbPb020() {
694 //
695 // D+->Kpipi syst errors. Responsible: ??
696 // 2010 PbPb sample, 0-20 CC
697 //
aebba8df 698
aebba8df 699 // Normalization
700 fNorm = new TH1F("fNorm","fNorm",20,0,20);
d5e15690 701 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
aebba8df 702
703 // Branching ratio
704 fBR = new TH1F("fBR","fBR",20,0,20);
f7c8a2f1 705 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.021); // 2.1% PDG2010
aebba8df 706
707 // Tracking efficiency
708 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
69bcc748 709 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
aebba8df 710
711 // Raw yield extraction
712 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
6c388dee 713 for(Int_t i=1;i<=20;i++) fRawYield->SetBinContent(i,.10); //5 to 10%
714 // fRawYield->SetBinContent(5,0.23);
715 //fRawYield->SetBinContent(6,0.23);
cb142b90 716 fRawYield->SetBinContent(7,0.20);
717 fRawYield->SetBinContent(8,0.20);
718 fRawYield->SetBinContent(9,0.15);
719 fRawYield->SetBinContent(10,0.15);
720 fRawYield->SetBinContent(11,0.15);
721 fRawYield->SetBinContent(12,0.15);
aebba8df 722
723 // Cuts efficiency (from cuts variation)
724 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
666cf569 725 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.15); // 10%
aebba8df 726
727 // PID efficiency (from PID/noPID)
728 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
729 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 5%
aebba8df 730
f7c8a2f1 731 // MC dN/dpt (2/2/2012)
aebba8df 732 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 733 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.);
f7c8a2f1 734 for(Int_t iBin=7; iBin<=8; iBin++) fMCPtShape->SetBinContent(iBin,0.01);
735 for(Int_t iBin=9; iBin<=12; iBin++) fMCPtShape->SetBinContent(iBin,0.05);
736 for(Int_t iBin=13; iBin<=16; iBin++) fMCPtShape->SetBinContent(iBin,0.05);
aebba8df 737
738
739 // particle-antiparticle
740 /*
741 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
742 fPartAntipart->SetBinContent(1,1);
743 fPartAntipart->SetBinContent(2,1);
744 fPartAntipart->SetBinContent(3,0.12);
745 for(Int_t i=4;i<=20;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
746 */
6c388dee 747
5541b811 748 return;
749}
750
751//--------------------------------------------------------------------------
752void AliHFSystErr::InitDplustoKpipi2010PbPb4080() {
753 //
754 // D+->Kpipi syst errors. Responsible: ??
755 // 2010 PbPb sample, 40-80 CC
756 //
757
aebba8df 758
759 // Normalization
760 fNorm = new TH1F("fNorm","fNorm",20,0,20);
d5e15690 761 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.07); // TAA and pp norm
aebba8df 762
763 // Branching ratio
764 fBR = new TH1F("fBR","fBR",20,0,20);
f7c8a2f1 765 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.021); // 2.1%
aebba8df 766
767 // Tracking efficiency
768 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
69bcc748 769 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
aebba8df 770
771
772 // Raw yield extraction
773 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
774 fRawYield->SetBinContent(1,1);
775 fRawYield->SetBinContent(2,1);
776 fRawYield->SetBinContent(3,1);
6970b225 777 fRawYield->SetBinContent(4,0.15);
cb142b90 778 fRawYield->SetBinContent(5,0.05);
779 fRawYield->SetBinContent(6,0.05);
780 fRawYield->SetBinContent(7,0.15);
781 fRawYield->SetBinContent(8,0.15);
6970b225 782 for(Int_t i=9;i<=12;i++) fRawYield->SetBinContent(i,0.15);
aebba8df 783 for(Int_t i=13;i<=20;i++) fRawYield->SetBinContent(i,1); //5 to 10%
784
785 // Cuts efficiency (from cuts variation)
786 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
787 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.10); // 10%
788
789 // PID efficiency (from PID/noPID)
790 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
791 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 5%
792 fPIDEff->SetBinContent(3,0.13); // 13%
793
794
f7c8a2f1 795 // MC dN/dpt (2/2/2012)
aebba8df 796 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 797 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0);
f7c8a2f1 798 for(Int_t iBin=4; iBin<=8; iBin++) fMCPtShape->SetBinContent(iBin,0.01);
799 for(Int_t iBin=9; iBin<=12; iBin++) fMCPtShape->SetBinContent(iBin,0.03);
800 for(Int_t iBin=13; iBin<=16; iBin++) fMCPtShape->SetBinContent(iBin,0.03);
aebba8df 801
802
803 // particle-antiparticle
804 /*
805 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
806 fPartAntipart->SetBinContent(1,1);
807 fPartAntipart->SetBinContent(2,1);
808 fPartAntipart->SetBinContent(3,0.12);
809 for(Int_t i=4;i<=20;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
810 */
5541b811 811 return;
812}
813
814//--------------------------------------------------------------------------
a8c3295d 815void AliHFSystErr::InitDplustoKpipi2010ppLowEn() {
816
817 //
818 // D+->Kpipi syst errors. Responsible: R. Bala
819 // 2011 2.76 TeV pp sample
820 //
821 AliInfo(" Settings for D+ --> K pi pi p-p collisions at 2.76 TeV");
822
823 // Normalization
824 fNorm = new TH1F("fNorm","fNorm",20,0,20);
f9a85c82 825 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.031); // 10% error on sigmaV0and
a8c3295d 826
827 // Branching ratio
828 fBR = new TH1F("fBR","fBR",20,0,20);
f7c8a2f1 829 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.021); // 2.1% PDG2010
a8c3295d 830
831 // Tracking efficiency
832 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
27360a0e 833 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.15); // 3% (1% per track)
a8c3295d 834
835 // Raw yield extraction
836 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
837 fRawYield->SetBinContent(1,1);
838 fRawYield->SetBinContent(2,1);
f9a85c82 839 for(Int_t i=3;i<=6;i++) fRawYield->SetBinContent(i,0.10); //5 to 10%
840 fRawYield->SetBinContent(7,0.15);
841 fRawYield->SetBinContent(8,0.15);
842 for(Int_t i=9;i<=20;i++) fRawYield->SetBinContent(i,0.055); //5 to 10%
a8c3295d 843
844 // Cuts efficiency (from cuts variation)
845 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
f9a85c82 846 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.15); // 10%
a8c3295d 847
848 // PID efficiency (from PID/noPID)
849 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
850 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 5%
f9a85c82 851 fPIDEff->SetBinContent(3,0.10); // 13%
852 fPIDEff->SetBinContent(4,0.10); // 13%
a8c3295d 853
854 // MC dN/dpt (copied from D0 : will update later)
855 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
27360a0e 856 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.01);
578bfbba 857 fMCPtShape->SetBinContent(1,0.03);
858 fMCPtShape->SetBinContent(2,0.03);
a8c3295d 859
860 return;
861}
862
863//--------------------------------------------------------------------------
5541b811 864void AliHFSystErr::InitDstartoD0pi2010pp() {
0233abe6 865 //
2cf98d0d 866 // D*+->D0pi syst errors. Responsible: A. Grelli, Y. Wang
5541b811 867 // 2010 pp sample
0233abe6 868 //
869
2cf98d0d 870 // Normalization
fa2be30c 871 fNorm = new TH1F("fNorm","fNorm",24,0,24);
27360a0e 872 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.035); // 4% error on sigmaV0and
fa2be30c 873
874 // Branching ratio
875 fBR = new TH1F("fBR","fBR",24,0,24);
876 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
877
878 // Tracking efficiency
879 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);
880 fTrackingEff->SetBinContent(1,1.0);
f8bc42d3 881 fTrackingEff->SetBinContent(2,0.13); // 10% (ITSsa) \oplus 8% (4% per ITSTPC track)
882 fTrackingEff->SetBinContent(3,0.12);
883 fTrackingEff->SetBinContent(3,0.12);
884 for(Int_t i=4;i<=24;i++) fTrackingEff->SetBinContent(i,0.12); // 12% (4% per track)
fa2be30c 885
886
887 // Raw yield extraction
888 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
889 fRawYield->SetBinContent(1,1.0);
d2e5959f 890 fRawYield->SetBinContent(2,0.10);
fa2be30c 891 fRawYield->SetBinContent(3,0.04);
d2e5959f 892 fRawYield->SetBinContent(4,0.03);
fa2be30c 893 fRawYield->SetBinContent(5,0.03);
d2e5959f 894 fRawYield->SetBinContent(6,0.05);
895 fRawYield->SetBinContent(7,0.05);
896 fRawYield->SetBinContent(8,0.05);
897 for(Int_t i=9;i<=12;i++) fRawYield->SetBinContent(i,0.04); //4%
898 for(Int_t i=13;i<=16;i++) fRawYield->SetBinContent(i,0.09); //4%
899 for(Int_t i=17;i<=24;i++) fRawYield->SetBinContent(i,0.2); //4%
fa2be30c 900
901 // Cuts efficiency (from cuts variation)
902 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
903 fCutsEff->SetBinContent(2,0.22);
904 for(Int_t i=3;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
905
906 // PID efficiency (from PID/noPID)
907 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
908 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.04); // 3%
909
910
911 // MC dN/dpt (copied from D0 : will update later)
912 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
578bfbba 913 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0);
914 fMCPtShape->SetBinContent(1,0.03);
915 fMCPtShape->SetBinContent(2,0.03);
fa2be30c 916
917 return;
918
919
920}
921//--------------------------------------------------------------------------
922void AliHFSystErr::InitDstartoD0pi2010ppLowEn() {
923
924 //
925 // D+->Kpipi syst errors. Responsible: A. Grelli
926 // 2011 2.76 TeV pp sample
927 //
928 AliInfo(" Settings for D*+ --> D0 pi p-p collisions at 2.76 TeV");
929
930// Normalization
2cf98d0d 931 fNorm = new TH1F("fNorm","fNorm",20,0,20);
f9a85c82 932 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.031); // 10% error on sigmaV0and
2cf98d0d 933
934 // Branching ratio
935 fBR = new TH1F("fBR","fBR",20,0,20);
8accac87 936 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
2cf98d0d 937
938 // Tracking efficiency
939 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
27360a0e 940 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.15); //10% (to be checked!!)
2cf98d0d 941
942 // Raw yield extraction
943 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
8accac87 944 fRawYield->SetBinContent(1,1);
fa2be30c 945 fRawYield->SetBinContent(2,1);
f9a85c82 946 fRawYield->SetBinContent(3,0.14);
947 fRawYield->SetBinContent(4,0.14);
948 fRawYield->SetBinContent(5,0.12);
949 fRawYield->SetBinContent(6,0.12);
950 fRawYield->SetBinContent(7,0.06);
951 fRawYield->SetBinContent(8,0.06);
952 fRawYield->SetBinContent(9,0.08);
953 fRawYield->SetBinContent(10,0.08);
954 fRawYield->SetBinContent(11,0.08);
955 fRawYield->SetBinContent(12,0.08);
fa2be30c 956 for(Int_t i=9;i<=20;i++) fRawYield->SetBinContent(i,0.065);
2cf98d0d 957
958 // Cuts efficiency (from cuts variation)
959 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
f9a85c82 960 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.10);
961 fCutsEff->SetBinContent(3,0.15);
962 fCutsEff->SetBinContent(4,0.15);
963 fCutsEff->SetBinContent(5,0.15);
964 fCutsEff->SetBinContent(6,0.15);
965 fCutsEff->SetBinContent(7,0.10);
966 fCutsEff->SetBinContent(8,0.10);
967 fCutsEff->SetBinContent(9,0.10);
968 fCutsEff->SetBinContent(10,0.10);
969 fCutsEff->SetBinContent(11,0.10);
970 fCutsEff->SetBinContent(12,0.10);
2cf98d0d 971
972 // PID efficiency (from PID/noPID)
973 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
fa2be30c 974 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 10%
2cf98d0d 975
fa2be30c 976 // MC dN/dpt
2cf98d0d 977 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
27360a0e 978 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.01);
578bfbba 979 fMCPtShape->SetBinContent(1,0.03);
980 fMCPtShape->SetBinContent(2,0.03);
2cf98d0d 981
0233abe6 982 return;
983}
6c388dee 984
fa2be30c 985//------------------------------------------------------------------------
5541b811 986void AliHFSystErr::InitDstartoD0pi2010PbPb020() {
987 //
fa2be30c 988 // D*+->D0pi syst errors. Responsible: A. Grelli
5541b811 989 // 2010 PbPb sample, 0-20 CC
990 //
991
fa2be30c 992 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 0-20 centrality - DUMMY");
993
994 // Normalization
995 fNorm = new TH1F("fNorm","fNorm",24,0,24);
d5e15690 996 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
fa2be30c 997
998 // Branching ratio
999 fBR = new TH1F("fBR","fBR",24,0,24);
1000 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
1001
1002 // Tracking efficiency
1003 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);;
69bcc748 1004 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
fa2be30c 1005
1006
1007 // Raw yield extraction
1008 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
6c388dee 1009 for(Int_t i=1;i<=24;i++) fRawYield->SetBinContent(i,0.1); //4%
1010 fRawYield->SetBinContent(3,0.2);
1011 fRawYield->SetBinContent(4,0.2);
1012 fRawYield->SetBinContent(5,0.2);
1013 fRawYield->SetBinContent(6,0.2);
fa2be30c 1014
1015 // Cuts efficiency (from cuts variation)
1016 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
1017 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
6fd587a4 1018 fCutsEff->SetBinContent(4,0.15);
1019 fCutsEff->SetBinContent(5,0.15);
1020 fCutsEff->SetBinContent(6,0.15);
fa2be30c 1021
1022 // PID efficiency (from PID/noPID)
1023 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
6c388dee 1024 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.05); // 3%
fa2be30c 1025
1026
6fd587a4 1027 // MC dN/dpt (from study on D* pt shape)
fa2be30c 1028 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
6fd587a4 1029 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0.045);
1030 fMCPtShape->SetBinContent(4,0.025);
1031 fMCPtShape->SetBinContent(5,0.025);
1032 fMCPtShape->SetBinContent(6,0.025);
1033 fMCPtShape->SetBinContent(7,0.04);
1034 fMCPtShape->SetBinContent(8,0.04);
1035 fMCPtShape->SetBinContent(9,0.03);
1036 fMCPtShape->SetBinContent(10,0.03);
1037 fMCPtShape->SetBinContent(11,0.03);
1038 fMCPtShape->SetBinContent(12,0.03);
1039
9a8b5080 1040 return;
1041
1042}
1043// ----------------------------- 2011 ----------------------------------
1044void AliHFSystErr::InitDstartoD0pi2011PbPb07half() {
1045 //
1046 // D*+->D0pi syst errors. Responsible: A. Grelli
1047 // 2011 PbPb sample, 0-7.5 CC
1048 //
1049
1050 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 0-7.5 centrality - DUMMY");
1051
1052
1053 // Normalization
1054 fNorm = new TH1F("fNorm","fNorm",36,0,36);
1055 for(Int_t i=1;i<=36;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
1056
1057 // Branching ratio
1058 fBR = new TH1F("fBR","fBR",36,0,36);
1059 for(Int_t i=1;i<=36;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
1060
1061 // Tracking efficiency
1062 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",36,0,36);;
1063 for(Int_t i=1;i<=36;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
1064
1065
1066 // Raw yield extraction
1067 fRawYield = new TH1F("fRawYield","fRawYield",36,0,36);
1068 for(Int_t i=1;i<=36;i++) fRawYield->SetBinContent(i,0.05); //4%
ada850b0 1069 fRawYield->SetBinContent(4,0.2);
9a8b5080 1070 fRawYield->SetBinContent(5,0.10);
ada850b0 1071 fRawYield->SetBinContent(6,0.10);
1072 fRawYield->SetBinContent(7,0.08);
9a8b5080 1073 for(Int_t i=25;i<=36;i++) fRawYield->SetBinContent(i,0.15); //4%
1074
9a8b5080 1075 // Cuts efficiency (from cuts variation)
1076 fCutsEff = new TH1F("fCutsEff","fCutsEff",36,0,36);
1077 for(Int_t i=1;i<=36;i++) fCutsEff->SetBinContent(i,0.10); // 10%
9a8b5080 1078
1079 // PID efficiency (from PID/noPID)
1080 fPIDEff = new TH1F("fPIDEff","fPIDEff",36,0,36);
1081 for(Int_t i=1;i<=36;i++) fPIDEff->SetBinContent(i,0.05); // 3%
ada850b0 1082 fPIDEff->SetBinContent(4,0.09);
9a8b5080 1083
1084 // MC dN/dpt (from study on D* pt shape)
1085 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",36,0,36);
1086 for(Int_t i=1;i<=36;i++) fMCPtShape->SetBinContent(i,0.045);
1087 fMCPtShape->SetBinContent(4,0.025);
1088 fMCPtShape->SetBinContent(5,0.025);
1089 fMCPtShape->SetBinContent(6,0.025);
1090 fMCPtShape->SetBinContent(7,0.04);
1091 fMCPtShape->SetBinContent(8,0.04);
1092 fMCPtShape->SetBinContent(9,0.03);
1093 fMCPtShape->SetBinContent(10,0.03);
1094 fMCPtShape->SetBinContent(11,0.03);
1095 fMCPtShape->SetBinContent(12,0.03);
1096
6fd587a4 1097
fa2be30c 1098
1099 return;
1100
1101}
1102//-------------------------------------------------------------------------
1103void AliHFSystErr::InitDstartoD0pi2010PbPb2040() {
1104 //
1105 // D*+->D0pi syst errors. Responsible: A. Grelli
1106 // 2010 PbPb sample, 20-40 CC
1107 //
1108
1109 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 20-40 centrality - DUMMY");
1110
1111 // Normalization
1112 fNorm = new TH1F("fNorm","fNorm",24,0,24);
1113 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.10); // 10% error on sigmaV0and
1114
1115 // Branching ratio
1116 fBR = new TH1F("fBR","fBR",24,0,24);
1117 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
1118
1119 // Tracking efficiency
1120 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);;
69bcc748 1121 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
fa2be30c 1122
1123
1124 // Raw yield extraction
1125 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
1126 for(Int_t i=1;i<=24;i++) fRawYield->SetBinContent(i,0.15); //4%
1127
1128 // Cuts efficiency (from cuts variation)
1129 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
1130 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
1131
1132 // PID efficiency (from PID/noPID)
1133 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
1134 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.04); // 3%
1135
1136
1137 // MC dN/dpt (copied from D0 : will update later)
1138 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
578bfbba 1139 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0.);
1140 fMCPtShape->SetBinContent(1,0.03);
1141 fMCPtShape->SetBinContent(2,0.03);
fa2be30c 1142
5541b811 1143 return;
fa2be30c 1144
5541b811 1145}
6c388dee 1146
5541b811 1147//--------------------------------------------------------------------------
1148void AliHFSystErr::InitDstartoD0pi2010PbPb4080() {
1149 //
fa2be30c 1150 // D*+->D0pi syst errors. Responsible: A. Grelli
5541b811 1151 // 2010 PbPb sample, 40-80 CC
1152 //
1153
fa2be30c 1154 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 40-80 centrality - DUMMY");
1155
1156 // Normalization
1157 fNorm = new TH1F("fNorm","fNorm",24,0,24);
d5e15690 1158 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.07); // TAA and pp norm
fa2be30c 1159
1160 // Branching ratio
1161 fBR = new TH1F("fBR","fBR",24,0,24);
1162 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
1163
1164 // Tracking efficiency
1165 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);;
69bcc748 1166 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
fa2be30c 1167
1168
1169 // Raw yield extraction
1170 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
6c388dee 1171 for(Int_t i=1;i<=24;i++) fRawYield->SetBinContent(i,0.2); //4%
1172 fRawYield->SetBinContent(1,1);
1173 fRawYield->SetBinContent(2,0.15);
1174 fRawYield->SetBinContent(3,0.15);
1175 fRawYield->SetBinContent(4,0.15);
1176 fRawYield->SetBinContent(5,0.15);
1177 fRawYield->SetBinContent(6,0.10);
1178 fRawYield->SetBinContent(7,0.10);
1179 fRawYield->SetBinContent(8,0.10);
1180 fRawYield->SetBinContent(9,0.11);
1181 fRawYield->SetBinContent(10,0.11);
1182 fRawYield->SetBinContent(11,0.11);
1183 fRawYield->SetBinContent(12,0.11);
1184 fRawYield->SetBinContent(13,0.08);
1185 fRawYield->SetBinContent(14,0.08);
1186 fRawYield->SetBinContent(15,0.08);
1187 fRawYield->SetBinContent(16,0.08);
1188
1189
fa2be30c 1190 // Cuts efficiency (from cuts variation)
1191 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
1192 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
1193
1194 // PID efficiency (from PID/noPID)
1195 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
6c388dee 1196 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.05); // 3%
fa2be30c 1197
1198
1199 // MC dN/dpt (copied from D0 : will update later)
1200 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
6fd587a4 1201 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0.01);
1202 fMCPtShape->SetBinContent(2,0.05);
1203 fMCPtShape->SetBinContent(3,0.05);
1204 fMCPtShape->SetBinContent(4,0.05);
1205 fMCPtShape->SetBinContent(5,0.04);
1206 fMCPtShape->SetBinContent(6,0.02);
1207 fMCPtShape->SetBinContent(7,0.04);
1208 fMCPtShape->SetBinContent(8,0.04);
1209
5541b811 1210 return;
fa2be30c 1211
5541b811 1212}
6c388dee 1213
5541b811 1214//--------------------------------------------------------------------------
414bc6a5 1215void AliHFSystErr::InitD0toKpi2010PbPb010CentScan(){
1216 // define errors for RAA vs. centrality
1217 InitD0toKpi2010PbPb020();
41cfcd39 1218 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
27360a0e 1219 for(Int_t i=3;i<=5;i++) fMCPtShape->SetBinContent(i,0.17);
41cfcd39 1220 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1221}
1222//--------------------------------------------------------------------------
1223void AliHFSystErr::InitD0toKpi2010PbPb1020CentScan(){
1224 // define errors for RAA vs. centrality
1225 InitD0toKpi2010PbPb020();
41cfcd39 1226 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
27360a0e 1227 for(Int_t i=3;i<=5;i++) fMCPtShape->SetBinContent(i,0.17);
41cfcd39 1228 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1229}
1230//--------------------------------------------------------------------------
1231void AliHFSystErr::InitD0toKpi2010PbPb2040CentScan(){
1232 // define errors for RAA vs. centrality
41cfcd39 1233 InitD0toKpi2010PbPb4080();
1234 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
27360a0e 1235 for(Int_t i=3;i<=5;i++) fMCPtShape->SetBinContent(i,0.14);
41cfcd39 1236 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1237}
1238//--------------------------------------------------------------------------
1239void AliHFSystErr::InitD0toKpi2010PbPb4060CentScan(){
41cfcd39 1240 // define errors for RAA vs. centrality
414bc6a5 1241 InitD0toKpi2010PbPb4080();
41cfcd39 1242 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.06);
27360a0e 1243 for(Int_t i=3;i<=5;i++) fMCPtShape->SetBinContent(i,0.11);
41cfcd39 1244 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1245}
1246//--------------------------------------------------------------------------
1247void AliHFSystErr::InitD0toKpi2010PbPb6080CentScan(){
41cfcd39 1248 // define errors for RAA vs. centrality
414bc6a5 1249 InitD0toKpi2010PbPb4080();
41cfcd39 1250 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.08);
27360a0e 1251 for(Int_t i=3;i<=5;i++) fMCPtShape->SetBinContent(i,0.08);
41cfcd39 1252 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1253}
1254//--------------------------------------------------------------------------
1255void AliHFSystErr::InitDplustoKpipi2010PbPb010CentScan(){
1256 // define errors for RAA vs. centrality
1257 InitDplustoKpipi2010PbPb020();
7b03f1ec 1258 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.18);
eefab142 1259 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.09);
7b03f1ec 1260
414bc6a5 1261}
1262//--------------------------------------------------------------------------
1263void AliHFSystErr::InitDplustoKpipi2010PbPb1020CentScan(){
1264 // define errors for RAA vs. centrality
1265 InitDplustoKpipi2010PbPb020();
7b03f1ec 1266 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.23);
eefab142 1267 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1268}
1269//--------------------------------------------------------------------------
1270void AliHFSystErr::InitDplustoKpipi2010PbPb2040CentScan(){
1271 // define errors for RAA vs. centrality
1272 InitDplustoKpipi2010PbPb020();
7b03f1ec 1273 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.08);
eefab142 1274 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.095);
414bc6a5 1275}
1276//--------------------------------------------------------------------------
1277void AliHFSystErr::InitDplustoKpipi2010PbPb4060CentScan(){
1278 // define errors for RAA vs. centrality
1279 InitDplustoKpipi2010PbPb4080();
7b03f1ec 1280 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.08);
eefab142 1281 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1282}
1283//--------------------------------------------------------------------------
1284void AliHFSystErr::InitDplustoKpipi2010PbPb6080CentScan(){
1285 // define errors for RAA vs. centrality
1286 InitDplustoKpipi2010PbPb4080();
7b03f1ec 1287 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.15);
eefab142 1288 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.07);
414bc6a5 1289}
1290
1291//--------------------------------------------------------------------------
1292void AliHFSystErr::InitDstartoD0pi2010PbPb010CentScan(){
1293 // define errors for RAA vs. centrality
1294 InitDstartoD0pi2010PbPb020();
1295 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.16);
eefab142 1296 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.15);
414bc6a5 1297}
1298//--------------------------------------------------------------------------
1299void AliHFSystErr::InitDstartoD0pi2010PbPb1020CentScan(){
1300 // define errors for RAA vs. centrality
1301 InitDstartoD0pi2010PbPb020();
1302 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
eefab142 1303 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.15);
414bc6a5 1304}
1305//--------------------------------------------------------------------------
1306void AliHFSystErr::InitDstartoD0pi2010PbPb2040CentScan(){
1307 // define errors for RAA vs. centrality
1308 InitDstartoD0pi2010PbPb2040();
1309 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.10);
eefab142 1310 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1311}
1312//--------------------------------------------------------------------------
1313void AliHFSystErr::InitDstartoD0pi2010PbPb4060CentScan(){
1314 // define errors for RAA vs. centrality
1315 InitDstartoD0pi2010PbPb4080();
1316 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.10);
eefab142 1317 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.045);
414bc6a5 1318}
1319//--------------------------------------------------------------------------
1320void AliHFSystErr::InitDstartoD0pi2010PbPb6080CentScan(){
1321 // define errors for RAA vs. centrality
1322 InitDstartoD0pi2010PbPb4080();
1323 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.10);
eefab142 1324 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.045);
414bc6a5 1325}
1326
1327
1328//--------------------------------------------------------------------------
0233abe6 1329Double_t AliHFSystErr::GetCutsEffErr(Double_t pt) const {
1330 //
1331 // Get error
1332 //
1333
1334 Int_t bin=fCutsEff->FindBin(pt);
1335
1336 return fCutsEff->GetBinContent(bin);
1337}
1338//--------------------------------------------------------------------------
1339Double_t AliHFSystErr::GetMCPtShapeErr(Double_t pt) const {
1340 //
1341 // Get error
1342 //
1343
1344 Int_t bin=fMCPtShape->FindBin(pt);
1345
1346 return fMCPtShape->GetBinContent(bin);
1347}
1348//--------------------------------------------------------------------------
1349Double_t AliHFSystErr::GetSeleEffErr(Double_t pt) const {
1350 //
1351 // Get error
1352 //
1353
1354 Double_t err=GetCutsEffErr(pt)*GetCutsEffErr(pt)+GetMCPtShapeErr(pt)*GetMCPtShapeErr(pt);
1355
1356 return TMath::Sqrt(err);
1357}
1358//--------------------------------------------------------------------------
1359Double_t AliHFSystErr::GetPIDEffErr(Double_t pt) const {
1360 //
1361 // Get error
1362 //
1363
1364 Int_t bin=fPIDEff->FindBin(pt);
1365
1366 return fPIDEff->GetBinContent(bin);
1367}
1368//--------------------------------------------------------------------------
1369Double_t AliHFSystErr::GetTrackingEffErr(Double_t pt) const {
1370 //
1371 // Get error
1372 //
1373
1374 Int_t bin=fTrackingEff->FindBin(pt);
1375
1376 return fTrackingEff->GetBinContent(bin);
1377}
1378//--------------------------------------------------------------------------
1379Double_t AliHFSystErr::GetRawYieldErr(Double_t pt) const {
1380 //
1381 // Get error
1382 //
1383
1384 Int_t bin=fRawYield->FindBin(pt);
1385
1386 return fRawYield->GetBinContent(bin);
1387}
1388//--------------------------------------------------------------------------
1389Double_t AliHFSystErr::GetPartAntipartErr(Double_t pt) const {
1390 //
1391 // Get error
1392 //
1393
1394 Int_t bin=fPartAntipart->FindBin(pt);
1395
1396 return fPartAntipart->GetBinContent(bin);
1397}
1398//--------------------------------------------------------------------------
1399Double_t AliHFSystErr::GetTotalSystErr(Double_t pt,Double_t feeddownErr) const {
1400 //
1401 // Get total syst error (except norm. error)
1402 //
1403
1404 Double_t err=0.;
1405
1406 if(fRawYield) err += GetRawYieldErr(pt)*GetRawYieldErr(pt);
1407 if(fTrackingEff) err += GetTrackingEffErr(pt)*GetTrackingEffErr(pt);
f9a85c82 1408 // if(fBR) err += GetBRErr()*GetBRErr();
0233abe6 1409 if(fCutsEff) err += GetCutsEffErr(pt)*GetCutsEffErr(pt);
1410 if(fPIDEff) err += GetPIDEffErr(pt)*GetPIDEffErr(pt);
1411 if(fMCPtShape) err += GetMCPtShapeErr(pt)*GetMCPtShapeErr(pt);
1412 if(fPartAntipart) err += GetPartAntipartErr(pt)*GetPartAntipartErr(pt);
1413
1414 err += feeddownErr*feeddownErr;
1415
1416 return TMath::Sqrt(err);
1417}
1418//---------------------------------------------------------------------------
5ad8ad40 1419void AliHFSystErr::DrawErrors(TGraphAsymmErrors *grErrFeeddown) const {
0233abe6 1420 //
1421 // Draw errors
1422 //
1423 gStyle->SetOptStat(0);
1424
a07118d0 1425 TCanvas *cSystErr = new TCanvas("cSystErr","Systematic Errors",300,80,640,500);
1426 cSystErr->Range(0.20,-0.5,18.4,0.34);
1427 cSystErr->SetRightMargin(0.318);
0233abe6 1428 cSystErr->SetFillColor(0);
1429
436b185f 1430 TH2F *hFrame = new TH2F("hFrame","Systematic errors; p_{t} (GeV/c); Relative Error",40,0,40,100,-1,+1);
1431 hFrame->SetAxisRange(1.,35.9,"X");
a07118d0 1432 hFrame->SetAxisRange(-0.5,0.5,"Y");
0233abe6 1433 hFrame->Draw();
1434
a07118d0 1435 TLegend *leg = new TLegend(0.69,0.44,0.98,0.86,NULL,"brNDC");
1436 leg->SetTextSize(0.03601695);
0233abe6 1437 leg->SetFillStyle(0);
1438 leg->SetBorderSize(0);
2ee3afe2 1439
436b185f 1440 TH1F *hTotErr=new TH1F("hTotErr","",36,0,36);
2ee3afe2 1441 Int_t nbins = fNorm->GetNbinsX();
1442 TGraphAsymmErrors *gTotErr = new TGraphAsymmErrors(nbins);
436b185f 1443 for(Int_t i=1;i<=36;i++) {
2ee3afe2 1444 Double_t pt = hTotErr->GetBinCenter(i);
1445 Double_t ptwidth = hTotErr->GetBinWidth(i);
1446
1447 if(grErrFeeddown) {
1448 Double_t x=0., y=0., errxl=0., errxh=0., erryl=0., erryh=0.;
1449 Double_t toterryl=0., toterryh=0.;
1450 for(Int_t j=0; j<grErrFeeddown->GetN(); j++) {
1451 grErrFeeddown->GetPoint(j,x,y);
1452 errxh = grErrFeeddown->GetErrorXhigh(j);
1453 errxl = grErrFeeddown->GetErrorXlow(j);
a07118d0 1454 if ( ( (x-errxl) <= pt) && ( (x+errxl) >= pt) ) {
2ee3afe2 1455 erryh = grErrFeeddown->GetErrorYhigh(j);
1456 erryl = grErrFeeddown->GetErrorYlow(j);
1457 }
1458 }
1459 if (erryl>=1e-3) toterryl = GetTotalSystErr(pt,erryl);
1460 else toterryl = GetTotalSystErr(pt);
1461 if (erryh>=1e-3) toterryh = GetTotalSystErr(pt,erryh);
1462 else toterryh = GetTotalSystErr(pt);
1463
1464 hTotErr->SetBinContent(i,toterryh);
1465 gTotErr->SetPoint(i,pt,0.);
1466 gTotErr->SetPointError(i,ptwidth/2.,ptwidth/2.,toterryl,toterryh); // i, exl, exh, eyl, eyh
1467 }
1468 else {
1469 hTotErr->SetBinContent(i,GetTotalSystErr(pt));
1470 gTotErr->SetPoint(i,pt,0.);
1471 gTotErr->SetPointError(i,ptwidth/2.,ptwidth/2.,GetTotalSystErr(pt),GetTotalSystErr(pt)); // i, exl, exh, eyl, eyh
1472 }
1473
1474 }
f968ef30 1475 gTotErr->SetLineColor(kBlack);
1476 gTotErr->SetFillColor(kRed);
1477 gTotErr->SetFillStyle(3002);
2ee3afe2 1478 gTotErr->Draw("2");
1479 leg->AddEntry(gTotErr,"Total (excl. norm.)","f");
1480// hTotErr->SetLineColor(1);
1481// hTotErr->SetLineWidth(3);
1482// hTotErr->Draw("same");
1483// leg->AddEntry(hTotErr,"Total (excl. norm.)","l");
1484
0233abe6 1485
e373b9f0 1486 fNorm->SetFillColor(1);
1487 fNorm->SetFillStyle(3002);
1488 //fNorm->Draw("same");
1489 //TH1F *hNormRefl = ReflectHisto(fNorm);
1490 //hNormRefl->Draw("same");
27360a0e 1491 Double_t norm = fNorm->GetBinContent(1)*100;
1492 leg->AddEntry(fNorm,Form("Normalization (%.1f%s)",norm,"%"),"");
e373b9f0 1493
5ad8ad40 1494 if(grErrFeeddown) {
1495 grErrFeeddown->SetFillColor(kTeal-8);
1496 grErrFeeddown->SetFillStyle(3001);
1497 grErrFeeddown->Draw("2");
1498 leg->AddEntry(grErrFeeddown,"Feed-down from B","f");
1499 }
0233abe6 1500 if(fTrackingEff) {
5ad8ad40 1501 fTrackingEff->SetFillColor(4);
1502 fTrackingEff->SetFillStyle(3006);
0233abe6 1503 fTrackingEff->Draw("same");
f968ef30 1504 TH1F *hTrackingEffRefl = ReflectHisto(fTrackingEff);
1505 hTrackingEffRefl->Draw("same");
0233abe6 1506 leg->AddEntry(fTrackingEff,"Tracking efficiency","f");
1507 }
1508 if(fBR) {
1509 fBR->SetFillColor(6);
1510 fBR->SetFillStyle(3005);
5ad8ad40 1511 //fBR->SetFillStyle(3020);
0233abe6 1512 fBR->Draw("same");
f968ef30 1513 TH1F *hBRRefl = ReflectHisto(fBR);
1514 hBRRefl->Draw("same");
0233abe6 1515 leg->AddEntry(fBR,"Branching ratio","f");
1516 }
1517 if(fRawYield) {
5ad8ad40 1518 Int_t ci; // for color index setting
1519 ci = TColor::GetColor("#00cc00");
1520 fRawYield->SetLineColor(ci);
1521 // fRawYield->SetLineColor(3);
0233abe6 1522 fRawYield->SetLineWidth(3);
1523 fRawYield->Draw("same");
f968ef30 1524 TH1F *hRawYieldRefl = ReflectHisto(fRawYield);
1525 hRawYieldRefl->Draw("same");
844405bc 1526 leg->AddEntry(fRawYield,"Yield extraction","l");
0233abe6 1527 }
1528 if(fCutsEff) {
1529 fCutsEff->SetLineColor(4);
1530 fCutsEff->SetLineWidth(3);
1531 fCutsEff->Draw("same");
f968ef30 1532 TH1F *hCutsEffRefl = ReflectHisto(fCutsEff);
1533 hCutsEffRefl->Draw("same");
0233abe6 1534 leg->AddEntry(fCutsEff,"Cuts efficiency","l");
1535 }
1536 if(fPIDEff) {
1537 fPIDEff->SetLineColor(7);
1538 fPIDEff->SetLineWidth(3);
1539 fPIDEff->Draw("same");
f968ef30 1540 TH1F *hPIDEffRefl = ReflectHisto(fPIDEff);
1541 hPIDEffRefl->Draw("same");
0233abe6 1542 leg->AddEntry(fPIDEff,"PID efficiency","l");
1543 }
1544 if(fMCPtShape) {
5ad8ad40 1545 Int_t ci = TColor::GetColor("#9933ff");
1546 fMCPtShape->SetLineColor(ci);
1547 // fMCPtShape->SetLineColor(8);
0233abe6 1548 fMCPtShape->SetLineWidth(3);
1549 fMCPtShape->Draw("same");
f968ef30 1550 TH1F *hMCPtShapeRefl = ReflectHisto(fMCPtShape);
1551 hMCPtShapeRefl->Draw("same");
0233abe6 1552 leg->AddEntry(fMCPtShape,"MC p_{t} shape","l");
1553 }
1554 if(fPartAntipart) {
5ad8ad40 1555 Int_t ci = TColor::GetColor("#ff6600");
1556 fPartAntipart->SetLineColor(ci);
1557 // fPartAntipart->SetLineColor(9);
0233abe6 1558 fPartAntipart->SetLineWidth(3);
1559 fPartAntipart->Draw("same");
f968ef30 1560 TH1F *hPartAntipartRefl = ReflectHisto(fPartAntipart);
1561 hPartAntipartRefl->Draw("same");
0233abe6 1562 leg->AddEntry(fPartAntipart,"D = #bar{D}","l");
1563 }
0233abe6 1564
0233abe6 1565
1566 leg->Draw();
1567
5ad8ad40 1568 cSystErr->SaveAs("RelativeSystematics.eps");
1569
0233abe6 1570 return;
1571}
f968ef30 1572//-------------------------------------------------------------------------
1573TH1F* AliHFSystErr::ReflectHisto(TH1F *hin) const {
1574 //
1575 // Clones and reflects histogram
1576 //
1577 TH1F *hout=(TH1F*)hin->Clone("hout");
1578 hout->Scale(-1.);
1579
1580 return hout;
1581}
9a8b5080 1582
ada850b0 1583
1584