1 doeffAllSpecies(Int_t isp=1){
2 if(isp==1) performAllPi();
3 else if(isp==2) performAllKa();
4 else if(isp == 3) performAllPr();
8 gSystem->Load("libVMC.so");
9 gSystem->Load("libPhysics.so");
10 gSystem->Load("libTree.so");
11 gSystem->Load("libMinuit.so");
12 gSystem->Load("libSTEERBase.so");
13 gSystem->Load("libANALYSIS.so");
14 gSystem->Load("libAOD.so");
15 gSystem->Load("libESD.so");
16 gSystem->Load("libANALYSIS.so");
17 gSystem->Load("libANALYSISalice.so");
18 gSystem->Load("libCORRFW.so");
19 gSystem->Load("libNetx.so");
20 gSystem->Load("libPWGPPpid.so");
22 gSystem->AddIncludePath("-I$ALICE_ROOT/PWGPP/pid");
24 gROOT->LoadMacro("$ALICE_ROOT/PWGPP/pid/doeffPi.C++");
26 // tune these parameters
27 cmin = 1; // centrality min 1
28 cmax = 10;// centrality max 10
29 Float_t etamin = -0.8;
33 rebinsize = 1; // don't change this, not choice here!!!
36 require5sigma = kFALSE;
40 kOverAllTOFmatch = kFALSE;
41 kOverAll2Sigma = kFALSE;
46 if(! LoadLib()) return;
48 // matching and PID eff.
49 doeffPi(1,0.1,etamin,etamax);
50 doeffPi(0,0.1,etamin,etamax);
51 doeffPi(1,0.2,etamin,etamax);
52 doeffPi(1,0.4,etamin,etamax);
53 doeffPi(1,0.6,etamin,etamax);
54 doeffPi(1,0.8,etamin,etamax);
55 doeffPi(0,0.2,etamin,etamax);
56 doeffPi(0,0.4,etamin,etamax);
57 doeffPi(0,0.6,etamin,etamax);
58 doeffPi(0,0.8,etamin,etamax);
60 // Good matching eff (1 - TOF mism)
62 doeffPi(1,0.1,etamin,etamax);
63 doeffPi(0,0.1,etamin,etamax);
66 // eff 2 sigma / eff 3 sigma
68 doeffPi(1,0.1,etamin,etamax);
69 doeffPi(0,0.1,etamin,etamax);
73 // TPC|TOF overall eff
74 doeffPi(1,0.2,etamin,etamax);
75 doeffPi(1,0.4,etamin,etamax);
76 doeffPi(1,0.6,etamin,etamax);
77 doeffPi(1,0.8,etamin,etamax);
78 doeffPi(0,0.2,etamin,etamax);
79 doeffPi(0,0.4,etamin,etamax);
80 doeffPi(0,0.6,etamin,etamax);
81 doeffPi(0,0.8,etamin,etamax);
83 kOverAllTOFmatch=kTRUE;
84 // TPC&TOF overall eff
85 doeffPi(1,0.2,etamin,etamax);
86 doeffPi(1,0.4,etamin,etamax);
87 doeffPi(1,0.6,etamin,etamax);
88 doeffPi(1,0.8,etamin,etamax);
89 doeffPi(0,0.2,etamin,etamax);
90 doeffPi(0,0.4,etamin,etamax);
91 doeffPi(0,0.6,etamin,etamax);
92 doeffPi(0,0.8,etamin,etamax);
93 kOverAllTOFmatch=kFALSE;
96 // TPC&TOF 2 TOF sigma cut
97 doeffPi(1,0.1,etamin,etamax);
98 doeffPi(0,0.1,etamin,etamax);
99 kOverAll2Sigma=kFALSE;
101 gSystem->Unload("$ALICE_ROOT/PWGPP/pid/doeffPi_C.so");
105 gSystem->Load("libVMC.so");
106 gSystem->Load("libPhysics.so");
107 gSystem->Load("libTree.so");
108 gSystem->Load("libMinuit.so");
109 gSystem->Load("libSTEERBase.so");
110 gSystem->Load("libANALYSIS.so");
111 gSystem->Load("libAOD.so");
112 gSystem->Load("libESD.so");
113 gSystem->Load("libANALYSIS.so");
114 gSystem->Load("libANALYSISalice.so");
115 gSystem->Load("libCORRFW.so");
116 gSystem->Load("libNetx.so");
117 gSystem->Load("libPWGPPpid.so");
119 gSystem->AddIncludePath("-I$ALICE_ROOT/PWGPP/pid");
121 gROOT->LoadMacro("$ALICE_ROOT/PWGPP/pid/doeffPr.C++");
123 // tune these parameters
124 cmin = 1; // centrality min 1
125 cmax = 10;// centrality max 10
126 Float_t etamin = -0.8;
127 Float_t etamax = 0.8;
130 rebinsize = 1; // don't change this, not choice here!!!
133 require5sigma = kFALSE;
134 bayesVsigma = kFALSE;
137 kOverAllTOFmatch = kFALSE;
138 kOverAll2Sigma = kFALSE;
143 if(! LoadLib()) return;
145 // matching and PID eff.
146 doeffPr(1,0.1,etamin,etamax);
147 doeffPr(0,0.1,etamin,etamax);
148 doeffPr(1,0.2,etamin,etamax);
149 doeffPr(1,0.4,etamin,etamax);
150 doeffPr(1,0.6,etamin,etamax);
151 doeffPr(1,0.8,etamin,etamax);
152 doeffPr(0,0.2,etamin,etamax);
153 doeffPr(0,0.4,etamin,etamax);
154 doeffPr(0,0.6,etamin,etamax);
155 doeffPr(0,0.8,etamin,etamax);
157 // Good matching eff (1 - TOF mism)
159 doeffPr(1,0.1,etamin,etamax);
160 doeffPr(0,0.1,etamin,etamax);
163 // eff 2 sigma / eff 3 sigma
165 doeffPr(1,0.1,etamin,etamax);
166 doeffPr(0,0.1,etamin,etamax);
170 // TPC|TOF overall eff
171 doeffPr(1,0.2,etamin,etamax);
172 doeffPr(1,0.4,etamin,etamax);
173 doeffPr(1,0.6,etamin,etamax);
174 doeffPr(1,0.8,etamin,etamax);
175 doeffPr(0,0.2,etamin,etamax);
176 doeffPr(0,0.4,etamin,etamax);
177 doeffPr(0,0.6,etamin,etamax);
178 doeffPr(0,0.8,etamin,etamax);
180 kOverAllTOFmatch=kTRUE;
181 // TPC&TOF overall eff
182 doeffPr(1,0.2,etamin,etamax);
183 doeffPr(1,0.4,etamin,etamax);
184 doeffPr(1,0.6,etamin,etamax);
185 doeffPr(1,0.8,etamin,etamax);
186 doeffPr(0,0.2,etamin,etamax);
187 doeffPr(0,0.4,etamin,etamax);
188 doeffPr(0,0.6,etamin,etamax);
189 doeffPr(0,0.8,etamin,etamax);
190 kOverAllTOFmatch=kFALSE;
192 kOverAll2Sigma=kTRUE;
193 // TPC&TOF 2 TOF sigma cut
194 doeffPr(1,0.1,etamin,etamax);
195 doeffPr(0,0.1,etamin,etamax);
196 kOverAll2Sigma=kFALSE;
198 gSystem->Unload("$ALICE_ROOT/PWGPP/pid/doeffPr_C.so");
202 gSystem->Load("libVMC.so");
203 gSystem->Load("libPhysics.so");
204 gSystem->Load("libTree.so");
205 gSystem->Load("libMinuit.so");
206 gSystem->Load("libSTEERBase.so");
207 gSystem->Load("libANALYSIS.so");
208 gSystem->Load("libAOD.so");
209 gSystem->Load("libESD.so");
210 gSystem->Load("libANALYSIS.so");
211 gSystem->Load("libANALYSISalice.so");
212 gSystem->Load("libCORRFW.so");
213 gSystem->Load("libNetx.so");
214 gSystem->Load("libPWGPPpid.so");
216 gSystem->AddIncludePath("-I$ALICE_ROOT/PWGPP/pid");
218 gROOT->LoadMacro("$ALICE_ROOT/PWGPP/pid/doeffKa.C++");
220 // tune these parameters
221 cmin = 1; // centrality min 1
222 cmax = 10;// centrality max 10
223 Float_t etamin = -0.8;
224 Float_t etamax = 0.8;
227 rebinsize = 1; // don't change this, not choice here!!!
230 require5sigma = kFALSE;
231 bayesVsigma = kFALSE;
234 kOverAllTOFmatch = kFALSE;
235 kOverAll2Sigma = kFALSE;
240 if(! LoadLib()) return;
242 // matching and PID eff.
243 doeffKa(1,0.1,etamin,etamax);
244 doeffKa(0,0.1,etamin,etamax);
245 doeffKa(1,0.2,etamin,etamax);
246 doeffKa(1,0.4,etamin,etamax);
247 doeffKa(1,0.6,etamin,etamax);
248 doeffKa(1,0.8,etamin,etamax);
249 doeffKa(0,0.2,etamin,etamax);
250 doeffKa(0,0.4,etamin,etamax);
251 doeffKa(0,0.6,etamin,etamax);
252 doeffKa(0,0.8,etamin,etamax);
254 // Good matching eff (1 - TOF mism)
256 doeffKa(1,0.1,etamin,etamax);
257 doeffKa(0,0.1,etamin,etamax);
260 // eff 2 sigma / eff 3 sigma
262 doeffKa(1,0.1,etamin,etamax);
263 doeffKa(0,0.1,etamin,etamax);
267 // TPC|TOF overall eff
268 doeffKa(1,0.2,etamin,etamax);
269 doeffKa(1,0.4,etamin,etamax);
270 doeffKa(1,0.6,etamin,etamax);
271 doeffKa(1,0.8,etamin,etamax);
272 doeffKa(0,0.2,etamin,etamax);
273 doeffKa(0,0.4,etamin,etamax);
274 doeffKa(0,0.6,etamin,etamax);
275 doeffKa(0,0.8,etamin,etamax);
277 kOverAllTOFmatch=kTRUE;
278 // TPC&TOF overall eff
279 doeffKa(1,0.2,etamin,etamax);
280 doeffKa(1,0.4,etamin,etamax);
281 doeffKa(1,0.6,etamin,etamax);
282 doeffKa(1,0.8,etamin,etamax);
283 doeffKa(0,0.2,etamin,etamax);
284 doeffKa(0,0.4,etamin,etamax);
285 doeffKa(0,0.6,etamin,etamax);
286 doeffKa(0,0.8,etamin,etamax);
287 kOverAllTOFmatch=kFALSE;
289 kOverAll2Sigma=kTRUE;
290 // TPC&TOF 2 TOF sigma cut
291 doeffKa(1,0.1,etamin,etamax);
292 doeffKa(0,0.1,etamin,etamax);
293 kOverAll2Sigma=kFALSE;
295 gSystem->Unload("$ALICE_ROOT/PWGPP/pid/doeffKa_C.so");
298 TGraphErrors *MakeRatio(const char *nf1,const char *nf2,const char *nfo=""/*output file*/,const char *title=""/*title*/){
299 TFile *f1 = new TFile(nf1);
300 TFile *f2 = new TFile(nf2);
302 TGraphErrors *g1 = (TGraphErrors *) f1->Get("Graph");
303 TGraphErrors *g2 = (TGraphErrors *) f2->Get("Graph");
304 if(!(g1 && g2)) return NULL;
305 if(!(g1 && g2)) return NULL;
307 Int_t n1= g1->GetN();
308 Int_t n2= g2->GetN();
310 if(n1 != n2) return NULL;
312 if(n1 > 100) n1 = 100;
314 Float_t x[100],y[100],ex[100],ey[100];
316 for(Int_t i=0;i < n1;i++){
317 x[i] = g1->GetX()[i];
318 ex[i] = g1->GetEX()[i];
319 if(g1->GetY()[i] > 0 && g2->GetY()[i] > 0){
320 y[i] = g1->GetY()[i] / g2->GetY()[i];
321 ey[i] = (g1->GetEY()[i] / g1->GetY()[i])**2 + (g2->GetEY()[i] / g2->GetY()[i])**2;
322 ey[i] = sqrt(ey[i])*y[i];
329 TGraphErrors *gr = new TGraphErrors(n1,x,y,ex,ey);
332 if(nfo[0] != '\0'){ // write output
333 printf("written in %s\n",nfo);
334 TFile *fo = new TFile(nfo,"RECREATE");