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