Updates syst unc for D+ (Elena)
[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);
a7cfa9ed 587 for(Int_t i=1;i<=36;i++) fNorm->SetBinContent(i,0.047); // TAA and pp norm
436b185f 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%
eb4886c7 600 fRawYield->SetBinContent(4,0.30);
601 fRawYield->SetBinContent(5,0.20);
602 fRawYield->SetBinContent(6,0.20);
603 for(Int_t i=7; i<=8; i++) fRawYield->SetBinContent(i,0.10);
604 for(Int_t i=9; i<=12; i++) fRawYield->SetBinContent(i,0.08);
436b185f 605 for(Int_t i=13; i<=16; i++) fRawYield->SetBinContent(i,0.05);
eb4886c7 606 for(Int_t i=17; i<=24; i++) fRawYield->SetBinContent(i,0.08);
436b185f 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);
a7cfa9ed 612 for(Int_t i=1; i<=12; i++) fCutsEff->SetBinContent(i,0.10);
613 for(Int_t i=13; i<=36; i++) fCutsEff->SetBinContent(i,0.08);
eb4886c7 614
436b185f 615
616 // PID efficiency (from PID/noPID)
617 fPIDEff = new TH1F("fPIDEff","fPIDEff",36,0,36);
618 for(Int_t i=1;i<=36;i++) fPIDEff->SetBinContent(i,0.05); // 5%
619
a7cfa9ed 620 // MC dN/dpt (24/7/2012)
436b185f 621 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",36,0,36);
a7cfa9ed 622 for(Int_t iBin=1; iBin<=8; iBin++) fMCPtShape->SetBinContent(iBin,0.01);
436b185f 623 for(Int_t iBin=9; iBin<=12; iBin++) fMCPtShape->SetBinContent(iBin,0.05);
624 for(Int_t iBin=13; iBin<=36; iBin++) fMCPtShape->SetBinContent(iBin,0.05);
625
626
627 // particle-antiparticle
628 /*
629 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
630 fPartAntipart->SetBinContent(1,1);
631 fPartAntipart->SetBinContent(2,1);
632 fPartAntipart->SetBinContent(3,0.12);
633 for(Int_t i=4;i<=20;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
634 */
635
636 return;
637}
638
639//--------------------------------------------------------------------------
46988859 640void AliHFSystErr::InitDstoKKpi2011PbPb07half() {
641 //
642 // D+s->Kpipi syst errors. Responsible: G.M. Innocenti
643 // 2011 PbPb sample, 0-7.5% CC
644 //
645
646 // Normalization
647 fNorm = new TH1F("fNorm","fNorm",12,0,12);
648 for(Int_t i=1;i<=12;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
649
650 // Branching ratio
651 fBR = new TH1F("fBR","fBR",12,0,12);
652 for(Int_t i=1;i<=12;i++) fBR->SetBinContent(i,06); // 0.14/2.32 PDG2010
653
654 // Tracking efficiency
655 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",12,0,12);
656 for(Int_t i=1;i<=12;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
657
658 // Raw yield extraction
659 fRawYield = new TH1F("fRawYield","fRawYield",12,0,12);
660 for(Int_t i=1;i<=6;i++) fRawYield->SetBinContent(i,.30);
661 for(Int_t i=7; i<=12; i++) fRawYield->SetBinContent(i,0.20);
662
663
664
665 // Cuts efficiency (from cuts variation)
666 fCutsEff = new TH1F("fCutsEff","fCutsEff",12,0,12);
667 for(Int_t i=1;i<=12;i++) fCutsEff->SetBinContent(i,0.20); // 20%
668
669 // PID efficiency (from PID/noPID)
670 fPIDEff = new TH1F("fPIDEff","fPIDEff",12,0,12);
671 for(Int_t i=1;i<=12;i++) fPIDEff->SetBinContent(i,0.1); // 10%
672
673 // MC dN/dpt
674 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",12,0,12);
675 for(Int_t i=1; i<=2; i++) fMCPtShape->SetBinContent(i,1.);
676 for(Int_t i=3; i<=4; i++) fMCPtShape->SetBinContent(i,0.03);
677 for(Int_t i=5; i<=6; i++) fMCPtShape->SetBinContent(i,0.03);
678 for(Int_t i=7; i<=8; i++) fMCPtShape->SetBinContent(i,0.02);
679 for(Int_t i=9; i<=12; i++) fMCPtShape->SetBinContent(i,0.02);
680
681 // particle-antiparticle
682 /*
683 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",12,0,12);
684 fPartAntipart->SetBinContent(1,1);
685 fPartAntipart->SetBinContent(2,1);
686 fPartAntipart->SetBinContent(3,0.12);
687 for(Int_t i=4;i<=12;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
688 */
689
690 return;
691}
692
693//--------------------------------------------------------------------------
5541b811 694void AliHFSystErr::InitDplustoKpipi2010PbPb020() {
695 //
696 // D+->Kpipi syst errors. Responsible: ??
697 // 2010 PbPb sample, 0-20 CC
698 //
aebba8df 699
aebba8df 700 // Normalization
701 fNorm = new TH1F("fNorm","fNorm",20,0,20);
d5e15690 702 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
aebba8df 703
704 // Branching ratio
705 fBR = new TH1F("fBR","fBR",20,0,20);
f7c8a2f1 706 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.021); // 2.1% PDG2010
aebba8df 707
708 // Tracking efficiency
709 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
69bcc748 710 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
aebba8df 711
712 // Raw yield extraction
713 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
6c388dee 714 for(Int_t i=1;i<=20;i++) fRawYield->SetBinContent(i,.10); //5 to 10%
715 // fRawYield->SetBinContent(5,0.23);
716 //fRawYield->SetBinContent(6,0.23);
cb142b90 717 fRawYield->SetBinContent(7,0.20);
718 fRawYield->SetBinContent(8,0.20);
719 fRawYield->SetBinContent(9,0.15);
720 fRawYield->SetBinContent(10,0.15);
721 fRawYield->SetBinContent(11,0.15);
722 fRawYield->SetBinContent(12,0.15);
aebba8df 723
724 // Cuts efficiency (from cuts variation)
725 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
666cf569 726 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.15); // 10%
aebba8df 727
728 // PID efficiency (from PID/noPID)
729 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
730 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 5%
aebba8df 731
f7c8a2f1 732 // MC dN/dpt (2/2/2012)
aebba8df 733 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 734 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.);
f7c8a2f1 735 for(Int_t iBin=7; iBin<=8; iBin++) fMCPtShape->SetBinContent(iBin,0.01);
736 for(Int_t iBin=9; iBin<=12; iBin++) fMCPtShape->SetBinContent(iBin,0.05);
737 for(Int_t iBin=13; iBin<=16; iBin++) fMCPtShape->SetBinContent(iBin,0.05);
aebba8df 738
739
740 // particle-antiparticle
741 /*
742 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
743 fPartAntipart->SetBinContent(1,1);
744 fPartAntipart->SetBinContent(2,1);
745 fPartAntipart->SetBinContent(3,0.12);
746 for(Int_t i=4;i<=20;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
747 */
6c388dee 748
5541b811 749 return;
750}
751
752//--------------------------------------------------------------------------
753void AliHFSystErr::InitDplustoKpipi2010PbPb4080() {
754 //
755 // D+->Kpipi syst errors. Responsible: ??
756 // 2010 PbPb sample, 40-80 CC
757 //
758
aebba8df 759
760 // Normalization
761 fNorm = new TH1F("fNorm","fNorm",20,0,20);
d5e15690 762 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.07); // TAA and pp norm
aebba8df 763
764 // Branching ratio
765 fBR = new TH1F("fBR","fBR",20,0,20);
f7c8a2f1 766 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.021); // 2.1%
aebba8df 767
768 // Tracking efficiency
769 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
69bcc748 770 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
aebba8df 771
772
773 // Raw yield extraction
774 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
775 fRawYield->SetBinContent(1,1);
776 fRawYield->SetBinContent(2,1);
777 fRawYield->SetBinContent(3,1);
6970b225 778 fRawYield->SetBinContent(4,0.15);
cb142b90 779 fRawYield->SetBinContent(5,0.05);
780 fRawYield->SetBinContent(6,0.05);
781 fRawYield->SetBinContent(7,0.15);
782 fRawYield->SetBinContent(8,0.15);
6970b225 783 for(Int_t i=9;i<=12;i++) fRawYield->SetBinContent(i,0.15);
aebba8df 784 for(Int_t i=13;i<=20;i++) fRawYield->SetBinContent(i,1); //5 to 10%
785
786 // Cuts efficiency (from cuts variation)
787 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
788 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.10); // 10%
789
790 // PID efficiency (from PID/noPID)
791 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
792 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 5%
793 fPIDEff->SetBinContent(3,0.13); // 13%
794
795
f7c8a2f1 796 // MC dN/dpt (2/2/2012)
aebba8df 797 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
578bfbba 798 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0);
f7c8a2f1 799 for(Int_t iBin=4; iBin<=8; iBin++) fMCPtShape->SetBinContent(iBin,0.01);
800 for(Int_t iBin=9; iBin<=12; iBin++) fMCPtShape->SetBinContent(iBin,0.03);
801 for(Int_t iBin=13; iBin<=16; iBin++) fMCPtShape->SetBinContent(iBin,0.03);
aebba8df 802
803
804 // particle-antiparticle
805 /*
806 fPartAntipart = new TH1F("fPartAntipart","fPartAntipart",20,0,20);
807 fPartAntipart->SetBinContent(1,1);
808 fPartAntipart->SetBinContent(2,1);
809 fPartAntipart->SetBinContent(3,0.12);
810 for(Int_t i=4;i<=20;i++) fPartAntipart->SetBinContent(i,0.05); //5 to 12%
811 */
5541b811 812 return;
813}
814
815//--------------------------------------------------------------------------
a8c3295d 816void AliHFSystErr::InitDplustoKpipi2010ppLowEn() {
817
818 //
819 // D+->Kpipi syst errors. Responsible: R. Bala
820 // 2011 2.76 TeV pp sample
821 //
822 AliInfo(" Settings for D+ --> K pi pi p-p collisions at 2.76 TeV");
823
824 // Normalization
825 fNorm = new TH1F("fNorm","fNorm",20,0,20);
f9a85c82 826 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.031); // 10% error on sigmaV0and
a8c3295d 827
828 // Branching ratio
829 fBR = new TH1F("fBR","fBR",20,0,20);
f7c8a2f1 830 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.021); // 2.1% PDG2010
a8c3295d 831
832 // Tracking efficiency
833 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
27360a0e 834 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.15); // 3% (1% per track)
a8c3295d 835
836 // Raw yield extraction
837 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
838 fRawYield->SetBinContent(1,1);
839 fRawYield->SetBinContent(2,1);
f9a85c82 840 for(Int_t i=3;i<=6;i++) fRawYield->SetBinContent(i,0.10); //5 to 10%
841 fRawYield->SetBinContent(7,0.15);
842 fRawYield->SetBinContent(8,0.15);
843 for(Int_t i=9;i<=20;i++) fRawYield->SetBinContent(i,0.055); //5 to 10%
a8c3295d 844
845 // Cuts efficiency (from cuts variation)
846 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
f9a85c82 847 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.15); // 10%
a8c3295d 848
849 // PID efficiency (from PID/noPID)
850 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
851 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 5%
f9a85c82 852 fPIDEff->SetBinContent(3,0.10); // 13%
853 fPIDEff->SetBinContent(4,0.10); // 13%
a8c3295d 854
855 // MC dN/dpt (copied from D0 : will update later)
856 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
27360a0e 857 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.01);
578bfbba 858 fMCPtShape->SetBinContent(1,0.03);
859 fMCPtShape->SetBinContent(2,0.03);
a8c3295d 860
861 return;
862}
863
864//--------------------------------------------------------------------------
5541b811 865void AliHFSystErr::InitDstartoD0pi2010pp() {
0233abe6 866 //
2cf98d0d 867 // D*+->D0pi syst errors. Responsible: A. Grelli, Y. Wang
5541b811 868 // 2010 pp sample
0233abe6 869 //
870
2cf98d0d 871 // Normalization
fa2be30c 872 fNorm = new TH1F("fNorm","fNorm",24,0,24);
27360a0e 873 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.035); // 4% error on sigmaV0and
fa2be30c 874
875 // Branching ratio
876 fBR = new TH1F("fBR","fBR",24,0,24);
877 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
878
879 // Tracking efficiency
880 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);
881 fTrackingEff->SetBinContent(1,1.0);
f8bc42d3 882 fTrackingEff->SetBinContent(2,0.13); // 10% (ITSsa) \oplus 8% (4% per ITSTPC track)
883 fTrackingEff->SetBinContent(3,0.12);
884 fTrackingEff->SetBinContent(3,0.12);
885 for(Int_t i=4;i<=24;i++) fTrackingEff->SetBinContent(i,0.12); // 12% (4% per track)
fa2be30c 886
887
888 // Raw yield extraction
889 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
890 fRawYield->SetBinContent(1,1.0);
d2e5959f 891 fRawYield->SetBinContent(2,0.10);
fa2be30c 892 fRawYield->SetBinContent(3,0.04);
d2e5959f 893 fRawYield->SetBinContent(4,0.03);
fa2be30c 894 fRawYield->SetBinContent(5,0.03);
d2e5959f 895 fRawYield->SetBinContent(6,0.05);
896 fRawYield->SetBinContent(7,0.05);
897 fRawYield->SetBinContent(8,0.05);
898 for(Int_t i=9;i<=12;i++) fRawYield->SetBinContent(i,0.04); //4%
899 for(Int_t i=13;i<=16;i++) fRawYield->SetBinContent(i,0.09); //4%
900 for(Int_t i=17;i<=24;i++) fRawYield->SetBinContent(i,0.2); //4%
fa2be30c 901
902 // Cuts efficiency (from cuts variation)
903 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
904 fCutsEff->SetBinContent(2,0.22);
905 for(Int_t i=3;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
906
907 // PID efficiency (from PID/noPID)
908 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
909 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.04); // 3%
910
911
912 // MC dN/dpt (copied from D0 : will update later)
913 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
578bfbba 914 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0);
915 fMCPtShape->SetBinContent(1,0.03);
916 fMCPtShape->SetBinContent(2,0.03);
fa2be30c 917
918 return;
919
920
921}
922//--------------------------------------------------------------------------
923void AliHFSystErr::InitDstartoD0pi2010ppLowEn() {
924
925 //
926 // D+->Kpipi syst errors. Responsible: A. Grelli
927 // 2011 2.76 TeV pp sample
928 //
929 AliInfo(" Settings for D*+ --> D0 pi p-p collisions at 2.76 TeV");
930
931// Normalization
2cf98d0d 932 fNorm = new TH1F("fNorm","fNorm",20,0,20);
f9a85c82 933 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.031); // 10% error on sigmaV0and
2cf98d0d 934
935 // Branching ratio
936 fBR = new TH1F("fBR","fBR",20,0,20);
8accac87 937 for(Int_t i=1;i<=20;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
2cf98d0d 938
939 // Tracking efficiency
940 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",20,0,20);
27360a0e 941 for(Int_t i=1;i<=20;i++) fTrackingEff->SetBinContent(i,0.15); //10% (to be checked!!)
2cf98d0d 942
943 // Raw yield extraction
944 fRawYield = new TH1F("fRawYield","fRawYield",20,0,20);
8accac87 945 fRawYield->SetBinContent(1,1);
fa2be30c 946 fRawYield->SetBinContent(2,1);
f9a85c82 947 fRawYield->SetBinContent(3,0.14);
948 fRawYield->SetBinContent(4,0.14);
949 fRawYield->SetBinContent(5,0.12);
950 fRawYield->SetBinContent(6,0.12);
951 fRawYield->SetBinContent(7,0.06);
952 fRawYield->SetBinContent(8,0.06);
953 fRawYield->SetBinContent(9,0.08);
954 fRawYield->SetBinContent(10,0.08);
955 fRawYield->SetBinContent(11,0.08);
956 fRawYield->SetBinContent(12,0.08);
fa2be30c 957 for(Int_t i=9;i<=20;i++) fRawYield->SetBinContent(i,0.065);
2cf98d0d 958
959 // Cuts efficiency (from cuts variation)
960 fCutsEff = new TH1F("fCutsEff","fCutsEff",20,0,20);
f9a85c82 961 for(Int_t i=1;i<=20;i++) fCutsEff->SetBinContent(i,0.10);
962 fCutsEff->SetBinContent(3,0.15);
963 fCutsEff->SetBinContent(4,0.15);
964 fCutsEff->SetBinContent(5,0.15);
965 fCutsEff->SetBinContent(6,0.15);
966 fCutsEff->SetBinContent(7,0.10);
967 fCutsEff->SetBinContent(8,0.10);
968 fCutsEff->SetBinContent(9,0.10);
969 fCutsEff->SetBinContent(10,0.10);
970 fCutsEff->SetBinContent(11,0.10);
971 fCutsEff->SetBinContent(12,0.10);
2cf98d0d 972
973 // PID efficiency (from PID/noPID)
974 fPIDEff = new TH1F("fPIDEff","fPIDEff",20,0,20);
fa2be30c 975 for(Int_t i=1;i<=20;i++) fPIDEff->SetBinContent(i,0.05); // 10%
2cf98d0d 976
fa2be30c 977 // MC dN/dpt
2cf98d0d 978 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",20,0,20);
27360a0e 979 for(Int_t i=1;i<=20;i++) fMCPtShape->SetBinContent(i,0.01);
578bfbba 980 fMCPtShape->SetBinContent(1,0.03);
981 fMCPtShape->SetBinContent(2,0.03);
2cf98d0d 982
0233abe6 983 return;
984}
6c388dee 985
fa2be30c 986//------------------------------------------------------------------------
5541b811 987void AliHFSystErr::InitDstartoD0pi2010PbPb020() {
988 //
fa2be30c 989 // D*+->D0pi syst errors. Responsible: A. Grelli
5541b811 990 // 2010 PbPb sample, 0-20 CC
991 //
992
fa2be30c 993 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 0-20 centrality - DUMMY");
994
995 // Normalization
996 fNorm = new TH1F("fNorm","fNorm",24,0,24);
d5e15690 997 for(Int_t i=1;i<=20;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
fa2be30c 998
999 // Branching ratio
1000 fBR = new TH1F("fBR","fBR",24,0,24);
1001 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
1002
1003 // Tracking efficiency
1004 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);;
69bcc748 1005 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
fa2be30c 1006
1007
1008 // Raw yield extraction
1009 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
6c388dee 1010 for(Int_t i=1;i<=24;i++) fRawYield->SetBinContent(i,0.1); //4%
1011 fRawYield->SetBinContent(3,0.2);
1012 fRawYield->SetBinContent(4,0.2);
1013 fRawYield->SetBinContent(5,0.2);
1014 fRawYield->SetBinContent(6,0.2);
fa2be30c 1015
1016 // Cuts efficiency (from cuts variation)
1017 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
1018 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
6fd587a4 1019 fCutsEff->SetBinContent(4,0.15);
1020 fCutsEff->SetBinContent(5,0.15);
1021 fCutsEff->SetBinContent(6,0.15);
fa2be30c 1022
1023 // PID efficiency (from PID/noPID)
1024 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
6c388dee 1025 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.05); // 3%
fa2be30c 1026
1027
6fd587a4 1028 // MC dN/dpt (from study on D* pt shape)
fa2be30c 1029 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
6fd587a4 1030 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0.045);
1031 fMCPtShape->SetBinContent(4,0.025);
1032 fMCPtShape->SetBinContent(5,0.025);
1033 fMCPtShape->SetBinContent(6,0.025);
1034 fMCPtShape->SetBinContent(7,0.04);
1035 fMCPtShape->SetBinContent(8,0.04);
1036 fMCPtShape->SetBinContent(9,0.03);
1037 fMCPtShape->SetBinContent(10,0.03);
1038 fMCPtShape->SetBinContent(11,0.03);
1039 fMCPtShape->SetBinContent(12,0.03);
1040
9a8b5080 1041 return;
1042
1043}
1044// ----------------------------- 2011 ----------------------------------
1045void AliHFSystErr::InitDstartoD0pi2011PbPb07half() {
1046 //
1047 // D*+->D0pi syst errors. Responsible: A. Grelli
1048 // 2011 PbPb sample, 0-7.5 CC
1049 //
1050
1051 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 0-7.5 centrality - DUMMY");
1052
1053
1054 // Normalization
1055 fNorm = new TH1F("fNorm","fNorm",36,0,36);
1056 for(Int_t i=1;i<=36;i++) fNorm->SetBinContent(i,0.05); // TAA and pp norm
1057
1058 // Branching ratio
1059 fBR = new TH1F("fBR","fBR",36,0,36);
1060 for(Int_t i=1;i<=36;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
1061
1062 // Tracking efficiency
1063 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",36,0,36);;
1064 for(Int_t i=1;i<=36;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
1065
1066
1067 // Raw yield extraction
1068 fRawYield = new TH1F("fRawYield","fRawYield",36,0,36);
1069 for(Int_t i=1;i<=36;i++) fRawYield->SetBinContent(i,0.05); //4%
ada850b0 1070 fRawYield->SetBinContent(4,0.2);
9a8b5080 1071 fRawYield->SetBinContent(5,0.10);
ada850b0 1072 fRawYield->SetBinContent(6,0.10);
1073 fRawYield->SetBinContent(7,0.08);
9a8b5080 1074 for(Int_t i=25;i<=36;i++) fRawYield->SetBinContent(i,0.15); //4%
1075
9a8b5080 1076 // Cuts efficiency (from cuts variation)
1077 fCutsEff = new TH1F("fCutsEff","fCutsEff",36,0,36);
1078 for(Int_t i=1;i<=36;i++) fCutsEff->SetBinContent(i,0.10); // 10%
9a8b5080 1079
1080 // PID efficiency (from PID/noPID)
1081 fPIDEff = new TH1F("fPIDEff","fPIDEff",36,0,36);
1082 for(Int_t i=1;i<=36;i++) fPIDEff->SetBinContent(i,0.05); // 3%
ada850b0 1083 fPIDEff->SetBinContent(4,0.09);
9a8b5080 1084
1085 // MC dN/dpt (from study on D* pt shape)
1086 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",36,0,36);
1087 for(Int_t i=1;i<=36;i++) fMCPtShape->SetBinContent(i,0.045);
1088 fMCPtShape->SetBinContent(4,0.025);
1089 fMCPtShape->SetBinContent(5,0.025);
1090 fMCPtShape->SetBinContent(6,0.025);
1091 fMCPtShape->SetBinContent(7,0.04);
1092 fMCPtShape->SetBinContent(8,0.04);
1093 fMCPtShape->SetBinContent(9,0.03);
1094 fMCPtShape->SetBinContent(10,0.03);
1095 fMCPtShape->SetBinContent(11,0.03);
1096 fMCPtShape->SetBinContent(12,0.03);
1097
6fd587a4 1098
fa2be30c 1099
1100 return;
1101
1102}
1103//-------------------------------------------------------------------------
1104void AliHFSystErr::InitDstartoD0pi2010PbPb2040() {
1105 //
1106 // D*+->D0pi syst errors. Responsible: A. Grelli
1107 // 2010 PbPb sample, 20-40 CC
1108 //
1109
1110 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 20-40 centrality - DUMMY");
1111
1112 // Normalization
1113 fNorm = new TH1F("fNorm","fNorm",24,0,24);
1114 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.10); // 10% error on sigmaV0and
1115
1116 // Branching ratio
1117 fBR = new TH1F("fBR","fBR",24,0,24);
1118 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
1119
1120 // Tracking efficiency
1121 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);;
69bcc748 1122 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
fa2be30c 1123
1124
1125 // Raw yield extraction
1126 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
1127 for(Int_t i=1;i<=24;i++) fRawYield->SetBinContent(i,0.15); //4%
1128
1129 // Cuts efficiency (from cuts variation)
1130 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
1131 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
1132
1133 // PID efficiency (from PID/noPID)
1134 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
1135 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.04); // 3%
1136
1137
1138 // MC dN/dpt (copied from D0 : will update later)
1139 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
578bfbba 1140 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0.);
1141 fMCPtShape->SetBinContent(1,0.03);
1142 fMCPtShape->SetBinContent(2,0.03);
fa2be30c 1143
5541b811 1144 return;
fa2be30c 1145
5541b811 1146}
6c388dee 1147
5541b811 1148//--------------------------------------------------------------------------
1149void AliHFSystErr::InitDstartoD0pi2010PbPb4080() {
1150 //
fa2be30c 1151 // D*+->D0pi syst errors. Responsible: A. Grelli
5541b811 1152 // 2010 PbPb sample, 40-80 CC
1153 //
1154
fa2be30c 1155 AliInfo(" Settings for D*+ --> D0pi Pb-Pb collisions at 2.76 TeV - 40-80 centrality - DUMMY");
1156
1157 // Normalization
1158 fNorm = new TH1F("fNorm","fNorm",24,0,24);
d5e15690 1159 for(Int_t i=1;i<=24;i++) fNorm->SetBinContent(i,0.07); // TAA and pp norm
fa2be30c 1160
1161 // Branching ratio
1162 fBR = new TH1F("fBR","fBR",24,0,24);
1163 for(Int_t i=1;i<=24;i++) fBR->SetBinContent(i,0.015); // 1.5% PDG2010
1164
1165 // Tracking efficiency
1166 fTrackingEff = new TH1F("fTrackingEff","fTrackingEff",24,0,24);;
69bcc748 1167 for(Int_t i=1;i<=24;i++) fTrackingEff->SetBinContent(i,0.15); // Jacek, 5% per track
fa2be30c 1168
1169
1170 // Raw yield extraction
1171 fRawYield = new TH1F("fRawYield","fRawYield",24,0,24);
6c388dee 1172 for(Int_t i=1;i<=24;i++) fRawYield->SetBinContent(i,0.2); //4%
1173 fRawYield->SetBinContent(1,1);
1174 fRawYield->SetBinContent(2,0.15);
1175 fRawYield->SetBinContent(3,0.15);
1176 fRawYield->SetBinContent(4,0.15);
1177 fRawYield->SetBinContent(5,0.15);
1178 fRawYield->SetBinContent(6,0.10);
1179 fRawYield->SetBinContent(7,0.10);
1180 fRawYield->SetBinContent(8,0.10);
1181 fRawYield->SetBinContent(9,0.11);
1182 fRawYield->SetBinContent(10,0.11);
1183 fRawYield->SetBinContent(11,0.11);
1184 fRawYield->SetBinContent(12,0.11);
1185 fRawYield->SetBinContent(13,0.08);
1186 fRawYield->SetBinContent(14,0.08);
1187 fRawYield->SetBinContent(15,0.08);
1188 fRawYield->SetBinContent(16,0.08);
1189
1190
fa2be30c 1191 // Cuts efficiency (from cuts variation)
1192 fCutsEff = new TH1F("fCutsEff","fCutsEff",24,0,24);
1193 for(Int_t i=1;i<=24;i++) fCutsEff->SetBinContent(i,0.10); // 10%
1194
1195 // PID efficiency (from PID/noPID)
1196 fPIDEff = new TH1F("fPIDEff","fPIDEff",24,0,24);
6c388dee 1197 for(Int_t i=1;i<=24;i++) fPIDEff->SetBinContent(i,0.05); // 3%
fa2be30c 1198
1199
1200 // MC dN/dpt (copied from D0 : will update later)
1201 fMCPtShape = new TH1F("fMCPtShape","fMCPtShape",24,0,24);
6fd587a4 1202 for(Int_t i=1;i<=24;i++) fMCPtShape->SetBinContent(i,0.01);
1203 fMCPtShape->SetBinContent(2,0.05);
1204 fMCPtShape->SetBinContent(3,0.05);
1205 fMCPtShape->SetBinContent(4,0.05);
1206 fMCPtShape->SetBinContent(5,0.04);
1207 fMCPtShape->SetBinContent(6,0.02);
1208 fMCPtShape->SetBinContent(7,0.04);
1209 fMCPtShape->SetBinContent(8,0.04);
1210
5541b811 1211 return;
fa2be30c 1212
5541b811 1213}
6c388dee 1214
5541b811 1215//--------------------------------------------------------------------------
414bc6a5 1216void AliHFSystErr::InitD0toKpi2010PbPb010CentScan(){
1217 // define errors for RAA vs. centrality
1218 InitD0toKpi2010PbPb020();
41cfcd39 1219 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
27360a0e 1220 for(Int_t i=3;i<=5;i++) fMCPtShape->SetBinContent(i,0.17);
41cfcd39 1221 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1222}
1223//--------------------------------------------------------------------------
1224void AliHFSystErr::InitD0toKpi2010PbPb1020CentScan(){
1225 // define errors for RAA vs. centrality
1226 InitD0toKpi2010PbPb020();
41cfcd39 1227 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
27360a0e 1228 for(Int_t i=3;i<=5;i++) fMCPtShape->SetBinContent(i,0.17);
41cfcd39 1229 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1230}
1231//--------------------------------------------------------------------------
1232void AliHFSystErr::InitD0toKpi2010PbPb2040CentScan(){
1233 // define errors for RAA vs. centrality
41cfcd39 1234 InitD0toKpi2010PbPb4080();
1235 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
27360a0e 1236 for(Int_t i=3;i<=5;i++) fMCPtShape->SetBinContent(i,0.14);
41cfcd39 1237 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1238}
1239//--------------------------------------------------------------------------
1240void AliHFSystErr::InitD0toKpi2010PbPb4060CentScan(){
41cfcd39 1241 // define errors for RAA vs. centrality
414bc6a5 1242 InitD0toKpi2010PbPb4080();
41cfcd39 1243 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.06);
27360a0e 1244 for(Int_t i=3;i<=5;i++) fMCPtShape->SetBinContent(i,0.11);
41cfcd39 1245 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1246}
1247//--------------------------------------------------------------------------
1248void AliHFSystErr::InitD0toKpi2010PbPb6080CentScan(){
41cfcd39 1249 // define errors for RAA vs. centrality
414bc6a5 1250 InitD0toKpi2010PbPb4080();
41cfcd39 1251 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.08);
27360a0e 1252 for(Int_t i=3;i<=5;i++) fMCPtShape->SetBinContent(i,0.08);
41cfcd39 1253 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1254}
1255//--------------------------------------------------------------------------
1256void AliHFSystErr::InitDplustoKpipi2010PbPb010CentScan(){
1257 // define errors for RAA vs. centrality
1258 InitDplustoKpipi2010PbPb020();
7b03f1ec 1259 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.18);
eefab142 1260 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.09);
7b03f1ec 1261
414bc6a5 1262}
1263//--------------------------------------------------------------------------
1264void AliHFSystErr::InitDplustoKpipi2010PbPb1020CentScan(){
1265 // define errors for RAA vs. centrality
1266 InitDplustoKpipi2010PbPb020();
7b03f1ec 1267 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.23);
eefab142 1268 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1269}
1270//--------------------------------------------------------------------------
1271void AliHFSystErr::InitDplustoKpipi2010PbPb2040CentScan(){
1272 // define errors for RAA vs. centrality
1273 InitDplustoKpipi2010PbPb020();
7b03f1ec 1274 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.08);
eefab142 1275 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.095);
414bc6a5 1276}
1277//--------------------------------------------------------------------------
1278void AliHFSystErr::InitDplustoKpipi2010PbPb4060CentScan(){
1279 // define errors for RAA vs. centrality
1280 InitDplustoKpipi2010PbPb4080();
7b03f1ec 1281 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.08);
eefab142 1282 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1283}
1284//--------------------------------------------------------------------------
1285void AliHFSystErr::InitDplustoKpipi2010PbPb6080CentScan(){
1286 // define errors for RAA vs. centrality
1287 InitDplustoKpipi2010PbPb4080();
7b03f1ec 1288 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.15);
eefab142 1289 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.07);
414bc6a5 1290}
1291
1292//--------------------------------------------------------------------------
1293void AliHFSystErr::InitDstartoD0pi2010PbPb010CentScan(){
1294 // define errors for RAA vs. centrality
1295 InitDstartoD0pi2010PbPb020();
1296 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.16);
eefab142 1297 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.15);
414bc6a5 1298}
1299//--------------------------------------------------------------------------
1300void AliHFSystErr::InitDstartoD0pi2010PbPb1020CentScan(){
1301 // define errors for RAA vs. centrality
1302 InitDstartoD0pi2010PbPb020();
1303 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.05);
eefab142 1304 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.15);
414bc6a5 1305}
1306//--------------------------------------------------------------------------
1307void AliHFSystErr::InitDstartoD0pi2010PbPb2040CentScan(){
1308 // define errors for RAA vs. centrality
1309 InitDstartoD0pi2010PbPb2040();
1310 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.10);
eefab142 1311 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.08);
414bc6a5 1312}
1313//--------------------------------------------------------------------------
1314void AliHFSystErr::InitDstartoD0pi2010PbPb4060CentScan(){
1315 // define errors for RAA vs. centrality
1316 InitDstartoD0pi2010PbPb4080();
1317 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.10);
eefab142 1318 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.045);
414bc6a5 1319}
1320//--------------------------------------------------------------------------
1321void AliHFSystErr::InitDstartoD0pi2010PbPb6080CentScan(){
1322 // define errors for RAA vs. centrality
1323 InitDstartoD0pi2010PbPb4080();
1324 for(Int_t i=7;i<=12;i++) fRawYield->SetBinContent(i,0.10);
eefab142 1325 for(Int_t i=7;i<=12;i++) fMCPtShape->SetBinContent(i,0.045);
414bc6a5 1326}
1327
1328
1329//--------------------------------------------------------------------------
0233abe6 1330Double_t AliHFSystErr::GetCutsEffErr(Double_t pt) const {
1331 //
1332 // Get error
1333 //
1334
1335 Int_t bin=fCutsEff->FindBin(pt);
1336
1337 return fCutsEff->GetBinContent(bin);
1338}
1339//--------------------------------------------------------------------------
1340Double_t AliHFSystErr::GetMCPtShapeErr(Double_t pt) const {
1341 //
1342 // Get error
1343 //
1344
1345 Int_t bin=fMCPtShape->FindBin(pt);
1346
1347 return fMCPtShape->GetBinContent(bin);
1348}
1349//--------------------------------------------------------------------------
1350Double_t AliHFSystErr::GetSeleEffErr(Double_t pt) const {
1351 //
1352 // Get error
1353 //
1354
1355 Double_t err=GetCutsEffErr(pt)*GetCutsEffErr(pt)+GetMCPtShapeErr(pt)*GetMCPtShapeErr(pt);
1356
1357 return TMath::Sqrt(err);
1358}
1359//--------------------------------------------------------------------------
1360Double_t AliHFSystErr::GetPIDEffErr(Double_t pt) const {
1361 //
1362 // Get error
1363 //
1364
1365 Int_t bin=fPIDEff->FindBin(pt);
1366
1367 return fPIDEff->GetBinContent(bin);
1368}
1369//--------------------------------------------------------------------------
1370Double_t AliHFSystErr::GetTrackingEffErr(Double_t pt) const {
1371 //
1372 // Get error
1373 //
1374
1375 Int_t bin=fTrackingEff->FindBin(pt);
1376
1377 return fTrackingEff->GetBinContent(bin);
1378}
1379//--------------------------------------------------------------------------
1380Double_t AliHFSystErr::GetRawYieldErr(Double_t pt) const {
1381 //
1382 // Get error
1383 //
1384
1385 Int_t bin=fRawYield->FindBin(pt);
1386
1387 return fRawYield->GetBinContent(bin);
1388}
1389//--------------------------------------------------------------------------
1390Double_t AliHFSystErr::GetPartAntipartErr(Double_t pt) const {
1391 //
1392 // Get error
1393 //
1394
1395 Int_t bin=fPartAntipart->FindBin(pt);
1396
1397 return fPartAntipart->GetBinContent(bin);
1398}
1399//--------------------------------------------------------------------------
1400Double_t AliHFSystErr::GetTotalSystErr(Double_t pt,Double_t feeddownErr) const {
1401 //
1402 // Get total syst error (except norm. error)
1403 //
1404
1405 Double_t err=0.;
1406
1407 if(fRawYield) err += GetRawYieldErr(pt)*GetRawYieldErr(pt);
1408 if(fTrackingEff) err += GetTrackingEffErr(pt)*GetTrackingEffErr(pt);
f9a85c82 1409 // if(fBR) err += GetBRErr()*GetBRErr();
0233abe6 1410 if(fCutsEff) err += GetCutsEffErr(pt)*GetCutsEffErr(pt);
1411 if(fPIDEff) err += GetPIDEffErr(pt)*GetPIDEffErr(pt);
1412 if(fMCPtShape) err += GetMCPtShapeErr(pt)*GetMCPtShapeErr(pt);
1413 if(fPartAntipart) err += GetPartAntipartErr(pt)*GetPartAntipartErr(pt);
1414
1415 err += feeddownErr*feeddownErr;
1416
1417 return TMath::Sqrt(err);
1418}
1419//---------------------------------------------------------------------------
5ad8ad40 1420void AliHFSystErr::DrawErrors(TGraphAsymmErrors *grErrFeeddown) const {
0233abe6 1421 //
1422 // Draw errors
1423 //
1424 gStyle->SetOptStat(0);
1425
a07118d0 1426 TCanvas *cSystErr = new TCanvas("cSystErr","Systematic Errors",300,80,640,500);
1427 cSystErr->Range(0.20,-0.5,18.4,0.34);
1428 cSystErr->SetRightMargin(0.318);
0233abe6 1429 cSystErr->SetFillColor(0);
1430
436b185f 1431 TH2F *hFrame = new TH2F("hFrame","Systematic errors; p_{t} (GeV/c); Relative Error",40,0,40,100,-1,+1);
1432 hFrame->SetAxisRange(1.,35.9,"X");
a07118d0 1433 hFrame->SetAxisRange(-0.5,0.5,"Y");
0233abe6 1434 hFrame->Draw();
1435
a07118d0 1436 TLegend *leg = new TLegend(0.69,0.44,0.98,0.86,NULL,"brNDC");
1437 leg->SetTextSize(0.03601695);
0233abe6 1438 leg->SetFillStyle(0);
1439 leg->SetBorderSize(0);
2ee3afe2 1440
436b185f 1441 TH1F *hTotErr=new TH1F("hTotErr","",36,0,36);
2ee3afe2 1442 Int_t nbins = fNorm->GetNbinsX();
1443 TGraphAsymmErrors *gTotErr = new TGraphAsymmErrors(nbins);
436b185f 1444 for(Int_t i=1;i<=36;i++) {
2ee3afe2 1445 Double_t pt = hTotErr->GetBinCenter(i);
1446 Double_t ptwidth = hTotErr->GetBinWidth(i);
1447
1448 if(grErrFeeddown) {
1449 Double_t x=0., y=0., errxl=0., errxh=0., erryl=0., erryh=0.;
1450 Double_t toterryl=0., toterryh=0.;
1451 for(Int_t j=0; j<grErrFeeddown->GetN(); j++) {
1452 grErrFeeddown->GetPoint(j,x,y);
1453 errxh = grErrFeeddown->GetErrorXhigh(j);
1454 errxl = grErrFeeddown->GetErrorXlow(j);
a07118d0 1455 if ( ( (x-errxl) <= pt) && ( (x+errxl) >= pt) ) {
2ee3afe2 1456 erryh = grErrFeeddown->GetErrorYhigh(j);
1457 erryl = grErrFeeddown->GetErrorYlow(j);
1458 }
1459 }
1460 if (erryl>=1e-3) toterryl = GetTotalSystErr(pt,erryl);
1461 else toterryl = GetTotalSystErr(pt);
1462 if (erryh>=1e-3) toterryh = GetTotalSystErr(pt,erryh);
1463 else toterryh = GetTotalSystErr(pt);
1464
1465 hTotErr->SetBinContent(i,toterryh);
1466 gTotErr->SetPoint(i,pt,0.);
1467 gTotErr->SetPointError(i,ptwidth/2.,ptwidth/2.,toterryl,toterryh); // i, exl, exh, eyl, eyh
1468 }
1469 else {
1470 hTotErr->SetBinContent(i,GetTotalSystErr(pt));
1471 gTotErr->SetPoint(i,pt,0.);
1472 gTotErr->SetPointError(i,ptwidth/2.,ptwidth/2.,GetTotalSystErr(pt),GetTotalSystErr(pt)); // i, exl, exh, eyl, eyh
1473 }
1474
1475 }
f968ef30 1476 gTotErr->SetLineColor(kBlack);
1477 gTotErr->SetFillColor(kRed);
1478 gTotErr->SetFillStyle(3002);
2ee3afe2 1479 gTotErr->Draw("2");
1480 leg->AddEntry(gTotErr,"Total (excl. norm.)","f");
1481// hTotErr->SetLineColor(1);
1482// hTotErr->SetLineWidth(3);
1483// hTotErr->Draw("same");
1484// leg->AddEntry(hTotErr,"Total (excl. norm.)","l");
1485
0233abe6 1486
e373b9f0 1487 fNorm->SetFillColor(1);
1488 fNorm->SetFillStyle(3002);
1489 //fNorm->Draw("same");
1490 //TH1F *hNormRefl = ReflectHisto(fNorm);
1491 //hNormRefl->Draw("same");
27360a0e 1492 Double_t norm = fNorm->GetBinContent(1)*100;
1493 leg->AddEntry(fNorm,Form("Normalization (%.1f%s)",norm,"%"),"");
e373b9f0 1494
5ad8ad40 1495 if(grErrFeeddown) {
1496 grErrFeeddown->SetFillColor(kTeal-8);
1497 grErrFeeddown->SetFillStyle(3001);
1498 grErrFeeddown->Draw("2");
1499 leg->AddEntry(grErrFeeddown,"Feed-down from B","f");
1500 }
0233abe6 1501 if(fTrackingEff) {
5ad8ad40 1502 fTrackingEff->SetFillColor(4);
1503 fTrackingEff->SetFillStyle(3006);
0233abe6 1504 fTrackingEff->Draw("same");
f968ef30 1505 TH1F *hTrackingEffRefl = ReflectHisto(fTrackingEff);
1506 hTrackingEffRefl->Draw("same");
0233abe6 1507 leg->AddEntry(fTrackingEff,"Tracking efficiency","f");
1508 }
1509 if(fBR) {
1510 fBR->SetFillColor(6);
1511 fBR->SetFillStyle(3005);
5ad8ad40 1512 //fBR->SetFillStyle(3020);
0233abe6 1513 fBR->Draw("same");
f968ef30 1514 TH1F *hBRRefl = ReflectHisto(fBR);
1515 hBRRefl->Draw("same");
0233abe6 1516 leg->AddEntry(fBR,"Branching ratio","f");
1517 }
1518 if(fRawYield) {
5ad8ad40 1519 Int_t ci; // for color index setting
1520 ci = TColor::GetColor("#00cc00");
1521 fRawYield->SetLineColor(ci);
1522 // fRawYield->SetLineColor(3);
0233abe6 1523 fRawYield->SetLineWidth(3);
1524 fRawYield->Draw("same");
f968ef30 1525 TH1F *hRawYieldRefl = ReflectHisto(fRawYield);
1526 hRawYieldRefl->Draw("same");
844405bc 1527 leg->AddEntry(fRawYield,"Yield extraction","l");
0233abe6 1528 }
1529 if(fCutsEff) {
1530 fCutsEff->SetLineColor(4);
1531 fCutsEff->SetLineWidth(3);
1532 fCutsEff->Draw("same");
f968ef30 1533 TH1F *hCutsEffRefl = ReflectHisto(fCutsEff);
1534 hCutsEffRefl->Draw("same");
0233abe6 1535 leg->AddEntry(fCutsEff,"Cuts efficiency","l");
1536 }
1537 if(fPIDEff) {
1538 fPIDEff->SetLineColor(7);
1539 fPIDEff->SetLineWidth(3);
1540 fPIDEff->Draw("same");
f968ef30 1541 TH1F *hPIDEffRefl = ReflectHisto(fPIDEff);
1542 hPIDEffRefl->Draw("same");
0233abe6 1543 leg->AddEntry(fPIDEff,"PID efficiency","l");
1544 }
1545 if(fMCPtShape) {
5ad8ad40 1546 Int_t ci = TColor::GetColor("#9933ff");
1547 fMCPtShape->SetLineColor(ci);
1548 // fMCPtShape->SetLineColor(8);
0233abe6 1549 fMCPtShape->SetLineWidth(3);
1550 fMCPtShape->Draw("same");
f968ef30 1551 TH1F *hMCPtShapeRefl = ReflectHisto(fMCPtShape);
1552 hMCPtShapeRefl->Draw("same");
0233abe6 1553 leg->AddEntry(fMCPtShape,"MC p_{t} shape","l");
1554 }
1555 if(fPartAntipart) {
5ad8ad40 1556 Int_t ci = TColor::GetColor("#ff6600");
1557 fPartAntipart->SetLineColor(ci);
1558 // fPartAntipart->SetLineColor(9);
0233abe6 1559 fPartAntipart->SetLineWidth(3);
1560 fPartAntipart->Draw("same");
f968ef30 1561 TH1F *hPartAntipartRefl = ReflectHisto(fPartAntipart);
1562 hPartAntipartRefl->Draw("same");
0233abe6 1563 leg->AddEntry(fPartAntipart,"D = #bar{D}","l");
1564 }
0233abe6 1565
0233abe6 1566
1567 leg->Draw();
1568
5ad8ad40 1569 cSystErr->SaveAs("RelativeSystematics.eps");
1570
0233abe6 1571 return;
1572}
f968ef30 1573//-------------------------------------------------------------------------
1574TH1F* AliHFSystErr::ReflectHisto(TH1F *hin) const {
1575 //
1576 // Clones and reflects histogram
1577 //
1578 TH1F *hout=(TH1F*)hin->Clone("hout");
1579 hout->Scale(-1.);
1580
1581 return hout;
1582}
9a8b5080 1583
ada850b0 1584
1585