-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCompareChargedAndNeutralPionDataALICE_LHC11h.C
2246 lines (1867 loc) · 162 KB
/
CompareChargedAndNeutralPionDataALICE_LHC11h.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/****************************************************************************************************************************
****** provided by Gamma Conversion Group, PWG4, *****
****** Ana Marin, [email protected] *****
****** Kathrin Koch, [email protected] *****
****** Friederike Bock, [email protected] *****
*****************************************************************************************************************************/
#include <Riostream.h>
#include "TMath.h"
#include <stdlib.h>
#include <fstream>
#include <math.h>
#include <TROOT.h>
#include <TApplication.h>
#include <TPaveLabel.h>
#include <TSystem.h>
#include <TFrame.h>
#include <TStyle.h>
#include <TString.h>
#include "TGaxis.h"
#include "TFile.h"
#include "TH1F.h"
#include "TH1D.h"
#include "TH2F.h"
#include "TF1.h"
#include "TVirtualFitter.h"
#include "TObject.h"
#include "TCanvas.h"
#include "TMultiGraph.h"
#include "TLegend.h"
#include "TDatabasePDG.h"
#include "TMinuit.h"
#include "TBenchmark.h"
#include "TRandom.h"
#include "TLatex.h"
#include "TASImage.h"
#include "TPostScript.h"
#include "TGraphErrors.h"
#include "TArrow.h"
#include "TGraphAsymmErrors.h"
#include "TGaxis.h"
#include "TMarker.h"
#include "Math/WrappedTF1.h"
#include "Math/BrentRootFinder.h"
#include "CommonHeaders/PlottingGammaConversionHistos.h"
#include "CommonHeaders/PlottingGammaConversionAdditional.h"
#include "CommonHeaders/FittingGammaConversion.h"
#include "CommonHeaders/ConversionFunctionsBasicsAndLabeling.h"
#include "CommonHeaders/ConversionFunctions.h"
#include "CommonHeaders/CombinationFunctions.h"
#include "CompareChargedAndNeutralPionDataALICE_LHC11h.h"
extern TRandom* gRandom;
extern TBenchmark* gBenchmark;
extern TSystem* gSystem;
extern TMinuit* gMinuit;
//************************** Convert yield histo ********************************************************************
TH1D* ConvertYieldHisto(TH1D* input){
// converts yield -> inv. yield
if (!input) {
cout << "Error: Histogram is NULL" << endl;
return NULL;
}
Int_t nBins = input->GetNbinsX();
Double_t newValue = 0;
Double_t newErrorValue = 0;
Double_t correctionValue = 1;
// divide py 2*pi
input->Scale(1/(2*TMath::Pi()));
// divide by pT
for(Int_t i=0;i<nBins;i++){
correctionValue = 1/(input->GetBinCenter(i+1));
input->SetBinContent(i+1, input->GetBinContent(i+1)*correctionValue);
input->SetBinError(i+1, input->GetBinError(i+1)*correctionValue);
}
return input;
}
void CompareChargedAndNeutralPionDataALICE_LHC11h(
TString nameFilePbPbLHC11h = "",
TString nameFilePP = "ExternalInput/CombNeutralMesons/CombinedResultsPaper_ShiftedX_PP7and900GeV_Pub2012.root",
TString nameFilePbPb = "LHC11hExternalInputs/CombinedResultsPbPb_18_Feb_2014.root",
TString suffix = "pdf"
){
gROOT->Reset();
gROOT->SetStyle("Plain");
StyleSettingsThesis(suffix);
SetPlotStyle();
TString dateForOutput = ReturnDateStringForOutput();
TString outputDir = Form("%s/%s/ComparisonNeutralAndChargedPions",suffix.Data(),dateForOutput.Data());
TString fileNameCharged5TeVPbPb = "ExternalInputPbPb/IdentifiedCharged_5.02TeV/Spectra_PbPbLHC15o_Combined_Histograms.root";
TString fileNameChargedPionPbPb = "ExternalInputPbPb/IdentifiedCharged_2.76TeV/ChargedPionSpectraPbPb_4_Apr_2014.root";
TString fileNameChargedPionPbPbFullPt = "ExternalInputPbPb/IdentifiedCharged_2.76TeV/PbPb276.fullpT.INEL.20140329.root";
TString fileNameChargedPionPP = "ExternalInput/IdentifiedCharged/ChargedIdentifiedSpectraPP_4_Apr_2014.root";
TString fileNameEMCalPion7TeVPP = "ExternalInput/EMCAL/7TeV/pi0Spectrum2011EMCALAddedSignalsEffic_7TeV_150323_evi_11cd.root";
TString fileNameEMCalPion2760GeVPP = "ExternalInput/EMCAL/2.76TeV/FinalCombinedXsec_pi0276TeV_25Apr2015_11a13g.root";
TString fileNameComb2760GeVPP = "ExternalInputPbPb/NeutralMesonspp276GeVReference/CombinedResultsPaperPP2760GeV_2017_01_26_FrediV2Clusterizer.root";
gSystem->Exec("mkdir -p "+outputDir);
cout << "*************************************************************************"<< endl;
cout << "********************** Charged Pion 5TeVPbPb full pT *******************"<< endl;
cout << "*************************************************************************"<< endl;
TFile* fileChargedInput5TeVPbPbFullPt = new TFile(fileNameCharged5TeVPbPb.Data());
TList* folderSummedPionStat = (TList*)fileChargedInput5TeVPbPbFullPt->Get("Summed_Pion");
TH1D* histoChargedPionSpec5TeVStat0005 = (TH1D*)folderSummedPionStat->FindObject("hSpectraSummedPion_PbPb_Combined_0.00to5.00");
histoChargedPionSpec5TeVStat0005 = ConvertYieldHisto(histoChargedPionSpec5TeVStat0005);
TH1D* histoChargedPionSpec5TeVStat0510 = (TH1D*)folderSummedPionStat->FindObject("hSpectraSummedPion_PbPb_Combined_5.00to10.00");
histoChargedPionSpec5TeVStat0510 = ConvertYieldHisto(histoChargedPionSpec5TeVStat0510);
TH1D* histoChargedPionSpec5TeVStat2030 = (TH1D*)folderSummedPionStat->FindObject("hSpectraSummedPion_PbPb_Combined_20.00to30.00");
histoChargedPionSpec5TeVStat2030 = ConvertYieldHisto(histoChargedPionSpec5TeVStat2030);
TH1D* histoChargedPionSpec5TeVStat3040 = (TH1D*)folderSummedPionStat->FindObject("hSpectraSummedPion_PbPb_Combined_30.00to40.00");
histoChargedPionSpec5TeVStat3040 = ConvertYieldHisto(histoChargedPionSpec5TeVStat3040);
TH1D* histoChargedPionSpec5TeVStat4050 = (TH1D*)folderSummedPionStat->FindObject("hSpectraSummedPion_PbPb_Combined_40.00to50.00");
histoChargedPionSpec5TeVStat4050 = ConvertYieldHisto(histoChargedPionSpec5TeVStat4050);
TList* folderSummedPionSyst = (TList*)fileChargedInput5TeVPbPbFullPt->Get("Summed_Pion_Sys");
TH1D* histoChargedPionSpec5TeVSyst0005 = (TH1D*)folderSummedPionSyst->FindObject("hSpectraSummedPion_PbPb_Combined_0.00to5.00");
histoChargedPionSpec5TeVSyst0005 = ConvertYieldHisto(histoChargedPionSpec5TeVSyst0005);
TH1D* histoChargedPionSpec5TeVSyst0510 = (TH1D*)folderSummedPionSyst->FindObject("hSpectraSummedPion_PbPb_Combined_5.00to10.00");
histoChargedPionSpec5TeVSyst0510 = ConvertYieldHisto(histoChargedPionSpec5TeVSyst0510);
TH1D* histoChargedPionSpec5TeVSyst2030 = (TH1D*)folderSummedPionSyst->FindObject("hSpectraSummedPion_PbPb_Combined_20.00to30.00");
histoChargedPionSpec5TeVSyst2030 = ConvertYieldHisto(histoChargedPionSpec5TeVSyst2030);
TH1D* histoChargedPionSpec5TeVSyst3040 = (TH1D*)folderSummedPionSyst->FindObject("hSpectraSummedPion_PbPb_Combined_30.00to40.00");
histoChargedPionSpec5TeVSyst3040 = ConvertYieldHisto(histoChargedPionSpec5TeVSyst3040);
TH1D* histoChargedPionSpec5TeVSyst4050 = (TH1D*)folderSummedPionSyst->FindObject("hSpectraSummedPion_PbPb_Combined_40.00to50.00");
histoChargedPionSpec5TeVSyst4050 = ConvertYieldHisto(histoChargedPionSpec5TeVSyst4050);
TList* folderSummedKaonStat = (TList*)fileChargedInput5TeVPbPbFullPt->Get("Summed_Kaon");
TH1D* histoChargedKaonSpec5TeVStat0005 = (TH1D*)folderSummedKaonStat->FindObject("hSpectraSummedKaon_PbPb_Combined_0.00to5.00");
histoChargedKaonSpec5TeVStat0005 = ConvertYieldHisto(histoChargedKaonSpec5TeVStat0005);
TH1D* histoChargedKaonSpec5TeVStat0510 = (TH1D*)folderSummedKaonStat->FindObject("hSpectraSummedKaon_PbPb_Combined_5.00to10.00");
histoChargedKaonSpec5TeVStat0510 = ConvertYieldHisto(histoChargedKaonSpec5TeVStat0510);
TH1D* histoChargedKaonSpec5TeVStat2030 = (TH1D*)folderSummedKaonStat->FindObject("hSpectraSummedKaon_PbPb_Combined_20.00to30.00");
histoChargedKaonSpec5TeVStat2030 = ConvertYieldHisto(histoChargedKaonSpec5TeVStat2030);
TH1D* histoChargedKaonSpec5TeVStat3040 = (TH1D*)folderSummedKaonStat->FindObject("hSpectraSummedKaon_PbPb_Combined_30.00to40.00");
histoChargedKaonSpec5TeVStat3040 = ConvertYieldHisto(histoChargedKaonSpec5TeVStat3040);
TH1D* histoChargedKaonSpec5TeVStat4050 = (TH1D*)folderSummedKaonStat->FindObject("hSpectraSummedKaon_PbPb_Combined_40.00to50.00");
histoChargedKaonSpec5TeVStat4050 = ConvertYieldHisto(histoChargedKaonSpec5TeVStat4050);
TList* folderSummedKaonSyst = (TList*)fileChargedInput5TeVPbPbFullPt->Get("Summed_Kaon_Sys");
TH1D* histoChargedKaonSpec5TeVSyst0005 = (TH1D*)folderSummedKaonSyst->FindObject("hSpectraSummedKaon_PbPb_Combined_0.00to5.00");
histoChargedKaonSpec5TeVSyst0005 = ConvertYieldHisto(histoChargedKaonSpec5TeVSyst0005);
TH1D* histoChargedKaonSpec5TeVSyst0510 = (TH1D*)folderSummedKaonSyst->FindObject("hSpectraSummedKaon_PbPb_Combined_5.00to10.00");
histoChargedKaonSpec5TeVSyst0510 = ConvertYieldHisto(histoChargedKaonSpec5TeVSyst0510);
TH1D* histoChargedKaonSpec5TeVSyst2030 = (TH1D*)folderSummedKaonSyst->FindObject("hSpectraSummedKaon_PbPb_Combined_20.00to30.00");
histoChargedKaonSpec5TeVSyst2030 = ConvertYieldHisto(histoChargedKaonSpec5TeVSyst2030);
TH1D* histoChargedKaonSpec5TeVSyst3040 = (TH1D*)folderSummedKaonSyst->FindObject("hSpectraSummedKaon_PbPb_Combined_30.00to40.00");
histoChargedKaonSpec5TeVSyst3040 = ConvertYieldHisto(histoChargedKaonSpec5TeVSyst3040);
TH1D* histoChargedKaonSpec5TeVSyst4050 = (TH1D*)folderSummedKaonSyst->FindObject("hSpectraSummedKaon_PbPb_Combined_40.00to50.00");
histoChargedKaonSpec5TeVSyst4050 = ConvertYieldHisto(histoChargedKaonSpec5TeVSyst4050);
TFile *fileInvYieldsChargedSpectra5TeV = new TFile("ExternalInputPbPb/IdentifiedCharged_5.02TeV/InvYield_PbPbLHC15o_Combined_Histograms.root","RECREATE");
histoChargedPionSpec5TeVStat0005->Write("InvYield_SummedPion_PbPb_Stat_0005");
histoChargedPionSpec5TeVStat0510->Write("InvYield_SummedPion_PbPb_Stat_0510");
histoChargedPionSpec5TeVStat2030->Write("InvYield_SummedPion_PbPb_Stat_2030");
histoChargedPionSpec5TeVStat3040->Write("InvYield_SummedPion_PbPb_Stat_3040");
histoChargedPionSpec5TeVStat4050->Write("InvYield_SummedPion_PbPb_Stat_4050");
histoChargedPionSpec5TeVSyst0005->Write("InvYield_SummedPion_PbPb_Syst_0005");
histoChargedPionSpec5TeVSyst0510->Write("InvYield_SummedPion_PbPb_Syst_0510");
histoChargedPionSpec5TeVSyst2030->Write("InvYield_SummedPion_PbPb_Syst_2030");
histoChargedPionSpec5TeVSyst3040->Write("InvYield_SummedPion_PbPb_Syst_3040");
histoChargedPionSpec5TeVSyst4050->Write("InvYield_SummedPion_PbPb_Syst_4050");
histoChargedKaonSpec5TeVStat0005->Write("InvYield_SummedKaon_PbPb_Stat_0005");
histoChargedKaonSpec5TeVStat0510->Write("InvYield_SummedKaon_PbPb_Stat_0510");
histoChargedKaonSpec5TeVStat2030->Write("InvYield_SummedKaon_PbPb_Stat_2030");
histoChargedKaonSpec5TeVStat3040->Write("InvYield_SummedKaon_PbPb_Stat_3040");
histoChargedKaonSpec5TeVStat4050->Write("InvYield_SummedKaon_PbPb_Stat_4050");
histoChargedKaonSpec5TeVSyst0005->Write("InvYield_SummedKaon_PbPb_Syst_0005");
histoChargedKaonSpec5TeVSyst0510->Write("InvYield_SummedKaon_PbPb_Syst_0510");
histoChargedKaonSpec5TeVSyst2030->Write("InvYield_SummedKaon_PbPb_Syst_2030");
histoChargedKaonSpec5TeVSyst3040->Write("InvYield_SummedKaon_PbPb_Syst_3040");
histoChargedKaonSpec5TeVSyst4050->Write("InvYield_SummedKaon_PbPb_Syst_4050");
fileInvYieldsChargedSpectra5TeV->Close();
histoChargedPionSpec5TeVStat0005->Scale(0.5);
histoChargedPionSpec5TeVStat0510->Scale(0.5);
histoChargedPionSpec5TeVStat2030->Scale(0.5);
histoChargedPionSpec5TeVStat3040->Scale(0.5);
histoChargedPionSpec5TeVStat4050->Scale(0.5);
histoChargedPionSpec5TeVSyst0005->Scale(0.5);
histoChargedPionSpec5TeVSyst0510->Scale(0.5);
histoChargedPionSpec5TeVSyst2030->Scale(0.5);
histoChargedPionSpec5TeVSyst3040->Scale(0.5);
histoChargedPionSpec5TeVSyst4050->Scale(0.5);
TH1D* histoChargedPionSpec5TeVStat0010 = (TH1D*)histoChargedPionSpec5TeVStat0005->Clone("histoChargedPionSpec5TeVStat0010");
histoChargedPionSpec5TeVStat0010->Add(histoChargedPionSpec5TeVStat0510);
histoChargedPionSpec5TeVStat0010->Scale(0.5);
TGraphErrors* graphChargedPionSpec5TeVStat0010 = new TGraphErrors(histoChargedPionSpec5TeVStat0010);
TH1D* histoChargedPionSpec5TeVSyst0010 = (TH1D*)histoChargedPionSpec5TeVSyst0005->Clone("histoChargedPionSpec5TeVSyst0010");
histoChargedPionSpec5TeVSyst0010->Add(histoChargedPionSpec5TeVSyst0510);
for (Int_t i = 1; i < histoChargedPionSpec5TeVSyst0010->GetNbinsX()+1; i++){
Double_t relErrLowerCenrHIGH = 0;
if (histoChargedPionSpec5TeVSyst0005->GetBinContent(i) != 0){
relErrLowerCenrHIGH= histoChargedPionSpec5TeVSyst0005->GetBinError(i)/histoChargedPionSpec5TeVSyst0005->GetBinContent(i)*100 ;
}
Double_t relErrLowerCentHIGH = 0;
if (histoChargedPionSpec5TeVSyst0510->GetBinContent(i) != 0){
relErrLowerCentHIGH = histoChargedPionSpec5TeVSyst0510->GetBinError(i)/histoChargedPionSpec5TeVSyst0510->GetBinContent(i)*100 ;
}
if (relErrLowerCentHIGH > relErrLowerCenrHIGH){
histoChargedPionSpec5TeVSyst0010->SetBinError(i, histoChargedPionSpec5TeVSyst0010->GetBinContent(i)*relErrLowerCentHIGH/100);
} else {
histoChargedPionSpec5TeVSyst0010->SetBinError(i, histoChargedPionSpec5TeVSyst0010->GetBinContent(i)*relErrLowerCenrHIGH/100);
}
}
histoChargedPionSpec5TeVSyst0010->Scale(0.5);
TGraphErrors* graphChargedPionSpec5TeVSyst0010 = new TGraphErrors(histoChargedPionSpec5TeVSyst0010);
TH1D* histoChargedPionSpec5TeVStat2040 = (TH1D*)histoChargedPionSpec5TeVStat2030->Clone("histoChargedPionSpec5TeVStat2040");
histoChargedPionSpec5TeVStat2040->Add(histoChargedPionSpec5TeVStat3040);
histoChargedPionSpec5TeVStat2040->Scale(0.5);
TH1D* histoChargedPionSpec5TeVStat2050 = (TH1D*)histoChargedPionSpec5TeVStat2030->Clone("histoChargedPionSpec5TeVStat2050");
histoChargedPionSpec5TeVStat2050->Add(histoChargedPionSpec5TeVStat3040);
histoChargedPionSpec5TeVStat2050->Add(histoChargedPionSpec5TeVStat4050);
histoChargedPionSpec5TeVStat2050->Scale(1./3);
TGraphErrors* graphChargedPionSpec5TeVStat2050 = new TGraphErrors(histoChargedPionSpec5TeVStat2050);
TH1D* histoChargedPionSpec5TeVSyst2040 = (TH1D*)histoChargedPionSpec5TeVSyst2030->Clone("histoChargedPionSpec5TeVSyst2040");
histoChargedPionSpec5TeVSyst2040->Add(histoChargedPionSpec5TeVSyst3040);
for (Int_t i = 1; i < histoChargedPionSpec5TeVSyst2040->GetNbinsX()+1; i++){
Double_t relErrLowerCenrHIGH = 0;
if (histoChargedPionSpec5TeVSyst2030->GetBinContent(i) != 0){
relErrLowerCenrHIGH= histoChargedPionSpec5TeVSyst2030->GetBinError(i)/histoChargedPionSpec5TeVSyst2030->GetBinContent(i)*100 ;
}
Double_t relErrLowerCentHIGH = 0;
if (histoChargedPionSpec5TeVSyst3040->GetBinContent(i) != 0){
relErrLowerCentHIGH = histoChargedPionSpec5TeVSyst3040->GetBinError(i)/histoChargedPionSpec5TeVSyst3040->GetBinContent(i)*100 ;
}
if (relErrLowerCentHIGH > relErrLowerCenrHIGH){
histoChargedPionSpec5TeVSyst2040->SetBinError(i, histoChargedPionSpec5TeVSyst2040->GetBinContent(i)*relErrLowerCentHIGH/100);
} else {
histoChargedPionSpec5TeVSyst2040->SetBinError(i, histoChargedPionSpec5TeVSyst2040->GetBinContent(i)*relErrLowerCenrHIGH/100);
}
}
histoChargedPionSpec5TeVSyst2040->Scale(0.5);
TH1D* histoChargedPionSpec5TeVSyst2050 = (TH1D*)histoChargedPionSpec5TeVSyst2040->Clone("histoChargedPionSpec5TeVSyst2050");
histoChargedPionSpec5TeVSyst2050->Add(histoChargedPionSpec5TeVSyst4050);
histoChargedPionSpec5TeVSyst2050->Scale(1./3);
for (Int_t i = 1; i < histoChargedPionSpec5TeVSyst2050->GetNbinsX()+1; i++){
Double_t relErrLowerCenrHIGH = 0;
if (histoChargedPionSpec5TeVSyst2040->GetBinContent(i) != 0){
relErrLowerCenrHIGH= histoChargedPionSpec5TeVSyst2040->GetBinError(i)/histoChargedPionSpec5TeVSyst2040->GetBinContent(i)*100 ;
}
Double_t relErrLowerCentHIGH = 0;
if (histoChargedPionSpec5TeVSyst4050->GetBinContent(i) != 0){
relErrLowerCentHIGH = histoChargedPionSpec5TeVSyst4050->GetBinError(i)/histoChargedPionSpec5TeVSyst4050->GetBinContent(i)*100 ;
}
if (relErrLowerCentHIGH > relErrLowerCenrHIGH){
histoChargedPionSpec5TeVSyst2050->SetBinError(i, histoChargedPionSpec5TeVSyst2050->GetBinContent(i)*relErrLowerCentHIGH/100);
} else {
histoChargedPionSpec5TeVSyst2050->SetBinError(i, histoChargedPionSpec5TeVSyst2050->GetBinContent(i)*relErrLowerCenrHIGH/100);
}
}
TGraphErrors* graphChargedPionSpec5TeVSyst2050 = new TGraphErrors(histoChargedPionSpec5TeVSyst2050);
histoChargedKaonSpec5TeVStat0005->Scale(0.5);
histoChargedKaonSpec5TeVStat0510->Scale(0.5);
histoChargedKaonSpec5TeVStat2030->Scale(0.5);
histoChargedKaonSpec5TeVStat3040->Scale(0.5);
histoChargedKaonSpec5TeVStat4050->Scale(0.5);
histoChargedKaonSpec5TeVSyst0005->Scale(0.5);
histoChargedKaonSpec5TeVSyst0510->Scale(0.5);
histoChargedKaonSpec5TeVSyst2030->Scale(0.5);
histoChargedKaonSpec5TeVSyst3040->Scale(0.5);
histoChargedKaonSpec5TeVSyst4050->Scale(0.5);
TH1D* histoChargedKaonSpec5TeVStat0010 = (TH1D*)histoChargedKaonSpec5TeVStat0005->Clone("histoChargedKaonSpec5TeVStat0010");
histoChargedKaonSpec5TeVStat0010->Add(histoChargedKaonSpec5TeVStat0510);
histoChargedKaonSpec5TeVStat0010->Scale(0.5);
TGraphErrors* graphChargedKaonSpec5TeVStat0010 = new TGraphErrors(histoChargedKaonSpec5TeVStat0010);
TH1D* histoChargedKaonSpec5TeVSyst0010 = (TH1D*)histoChargedKaonSpec5TeVSyst0005->Clone("histoChargedKaonSpec5TeVSyst0010");
histoChargedKaonSpec5TeVSyst0010->Add(histoChargedKaonSpec5TeVSyst0510);
for (Int_t i = 1; i < histoChargedKaonSpec5TeVSyst0010->GetNbinsX()+1; i++){
Double_t relErrLowerCenrHIGH = 0;
if (histoChargedKaonSpec5TeVSyst0005->GetBinContent(i) != 0){
relErrLowerCenrHIGH= histoChargedKaonSpec5TeVSyst0005->GetBinError(i)/histoChargedKaonSpec5TeVSyst0005->GetBinContent(i)*100 ;
}
Double_t relErrLowerCentHIGH = 0;
if (histoChargedKaonSpec5TeVSyst0510->GetBinContent(i) != 0){
relErrLowerCentHIGH = histoChargedKaonSpec5TeVSyst0510->GetBinError(i)/histoChargedKaonSpec5TeVSyst0510->GetBinContent(i)*100 ;
}
if (relErrLowerCentHIGH > relErrLowerCenrHIGH){
histoChargedKaonSpec5TeVSyst0010->SetBinError(i, histoChargedKaonSpec5TeVSyst0010->GetBinContent(i)*relErrLowerCentHIGH/100);
} else {
histoChargedKaonSpec5TeVSyst0010->SetBinError(i, histoChargedKaonSpec5TeVSyst0010->GetBinContent(i)*relErrLowerCenrHIGH/100);
}
}
histoChargedKaonSpec5TeVSyst0010->Scale(0.5);
TGraphErrors* graphChargedKaonSpec5TeVSyst0010 = new TGraphErrors(histoChargedKaonSpec5TeVSyst0010);
TH1D* histoChargedKaonSpec5TeVStat2040 = (TH1D*)histoChargedKaonSpec5TeVStat2030->Clone("histoChargedKaonSpec5TeVStat2040");
histoChargedKaonSpec5TeVStat2040->Add(histoChargedKaonSpec5TeVStat3040);
histoChargedKaonSpec5TeVStat2040->Scale(0.5);
TH1D* histoChargedKaonSpec5TeVStat2050 = (TH1D*)histoChargedKaonSpec5TeVStat2030->Clone("histoChargedKaonSpec5TeVStat2050");
histoChargedKaonSpec5TeVStat2050->Add(histoChargedKaonSpec5TeVStat3040);
histoChargedKaonSpec5TeVStat2050->Add(histoChargedKaonSpec5TeVStat4050);
histoChargedKaonSpec5TeVStat2050->Scale(1./3);
TGraphErrors* graphChargedKaonSpec5TeVStat2050 = new TGraphErrors(histoChargedKaonSpec5TeVStat2050);
TH1D* histoChargedKaonSpec5TeVSyst2040 = (TH1D*)histoChargedKaonSpec5TeVSyst2030->Clone("histoChargedKaonSpec5TeVSyst2040");
histoChargedKaonSpec5TeVSyst2040->Add(histoChargedKaonSpec5TeVSyst3040);
for (Int_t i = 1; i < histoChargedKaonSpec5TeVSyst2040->GetNbinsX()+1; i++){
Double_t relErrLowerCenrHIGH = 0;
if (histoChargedKaonSpec5TeVSyst2030->GetBinContent(i) != 0){
relErrLowerCenrHIGH= histoChargedKaonSpec5TeVSyst2030->GetBinError(i)/histoChargedKaonSpec5TeVSyst2030->GetBinContent(i)*100 ;
}
Double_t relErrLowerCentHIGH = 0;
if (histoChargedKaonSpec5TeVSyst3040->GetBinContent(i) != 0){
relErrLowerCentHIGH = histoChargedKaonSpec5TeVSyst3040->GetBinError(i)/histoChargedKaonSpec5TeVSyst3040->GetBinContent(i)*100 ;
}
if (relErrLowerCentHIGH > relErrLowerCenrHIGH){
histoChargedKaonSpec5TeVSyst2040->SetBinError(i, histoChargedKaonSpec5TeVSyst2040->GetBinContent(i)*relErrLowerCentHIGH/100);
} else {
histoChargedKaonSpec5TeVSyst2040->SetBinError(i, histoChargedKaonSpec5TeVSyst2040->GetBinContent(i)*relErrLowerCenrHIGH/100);
}
}
histoChargedKaonSpec5TeVSyst2040->Scale(0.5);
TH1D* histoChargedKaonSpec5TeVSyst2050 = (TH1D*)histoChargedKaonSpec5TeVSyst2040->Clone("histoChargedKaonSpec5TeVSyst2050");
histoChargedKaonSpec5TeVSyst2050->Add(histoChargedKaonSpec5TeVSyst4050);
histoChargedKaonSpec5TeVSyst2050->Scale(1./3);
for (Int_t i = 1; i < histoChargedKaonSpec5TeVSyst2050->GetNbinsX()+1; i++){
Double_t relErrLowerCenrHIGH = 0;
if (histoChargedKaonSpec5TeVSyst2040->GetBinContent(i) != 0){
relErrLowerCenrHIGH= histoChargedKaonSpec5TeVSyst2040->GetBinError(i)/histoChargedKaonSpec5TeVSyst2040->GetBinContent(i)*100 ;
}
Double_t relErrLowerCentHIGH = 0;
if (histoChargedKaonSpec5TeVSyst4050->GetBinContent(i) != 0){
relErrLowerCentHIGH = histoChargedKaonSpec5TeVSyst4050->GetBinError(i)/histoChargedKaonSpec5TeVSyst4050->GetBinContent(i)*100 ;
}
if (relErrLowerCentHIGH > relErrLowerCenrHIGH){
histoChargedKaonSpec5TeVSyst2050->SetBinError(i, histoChargedKaonSpec5TeVSyst2050->GetBinContent(i)*relErrLowerCentHIGH/100);
} else {
histoChargedKaonSpec5TeVSyst2050->SetBinError(i, histoChargedKaonSpec5TeVSyst2050->GetBinContent(i)*relErrLowerCenrHIGH/100);
}
}
TGraphErrors* graphChargedKaonSpec5TeVSyst2050 = new TGraphErrors(histoChargedKaonSpec5TeVSyst2050);
cout << "*************************************************************************"<< endl;
cout << "************************** Charged Pion PbPb full pT *******************"<< endl;
cout << "*************************************************************************"<< endl;
TFile* fileChargedPionInputPbPbFullPt = new TFile(fileNameChargedPionPbPbFullPt.Data());
TH1D* histoChargedPionSpecFullPtStat2040 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hstat_PbPb276_2040_pion_sum");
TH1D* histoChargedPionSpecFullPtSyst2040 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hsys_PbPb276_2040_pion_sum");
histoChargedPionSpecFullPtStat2040->Scale(0.5);
histoChargedPionSpecFullPtSyst2040->Scale(0.5);
TH1D* histoChargedPionSpecFullPtStat4060 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hstat_PbPb276_4060_pion_sum");
TH1D* histoChargedPionSpecFullPtSyst4060 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hsys_PbPb276_4060_pion_sum");
histoChargedPionSpecFullPtStat4060->Scale(0.5);
histoChargedPionSpecFullPtSyst4060->Scale(0.5);
histoChargedPionSpecFullPtStat4060->Scale(0.5);
histoChargedPionSpecFullPtSyst4060->Scale(0.5);
TH1D* histoChargedPionSpecFullPtStat2050 = (TH1D*)histoChargedPionSpecFullPtStat2040->Clone("histoChargedPionSpecFullPtStat2050");
TH1D* histoChargedPionSpecFullPtSyst2050 = (TH1D*)histoChargedPionSpecFullPtSyst2040->Clone("histoChargedPionSpecFullPtSyst2050");
histoChargedPionSpecFullPtStat2050->Add(histoChargedPionSpecFullPtStat4060);
histoChargedPionSpecFullPtSyst2050->Add(histoChargedPionSpecFullPtSyst4060);
for (Int_t i = 1; i < histoChargedPionSpecFullPtSyst2050->GetNbinsX()+1; i++){
Double_t relErrLowerCenrHIGH = 0;
if (histoChargedPionSpecFullPtSyst4060->GetBinContent(i) != 0){
relErrLowerCenrHIGH= histoChargedPionSpecFullPtSyst4060->GetBinError(i)/histoChargedPionSpecFullPtSyst4060->GetBinContent(i)*100 ;
}
Double_t relErrLowerCentHIGH = 0;
if (histoChargedPionSpecFullPtSyst2040->GetBinContent(i) != 0){
relErrLowerCentHIGH = histoChargedPionSpecFullPtSyst2040->GetBinError(i)/histoChargedPionSpecFullPtSyst2040->GetBinContent(i)*100 ;
}
if (relErrLowerCentHIGH > relErrLowerCenrHIGH){
histoChargedPionSpecFullPtSyst2050->SetBinError(i, histoChargedPionSpecFullPtSyst2050->GetBinContent(i)*relErrLowerCentHIGH/100);
} else {
histoChargedPionSpecFullPtSyst2050->SetBinError(i, histoChargedPionSpecFullPtSyst2050->GetBinContent(i)*relErrLowerCenrHIGH/100);
}
}
histoChargedPionSpecFullPtStat2050->Scale(3./4);
histoChargedPionSpecFullPtSyst2050->Scale(3./4);
TH1D* histoChargedPionSpecOtherPtStat0005 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hstat_PbPb276_0005_pion_sum");
TH1D* histoChargedPionSpecOtherPtSyst0005 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hsys_PbPb276_0005_pion_sum");
histoChargedPionSpecOtherPtStat0005->Scale(0.5);
histoChargedPionSpecOtherPtSyst0005->Scale(0.5);
TH1D* histoChargedPionSpecOtherPtStat0510 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hstat_PbPb276_0510_pion_sum");
TH1D* histoChargedPionSpecOtherPtSyst0510 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hsys_PbPb276_0510_pion_sum");
histoChargedPionSpecOtherPtStat0510->Scale(0.5);
histoChargedPionSpecOtherPtSyst0510->Scale(0.5);
TH1D* histoChargedPionSpecFullPtStat0010 = (TH1D*)histoChargedPionSpecOtherPtStat0510->Clone("histoChargedPionSpecFullPtStat0010");
TH1D* histoChargedPionSpecFullPtSyst0010 = (TH1D*)histoChargedPionSpecOtherPtSyst0510->Clone("histoChargedPionSpecFullPtSyst0010");
histoChargedPionSpecFullPtStat0010->Add(histoChargedPionSpecOtherPtStat0005);
histoChargedPionSpecFullPtSyst0010->Add(histoChargedPionSpecOtherPtSyst0005);
for (Int_t i = 1; i < histoChargedPionSpecFullPtSyst0010->GetNbinsX()+1; i++){
Double_t relErrLowerCenrHIGH = 0;
if (histoChargedPionSpecOtherPtSyst0005->GetBinContent(i) != 0){
relErrLowerCenrHIGH= histoChargedPionSpecOtherPtSyst0005->GetBinError(i)/histoChargedPionSpecOtherPtSyst0005->GetBinContent(i)*100 ;
}
Double_t relErrLowerCentHIGH = 0;
if (histoChargedPionSpecOtherPtSyst0510->GetBinContent(i) != 0){
relErrLowerCentHIGH = histoChargedPionSpecOtherPtSyst0510->GetBinError(i)/histoChargedPionSpecOtherPtSyst0510->GetBinContent(i)*100 ;
}
if (relErrLowerCentHIGH > relErrLowerCenrHIGH){
histoChargedPionSpecFullPtSyst0010->SetBinError(i, histoChargedPionSpecFullPtSyst0010->GetBinContent(i)*relErrLowerCentHIGH/100);
} else {
histoChargedPionSpecFullPtSyst0010->SetBinError(i, histoChargedPionSpecFullPtSyst0010->GetBinContent(i)*relErrLowerCenrHIGH/100);
}
}
histoChargedPionSpecFullPtStat0010->Scale(0.5);
histoChargedPionSpecFullPtSyst0010->Scale(0.5);
TH1D* histoChargedKaonSpecFullPtStat2040 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hstat_PbPb276_2040_kaon_sum");
TH1D* histoChargedKaonSpecFullPtSyst2040 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hsys_PbPb276_2040_kaon_sum");
histoChargedKaonSpecFullPtStat2040->Scale(0.5);
histoChargedKaonSpecFullPtSyst2040->Scale(0.5);
TH1D* histoChargedKaonSpecFullPtStat4060 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hstat_PbPb276_4060_kaon_sum");
TH1D* histoChargedKaonSpecFullPtSyst4060 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hsys_PbPb276_4060_kaon_sum");
histoChargedKaonSpecFullPtStat4060->Scale(0.5);
histoChargedKaonSpecFullPtSyst4060->Scale(0.5);
histoChargedKaonSpecFullPtStat4060->Scale(0.5);
histoChargedKaonSpecFullPtSyst4060->Scale(0.5);
TH1D* histoChargedKaonSpecFullPtStat2050 = (TH1D*)histoChargedKaonSpecFullPtStat2040->Clone("histoChargedKaonSpecFullPtStat2050");
TH1D* histoChargedKaonSpecFullPtSyst2050 = (TH1D*)histoChargedKaonSpecFullPtSyst2040->Clone("histoChargedKaonSpecFullPtSyst2050");
histoChargedKaonSpecFullPtStat2050->Add(histoChargedKaonSpecFullPtStat4060);
histoChargedKaonSpecFullPtSyst2050->Add(histoChargedKaonSpecFullPtSyst4060);
for (Int_t i = 1; i < histoChargedKaonSpecFullPtSyst2050->GetNbinsX()+1; i++){
Double_t relErrLowerCenrHIGH = 0;
if (histoChargedKaonSpecFullPtSyst4060->GetBinContent(i) != 0){
relErrLowerCenrHIGH= histoChargedKaonSpecFullPtSyst4060->GetBinError(i)/histoChargedKaonSpecFullPtSyst4060->GetBinContent(i)*100 ;
}
Double_t relErrLowerCentHIGH = 0;
if (histoChargedKaonSpecFullPtSyst2040->GetBinContent(i) != 0){
relErrLowerCentHIGH = histoChargedKaonSpecFullPtSyst2040->GetBinError(i)/histoChargedKaonSpecFullPtSyst2040->GetBinContent(i)*100 ;
}
if (relErrLowerCentHIGH > relErrLowerCenrHIGH){
histoChargedKaonSpecFullPtSyst2050->SetBinError(i, histoChargedKaonSpecFullPtSyst2050->GetBinContent(i)*relErrLowerCentHIGH/100);
} else {
histoChargedKaonSpecFullPtSyst2050->SetBinError(i, histoChargedKaonSpecFullPtSyst2050->GetBinContent(i)*relErrLowerCenrHIGH/100);
}
}
histoChargedKaonSpecFullPtStat2050->Scale(3./4);
histoChargedKaonSpecFullPtSyst2050->Scale(3./4);
TH1D* histoChargedKaonSpecOtherPtStat0005 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hstat_PbPb276_0005_kaon_sum");
TH1D* histoChargedKaonSpecOtherPtSyst0005 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hsys_PbPb276_0005_kaon_sum");
histoChargedKaonSpecOtherPtStat0005->Scale(0.5);
histoChargedKaonSpecOtherPtSyst0005->Scale(0.5);
TH1D* histoChargedKaonSpecOtherPtStat0510 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hstat_PbPb276_0510_kaon_sum");
TH1D* histoChargedKaonSpecOtherPtSyst0510 = (TH1D*)fileChargedPionInputPbPbFullPt->Get("hsys_PbPb276_0510_kaon_sum");
histoChargedKaonSpecOtherPtStat0510->Scale(0.5);
histoChargedKaonSpecOtherPtSyst0510->Scale(0.5);
TH1D* histoChargedKaonSpecFullPtStat0010 = (TH1D*)histoChargedKaonSpecOtherPtStat0510->Clone("histoChargedKaonSpecFullPtStat0010");
TH1D* histoChargedKaonSpecFullPtSyst0010 = (TH1D*)histoChargedKaonSpecOtherPtSyst0510->Clone("histoChargedKaonSpecFullPtSyst0010");
histoChargedKaonSpecFullPtStat0010->Add(histoChargedKaonSpecOtherPtStat0005);
histoChargedKaonSpecFullPtSyst0010->Add(histoChargedKaonSpecOtherPtSyst0005);
for (Int_t i = 1; i < histoChargedKaonSpecFullPtSyst0010->GetNbinsX()+1; i++){
Double_t relErrLowerCenrHIGH = 0;
if (histoChargedKaonSpecOtherPtSyst0005->GetBinContent(i) != 0){
relErrLowerCenrHIGH= histoChargedKaonSpecOtherPtSyst0005->GetBinError(i)/histoChargedKaonSpecOtherPtSyst0005->GetBinContent(i)*100 ;
}
Double_t relErrLowerCentHIGH = 0;
if (histoChargedKaonSpecOtherPtSyst0510->GetBinContent(i) != 0){
relErrLowerCentHIGH = histoChargedKaonSpecOtherPtSyst0510->GetBinError(i)/histoChargedKaonSpecOtherPtSyst0510->GetBinContent(i)*100 ;
}
if (relErrLowerCentHIGH > relErrLowerCenrHIGH){
histoChargedKaonSpecFullPtSyst0010->SetBinError(i, histoChargedKaonSpecFullPtSyst0010->GetBinContent(i)*relErrLowerCentHIGH/100);
} else {
histoChargedKaonSpecFullPtSyst0010->SetBinError(i, histoChargedKaonSpecFullPtSyst0010->GetBinContent(i)*relErrLowerCenrHIGH/100);
}
}
histoChargedKaonSpecFullPtStat0010->Scale(0.5);
histoChargedKaonSpecFullPtSyst0010->Scale(0.5);
cout << "*************************************************************************"<< endl;
cout << "***************************** charged pion PbPb ************************"<< endl;
cout << "*************************************************************************"<< endl;
TFile* fileChargedPionInputPbPb = new TFile(fileNameChargedPionPbPb.Data());
TH1D* histoChargedPionSpecHighPtStat0005 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecHighPtStat0005");
TH1D* histoChargedPionSpecHighPtSyst0005 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecHighPtSyst0005");
TH1D* histoChargedPionSpecHighPtStat0510 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecHighPtStat0510");
TH1D* histoChargedPionSpecHighPtSyst0510 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecHighPtSyst0510");
TH1D* histoChargedPionSpecHighPtStat1020 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecHighPtStat1020");
TH1D* histoChargedPionSpecHighPtSyst1020 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecHighPtSyst1020");
TH1D* histoChargedPionSpecHighPtSyst2040 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecHighPtSyst2040");
TH1D* histoChargedPionSpecHighPtStat2040 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecHighPtStat2040");
TH1D* histoChargedPionSpecHighPtSyst4060 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecHighPtSyst4060");
TH1D* histoChargedPionSpecHighPtStat4060 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecHighPtStat4060");
TH1D* histoChargedPionSpecHighPtSyst6080 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecHighPtSyst6080");
TH1D* histoChargedPionSpecHighPtStat6080 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecHighPtStat6080");
TH1D* histoChargedPionSpecLowPtStat0005 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecLowPtStat0005");
TH1D* histoChargedPionSpecLowPtSyst0005 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecLowPtSyst0005");
TH1D* histoChargedPionSpecLowPtStat0510 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecLowPtStat0510");
TH1D* histoChargedPionSpecLowPtSyst0510 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecLowPtSyst0510");
TH1D* histoChargedPionSpecLowPtStat1020 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecLowPtStat1020");
TH1D* histoChargedPionSpecLowPtSyst1020 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecLowPtSyst1020");
TH1D* histoChargedPionSpecLowPtStat2040 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecLowPtStat2040");
TH1D* histoChargedPionSpecLowPtSyst2040 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecLowPtSyst2040");
TH1D* histoChargedPionSpecLowPtStat4060 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecLowPtStat4060");
TH1D* histoChargedPionSpecLowPtSyst4060 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecLowPtSyst4060");
TH1D* histoChargedPionSpecLowPtStat6080 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecLowPtStat6080");
TH1D* histoChargedPionSpecLowPtSyst6080 = (TH1D*)fileChargedPionInputPbPb->Get("histoChargedPionSpecLowPtSyst6080");
TH1D* histoChargedPionSpecLowPtStat0010 = (TH1D*)histoChargedPionSpecLowPtStat0510->Clone("histoChargedPionSpecLowPtStat0010");
TH1D* histoChargedPionSpecLowPtSyst0010 = (TH1D*)histoChargedPionSpecLowPtSyst0510->Clone("histoChargedPionSpecLowPtSyst0010");
histoChargedPionSpecLowPtStat0010->Add(histoChargedPionSpecLowPtStat0005);
histoChargedPionSpecLowPtSyst0010->Add(histoChargedPionSpecLowPtSyst0005);
histoChargedPionSpecLowPtStat0010->Scale(0.5);
histoChargedPionSpecLowPtSyst0010->Scale(0.5);
for (Int_t i = 1; i < histoChargedPionSpecLowPtSyst0010->GetNbinsX()+1; i++){
Double_t relErrLowerCenrLOW = 0;
if (histoChargedPionSpecLowPtSyst0005->GetBinContent(i) != 0){
relErrLowerCenrLOW= histoChargedPionSpecLowPtSyst0005->GetBinError(i)/histoChargedPionSpecLowPtSyst0005->GetBinContent(i)*100 ;
}
Double_t relErrLowerCentLOW = 0;
if (histoChargedPionSpecLowPtSyst0510->GetBinContent(i) != 0){
relErrLowerCentLOW = histoChargedPionSpecLowPtSyst0510->GetBinError(i)/histoChargedPionSpecLowPtSyst0510->GetBinContent(i)*100 ;
}
if (relErrLowerCentLOW > relErrLowerCenrLOW){
histoChargedPionSpecLowPtSyst0010->SetBinError(i, histoChargedPionSpecLowPtSyst0010->GetBinContent(i)*relErrLowerCentLOW/100);
} else {
histoChargedPionSpecLowPtSyst0010->SetBinError(i, histoChargedPionSpecLowPtSyst0010->GetBinContent(i)*relErrLowerCenrLOW/100);
}
}
TH1D* histoChargedPionSpecHighPtStat0010 = (TH1D*)histoChargedPionSpecHighPtStat0510->Clone("histoChargedPionSpecHighPtStat0010");
TH1D* histoChargedPionSpecHighPtSyst0010 = (TH1D*)histoChargedPionSpecHighPtSyst0510->Clone("histoChargedPionSpecHighPtSyst0010");
histoChargedPionSpecHighPtStat0010->Add(histoChargedPionSpecHighPtStat0005);
histoChargedPionSpecHighPtSyst0010->Add(histoChargedPionSpecHighPtSyst0005);
histoChargedPionSpecHighPtStat0010->Scale(0.5);
histoChargedPionSpecHighPtSyst0010->Scale(0.5);
for (Int_t i = 1; i < histoChargedPionSpecHighPtSyst0010->GetNbinsX()+1; i++){
Double_t relErrLowerCenrHIGH = 0;
if (histoChargedPionSpecHighPtSyst0005->GetBinContent(i) != 0){
relErrLowerCenrHIGH= histoChargedPionSpecHighPtSyst0005->GetBinError(i)/histoChargedPionSpecHighPtSyst0005->GetBinContent(i)*100 ;
}
Double_t relErrLowerCentHIGH = 0;
if (histoChargedPionSpecHighPtSyst0510->GetBinContent(i) != 0){
relErrLowerCentHIGH = histoChargedPionSpecHighPtSyst0510->GetBinError(i)/histoChargedPionSpecHighPtSyst0510->GetBinContent(i)*100 ;
}
if (relErrLowerCentHIGH > relErrLowerCenrHIGH){
histoChargedPionSpecHighPtSyst0010->SetBinError(i, histoChargedPionSpecHighPtSyst0010->GetBinContent(i)*relErrLowerCentHIGH/100);
} else {
histoChargedPionSpecHighPtSyst0010->SetBinError(i, histoChargedPionSpecHighPtSyst0010->GetBinContent(i)*relErrLowerCenrHIGH/100);
}
}
cout << "*************************************************************************"<< endl;
cout << "*************************** Pi0 PbPb 2010 ******************************"<< endl;
cout << "*************************************************************************"<< endl;
TFile* fCombResults= new TFile(nameFilePbPb.Data());
TGraphAsymmErrors* graphYieldCombStatPi02760GeV = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPPComb2760GeV_StatErr");
TGraphAsymmErrors* graphYieldCombSysPi02760GeV = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPPComb2760GeV_SysErr");
TGraphAsymmErrors* graphYieldPCMStatPi02760GeV = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPPPCM2760GeV_StatErr");
TGraphAsymmErrors* graphYieldPCMSysPi02760GeV = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPPPCM2760GeV_SysErr");
TGraphAsymmErrors* graphYieldPHOSStatPi02760GeV = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPPPHOS2760GeV_StatErr");
TGraphAsymmErrors* graphYieldPHOSSysPi02760GeV = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPPPHOS2760GeV_SysErr");
TGraphAsymmErrors* graphYieldPi0CombPbPb0005StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbStatErr_0005");
TGraphAsymmErrors* graphYieldPi0CombPbPb0005SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbSysErr_0005");
TGraphAsymmErrors* graphYieldPi0PCMPbPb0005StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMStatErr_0005");
TGraphAsymmErrors* graphYieldPi0PCMPbPb0005SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMSysErr_0005");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb0005StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPHOSStatErr_0005");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb0005SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPHOSSysErr_0005");
TGraphAsymmErrors* graphYieldPi0CombPbPb0510StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbStatErr_0510");
TGraphAsymmErrors* graphYieldPi0CombPbPb0510SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbSysErr_0510");
TGraphAsymmErrors* graphYieldPi0PCMPbPb0510StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMStatErr_0510");
TGraphAsymmErrors* graphYieldPi0PCMPbPb0510SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMSysErr_0510");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb0510StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPHOSStatErr_0510");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb0510SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPHOSSysErr_0510");
TGraphAsymmErrors* graphYieldPi0CombPbPb0010StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbStatErr_0010");
TGraphAsymmErrors* graphYieldPi0CombPbPb0010SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbSysErr_0010");
TGraphAsymmErrors* graphYieldPi0PCMPbPb0010StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMStatErr_0010");
TGraphAsymmErrors* graphYieldPi0PCMPbPb0010SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMSysErr_0010");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb0010StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPHOSStatErr_0010");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb0010SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPHOSSysErr_0010");
TGraphAsymmErrors* graphYieldPi0CombPbPb1020StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbStatErr_1020");
TGraphAsymmErrors* graphYieldPi0CombPbPb1020SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbSysErr_1020");
TGraphAsymmErrors* graphYieldPi0PCMPbPb1020StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMStatErr_1020");
TGraphAsymmErrors* graphYieldPi0PCMPbPb1020SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMSysErr_1020");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb1020StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPHOSStatErr_1020");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb1020SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPHOSSysErr_1020");
TGraphAsymmErrors* graphYieldPi0CombPbPb2040StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbStatErr_2040");
TGraphAsymmErrors* graphYieldPi0CombPbPb2040SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbSysErr_2040");
TGraphAsymmErrors* graphYieldPi0PCMPbPb2040StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMStatErr_2040");
TGraphAsymmErrors* graphYieldPi0PCMPbPb2040SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMSysErr_2040");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb2040StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPHOSStatErr_2040");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb2040SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPHOSSysErr_2040");
TGraphAsymmErrors* graphYieldPi0CombPbPb4060StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbStatErr_4060");
TGraphAsymmErrors* graphYieldPi0CombPbPb4060SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbSysErr_4060");
TGraphAsymmErrors* graphYieldPi0PCMPbPb4060StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMStatErr_4060");
TGraphAsymmErrors* graphYieldPi0PCMPbPb4060SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMSysErr_4060");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb4060StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPHOSStatErr_4060");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb4060SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPHOSSysErr_4060");
TGraphAsymmErrors* graphYieldPi0CombPbPb6080StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbStatErr_6080");
TGraphAsymmErrors* graphYieldPi0CombPbPb6080SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbSysErr_6080");
TGraphAsymmErrors* graphYieldPi0PCMPbPb6080StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMStatErr_6080");
TGraphAsymmErrors* graphYieldPi0PCMPbPb6080SysErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPCMSysErr_6080");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb6080StatErr = (TGraphAsymmErrors*)fCombResults->Get("InvYieldPbPbPHOSStatErr_6080");
cout << "*************************************************************************"<< endl;
cout << "****************************** PbPb 0-10% *******************************"<< endl;
cout << "*************************************************************************"<< endl;
TGraphAsymmErrors* graphYieldPi0CombPbPb0010StatErrCopy = (TGraphAsymmErrors*) graphYieldPi0CombPbPb0010StatErr->Clone("graphYieldPi0CombPbPb0010StatErrCopy");
TGraphAsymmErrors* graphYieldPi0CombPbPb0010SysErrCopy = (TGraphAsymmErrors*) graphYieldPi0CombPbPb0010SysErr->Clone("graphYieldPi0CombPbPb0010SysErrCopy");
TGraphAsymmErrors* graphYieldPi0PCMPbPb0010StatErrCopy = (TGraphAsymmErrors*) graphYieldPi0PCMPbPb0010StatErr->Clone("graphYieldPi0PCMPbPb0010StatErrCopy");
TGraphAsymmErrors* graphYieldPi0PCMPbPb0010SysErrCopy = (TGraphAsymmErrors*) graphYieldPi0PCMPbPb0010SysErr->Clone("graphYieldPi0PCMPbPb0010SysErrCopy");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb0010StatErrCopy = (TGraphAsymmErrors*) graphYieldPi0PHOSPbPb0010StatErr->Clone("graphYieldPi0PHOSPbPb0010StatErrCopy");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb0010SysErrCopy = (TGraphAsymmErrors*) graphYieldPi0PHOSPbPb0010SysErr->Clone("graphYieldPi0PHOSPbPb0010SysErrCopy");
TGraphErrors* graphRatioHighPtChargedPionsComb0010 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0CombPbPb0010StatErrCopy, graphYieldPi0CombPbPb0010SysErrCopy,
histoChargedPionSpecHighPtStat0010, histoChargedPionSpecHighPtSyst0010,
kTRUE, kTRUE,
&graphYieldCombStatPi00010RebinnedHighPtComb, &graphYieldCombSysPi00010RebinnedHighPtComb,
&graphChargedPionSpecHighPtStat0010HighPtComb, &graphChargedPionSpecHighPtSyst0010HighPtComb);
// graphRatioHighPtChargedPionsComb0010->Print();
TGraphErrors* graphRatioLowPtChargedPionsComb0010 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0CombPbPb0010StatErrCopy, graphYieldPi0CombPbPb0010SysErrCopy,
histoChargedPionSpecLowPtStat0010, histoChargedPionSpecLowPtSyst0010,
kTRUE, kTRUE,
&graphYieldCombStatPi00010RebinnedLowPtComb, &graphYieldCombSysPi00010RebinnedLowPtComb,
&graphChargedPionSpecLowPtStat0010LowPtComb, &graphChargedPionSpecLowPtSyst0010LowPtComb);
// graphRatioLowPtChargedPionsComb0010->Print();
TGraphErrors* graphRatioHighPtChargedPionsPCM0010 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0PCMPbPb0010StatErrCopy, graphYieldPi0PCMPbPb0010SysErrCopy,
histoChargedPionSpecHighPtStat0010, histoChargedPionSpecHighPtSyst0010,
kTRUE, kTRUE,
&graphYieldPCMStatPi00010RebinnedHighPtPCM, &graphYieldPCMSysPi00010RebinnedHighPtPCM,
&graphChargedPionSpecHighPtStat0010HighPtPCM, &graphChargedPionSpecHighPtSyst0010HighPtPCM);
// graphRatioHighPtChargedPionsPCM0010->Print();
TGraphErrors* graphRatioLowPtChargedPionsPCM0010 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0PCMPbPb0010StatErrCopy, graphYieldPi0PCMPbPb0010SysErrCopy,
histoChargedPionSpecLowPtStat0010, histoChargedPionSpecLowPtSyst0010,
kTRUE, kTRUE,
&graphYieldPCMStatPi00010RebinnedLowPtPCM, &graphYieldPCMSysPi00010RebinnedLowPtPCM,
&graphChargedPionSpecLowPtStat0010LowPtPCM, &graphChargedPionSpecLowPtSyst0010LowPtPCM);
// graphRatioLowPtChargedPionsPCM0010->Print();
graphYieldPi0PHOSPbPb0010StatErrCopy->RemovePoint(0);
graphYieldPi0PHOSPbPb0010SysErrCopy->RemovePoint(0);
TGraphErrors* graphRatioHighPtChargedPionsPHOS0010 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0PHOSPbPb0010StatErrCopy, graphYieldPi0PHOSPbPb0010SysErrCopy,
histoChargedPionSpecHighPtStat0010, histoChargedPionSpecHighPtSyst0010,
kTRUE, kTRUE,
&graphYieldPHOSStatPi00010RebinnedHighPtPHOS, &graphYieldPHOSSysPi00010RebinnedHighPtPHOS,
&graphChargedPionSpecHighPtStat0010HighPtPHOS, &graphChargedPionSpecHighPtSyst0010HighPtPHOS);
// graphRatioHighPtChargedPionsPHOS0010->Print();
TGraphErrors* graphRatioLowPtChargedPionsPHOS0010 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0PHOSPbPb0010StatErrCopy, graphYieldPi0PHOSPbPb0010SysErrCopy,
histoChargedPionSpecLowPtStat0010, histoChargedPionSpecLowPtSyst0010,
kTRUE, kTRUE,
&graphYieldPHOSStatPi00010RebinnedLowPtPHOS, &graphYieldPHOSSysPi00010RebinnedLowPtPHOS,
&graphChargedPionSpecLowPtStat0010LowPtPHOS, &graphChargedPionSpecLowPtSyst0010LowPtPHOS);
// graphRatioLowPtChargedPionsPHOS0010->Print();
TGraphErrors* graphRatioFullPtChargedPionsComb0010 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0CombPbPb0010StatErrCopy, graphYieldPi0CombPbPb0010SysErrCopy,
histoChargedPionSpecFullPtStat0010, histoChargedPionSpecFullPtSyst0010,
kTRUE, kTRUE,
&graphYieldCombStatPi00010FullPtPtComb, &graphYieldCombSysPi00010FullPtPtComb,
&graphChargedPionSpecFullPtStat0010FullPtComb, &graphChargedPionSpecFullPtSyst0010FullPtComb);
// graphRatioFullPtChargedPionsComb0010->Print();
TGraphErrors* graphRatioFullPtChargedPionsPCM0010 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0PCMPbPb0010StatErrCopy, graphYieldPi0PCMPbPb0010SysErrCopy,
histoChargedPionSpecFullPtStat0010, histoChargedPionSpecFullPtSyst0010,
kTRUE, kTRUE,
&graphYieldPCMStatPi00010FullPtPtPCM, &graphYieldPCMSysPi00010FullPtPtPCM,
&graphChargedPionSpecFullPtStat0010FullPtPCM, &graphChargedPionSpecFullPtSyst0010FullPtPCM);
// graphRatioFullPtChargedPionsPCM0010->Print();
// graphYieldPi0PHOSPbPb0010StatErrCopy->RemovePoint(0);
// graphYieldPi0PHOSPbPb0010SysErrCopy->RemovePoint(0);
TGraphErrors* graphRatioFullPtChargedPionsPHOS0010 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0PHOSPbPb0010StatErrCopy, graphYieldPi0PHOSPbPb0010SysErrCopy,
histoChargedPionSpecFullPtStat0010, histoChargedPionSpecFullPtSyst0010,
kTRUE, kTRUE,
&graphYieldPHOSStatPi00010FullPtPtPHOS, &graphYieldPHOSSysPi00010FullPtPtPHOS,
&graphChargedPionSpecFullPtStat0010FullPtPHOS, &graphChargedPionSpecFullPtSyst0010FullPtPHOS);
// graphRatioFullPtChargedPionsPHOS0010->Print();
cout << "*************************************************************************"<< endl;
cout << "****************************** PbPb 20-40% *****************************"<< endl;
cout << "*************************************************************************"<< endl;
TGraphAsymmErrors* graphYieldPi0CombPbPb2040StatErrCopy = (TGraphAsymmErrors*) graphYieldPi0CombPbPb2040StatErr->Clone("graphYieldPi0CombPbPb2040StatErrCopy");
TGraphAsymmErrors* graphYieldPi0CombPbPb2040SysErrCopy = (TGraphAsymmErrors*) graphYieldPi0CombPbPb2040SysErr->Clone("graphYieldPi0CombPbPb2040SysErrCopy");
TGraphAsymmErrors* graphYieldPi0PCMPbPb2040StatErrCopy = (TGraphAsymmErrors*) graphYieldPi0PCMPbPb2040StatErr->Clone("graphYieldPi0PCMPbPb2040StatErrCopy");
TGraphAsymmErrors* graphYieldPi0PCMPbPb2040SysErrCopy = (TGraphAsymmErrors*) graphYieldPi0PCMPbPb2040SysErr->Clone("graphYieldPi0PCMPbPb2040SysErrCopy");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb2040StatErrCopy = (TGraphAsymmErrors*) graphYieldPi0PHOSPbPb2040StatErr->Clone("graphYieldPi0PHOSPbPb2040StatErrCopy");
TGraphAsymmErrors* graphYieldPi0PHOSPbPb2040SysErrCopy = (TGraphAsymmErrors*) graphYieldPi0PHOSPbPb2040SysErr->Clone("graphYieldPi0PHOSPbPb2040SysErrCopy");
TGraphErrors* graphYieldCombStatPi02040RebinnedHighPtComb = NULL;
TGraphErrors* graphYieldCombSysPi02040RebinnedHighPtComb = NULL;
TGraphErrors* graphChargedPionSpecHighPtStat2040HighPtComb = NULL;
TGraphErrors* graphChargedPionSpecHighPtSyst2040HighPtComb = NULL;
TGraphErrors* graphRatioHighPtChargedPionsComb2040 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0CombPbPb2040StatErrCopy, graphYieldPi0CombPbPb2040SysErrCopy,
histoChargedPionSpecHighPtStat2040, histoChargedPionSpecHighPtSyst2040,
kTRUE, kTRUE,
&graphYieldCombStatPi02040RebinnedHighPtComb, &graphYieldCombSysPi02040RebinnedHighPtComb,
&graphChargedPionSpecHighPtStat2040HighPtComb, &graphChargedPionSpecHighPtSyst2040HighPtComb);
graphRatioHighPtChargedPionsComb2040->Print();
TGraphErrors* graphYieldCombStatPi02040RebinnedLowPtComb = NULL;
TGraphErrors* graphYieldCombSysPi02040RebinnedLowPtComb = NULL;
TGraphErrors* graphChargedPionSpecLowPtStat2040LowPtComb = NULL;
TGraphErrors* graphChargedPionSpecLowPtSyst2040LowPtComb = NULL;
TGraphErrors* graphRatioLowPtChargedPionsComb2040 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0CombPbPb2040StatErrCopy, graphYieldPi0CombPbPb2040SysErrCopy,
histoChargedPionSpecLowPtStat2040, histoChargedPionSpecLowPtSyst2040,
kTRUE, kTRUE,
&graphYieldCombStatPi02040RebinnedLowPtComb, &graphYieldCombSysPi02040RebinnedLowPtComb,
&graphChargedPionSpecLowPtStat2040LowPtComb, &graphChargedPionSpecLowPtSyst2040LowPtComb);
graphRatioLowPtChargedPionsComb2040->Print();
TGraphErrors* graphYieldPCMStatPi02040RebinnedHighPtPCM = NULL;
TGraphErrors* graphYieldPCMSysPi02040RebinnedHighPtPCM = NULL;
TGraphErrors* graphChargedPionSpecHighPtStat2040HighPtPCM = NULL;
TGraphErrors* graphChargedPionSpecHighPtSyst2040HighPtPCM = NULL;
TGraphErrors* graphRatioHighPtChargedPionsPCM2040 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0PCMPbPb2040StatErrCopy, graphYieldPi0PCMPbPb2040SysErrCopy,
histoChargedPionSpecHighPtStat2040, histoChargedPionSpecHighPtSyst2040,
kTRUE, kTRUE,
&graphYieldPCMStatPi02040RebinnedHighPtPCM, &graphYieldPCMSysPi02040RebinnedHighPtPCM,
&graphChargedPionSpecHighPtStat2040HighPtPCM, &graphChargedPionSpecHighPtSyst2040HighPtPCM);
graphRatioHighPtChargedPionsPCM2040->Print();
TGraphErrors* graphYieldPCMStatPi02040RebinnedLowPtPCM = NULL;
TGraphErrors* graphYieldPCMSysPi02040RebinnedLowPtPCM = NULL;
TGraphErrors* graphChargedPionSpecLowPtStat2040LowPtPCM = NULL;
TGraphErrors* graphChargedPionSpecLowPtSyst2040LowPtPCM = NULL;
TGraphErrors* graphRatioLowPtChargedPionsPCM2040 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0PCMPbPb2040StatErrCopy, graphYieldPi0PCMPbPb2040SysErrCopy,
histoChargedPionSpecLowPtStat2040, histoChargedPionSpecLowPtSyst2040,
kTRUE, kTRUE,
&graphYieldPCMStatPi02040RebinnedLowPtPCM, &graphYieldPCMSysPi02040RebinnedLowPtPCM,
&graphChargedPionSpecLowPtStat2040LowPtPCM, &graphChargedPionSpecLowPtSyst2040LowPtPCM);
graphRatioLowPtChargedPionsPCM2040->Print();
graphYieldPi0PHOSPbPb2040StatErrCopy->RemovePoint(0);
graphYieldPi0PHOSPbPb2040SysErrCopy->RemovePoint(0);
TGraphErrors* graphYieldPHOSStatPi02040RebinnedHighPtPHOS = NULL;
TGraphErrors* graphYieldPHOSSysPi02040RebinnedHighPtPHOS = NULL;
TGraphErrors* graphChargedPionSpecHighPtStat2040HighPtPHOS = NULL;
TGraphErrors* graphChargedPionSpecHighPtSyst2040HighPtPHOS = NULL;
TGraphErrors* graphRatioHighPtChargedPionsPHOS2040 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0PHOSPbPb2040StatErrCopy, graphYieldPi0PHOSPbPb2040SysErrCopy,
histoChargedPionSpecHighPtStat2040, histoChargedPionSpecHighPtSyst2040,
kTRUE, kTRUE,
&graphYieldPHOSStatPi02040RebinnedHighPtPHOS, &graphYieldPHOSSysPi02040RebinnedHighPtPHOS,
&graphChargedPionSpecHighPtStat2040HighPtPHOS, &graphChargedPionSpecHighPtSyst2040HighPtPHOS);
graphRatioHighPtChargedPionsPHOS2040->Print();
TGraphErrors* graphYieldPHOSStatPi02040RebinnedLowPtPHOS = NULL;
TGraphErrors* graphYieldPHOSSysPi02040RebinnedLowPtPHOS = NULL;
TGraphErrors* graphChargedPionSpecLowPtStat2040LowPtPHOS = NULL;
TGraphErrors* graphChargedPionSpecLowPtSyst2040LowPtPHOS = NULL;
TGraphErrors* graphRatioLowPtChargedPionsPHOS2040 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0PHOSPbPb2040StatErrCopy, graphYieldPi0PHOSPbPb2040SysErrCopy,
histoChargedPionSpecLowPtStat2040, histoChargedPionSpecLowPtSyst2040,
kTRUE, kTRUE,
&graphYieldPHOSStatPi02040RebinnedLowPtPHOS, &graphYieldPHOSSysPi02040RebinnedLowPtPHOS,
&graphChargedPionSpecLowPtStat2040LowPtPHOS, &graphChargedPionSpecLowPtSyst2040LowPtPHOS);
graphRatioLowPtChargedPionsPHOS2040->Print();
TGraphErrors* graphYieldCombStatPi02040FullPtPtComb = NULL;
TGraphErrors* graphYieldCombSysPi02040FullPtPtComb = NULL;
TGraphErrors* graphChargedPionSpecFullPtStat2040FullPtComb = NULL;
TGraphErrors* graphChargedPionSpecFullPtSyst2040FullPtComb = NULL;
TGraphErrors* graphRatioFullPtChargedPionsComb2040 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0CombPbPb2040StatErrCopy, graphYieldPi0CombPbPb2040SysErrCopy,
histoChargedPionSpecFullPtStat2040, histoChargedPionSpecFullPtSyst2040,
kTRUE, kTRUE,
&graphYieldCombStatPi02040FullPtPtComb, &graphYieldCombSysPi02040FullPtPtComb,
&graphChargedPionSpecFullPtStat2040FullPtComb, &graphChargedPionSpecFullPtSyst2040FullPtComb);
graphRatioFullPtChargedPionsComb2040->Print();
TGraphErrors* graphYieldPCMStatPi02040FullPtPtPCM = NULL;
TGraphErrors* graphYieldPCMSysPi02040FullPtPtPCM = NULL;
TGraphErrors* graphChargedPionSpecFullPtStat2040FullPtPCM = NULL;
TGraphErrors* graphChargedPionSpecFullPtSyst2040FullPtPCM = NULL;
TGraphErrors* graphRatioFullPtChargedPionsPCM2040 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0PCMPbPb2040StatErrCopy, graphYieldPi0PCMPbPb2040SysErrCopy,
histoChargedPionSpecFullPtStat2040, histoChargedPionSpecFullPtSyst2040,
kTRUE, kTRUE,
&graphYieldPCMStatPi02040FullPtPtPCM, &graphYieldPCMSysPi02040FullPtPtPCM,
&graphChargedPionSpecFullPtStat2040FullPtPCM, &graphChargedPionSpecFullPtSyst2040FullPtPCM);
graphRatioFullPtChargedPionsPCM2040->Print();
graphYieldPi0PHOSPbPb2040StatErrCopy->RemovePoint(0);
graphYieldPi0PHOSPbPb2040SysErrCopy->RemovePoint(0);
TGraphErrors* graphYieldPHOSStatPi02040FullPtPtPHOS = NULL;
TGraphErrors* graphYieldPHOSSysPi02040FullPtPtPHOS = NULL;
TGraphErrors* graphChargedPionSpecFullPtStat2040FullPtPHOS = NULL;
TGraphErrors* graphChargedPionSpecFullPtSyst2040FullPtPHOS = NULL;
TGraphErrors* graphRatioFullPtChargedPionsPHOS2040 = CalculateRatioBetweenSpectraWithDifferentBinning(graphYieldPi0PHOSPbPb2040StatErrCopy, graphYieldPi0PHOSPbPb2040SysErrCopy,
histoChargedPionSpecFullPtStat2040, histoChargedPionSpecFullPtSyst2040,
kTRUE, kTRUE,
&graphYieldPHOSStatPi02040FullPtPtPHOS, &graphYieldPHOSSysPi02040FullPtPtPHOS,
&graphChargedPionSpecFullPtStat2040FullPtPHOS, &graphChargedPionSpecFullPtSyst2040FullPtPHOS);
graphRatioFullPtChargedPionsPHOS2040->Print();
cout << "*************************************************************************"<< endl;
cout << "*************************** Pi0 PbPb 2011 ******************************"<< endl;
cout << "*************************************************************************"<< endl;
TFile* fCombResultsLHC11h = new TFile(nameFilePbPbLHC11h.Data());
TDirectory* directoryUnshiftedSpectra = (TDirectory*)fCombResultsLHC11h->Get("UnshiftedSpectra");
//comb
TGraphAsymmErrors* graphYieldPi0CombPbPb0010LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0CombPbPb2760GeVStatErrNoShift_0010");
TGraphAsymmErrors* graphYieldPi0CombPbPb0010LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0CombPbPb2760GeVSysErrNoShift_0010");
TGraphAsymmErrors* graphYieldEtaCombPbPb0010LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaCombPbPb2760GeVStatErrNoShift_0010");
TGraphAsymmErrors* graphYieldEtaCombPbPb0010LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaCombPbPb2760GeVSysErrNoShift_0010");
TGraphAsymmErrors* graphYieldPi0CombPbPb2050LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0CombPbPb2760GeVStatErrNoShift_2050");
TGraphAsymmErrors* graphYieldPi0CombPbPb2050LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0CombPbPb2760GeVSysErrNoShift_2050");
TGraphAsymmErrors* graphYieldEtaCombPbPb2050LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaCombPbPb2760GeVStatErrNoShift_2050");
TGraphAsymmErrors* graphYieldEtaCombPbPb2050LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaCombPbPb2760GeVSysErrNoShift_2050");
//PCM
TGraphAsymmErrors* graphYieldPi0PCMPbPb0010LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0PCMPbPb2760GeVStatErrNoShift_0010");
TGraphAsymmErrors* graphYieldPi0PCMPbPb0010LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0PCMPbPb2760GeVSysErrNoShift_0010");
TGraphAsymmErrors* graphYieldPi0PCMPbPb2040LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0PCMPbPb2760GeVStatErrNoShift_2040");
TGraphAsymmErrors* graphYieldPi0PCMPbPb2040LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0PCMPbPb2760GeVSysErrNoShift_2040");
TGraphAsymmErrors* graphYieldPi0PCMPbPb2050LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0PCMPbPb2760GeVStatErrNoShift_2050");
TGraphAsymmErrors* graphYieldPi0PCMPbPb2050LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0PCMPbPb2760GeVSysErrNoShift_2050");
//PCM
TGraphAsymmErrors* graphYieldEtaPCMPbPb0010LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaPCMPbPb2760GeVStatErrNoShift_0010");
TGraphAsymmErrors* graphYieldEtaPCMPbPb0010LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaPCMPbPb2760GeVSysErrNoShift_0010");
// TGraphAsymmErrors* graphYieldEtaPCMPbPb2040LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaPCMPbPb2760GeVSysErrNoShift_2040");
// TGraphAsymmErrors* graphYieldEtaPCMPbPb2040LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaPCMPbPb2760GeVSysErrNoShift_2040");
TGraphAsymmErrors* graphYieldEtaPCMPbPb2050LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaPCMPbPb2760GeVStatErrNoShift_2050");
TGraphAsymmErrors* graphYieldEtaPCMPbPb2050LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaPCMPbPb2760GeVSysErrNoShift_2050");
//EMCal
TGraphAsymmErrors* graphYieldPi0EMCalPbPb0010LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0EMCalPbPb2760GeVStatErrNoShift_0010");
TGraphAsymmErrors* graphYieldPi0EMCalPbPb0010LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0EMCalPbPb2760GeVSysErrNoShift_0010");
TGraphAsymmErrors* graphYieldEtaEMCalPbPb0010LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaEMCalPbPb2760GeVStatErrNoShift_0010");
TGraphAsymmErrors* graphYieldEtaEMCalPbPb0010LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaEMCalPbPb2760GeVSysErrNoShift_0010");
TGraphAsymmErrors* graphYieldPi0EMCalPbPb2050LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0EMCalPbPb2760GeVStatErrNoShift_2050");
TGraphAsymmErrors* graphYieldPi0EMCalPbPb2050LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldPi0EMCalPbPb2760GeVSysErrNoShift_2050");
TGraphAsymmErrors* graphYieldEtaEMCalPbPb2050LHC11hStatErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaEMCalPbPb2760GeVStatErrNoShift_2050");
TGraphAsymmErrors* graphYieldEtaEMCalPbPb2050LHC11hSysErr = (TGraphAsymmErrors*)directoryUnshiftedSpectra->Get("graphInvYieldEtaEMCalPbPb2760GeVSysErrNoShift_2050");
TGraphErrors * a = NULL;
TGraphErrors * b = NULL;
TGraphErrors * c = NULL;
TGraphErrors * d = NULL;
cout << "*************************************************************************"<< endl;
cout << "************************** PbPb 0-10% LHC11h ***************************"<< endl;
cout << "*************************************************************************"<< endl;
TGraphAsymmErrors* graphYieldPi0CombPbPb0010LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldPi0CombPbPb0010LHC11hStatErr->Clone("graphYieldPi0CombPbPb0010LHC11hStatErrCopy");
TGraphAsymmErrors* graphYieldPi0CombPbPb0010LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldPi0CombPbPb0010LHC11hSysErr->Clone("graphYieldPi0CombPbPb0010LHC11hSysErrCopy");
TGraphAsymmErrors* graphYieldEtaCombPbPb0010LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldEtaCombPbPb0010LHC11hStatErr->Clone("graphYieldEtaCombPbPb0010LHC11hStatErrCopy");
TGraphAsymmErrors* graphYieldEtaCombPbPb0010LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldEtaCombPbPb0010LHC11hSysErr->Clone("graphYieldEtaCombPbPb0010LHC11hSysErrCopy");
TGraphAsymmErrors* graphYieldPi0CombPbPb2050LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldPi0CombPbPb2050LHC11hStatErr->Clone("graphYieldPi0CombPbPb2050LHC11hStatErrCopy");
TGraphAsymmErrors* graphYieldPi0CombPbPb2050LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldPi0CombPbPb2050LHC11hSysErr->Clone("graphYieldPi0CombPbPb2050LHC11hSysErrCopy");
TGraphAsymmErrors* graphYieldEtaCombPbPb2050LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldEtaCombPbPb2050LHC11hStatErr->Clone("graphYieldEtaCombPbPb2050LHC11hStatErrCopy");
TGraphAsymmErrors* graphYieldEtaCombPbPb2050LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldEtaCombPbPb2050LHC11hSysErr->Clone("graphYieldEtaCombPbPb2050LHC11hSysErrCopy");
TGraphAsymmErrors* graphYieldPi0PCMPbPb0010LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldPi0PCMPbPb0010LHC11hStatErr->Clone("graphYieldPi0PCMPbPb0010LHC11hStatErrCopy");
TGraphAsymmErrors* graphYieldPi0PCMPbPb0010LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldPi0PCMPbPb0010LHC11hSysErr->Clone("graphYieldPi0PCMPbPb0010LHC11hSysErrCopy");
TGraphAsymmErrors* graphYieldEtaPCMPbPb0010LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldEtaPCMPbPb0010LHC11hStatErr->Clone("graphYieldEtaPCMPbPb0010LHC11hStatErrCopy");
TGraphAsymmErrors* graphYieldEtaPCMPbPb0010LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldEtaPCMPbPb0010LHC11hSysErr->Clone("graphYieldEtaPCMPbPb0010LHC11hSysErrCopy");
TGraphAsymmErrors* graphYieldPi0PCMPbPb2040LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldPi0PCMPbPb2040LHC11hStatErr->Clone("graphYieldPi0PCMPbPb2040LHC11hStatErrCopy");
TGraphAsymmErrors* graphYieldPi0PCMPbPb2040LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldPi0PCMPbPb2040LHC11hSysErr->Clone("graphYieldPi0PCMPbPb2040LHC11hSysErrCopy");
// TGraphAsymmErrors* graphYieldEtaPCMPbPb2040LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldEtaPCMPbPb2040LHC11hStatErr->Clone("graphYieldEtaPCMPbPb2040LHC11hStatErrCopy");
// TGraphAsymmErrors* graphYieldEtaPCMPbPb2040LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldEtaPCMPbPb2040LHC11hSysErr->Clone("graphYieldEtaPCMPbPb2040LHC11hSysErrCopy");
TGraphAsymmErrors* graphYieldPi0PCMPbPb2050LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldPi0PCMPbPb2050LHC11hStatErr->Clone("graphYieldPi0PCMPbPb2050LHC11hStatErrCopy");
TGraphAsymmErrors* graphYieldPi0PCMPbPb2050LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldPi0PCMPbPb2050LHC11hSysErr->Clone("graphYieldPi0PCMPbPb2050LHC11hSysErrCopy");
TGraphAsymmErrors* graphYieldEtaPCMPbPb2050LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldEtaPCMPbPb2050LHC11hStatErr->Clone("graphYieldEtaPCMPbPb2050LHC11hStatErrCopy");
TGraphAsymmErrors* graphYieldEtaPCMPbPb2050LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldEtaPCMPbPb2050LHC11hSysErr->Clone("graphYieldEtaPCMPbPb2050LHC11hSysErrCopy");
TGraphAsymmErrors* graphYieldPi0EMCalPbPb0010LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldPi0EMCalPbPb0010LHC11hStatErr->Clone("graphYieldPi0EMCalPbPb0010LHC11hStatErrCopy");
TGraphAsymmErrors* graphYieldPi0EMCalPbPb0010LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldPi0EMCalPbPb0010LHC11hSysErr->Clone("graphYieldPi0EMCalPbPb0010LHC11hSysErrCopy");
TGraphAsymmErrors* graphYieldEtaEMCalPbPb0010LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldEtaEMCalPbPb0010LHC11hStatErr->Clone("graphYieldEtaEMCalPbPb0010LHC11hStatErrCopy");
TGraphAsymmErrors* graphYieldEtaEMCalPbPb0010LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldEtaEMCalPbPb0010LHC11hSysErr->Clone("graphYieldEtaEMCalPbPb0010LHC11hSysErrCopy");
TGraphAsymmErrors* graphYieldPi0EMCalPbPb2050LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldPi0EMCalPbPb2050LHC11hStatErr->Clone("graphYieldPi0EMCalPbPb2050LHC11hStatErrCopy");
TGraphAsymmErrors* graphYieldPi0EMCalPbPb2050LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldPi0EMCalPbPb2050LHC11hSysErr->Clone("graphYieldPi0EMCalPbPb2050LHC11hSysErrCopy");
TGraphAsymmErrors* graphYieldEtaEMCalPbPb2050LHC11hStatErrCopy = (TGraphAsymmErrors*) graphYieldEtaEMCalPbPb2050LHC11hStatErr->Clone("graphYieldEtaEMCalPbPb2050LHC11hStatErrCopy");
TGraphAsymmErrors* graphYieldEtaEMCalPbPb2050LHC11hSysErrCopy = (TGraphAsymmErrors*) graphYieldEtaEMCalPbPb2050LHC11hSysErr->Clone("graphYieldEtaEMCalPbPb2050LHC11hSysErrCopy");
TGraphErrors* graphRatioHighPtChargedPionsComb0010LHC11h = CalculateRatioBetweenSpectraWithDifferentBinning(
graphYieldPi0CombPbPb0010LHC11hStatErrCopy, graphYieldPi0CombPbPb0010LHC11hSysErrCopy,
histoChargedPionSpecHighPtStat0010, histoChargedPionSpecHighPtSyst0010,
kTRUE, kTRUE,
&graphYieldCombStatPi00010LHC11hRebinnedHighPtComb, &graphYieldCombSysPi00010LHC11hRebinnedHighPtComb,
&graphChargedPionSpecHighPtStat0010LHC11hHighPtComb, &graphChargedPionSpecHighPtSyst0010LHC11hHighPtComb);
// graphRatioHighPtChargedPionsComb0010LHC11h->Print();
TGraphErrors* graphRatioLowPtChargedPionsComb0010LHC11h = CalculateRatioBetweenSpectraWithDifferentBinning(
graphYieldPi0CombPbPb0010LHC11hStatErrCopy, graphYieldPi0CombPbPb0010LHC11hSysErrCopy,
histoChargedPionSpecLowPtStat0010, histoChargedPionSpecLowPtSyst0010,
kTRUE, kTRUE,
&graphYieldCombStatPi00010LHC11hRebinnedLowPtComb, &graphYieldCombSysPi00010LHC11hRebinnedLowPtComb,
&graphChargedPionSpecLowPtStat0010LHC11hLowPtComb, &graphChargedPionSpecLowPtSyst0010LHC11hLowPtComb);
// graphRatioLowPtChargedPionsComb0010LHC11h->Print();
TGraphErrors* graphRatioHighPtChargedPionsPCM0010LHC11h = CalculateRatioBetweenSpectraWithDifferentBinning(
graphYieldPi0PCMPbPb0010LHC11hStatErrCopy, graphYieldPi0PCMPbPb0010LHC11hSysErrCopy,
histoChargedPionSpecHighPtStat0010, histoChargedPionSpecHighPtSyst0010,
kTRUE, kTRUE,
&graphYieldPCMStatPi00010LHC11hRebinnedHighPtPCM, &graphYieldPCMSysPi00010LHC11hRebinnedHighPtPCM,
&graphChargedPionSpecHighPtStat0010LHC11hHighPtPCM, &graphChargedPionSpecHighPtSyst0010LHC11hHighPtPCM);
// graphRatioHighPtChargedPionsPCM0010LHC11h->Print();
TGraphErrors* graphRatioLowPtChargedPionsPCM0010LHC11h = CalculateRatioBetweenSpectraWithDifferentBinning(
graphYieldPi0PCMPbPb0010LHC11hStatErrCopy, graphYieldPi0PCMPbPb0010LHC11hSysErrCopy,
histoChargedPionSpecLowPtStat0010, histoChargedPionSpecLowPtSyst0010,
kTRUE, kTRUE,
&graphYieldPCMStatPi00010LHC11hRebinnedLowPtPCM, &graphYieldPCMSysPi00010LHC11hRebinnedLowPtPCM,
&graphChargedPionSpecLowPtStat0010LHC11hLowPtPCM, &graphChargedPionSpecLowPtSyst0010LHC11hLowPtPCM);
// graphRatioLowPtChargedPionsPCM0010LHC11h->Print();
TGraphErrors* graphRatioHighPtChargedPionsPCM2040LHC11h = CalculateRatioBetweenSpectraWithDifferentBinning(
graphYieldPi0PCMPbPb2040LHC11hStatErrCopy, graphYieldPi0PCMPbPb2040LHC11hSysErrCopy,
histoChargedPionSpecHighPtStat2040, histoChargedPionSpecHighPtSyst2040,
kTRUE, kTRUE,
&graphYieldPCMStatPi02040LHC11hRebinnedHighPtPCM, &graphYieldPCMSysPi02040LHC11hRebinnedHighPtPCM,
&graphChargedPionSpecHighPtStat2040LHC11hHighPtPCM, &graphChargedPionSpecHighPtSyst2040LHC11hHighPtPCM);
graphRatioHighPtChargedPionsPCM2040LHC11h->Print();
TGraphErrors* graphRatioLowPtChargedPionsPCM2040LHC11h = CalculateRatioBetweenSpectraWithDifferentBinning(
graphYieldPi0PCMPbPb2040LHC11hStatErrCopy, graphYieldPi0PCMPbPb2040LHC11hSysErrCopy,
histoChargedPionSpecLowPtStat2040, histoChargedPionSpecLowPtSyst2040,
kTRUE, kTRUE,
&graphYieldPCMStatPi02040LHC11hRebinnedLowPtPCM, &graphYieldPCMSysPi02040LHC11hRebinnedLowPtPCM,
&graphChargedPionSpecLowPtStat2040LHC11hLowPtPCM, &graphChargedPionSpecLowPtSyst2040LHC11hLowPtPCM);
graphRatioLowPtChargedPionsPCM2040LHC11h->Print();
TGraphErrors* graphRatioHighPtChargedPionsEMCal0010LHC11h = CalculateRatioBetweenSpectraWithDifferentBinning(
graphYieldPi0EMCalPbPb0010LHC11hStatErrCopy, graphYieldPi0EMCalPbPb0010LHC11hSysErrCopy,
histoChargedPionSpecHighPtStat0010, histoChargedPionSpecHighPtSyst0010,
kTRUE, kTRUE,
&graphYieldEMCalStatPi00010LHC11hRebinnedHighPtEMCal, &graphYieldEMCalSysPi00010LHC11hRebinnedHighPtEMCal,
&graphChargedPionSpecHighPtStat0010LHC11hHighPtEMCal, &graphChargedPionSpecHighPtSyst0010LHC11hHighPtEMCal);
// graphRatioHighPtChargedPionsEMCal0010LHC11h->Print();
TGraphErrors* graphRatioFullPtChargedPionsComb0010LHC11h = CalculateRatioBetweenSpectraWithDifferentBinning(
graphYieldPi0CombPbPb0010LHC11hStatErrCopy, graphYieldPi0CombPbPb0010LHC11hSysErrCopy,
histoChargedPionSpecFullPtStat0010, histoChargedPionSpecFullPtSyst0010,