-
Notifications
You must be signed in to change notification settings - Fork 0
/
CombineMesonMeasurementsPbPbVer2.C
6658 lines (5543 loc) · 447 KB
/
CombineMesonMeasurementsPbPbVer2.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 "CombineMesonMeasurementsPbPbVer2.h"
extern TRandom* gRandom;
extern TBenchmark* gBenchmark;
extern TSystem* gSystem;
extern TMinuit* gMinuit;
void CombineMesonMeasurementsPbPbVer2(TString fileNameConversionPbPb = "", TString fileNameCombPP2760GeV = "", TString suffix = "eps", TString conferencePlots ="", TString bWCorrection="X"){
date = ReturnDateString();
gROOT->Reset();
gROOT->SetStyle("Plain");
StyleSettingsThesis();
SetPlotStyle();
//******************************** Declaration of files *****************************************
collisionSystemPP = "pp #sqrt{#it{s}} = 2.76 TeV";
collisionSystemPbPb = "Pb-Pb #sqrt{#it{s}_{_{NN}}} = 2.76 TeV";
collisionSystemCent0005 = "0-5% Pb-Pb #sqrt{#it{s}_{_{NN}}} = 2.76 TeV";
TString collisionSystemCent0005Legend = " 0- 5% Pb-Pb #sqrt{#it{s}_{_{NN}}} = 2.76 TeV";
collisionSystemCent0510 = "5-10% Pb-Pb #sqrt{#it{s}_{_{NN}}} = 2.76 TeV";
TString collisionSystemCent0510Legend = " 5-10% Pb-Pb #sqrt{#it{s}_{_{NN}}} = 2.76 TeV";
collisionSystemCent1020 = "10-20% Pb-Pb #sqrt{#it{s}_{_{NN}}} = 2.76 TeV";
collisionSystemCent0020 = "0-20% Pb-Pb #sqrt{#it{s}_{_{NN}}} = 2.76 TeV";
collisionSystemCent2040 = "20-40% Pb-Pb #sqrt{#it{s}_{_{NN}}} = 2.76 TeV";
collisionSystemCent4060 = "40-60% Pb-Pb #sqrt{#it{s}_{_{NN}}} = 2.76 TeV";
collisionSystemCent6080 = "60-80% Pb-Pb #sqrt{#it{s}_{_{NN}}} = 2.76 TeV";
fileNameCaloPHOSPbPb = "ExternalInputPbPb/PHOS/LHC10h_PHOS_pi0_PbPb_06022014.root";
fileNameCaloPHOSPP = "ExternalInput/PHOS/2.76TeV/LHC11a_PHOS_pi0_pp2760_noBWCorr_FDcorr_20131112_v2.root";
cout << fileNameCaloPHOSPbPb << endl;
fileNameCaloEMCALPbPb = "ExternalInputPbPb/EMCAL/EMCALResults_PbPb.root";
fileNameTheoryInput = "ExternalInputPbPb/Theory/TheoryCompilationPbPb.root";
fileNameDataOtherEnergyInput = "ExternalInputPbPb/OtherExperiments/DataCompilationFromOtherEnergiesPbPb.root";
fileNamePCMPP2760GeV = "data_PCMResultsFullCorrection_PP_NoBinShifting_4_Aug_2013.root";
TString dateForOutput = ReturnDateStringForOutput();
TString outputDir = Form("%s/%s/CombineMesonMeasurementsPbPb%s",suffix.Data(),dateForOutput.Data(),bWCorrection.Data());
nameFinalResDat = Form("%s/CombinedResultsPbPb%s_FitResults.dat",outputDir.Data(),bWCorrection.Data());
gSystem->Exec("mkdir -p "+outputDir);
gSystem->Exec(Form("cp %s %s/InputPCMPbPb.root", fileNameConversionPbPb.Data(), outputDir.Data()));
gSystem->Exec(Form("cp %s %s/InputPCMPP.root", fileNamePCMPP2760GeV.Data(), outputDir.Data()));
gSystem->Exec(Form("cp %s %s/InputCombPP.root", fileNameCombPP2760GeV.Data(), outputDir.Data()));
gSystem->Exec(Form("cp %s %s/InputPHOSPbPb.root", fileNameCaloPHOSPbPb.Data(), outputDir.Data()));
gSystem->Exec(Form("cp %s %s/InputPHOSPP.root", fileNameCaloPHOSPP.Data(), outputDir.Data()));
TString nameHistoConv = "CorrectedYieldPi0";
TString nameGraphConv = "Pi0SystError";
TString namePPComb;
TString namePPCombSys;
fileFinalResultsPP = new TFile(fileNameCombPP2760GeV);
graphInvSectionCombStatPi02760GeVPlot = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0Comb2760GeVStatErr");
graphInvSectionCombStatPi02760GeVPlot = ScaleGraph(graphInvSectionCombStatPi02760GeVPlot,1./xSection2769GeVppINEL);
graphInvSectionCombStatPi02760GeVPlot->RemovePoint(graphInvSectionCombStatPi02760GeVPlot->GetN()-1);
graphInvSectionCombSysPi02760GeVPlot = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0Comb2760GeVSysErr");
graphInvSectionCombSysPi02760GeVPlot = ScaleGraph(graphInvSectionCombSysPi02760GeVPlot,1./xSection2769GeVppINEL);
graphInvSectionCombSysPi02760GeVPlot->RemovePoint(graphInvSectionCombSysPi02760GeVPlot->GetN()-1);
graphInvSectionPCMStatPi02760GeVPlot = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0PCM2760GeVStatErr");
graphInvSectionPCMStatPi02760GeVPlot = ScaleGraph(graphInvSectionPCMStatPi02760GeVPlot,1./xSection2769GeVppINEL);
graphInvSectionPCMSysPi02760GeVPlot = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0PCM2760GeVSysErr");
graphInvSectionPCMSysPi02760GeVPlot = ScaleGraph(graphInvSectionPCMSysPi02760GeVPlot,1./xSection2769GeVppINEL);
graphInvSectionPHOSStatPi02760GeVPlot = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0PHOS2760GeVStatErr");
graphInvSectionPHOSStatPi02760GeVPlot = ScaleGraph(graphInvSectionPHOSStatPi02760GeVPlot,1./xSection2769GeVppINEL);
graphInvSectionPHOSSysPi02760GeVPlot = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0PHOS2760GeVSysErr");
graphInvSectionPHOSSysPi02760GeVPlot = ScaleGraph(graphInvSectionPHOSSysPi02760GeVPlot,1./xSection2769GeVppINEL);
graphInvSectionCombStatPi02760GeV = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0Comb2760GeVStatErr_YShifted");
graphInvSectionCombStatPi02760GeV = ScaleGraph(graphInvSectionCombStatPi02760GeV,1./xSection2769GeVppINEL);
graphInvSectionCombStatPi02760GeV->RemovePoint(graphInvSectionCombStatPi02760GeV->GetN()-1);
graphInvSectionCombSysPi02760GeV = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0Comb2760GeVSysErr_YShifted");
graphInvSectionCombSysPi02760GeV = ScaleGraph(graphInvSectionCombSysPi02760GeV,1./xSection2769GeVppINEL);
graphInvSectionCombSysPi02760GeV->RemovePoint(graphInvSectionCombStatPi02760GeV->GetN()-1);
graphInvSectionPHOSSysPi02760GeV = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0PHOSSysForRAA2760GeV_YShifted");
graphInvSectionPHOSSysPi02760GeV = ScaleGraph(graphInvSectionPHOSSysPi02760GeV,1./xSection2769GeVppINEL);
graphInvSectionPHOSStatPi02760GeV = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0PHOSStat2760GeV_YShifted");
graphInvSectionPHOSStatPi02760GeV = ScaleGraph(graphInvSectionPHOSStatPi02760GeV,1./xSection2769GeVppINEL);
graphInvSectionCombPi02760GeV = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0Comb2760GeV_YShifted");
graphInvSectionCombPi02760GeV = ScaleGraph(graphInvSectionCombPi02760GeV,1./xSection2769GeVppINEL);
TGraphAsymmErrors* graphInvSectionCombPi02760GeVOnlyStat = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0Comb2760GeVStatErr_YShifted");
graphInvSectionCombPi02760GeVOnlyStat = ScaleGraph(graphInvSectionCombPi02760GeVOnlyStat,1./xSection2769GeVppINEL);
graphInvSectionPCMSysPi02760GeV = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0PCMSysForRAA2760GeV_YShifted");
graphInvSectionPCMSysPi02760GeV = ScaleGraph(graphInvSectionPCMSysPi02760GeV,1./xSection2769GeVppINEL);
graphInvSectionPCMStatPi02760GeV = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphInvCrossSectionPi0PCMStat2760GeV_YShifted");
graphInvSectionPCMStatPi02760GeV = ScaleGraph(graphInvSectionPCMStatPi02760GeV,1./xSection2769GeVppINEL);
TGraphAsymmErrors* graphRatioCombCombFit2760GeVSys = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphRatioCombCombFit2760GeVSys");
TGraphAsymmErrors* graphRatioCombCombFit2760GeVStat = (TGraphAsymmErrors*)fileFinalResultsPP->Get("graphRatioCombCombFit2760GeVStat");
TGraph* graphRatioCombNLOPi02760GeVMuHalf = (TGraph*)fileFinalResultsPP->Get("graphRatioCombNLOPi02760GeVMuHalf");
TGraph* graphRatioCombNLOPi02760GeVMuOne = (TGraph*)fileFinalResultsPP->Get("graphRatioCombNLOPi02760GeVMuOne");
TGraph* graphRatioCombNLOPi02760GeVMuTwo = (TGraph*)fileFinalResultsPP->Get("graphRatioCombNLOPi02760GeVMuTwo");
TH1F* histoRatioPythia8ToFit2760GeV = (TH1F*)fileFinalResultsPP->Get("histoRatioPythia8ToFit2760GeV");
graphInvSectionPCMStatPi02760GeVRed = new TGraphAsymmErrors(17);
graphInvSectionPCMSysPi02760GeVRed = new TGraphAsymmErrors(17);
Double_t* xValPCMStat = graphInvSectionPCMStatPi02760GeV->GetX();
Double_t* yValPCMStat = graphInvSectionPCMStatPi02760GeV->GetY();
for (Int_t i = 0; i < 17; i++){
graphInvSectionPCMStatPi02760GeVRed->SetPoint(i,xValPCMStat[i], yValPCMStat[i]);
graphInvSectionPCMStatPi02760GeVRed->SetPointError(i, graphInvSectionPCMStatPi02760GeV->GetErrorXlow(i),graphInvSectionPCMStatPi02760GeV->GetErrorXhigh(i), graphInvSectionPCMStatPi02760GeV->GetErrorYlow(i), graphInvSectionPCMStatPi02760GeV->GetErrorYhigh(i));
graphInvSectionPCMSysPi02760GeVRed->SetPoint(i,xValPCMStat[i], yValPCMStat[i]);
graphInvSectionPCMSysPi02760GeVRed->SetPointError(i, graphInvSectionPCMSysPi02760GeV->GetErrorXlow(i),graphInvSectionPCMSysPi02760GeV->GetErrorXhigh(i), graphInvSectionPCMSysPi02760GeV->GetErrorYlow(i), graphInvSectionPCMSysPi02760GeV->GetErrorYhigh(i));
cout << "PCM: \t" << i << "\t" << xValPCMStat[i] << "\t" << yValPCMStat[i] << endl;
}
graphInvSectionPHOSStatPi02760GeVRed = new TGraphAsymmErrors(17);
graphInvSectionPHOSSysPi02760GeVRed = new TGraphAsymmErrors(17);
Double_t* xValPHOSStat = graphInvSectionPHOSStatPi02760GeV->GetX();
Double_t* yValPHOSStat = graphInvSectionPHOSStatPi02760GeV->GetY();
// graphInvSectionPHOSStatPi02760GeV->Print();
graphInvSectionPHOSSysPi02760GeV->RemovePoint(0);
// graphInvSectionPHOSSysPi02760GeV->Print();
Int_t nOffsetPhosPP = 0;
for (Int_t i = 0; i < 17; i++){
graphInvSectionPHOSStatPi02760GeVRed->SetPoint(i,xValPHOSStat[i+nOffsetPhosPP], yValPHOSStat[i+nOffsetPhosPP]);
graphInvSectionPHOSStatPi02760GeVRed->SetPointError(i, graphInvSectionPHOSStatPi02760GeV->GetErrorXlow(i+nOffsetPhosPP),graphInvSectionPHOSStatPi02760GeV->GetErrorXhigh(i+nOffsetPhosPP), graphInvSectionPHOSStatPi02760GeV->GetErrorYlow(i+nOffsetPhosPP), graphInvSectionPHOSStatPi02760GeV->GetErrorYhigh(i+nOffsetPhosPP));
graphInvSectionPHOSSysPi02760GeVRed->SetPoint(i,xValPHOSStat[i+nOffsetPhosPP], yValPHOSStat[i+nOffsetPhosPP]);
graphInvSectionPHOSSysPi02760GeVRed->SetPointError(i, graphInvSectionPHOSSysPi02760GeV->GetErrorXlow(i+nOffsetPhosPP),graphInvSectionPHOSSysPi02760GeV->GetErrorXhigh(i+nOffsetPhosPP), graphInvSectionPHOSSysPi02760GeV->GetErrorYlow(i+nOffsetPhosPP), graphInvSectionPHOSSysPi02760GeV->GetErrorYhigh(i+nOffsetPhosPP));
cout << "PHOS: \t" << i << "\t" << xValPHOSStat[i+nOffsetPhosPP] << "\t" << yValPHOSStat[i+nOffsetPhosPP] << "\t" << graphInvSectionPHOSSysPi02760GeV->GetErrorYlow(i+nOffsetPhosPP)<< endl;
}
filePCMPP = new TFile(fileNamePCMPP2760GeV);
directoryPi0PP = (TDirectory*)filePCMPP->Get("Pi02.76TeV");
histoPCMMassDataPP = (TH1D*)directoryPi0PP->Get("MassPi0");
histoPCMWidthDataPP = (TH1D*)directoryPi0PP->Get("FWHMPi0MeV");
histoPCMMassMCPP = (TH1D*)directoryPi0PP->Get("TrueMassPi0");
histoPCMWidthMCPP = (TH1D*)directoryPi0PP->Get("TrueFWHMPi0MeV");
histoPCMMassDataPP->Scale(1000.);
histoPCMMassMCPP->Scale(1000.);
histoPCMMassDataPP->SetBinContent(histoPCMMassDataPP->GetNbinsX(),0);
histoPCMMassMCPP->SetBinContent(histoPCMMassMCPP->GetNbinsX(),0);
histoPCMWidthDataPP->SetBinContent(histoPCMWidthDataPP->GetNbinsX(),10000.);
histoPCMWidthMCPP->SetBinContent(histoPCMWidthMCPP->GetNbinsX(),10000.);
minPtForFits = 0.4;
if(conferencePlots.CompareTo("conference") == 0){
conference = kTRUE;
}
fstream fileFinalResultsFits;
fileFinalResultsFits.open(nameFinalResDat.Data(), ios::out);
//declaration for printing logo
prefix2 = "data";
pictDrawingOptions[1] = kFALSE;
mesonMassExpectPi0 = TDatabasePDG::Instance()->GetParticle(111)->Mass();
cout << mesonMassExpectPi0 << endl;
//************************** Read data for conversions **************************************************
// File definitions
filePCMPbPb = new TFile(fileNameConversionPbPb.Data());
directoryPi0PbPb0005 = (TDirectory*)filePCMPbPb->Get("Pi0_PbPb_2.76TeV_0-5%");
cout << "PCM: 0-5%" << endl;
histoNumberOfEvents0005= (TH1D*)filePCMPbPb->Get("histoNumberOfEventsPbPb_2.76TeV0-5%");
histoYieldPbPb0005 = (TH1D*)directoryPi0PbPb0005->Get(nameHistoConv.Data());
graphPCMYieldPi0SysErrPbPb0005= (TGraphAsymmErrors*)directoryPi0PbPb0005->Get(nameGraphConv.Data());
graphPCMYieldPi0SysErrRAAPbPb0005= (TGraphAsymmErrors*)directoryPi0PbPb0005->Get("Pi0SystErrorA");
histoPCMMassData0005 = (TH1D*)directoryPi0PbPb0005->Get("MassPi0");
histoPCMMassMC0005 = (TH1D*)directoryPi0PbPb0005->Get("TrueMassPi0");
histoPCMWidthData0005 = (TH1D*)directoryPi0PbPb0005->Get("FWHMPi0MeV");
histoPCMWidthMC0005 = (TH1D*)directoryPi0PbPb0005->Get("TrueFWHMPi0MeV");
histoPCMMassData0005->Scale(1000.);
histoPCMMassMC0005->Scale(1000.);
histoPCMMassData0005->SetBinContent(histoPCMMassData0005->GetNbinsX(),0);
histoPCMMassData0005->SetBinContent(histoPCMMassData0005->GetNbinsX()-1,0);
histoPCMMassMC0005->SetBinContent(histoPCMMassMC0005->GetNbinsX(),0);
histoPCMMassMC0005->SetBinContent(histoPCMMassMC0005->GetNbinsX()-1,0);
histoPCMWidthData0005->SetBinContent(histoPCMWidthData0005->GetNbinsX(),10000.);
histoPCMWidthData0005->SetBinContent(histoPCMWidthData0005->GetNbinsX()-1,10000.);
histoPCMWidthMC0005->SetBinContent(histoPCMWidthMC0005->GetNbinsX(),10000.);
histoPCMWidthMC0005->SetBinContent(histoPCMWidthMC0005->GetNbinsX()-1,10000.);
for (Int_t i = 0; i < histoPCMMassData0005->GetXaxis()->FindBin(0.6); i++){
histoPCMMassData0005->SetBinContent(i,0);
histoPCMMassMC0005->SetBinContent(i,0);
histoPCMWidthData0005->SetBinContent(i,10000.);
histoPCMWidthMC0005->SetBinContent(i,10000.);
}
nEvent0005 = histoNumberOfEvents0005->GetBinContent(1);
graphPCMYieldPi0SysErrPbPb0005Red = new TGraphAsymmErrors(17);
graphPCMYieldPi0SysErrRAAPbPb0005Red = new TGraphAsymmErrors(17);
Double_t* xValPCMStat0005 = graphPCMYieldPi0SysErrPbPb0005->GetX();
Double_t* yValPCMStat0005 = graphPCMYieldPi0SysErrPbPb0005->GetY();
for (Int_t i = 0; i < 17; i++){
graphPCMYieldPi0SysErrPbPb0005Red->SetPoint(i,xValPCMStat0005[i], yValPCMStat0005[i]);
graphPCMYieldPi0SysErrPbPb0005Red->SetPointError(i, graphPCMYieldPi0SysErrPbPb0005->GetErrorXlow(i),graphPCMYieldPi0SysErrPbPb0005->GetErrorXhigh(i), graphPCMYieldPi0SysErrPbPb0005->GetErrorYlow(i), graphPCMYieldPi0SysErrPbPb0005->GetErrorYhigh(i));
graphPCMYieldPi0SysErrRAAPbPb0005Red->SetPoint(i,xValPCMStat0005[i], yValPCMStat0005[i]);
graphPCMYieldPi0SysErrRAAPbPb0005Red->SetPointError(i, graphPCMYieldPi0SysErrRAAPbPb0005->GetErrorXlow(i),graphPCMYieldPi0SysErrRAAPbPb0005->GetErrorXhigh(i), graphPCMYieldPi0SysErrRAAPbPb0005->GetErrorYlow(i), graphPCMYieldPi0SysErrRAAPbPb0005->GetErrorYhigh(i));
}
graphPCMYieldPi0SysErrPbPb0005Red->SetPoint(0,0.5, 0);
graphPCMYieldPi0SysErrRAAPbPb0005Red->SetPoint(0,0.5, 0);
histoYieldPbPb0005Red = new TH1D("histoYieldPbPb0005Red","",18,fBinsPi0HIPtPCM);
for (Int_t i =1; i < 19; i++){
cout << i<< "\t"<<histoYieldPbPb0005->GetBinCenter(i)<< "\t"<<histoYieldPbPb0005->GetBinContent(i) << endl;
histoYieldPbPb0005Red->SetBinContent(i,histoYieldPbPb0005->GetBinContent(i));
histoYieldPbPb0005Red->SetBinError(i,histoYieldPbPb0005->GetBinError(i));
}
histoYieldPbPb0005Red->SetBinContent(1,0);
histoYieldPbPb0005Red->SetBinContent(2,0);
nPointsPi00005 = graphPCMYieldPi0SysErrPbPb0005Red->GetN();
directoryPi0PbPb0010 = (TDirectory*)filePCMPbPb->Get("Pi0_PbPb_2.76TeV_0-10%");
cout << "PCM: 0-10%" << endl;
histoNumberOfEvents0010= (TH1D*)filePCMPbPb->Get("histoNumberOfEventsPbPb_2.76TeV0-10%");
histoYieldPbPb0010 = (TH1D*)directoryPi0PbPb0010->Get(nameHistoConv.Data());
graphPCMYieldPi0SysErrPbPb0010= (TGraphAsymmErrors*)directoryPi0PbPb0010->Get(nameGraphConv.Data());
graphPCMYieldPi0SysErrRAAPbPb0010= (TGraphAsymmErrors*)directoryPi0PbPb0010->Get("Pi0SystErrorA");
histoPCMMassData0010 = (TH1D*)directoryPi0PbPb0010->Get("MassPi0");
histoPCMMassMC0010 = (TH1D*)directoryPi0PbPb0010->Get("TrueMassPi0");
histoPCMWidthData0010 = (TH1D*)directoryPi0PbPb0010->Get("FWHMPi0MeV");
histoPCMWidthMC0010 = (TH1D*)directoryPi0PbPb0010->Get("TrueFWHMPi0MeV");
histoPCMMassData0010->Scale(1000.);
histoPCMMassMC0010->Scale(1000.);
for (Int_t i = 0; i < histoPCMMassMC0010->GetXaxis()->FindBin(0.6); i++){
histoPCMMassData0010->SetBinContent(i,0);
histoPCMMassMC0010->SetBinContent(i,0);
histoPCMWidthData0010->SetBinContent(i,10000.);
histoPCMWidthMC0010->SetBinContent(i,10000.);
}
histoPCMMassData0010->SetBinContent(histoPCMMassData0010->GetNbinsX(),0);
histoPCMMassData0010->SetBinContent(histoPCMMassData0010->GetNbinsX()-1,0);
histoPCMMassMC0010->SetBinContent(histoPCMMassMC0010->GetNbinsX(),0);
histoPCMMassMC0010->SetBinContent(histoPCMMassMC0010->GetNbinsX()-1,0);
histoPCMWidthData0010->SetBinContent(histoPCMWidthData0010->GetNbinsX(),10000.);
histoPCMWidthData0010->SetBinContent(histoPCMWidthData0010->GetNbinsX()-1,10000.);
histoPCMWidthMC0010->SetBinContent(histoPCMWidthMC0010->GetNbinsX(),10000.);
histoPCMWidthMC0010->SetBinContent(histoPCMWidthMC0010->GetNbinsX()-1,10000.);
nEvent0010 = histoNumberOfEvents0010->GetBinContent(1);
graphPCMYieldPi0SysErrPbPb0010Red = new TGraphAsymmErrors(17);
graphPCMYieldPi0SysErrRAAPbPb0010Red = new TGraphAsymmErrors(17);
Double_t* xValPCMStat0010 = graphPCMYieldPi0SysErrPbPb0010->GetX();
Double_t* yValPCMStat0010 = graphPCMYieldPi0SysErrPbPb0010->GetY();
for (Int_t i = 0; i < 17; i++){
graphPCMYieldPi0SysErrPbPb0010Red->SetPoint(i,xValPCMStat0010[i], yValPCMStat0010[i]);
graphPCMYieldPi0SysErrPbPb0010Red->SetPointError(i, graphPCMYieldPi0SysErrPbPb0010->GetErrorXlow(i),graphPCMYieldPi0SysErrPbPb0010->GetErrorXhigh(i), graphPCMYieldPi0SysErrPbPb0010->GetErrorYlow(i), graphPCMYieldPi0SysErrPbPb0010->GetErrorYhigh(i));
graphPCMYieldPi0SysErrRAAPbPb0010Red->SetPoint(i,xValPCMStat0010[i], yValPCMStat0010[i]);
graphPCMYieldPi0SysErrRAAPbPb0010Red->SetPointError(i, graphPCMYieldPi0SysErrRAAPbPb0010->GetErrorXlow(i),graphPCMYieldPi0SysErrRAAPbPb0010->GetErrorXhigh(i), graphPCMYieldPi0SysErrRAAPbPb0010->GetErrorYlow(i), graphPCMYieldPi0SysErrRAAPbPb0010->GetErrorYhigh(i));
}
graphPCMYieldPi0SysErrPbPb0010Red->SetPoint(0,0.5, 0);
graphPCMYieldPi0SysErrRAAPbPb0010Red->SetPoint(0,0.5, 0);
histoYieldPbPb0010Red = new TH1D("histoYieldPbPb0010Red","",18,fBinsPi0HIPtPCM);
for (Int_t i =1; i < 19; i++){
histoYieldPbPb0010Red->SetBinContent(i,histoYieldPbPb0010->GetBinContent(i));
histoYieldPbPb0010Red->SetBinError(i,histoYieldPbPb0010->GetBinError(i));
}
histoYieldPbPb0010Red->SetBinContent(1,0);
histoYieldPbPb0010Red->SetBinContent(2,0);
nPointsPi00010 = graphPCMYieldPi0SysErrPbPb0010Red->GetN();
cout << "PCM: 5-10%" << endl;
directoryPi0PbPb0510 = (TDirectory*)filePCMPbPb->Get("Pi0_PbPb_2.76TeV_5-10%");
histoNumberOfEvents0510= (TH1D*)filePCMPbPb->Get("histoNumberOfEventsPbPb_2.76TeV5-10%");
histoYieldPbPb0510 = (TH1D*)directoryPi0PbPb0510->Get(nameHistoConv.Data());
graphPCMYieldPi0SysErrPbPb0510= (TGraphAsymmErrors*)directoryPi0PbPb0510->Get(nameGraphConv.Data());
graphPCMYieldPi0SysErrRAAPbPb0510= (TGraphAsymmErrors*)directoryPi0PbPb0510->Get("Pi0SystErrorA");
histoPCMMassData0510 = (TH1D*)directoryPi0PbPb0510->Get("MassPi0");
histoPCMMassMC0510 = (TH1D*)directoryPi0PbPb0510->Get("TrueMassPi0");
histoPCMWidthData0510 = (TH1D*)directoryPi0PbPb0510->Get("FWHMPi0MeV");
histoPCMWidthMC0510 = (TH1D*)directoryPi0PbPb0510->Get("TrueFWHMPi0MeV");
histoPCMMassData0510->Scale(1000.);
histoPCMMassMC0510->Scale(1000.);
histoPCMMassData0510->SetBinContent(histoPCMMassData0510->GetNbinsX(),0);
histoPCMMassData0510->SetBinContent(histoPCMMassData0510->GetNbinsX()-1,0);
histoPCMMassMC0510->SetBinContent(histoPCMMassMC0510->GetNbinsX(),0);
histoPCMMassMC0510->SetBinContent(histoPCMMassMC0510->GetNbinsX()-1,0);
histoPCMWidthData0510->SetBinContent(histoPCMWidthData0510->GetNbinsX(),10000.);
histoPCMWidthData0510->SetBinContent(histoPCMWidthData0510->GetNbinsX()-1,10000.);
histoPCMWidthMC0510->SetBinContent(histoPCMWidthMC0510->GetNbinsX(),10000.);
histoPCMWidthMC0510->SetBinContent(histoPCMWidthMC0510->GetNbinsX()-1,10000.);
nEvent0510 = histoNumberOfEvents0510->GetBinContent(1);
// graphPCMYieldPi0SysErrRAAPbPb0510->Print();
graphPCMYieldPi0SysErrPbPb0510Red = new TGraphAsymmErrors(17);
graphPCMYieldPi0SysErrRAAPbPb0510Red = new TGraphAsymmErrors(17);
Double_t* xValPCMStat0510 = graphPCMYieldPi0SysErrPbPb0510->GetX();
Double_t* yValPCMStat0510 = graphPCMYieldPi0SysErrPbPb0510->GetY();
for (Int_t i = 0; i < 17; i++){
graphPCMYieldPi0SysErrPbPb0510Red->SetPoint(i,xValPCMStat0510[i], yValPCMStat0510[i]);
graphPCMYieldPi0SysErrPbPb0510Red->SetPointError(i, graphPCMYieldPi0SysErrPbPb0510->GetErrorXlow(i),graphPCMYieldPi0SysErrPbPb0510->GetErrorXhigh(i), graphPCMYieldPi0SysErrPbPb0510->GetErrorYlow(i), graphPCMYieldPi0SysErrPbPb0510->GetErrorYhigh(i));
graphPCMYieldPi0SysErrRAAPbPb0510Red->SetPoint(i,xValPCMStat0510[i], yValPCMStat0510[i]);
graphPCMYieldPi0SysErrRAAPbPb0510Red->SetPointError(i, graphPCMYieldPi0SysErrRAAPbPb0510->GetErrorXlow(i),graphPCMYieldPi0SysErrRAAPbPb0510->GetErrorXhigh(i), graphPCMYieldPi0SysErrRAAPbPb0510->GetErrorYlow(i), graphPCMYieldPi0SysErrRAAPbPb0510->GetErrorYhigh(i));
}
graphPCMYieldPi0SysErrPbPb0510Red->SetPoint(0,0.5, 0);
graphPCMYieldPi0SysErrRAAPbPb0510Red->SetPoint(0,0.5, 0);
// graphPCMYieldPi0SysErrPbPb0510Red->SetPoint(16,7, 0);
// graphPCMYieldPi0SysErrRAAPbPb0510Red->SetPoint(16,7, 0);
// cout << "" << endl;
// graphPCMYieldPi0SysErrRAAPbPb0510Red->Print();
histoYieldPbPb0510Red = new TH1D("histoYieldPbPb0510Red","",18,fBinsPi0HIPtPCM);
for (Int_t i =1; i < 19; i++){
// cout << histoYieldPbPb0510Red->GetBinCenter(i) << "\t"<< histoYieldPbPb0510->GetBinCenter(i) << "\t"<< histoYieldPbPb0510->GetBinContent(i) << "\t"<< histoYieldPbPb0510->GetBinError(i) << endl;
histoYieldPbPb0510Red->SetBinContent(i,histoYieldPbPb0510->GetBinContent(i));
histoYieldPbPb0510Red->SetBinError(i,histoYieldPbPb0510->GetBinError(i));
}
histoYieldPbPb0510Red->SetBinContent(1,0);
histoYieldPbPb0510Red->SetBinContent(2,0);
// histoYieldPbPb0510Red->SetBinContent(18,0);
nPointsPi00510 = graphPCMYieldPi0SysErrPbPb0510Red->GetN();
cout << "PCM: 10-20%" << endl;
directoryPi0PbPb1020 = (TDirectory*)filePCMPbPb->Get("Pi0_PbPb_2.76TeV_10-20%");
histoNumberOfEvents1020= (TH1D*)filePCMPbPb->Get("histoNumberOfEventsPbPb_2.76TeV10-20%");
histoYieldPbPb1020 = (TH1D*)directoryPi0PbPb1020->Get(nameHistoConv.Data());
graphPCMYieldPi0SysErrPbPb1020= (TGraphAsymmErrors*)directoryPi0PbPb1020->Get(nameGraphConv.Data());
graphPCMYieldPi0SysErrRAAPbPb1020= (TGraphAsymmErrors*)directoryPi0PbPb1020->Get("Pi0SystErrorA");
histoPCMMassData1020 = (TH1D*)directoryPi0PbPb1020->Get("MassPi0");
histoPCMMassMC1020 = (TH1D*)directoryPi0PbPb1020->Get("TrueMassPi0");
histoPCMWidthData1020 = (TH1D*)directoryPi0PbPb1020->Get("FWHMPi0MeV");
histoPCMWidthMC1020 = (TH1D*)directoryPi0PbPb1020->Get("TrueFWHMPi0MeV");
histoPCMMassData1020->Scale(1000.);
histoPCMMassMC1020->Scale(1000.);
histoPCMMassData1020->SetBinContent(histoPCMMassData1020->GetNbinsX(),0);
histoPCMMassData1020->SetBinContent(histoPCMMassData1020->GetNbinsX()-1,0);
histoPCMMassMC1020->SetBinContent(histoPCMMassMC1020->GetNbinsX(),0);
histoPCMMassMC1020->SetBinContent(histoPCMMassMC1020->GetNbinsX()-1,0);
histoPCMWidthData1020->SetBinContent(histoPCMWidthData1020->GetNbinsX(),10000.);
histoPCMWidthData1020->SetBinContent(histoPCMWidthData1020->GetNbinsX()-1,10000.);
histoPCMWidthMC1020->SetBinContent(histoPCMWidthMC1020->GetNbinsX(),10000.);
histoPCMWidthMC1020->SetBinContent(histoPCMWidthMC1020->GetNbinsX()-1,10000.);
nEvent1020 = histoNumberOfEvents1020->GetBinContent(1);
// graphPCMYieldPi0SysErrRAAPbPb1020->Print();
graphPCMYieldPi0SysErrPbPb1020Red = new TGraphAsymmErrors(17);
graphPCMYieldPi0SysErrRAAPbPb1020Red = new TGraphAsymmErrors(17);
Double_t* xValPCMStat1020 = graphPCMYieldPi0SysErrPbPb1020->GetX();
Double_t* yValPCMStat1020 = graphPCMYieldPi0SysErrPbPb1020->GetY();
for (Int_t i = 0; i < 17; i++){
graphPCMYieldPi0SysErrPbPb1020Red->SetPoint(i,xValPCMStat1020[i], yValPCMStat1020[i]);
graphPCMYieldPi0SysErrPbPb1020Red->SetPointError(i, graphPCMYieldPi0SysErrPbPb1020->GetErrorXlow(i),graphPCMYieldPi0SysErrPbPb1020->GetErrorXhigh(i), graphPCMYieldPi0SysErrPbPb1020->GetErrorYlow(i), graphPCMYieldPi0SysErrPbPb1020->GetErrorYhigh(i));
graphPCMYieldPi0SysErrRAAPbPb1020Red->SetPoint(i,xValPCMStat1020[i], yValPCMStat1020[i]);
graphPCMYieldPi0SysErrRAAPbPb1020Red->SetPointError(i, graphPCMYieldPi0SysErrRAAPbPb1020->GetErrorXlow(i),graphPCMYieldPi0SysErrRAAPbPb1020->GetErrorXhigh(i), graphPCMYieldPi0SysErrRAAPbPb1020->GetErrorYlow(i), graphPCMYieldPi0SysErrRAAPbPb1020->GetErrorYhigh(i));
}
graphPCMYieldPi0SysErrPbPb1020Red->SetPoint(0,0.5, 0);
graphPCMYieldPi0SysErrRAAPbPb1020Red->SetPoint(0,0.5, 0);
// cout << "" << endl;
// graphPCMYieldPi0SysErrRAAPbPb1020Red->Print();
histoYieldPbPb1020Red = new TH1D("histoYieldPbPb1020Red","",18,fBinsPi0HIPtPCM);
for (Int_t i =1; i < 19; i++){
// cout << histoYieldPbPb1020Red->GetBinCenter(i) << "\t"<< histoYieldPbPb1020->GetBinCenter(i) << "\t"<< histoYieldPbPb1020->GetBinContent(i) << "\t"<< histoYieldPbPb1020->GetBinError(i) << endl;
histoYieldPbPb1020Red->SetBinContent(i,histoYieldPbPb1020->GetBinContent(i));
histoYieldPbPb1020Red->SetBinError(i,histoYieldPbPb1020->GetBinError(i));
}
histoYieldPbPb1020Red->SetBinContent(1,0);
histoYieldPbPb1020Red->SetBinContent(2,0);
nPointsPi01020 = graphPCMYieldPi0SysErrPbPb1020Red->GetN();
cout << "PCM: 20-40%" << endl;
directoryPi0PbPb2040 = (TDirectory*)filePCMPbPb->Get("Pi0_PbPb_2.76TeV_20-40%");
histoNumberOfEvents2040= (TH1D*)filePCMPbPb->Get("histoNumberOfEventsPbPb_2.76TeV20-40%");
histoYieldPbPb2040 = (TH1D*)directoryPi0PbPb2040->Get(nameHistoConv.Data());
graphPCMYieldPi0SysErrPbPb2040= (TGraphAsymmErrors*)directoryPi0PbPb2040->Get(nameGraphConv.Data());
graphPCMYieldPi0SysErrRAAPbPb2040= (TGraphAsymmErrors*)directoryPi0PbPb2040->Get("Pi0SystErrorA");
nEvent2040 = histoNumberOfEvents2040->GetBinContent(1);
// graphPCMYieldPi0SysErrPbPb2040->Print();
graphPCMYieldPi0SysErrRAAPbPb2040Red = new TGraphAsymmErrors(17);
graphPCMYieldPi0SysErrPbPb2040Red = new TGraphAsymmErrors(17);
Double_t* xValPCMStat2040 = graphPCMYieldPi0SysErrPbPb2040->GetX();
Double_t* yValPCMStat2040 = graphPCMYieldPi0SysErrPbPb2040->GetY();
for (Int_t i = 0; i < 17; i++){
graphPCMYieldPi0SysErrPbPb2040Red->SetPoint(i,xValPCMStat2040[i], yValPCMStat2040[i]);
graphPCMYieldPi0SysErrPbPb2040Red->SetPointError(i, graphPCMYieldPi0SysErrPbPb2040->GetErrorXlow(i),graphPCMYieldPi0SysErrPbPb2040->GetErrorXhigh(i), graphPCMYieldPi0SysErrPbPb2040->GetErrorYlow(i), graphPCMYieldPi0SysErrPbPb2040->GetErrorYhigh(i));
graphPCMYieldPi0SysErrRAAPbPb2040Red->SetPoint(i,xValPCMStat2040[i], yValPCMStat2040[i]);
graphPCMYieldPi0SysErrRAAPbPb2040Red->SetPointError(i, graphPCMYieldPi0SysErrRAAPbPb2040->GetErrorXlow(i),graphPCMYieldPi0SysErrRAAPbPb2040->GetErrorXhigh(i), graphPCMYieldPi0SysErrRAAPbPb2040->GetErrorYlow(i), graphPCMYieldPi0SysErrRAAPbPb2040->GetErrorYhigh(i));
}
graphPCMYieldPi0SysErrPbPb2040Red->SetPoint(0,0.5, 0);
graphPCMYieldPi0SysErrRAAPbPb2040Red->SetPoint(0,0.5, 0);
// cout << "" << endl;
// graphPCMYieldPi0SysErrPbPb2040Red->Print();
histoYieldPbPb2040Red = new TH1D("histoYieldPbPb2040Red","",18,fBinsPi0HIPtPCM);
for (Int_t i =1; i < 19; i++){
// cout << histoYieldPbPb2040Red->GetBinCenter(i) << "\t"<< histoYieldPbPb2040->GetBinCenter(i) << "\t"<< histoYieldPbPb2040->GetBinContent(i) << "\t"<< histoYieldPbPb2040->GetBinError(i) << endl;
histoYieldPbPb2040Red->SetBinContent(i,histoYieldPbPb2040->GetBinContent(i));
histoYieldPbPb2040Red->SetBinError(i,histoYieldPbPb2040->GetBinError(i));
}
histoYieldPbPb2040Red->SetBinContent(1,0);
histoYieldPbPb2040Red->SetBinContent(2,0);
nPointsPi02040 = graphPCMYieldPi0SysErrPbPb2040Red->GetN();
cout << "PCM: 40-60%" << endl;
directoryPi0PbPb4060 = (TDirectory*)filePCMPbPb->Get("Pi0_PbPb_2.76TeV_40-60%");
histoNumberOfEvents4060= (TH1D*)filePCMPbPb->Get("histoNumberOfEventsPbPb_2.76TeV40-60%");
histoYieldPbPb4060 = (TH1D*)directoryPi0PbPb4060->Get(nameHistoConv.Data());
graphPCMYieldPi0SysErrPbPb4060= (TGraphAsymmErrors*)directoryPi0PbPb4060->Get(nameGraphConv.Data());
graphPCMYieldPi0SysErrRAAPbPb4060= (TGraphAsymmErrors*)directoryPi0PbPb4060->Get("Pi0SystErrorA");
nEvent4060 = histoNumberOfEvents4060->GetBinContent(1);
// graphPCMYieldPi0SysErrPbPb4060->Print();
graphPCMYieldPi0SysErrRAAPbPb4060Red = new TGraphAsymmErrors(17);
graphPCMYieldPi0SysErrPbPb4060Red = new TGraphAsymmErrors(17);
Double_t* xValPCMStat4060 = graphPCMYieldPi0SysErrPbPb4060->GetX();
Double_t* yValPCMStat4060 = graphPCMYieldPi0SysErrPbPb4060->GetY();
for (Int_t i = 0; i < 17; i++){
graphPCMYieldPi0SysErrPbPb4060Red->SetPoint(i,xValPCMStat4060[i], yValPCMStat4060[i]);
graphPCMYieldPi0SysErrPbPb4060Red->SetPointError(i, graphPCMYieldPi0SysErrPbPb4060->GetErrorXlow(i),graphPCMYieldPi0SysErrPbPb4060->GetErrorXhigh(i), graphPCMYieldPi0SysErrPbPb4060->GetErrorYlow(i), graphPCMYieldPi0SysErrPbPb4060->GetErrorYhigh(i));
graphPCMYieldPi0SysErrRAAPbPb4060Red->SetPoint(i,xValPCMStat4060[i], yValPCMStat4060[i]);
graphPCMYieldPi0SysErrRAAPbPb4060Red->SetPointError(i, graphPCMYieldPi0SysErrRAAPbPb4060->GetErrorXlow(i),graphPCMYieldPi0SysErrRAAPbPb4060->GetErrorXhigh(i), graphPCMYieldPi0SysErrRAAPbPb4060->GetErrorYlow(i), graphPCMYieldPi0SysErrRAAPbPb4060->GetErrorYhigh(i));
}
graphPCMYieldPi0SysErrPbPb4060Red->SetPoint(0,0.5, 0);
graphPCMYieldPi0SysErrRAAPbPb4060Red->SetPoint(0,0.5, 0);
// cout << "" << endl;
// graphPCMYieldPi0SysErrPbPb4060Red->Print();
histoYieldPbPb4060Red = new TH1D("histoYieldPbPb4060Red","",18,fBinsPi0HIPtPCM);
for (Int_t i =1; i < 19; i++){
// cout << histoYieldPbPb4060Red->GetBinCenter(i) << "\t"<< histoYieldPbPb4060->GetBinCenter(i) << "\t"<< histoYieldPbPb4060->GetBinContent(i) << "\t"<< histoYieldPbPb4060->GetBinError(i) << endl;
histoYieldPbPb4060Red->SetBinContent(i,histoYieldPbPb4060->GetBinContent(i));
histoYieldPbPb4060Red->SetBinError(i,histoYieldPbPb4060->GetBinError(i));
}
histoYieldPbPb4060Red->SetBinContent(1,0);
histoYieldPbPb4060Red->SetBinContent(2,0);
nPointsPi04060 = graphPCMYieldPi0SysErrPbPb4060Red->GetN();
cout << "PCM: 60-80%" << endl;
directoryPi0PbPb6080 = (TDirectory*)filePCMPbPb->Get("Pi0_PbPb_2.76TeV_60-80%");
histoNumberOfEvents6080= (TH1D*)filePCMPbPb->Get("histoNumberOfEventsPbPb_2.76TeV60-80%");
histoYieldPbPb6080 = (TH1D*)directoryPi0PbPb6080->Get(nameHistoConv.Data());
graphPCMYieldPi0SysErrPbPb6080= (TGraphAsymmErrors*)directoryPi0PbPb6080->Get(nameGraphConv.Data());
graphPCMYieldPi0SysErrRAAPbPb6080= (TGraphAsymmErrors*)directoryPi0PbPb6080->Get("Pi0SystErrorA");
histoPCMMassData6080 = (TH1D*)directoryPi0PbPb6080->Get("MassPi0");
histoPCMMassMC6080 = (TH1D*)directoryPi0PbPb6080->Get("TrueMassPi0");
histoPCMWidthData6080 = (TH1D*)directoryPi0PbPb6080->Get("FWHMPi0MeV");
histoPCMWidthMC6080 = (TH1D*)directoryPi0PbPb6080->Get("TrueFWHMPi0MeV");
histoPCMMassData6080->Scale(1000.);
histoPCMMassMC6080->Scale(1000.);
histoPCMMassData6080->SetBinContent(histoPCMMassData6080->GetNbinsX(),0);
histoPCMMassData6080->SetBinContent(histoPCMMassData6080->GetNbinsX()-1,0);
histoPCMMassMC6080->SetBinContent(histoPCMMassMC6080->GetNbinsX(),0);
histoPCMMassMC6080->SetBinContent(histoPCMMassMC6080->GetNbinsX()-1,0);
histoPCMWidthData6080->SetBinContent(histoPCMWidthData6080->GetNbinsX(),10000.);
histoPCMWidthData6080->SetBinContent(histoPCMWidthData6080->GetNbinsX()-1,10000.);
histoPCMWidthMC6080->SetBinContent(histoPCMWidthMC6080->GetNbinsX(),10000.);
histoPCMWidthMC6080->SetBinContent(histoPCMWidthMC6080->GetNbinsX()-1,10000.);
for (Int_t i = 0; i < histoPCMMassData6080->GetXaxis()->FindBin(0.6); i++){
histoPCMMassData6080->SetBinContent(i,0);
histoPCMMassMC6080->SetBinContent(i,0);
histoPCMWidthData6080->SetBinContent(i,10000.);
histoPCMWidthMC6080->SetBinContent(i,10000.);
}
nEvent6080 = histoNumberOfEvents6080->GetBinContent(1);
// graphPCMYieldPi0SysErrPbPb6080->Print();
graphPCMYieldPi0SysErrRAAPbPb6080Red = new TGraphAsymmErrors(17);
graphPCMYieldPi0SysErrPbPb6080Red = new TGraphAsymmErrors(17);
Double_t* xValPCMStat6080 = graphPCMYieldPi0SysErrPbPb6080->GetX();
Double_t* yValPCMStat6080 = graphPCMYieldPi0SysErrPbPb6080->GetY();
for (Int_t i = 0; i < 17; i++){
graphPCMYieldPi0SysErrPbPb6080Red->SetPoint(i,xValPCMStat6080[i], yValPCMStat6080[i]);
graphPCMYieldPi0SysErrPbPb6080Red->SetPointError(i, graphPCMYieldPi0SysErrPbPb6080->GetErrorXlow(i),graphPCMYieldPi0SysErrPbPb6080->GetErrorXhigh(i), graphPCMYieldPi0SysErrPbPb6080->GetErrorYlow(i), graphPCMYieldPi0SysErrPbPb6080->GetErrorYhigh(i));
graphPCMYieldPi0SysErrRAAPbPb6080Red->SetPoint(i,xValPCMStat6080[i], yValPCMStat6080[i]);
graphPCMYieldPi0SysErrRAAPbPb6080Red->SetPointError(i, graphPCMYieldPi0SysErrRAAPbPb6080->GetErrorXlow(i),graphPCMYieldPi0SysErrRAAPbPb6080->GetErrorXhigh(i), graphPCMYieldPi0SysErrRAAPbPb6080->GetErrorYlow(i), graphPCMYieldPi0SysErrRAAPbPb6080->GetErrorYhigh(i));
}
graphPCMYieldPi0SysErrPbPb6080Red->SetPoint(0,0.5, 0);
graphPCMYieldPi0SysErrRAAPbPb6080Red->SetPoint(0,0.5, 0);
// cout << "" << endl;
// graphPCMYieldPi0SysErrPbPb6080Red->Print();
histoYieldPbPb6080Red = new TH1D("histoYieldPbPb6080Red","",18,fBinsPi0HIPtPCM);
for (Int_t i =1; i < 19; i++){
// cout << histoYieldPbPb6080Red->GetBinCenter(i) << "\t"<< histoYieldPbPb6080->GetBinCenter(i) << "\t"<< histoYieldPbPb6080->GetBinContent(i) << "\t"<< histoYieldPbPb6080->GetBinError(i) << endl;
histoYieldPbPb6080Red->SetBinContent(i,histoYieldPbPb6080->GetBinContent(i));
histoYieldPbPb6080Red->SetBinError(i,histoYieldPbPb6080->GetBinError(i));
}
histoYieldPbPb6080Red->SetBinContent(1,0);
histoYieldPbPb6080Red->SetBinContent(2,0);
nPointsPi06080 = graphPCMYieldPi0SysErrPbPb6080Red->GetN();
//************************** Read data for PHOS **************************************************
filePHOSPbPb = new TFile(fileNameCaloPHOSPbPb);
directoryPHOSPi0PbPb0005 = (TDirectory*)filePHOSPbPb->Get("pi0_PbPb_2760_Centrality_0-5%");
directoryPHOSPi0PbPb0510 = (TDirectory*)filePHOSPbPb->Get("pi0_PbPb_2760_Centrality_5-10%");
directoryPHOSPi0PbPb0010 = (TDirectory*)filePHOSPbPb->Get("pi0_PbPb_2760_Centrality_0-10%");
directoryPHOSPi0PbPb1020 = (TDirectory*)filePHOSPbPb->Get("pi0_PbPb_2760_Centrality_10-20%");
directoryPHOSPi0PbPb2040 = (TDirectory*)filePHOSPbPb->Get("pi0_PbPb_2760_Centrality_20-40%");
directoryPHOSPi0PbPb4060 = (TDirectory*)filePHOSPbPb->Get("pi0_PbPb_2760_Centrality_40-60%");
directoryPHOSPi0PbPb6080 = (TDirectory*)filePHOSPbPb->Get("pi0_PbPb_2760_Centrality_60-80%");
cout << "PHOS: 0-5%" << endl;
histoPi0PHOSPbPb0005 = (TH1D*)directoryPHOSPi0PbPb0005->Get("hPi0_PbPb_cen0_NoBW_Stat");
histoPi0PHOSSysPbPb0005 = (TH1D*)directoryPHOSPi0PbPb0005->Get("hPi0_PbPb_cen0_NoBW_Syst");
graphPHOSYieldPi0SysErrPbPb0005 = new TGraphAsymmErrors(histoPi0PHOSSysPbPb0005);
histoPi0PHOSSysRAAPbPb0005 = (TH1D*)directoryPHOSPi0PbPb0005->Get("hPi0_PbPb_cen0_SystRaa");
graphSysErrRAAYieldPi0PHOSPbPb0005 = new TGraphAsymmErrors(histoPi0PHOSSysRAAPbPb0005);
histoPHOSMassData0005 = (TH1D*)directoryPHOSPi0PbPb0005->Get("mass1_GS_Both2core_cen0");
histoPHOSMassMC0005 = (TH1D*)directoryPHOSPi0PbPb0005->Get("MC_mass1_GS_Both2core_cen0");
histoPHOSWidthData0005 = (TH1D*)directoryPHOSPi0PbPb0005->Get("width1_GS_Both2core_cen0");
histoPHOSWidthMC0005 = (TH1D*)directoryPHOSPi0PbPb0005->Get("MC_width1_GS_Both2core_cen0");
histoPHOSWidthData0005->Scale(1000.);
histoPHOSWidthMC0005->Scale(1000.);
histoPHOSMassData0005->Scale(1000.);
histoPHOSMassMC0005->Scale(1000.);
for (Int_t i = 0; i < histoPHOSWidthData0005->GetXaxis()->FindBin(1.0); i++){
histoPHOSWidthData0005->SetBinContent(i,10000.);
histoPHOSMassData0005->SetBinContent(i,10000.);
}
for (Int_t i = histoPHOSWidthData0005->GetXaxis()->FindBin(12.1); i < histoPHOSWidthData0005->GetNbinsX()+1; i++){
histoPHOSWidthData0005->SetBinContent(i,10000.);
histoPHOSMassData0005->SetBinContent(i,10000.);
}
for (Int_t i = 0; i < histoPHOSWidthMC0005->GetXaxis()->FindBin(1.0); i++){
histoPHOSWidthMC0005->SetBinContent(i,10000.);
histoPHOSMassMC0005->SetBinContent(i,10000.);
}
for (Int_t i = histoPHOSWidthMC0005->GetXaxis()->FindBin(12.1); i < histoPHOSWidthMC0005->GetNbinsX()+1; i++){
histoPHOSWidthMC0005->SetBinContent(i,10000.);
histoPHOSMassMC0005->SetBinContent(i,10000.);
}
// graphPHOSYieldPi0SysErrPbPb0005->Print();
graphPHOSYieldPi0SysErrPbPb0005Red = new TGraphAsymmErrors(17);
graphSysErrRAAYieldPi0PHOSPbPb0005Red = new TGraphAsymmErrors(17);
Double_t* xValPHOStat0005 = graphPHOSYieldPi0SysErrPbPb0005->GetX();
Double_t* yValPHOSStat0005 = graphPHOSYieldPi0SysErrPbPb0005->GetY();
Int_t phosOffset = 1;
for (Int_t i = 0; i < 17; i++){
graphPHOSYieldPi0SysErrPbPb0005Red->SetPoint(i,xValPHOStat0005[i+phosOffset], yValPHOSStat0005[i+phosOffset]);
graphPHOSYieldPi0SysErrPbPb0005Red->SetPointError(i, graphPHOSYieldPi0SysErrPbPb0005->GetErrorXlow(i+phosOffset),graphPHOSYieldPi0SysErrPbPb0005->GetErrorXhigh(i+phosOffset), graphPHOSYieldPi0SysErrPbPb0005->GetErrorYlow(i+phosOffset), graphPHOSYieldPi0SysErrPbPb0005->GetErrorYhigh(i+phosOffset));
graphSysErrRAAYieldPi0PHOSPbPb0005Red->SetPoint(i,xValPHOStat0005[i+phosOffset], yValPHOSStat0005[i+phosOffset]);
graphSysErrRAAYieldPi0PHOSPbPb0005Red->SetPointError(i, graphSysErrRAAYieldPi0PHOSPbPb0005->GetErrorXlow(i+phosOffset),graphSysErrRAAYieldPi0PHOSPbPb0005->GetErrorXhigh(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb0005->GetErrorYlow(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb0005->GetErrorYhigh(i+phosOffset));
}
cout << "" << endl;
graphPHOSYieldPi0SysErrPbPb0005Red->SetPoint(0,0.9, 0);
graphSysErrRAAYieldPi0PHOSPbPb0005Red->SetPoint(0,0.9, 0);
// graphPHOSYieldPi0SysErrPbPb0005Red->Print();
histoPi0PHOSPbPb0005Red = new TH1D("histoPi0PHOSPbPb0005Red","",18,fBinsPi0HIPtPHOS);
for (Int_t i =1; i < 18; i++){
cout << histoPi0PHOSPbPb0005Red->GetBinCenter(i) << "\t"<< histoPi0PHOSPbPb0005->GetBinCenter(i+phosOffset) << "\t"<< histoPi0PHOSPbPb0005->GetBinContent(i+phosOffset) << "\t"<< histoPi0PHOSPbPb0005->GetBinError(i+phosOffset) << endl;
histoPi0PHOSPbPb0005Red->SetBinContent(i,histoPi0PHOSPbPb0005->GetBinContent(i+phosOffset));
histoPi0PHOSPbPb0005Red->SetBinError(i,histoPi0PHOSPbPb0005->GetBinError(i+phosOffset));
}
histoPi0PHOSPbPb0005Red->SetBinContent(1,0);
cout << "PHOS: 0-10%" << endl;
histoPi0PHOSPbPb0010 = (TH1D*)directoryPHOSPi0PbPb0010->Get("hPi0_PbPb_cen7_NoBW_Stat");
histoPi0PHOSSysPbPb0010 = (TH1D*)directoryPHOSPi0PbPb0010->Get("hPi0_PbPb_cen7_NoBW_Syst");
graphPHOSYieldPi0SysErrPbPb0010 = new TGraphAsymmErrors(histoPi0PHOSSysPbPb0010);
histoPi0PHOSSysRAAPbPb0010 = (TH1D*)directoryPHOSPi0PbPb0010->Get("hPi0_PbPb_cen7_SystRaa");
graphSysErrRAAYieldPi0PHOSPbPb0010 = new TGraphAsymmErrors(histoPi0PHOSSysRAAPbPb0010);
histoPHOSMassData0010 = (TH1D*)directoryPHOSPi0PbPb0010->Get("mass1_GS_Both2core_cen7");
histoPHOSMassMC0010 = (TH1D*)directoryPHOSPi0PbPb0010->Get("MC_mass1_GS_Both2core_cen7");
histoPHOSWidthData0010 = (TH1D*)directoryPHOSPi0PbPb0010->Get("width1_GS_Both2core_cen7");
histoPHOSWidthMC0010 = (TH1D*)directoryPHOSPi0PbPb0010->Get("MC_width1_GS_Both2core_cen7");
histoPHOSWidthData0010->Scale(1000.);
histoPHOSWidthMC0010->Scale(1000.);
histoPHOSMassData0010->Scale(1000.);
histoPHOSMassMC0010->Scale(1000.);
for (Int_t i = 0; i < histoPHOSWidthData0010->GetXaxis()->FindBin(1.0); i++){
histoPHOSMassData0010->SetBinContent(i,0.);
histoPHOSWidthData0010->SetBinContent(i,10000.);
}
for (Int_t i = 0; i < histoPHOSWidthMC0010->GetXaxis()->FindBin(1.0); i++){
histoPHOSMassMC0010->SetBinContent(i,0.);
histoPHOSWidthMC0010->SetBinContent(i,10000.);
}
cout << histoPHOSWidthData0010->GetXaxis()->FindBin(15.0) << endl;
for (Int_t i = histoPHOSWidthData0010->GetXaxis()->FindBin(15.0); i < histoPHOSWidthData0010->GetNbinsX()+1; i++){
histoPHOSMassData0010->SetBinContent(i,0);
histoPHOSWidthData0010->SetBinContent(i,10000.);
}
for (Int_t i = histoPHOSWidthMC0010->GetXaxis()->FindBin(15.0); i < histoPHOSWidthMC0010->GetNbinsX()+1; i++){
histoPHOSMassMC0010->SetBinContent(i,0);;
histoPHOSWidthMC0010->SetBinContent(i,10000.);
}
// graphPHOSYieldPi0SysErrPbPb0010->Print();
graphPHOSYieldPi0SysErrPbPb0010Red = new TGraphAsymmErrors(17);
graphSysErrRAAYieldPi0PHOSPbPb0010Red = new TGraphAsymmErrors(17);
Double_t* xValPHOStat0010 = graphPHOSYieldPi0SysErrPbPb0010->GetX();
Double_t* yValPHOSStat0010 = graphPHOSYieldPi0SysErrPbPb0010->GetY();
for (Int_t i = 0; i < 17; i++){
graphPHOSYieldPi0SysErrPbPb0010Red->SetPoint(i,xValPHOStat0010[i+phosOffset], yValPHOSStat0010[i+phosOffset]);
graphPHOSYieldPi0SysErrPbPb0010Red->SetPointError(i, graphPHOSYieldPi0SysErrPbPb0010->GetErrorXlow(i+phosOffset),graphPHOSYieldPi0SysErrPbPb0010->GetErrorXhigh(i+phosOffset), graphPHOSYieldPi0SysErrPbPb0010->GetErrorYlow(i+phosOffset), graphPHOSYieldPi0SysErrPbPb0010->GetErrorYhigh(i+phosOffset));
graphSysErrRAAYieldPi0PHOSPbPb0010Red->SetPoint(i,xValPHOStat0010[i+phosOffset], yValPHOSStat0010[i+phosOffset]);
graphSysErrRAAYieldPi0PHOSPbPb0010Red->SetPointError(i, graphSysErrRAAYieldPi0PHOSPbPb0010->GetErrorXlow(i+phosOffset),graphSysErrRAAYieldPi0PHOSPbPb0010->GetErrorXhigh(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb0010->GetErrorYlow(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb0010->GetErrorYhigh(i+phosOffset));
}
cout << "" << endl;
graphPHOSYieldPi0SysErrPbPb0010Red->SetPoint(0,0.9, 0);
graphSysErrRAAYieldPi0PHOSPbPb0010Red->SetPoint(0,0.9, 0);
// graphPHOSYieldPi0SysErrPbPb0010Red->Print();
histoPi0PHOSPbPb0010Red = new TH1D("histoPi0PHOSPbPb0010Red","",18,fBinsPi0HIPtPHOS);
for (Int_t i =1; i < 18; i++){
cout << histoPi0PHOSPbPb0010Red->GetBinCenter(i) << "\t"<< histoPi0PHOSPbPb0010->GetBinCenter(i+phosOffset) << "\t"<< histoPi0PHOSPbPb0010->GetBinContent(i+phosOffset) << "\t"<< histoPi0PHOSPbPb0010->GetBinError(i+phosOffset) << endl;
histoPi0PHOSPbPb0010Red->SetBinContent(i,histoPi0PHOSPbPb0010->GetBinContent(i+phosOffset));
histoPi0PHOSPbPb0010Red->SetBinError(i,histoPi0PHOSPbPb0010->GetBinError(i+phosOffset));
}
histoPi0PHOSPbPb0010Red->SetBinContent(1,0);
cout << "PHOS: 5-10%" << endl;
histoPi0PHOSPbPb0510 = (TH1D*)directoryPHOSPi0PbPb0510->Get("hPi0_PbPb_cen1_NoBW_Stat");
histoPi0PHOSSysPbPb0510 = (TH1D*)directoryPHOSPi0PbPb0510->Get("hPi0_PbPb_cen1_NoBW_Syst");
graphPHOSYieldPi0SysErrPbPb0510 = new TGraphAsymmErrors(histoPi0PHOSSysPbPb0510);
histoPi0PHOSSysRAAPbPb0510 = (TH1D*)directoryPHOSPi0PbPb0510->Get("hPi0_PbPb_cen1_SystRaa");
graphSysErrRAAYieldPi0PHOSPbPb0510 = new TGraphAsymmErrors(histoPi0PHOSSysRAAPbPb0510);
histoPHOSMassData0510 = (TH1D*)directoryPHOSPi0PbPb0510->Get("mass1_GS_Both2core_cen1");
histoPHOSMassMC0510 = (TH1D*)directoryPHOSPi0PbPb0510->Get("MC_mass1_GS_Both2core_cen1");
histoPHOSWidthData0510 = (TH1D*)directoryPHOSPi0PbPb0510->Get("width1_GS_Both2core_cen1");
histoPHOSWidthMC0510 = (TH1D*)directoryPHOSPi0PbPb0510->Get("MC_width1_GS_Both2core_cen1");
histoPHOSWidthData0510->Scale(1000.);
histoPHOSWidthMC0510->Scale(1000.);
histoPHOSMassData0510->Scale(1000.);
histoPHOSMassMC0510->Scale(1000.);
for (Int_t i = 0; i < histoPHOSWidthData0510->GetXaxis()->FindBin(1.0); i++){
histoPHOSWidthData0510->SetBinContent(i,10000.);
histoPHOSMassData0510->SetBinContent(i,10000.);
}
for (Int_t i = 0; i < histoPHOSWidthMC0510->GetXaxis()->FindBin(1.0); i++){
histoPHOSWidthMC0510->SetBinContent(i,10000.);
histoPHOSMassMC0510->SetBinContent(i,10000.);
}
histoPHOSMassData0510->SetBinContent(histoPHOSMassData0510->GetNbinsX(),0);
histoPHOSMassMC0510->SetBinContent(histoPHOSMassMC0510->GetNbinsX(),0);;
histoPHOSWidthData0510->SetBinContent(histoPHOSWidthData0510->GetNbinsX(),10000.);
histoPHOSWidthMC0510->SetBinContent(histoPHOSWidthMC0510->GetNbinsX(),10000.);
// graphPHOSYieldPi0SysErrPbPb0510->Print();
graphPHOSYieldPi0SysErrPbPb0510Red = new TGraphAsymmErrors(17);
graphSysErrRAAYieldPi0PHOSPbPb0510Red = new TGraphAsymmErrors(17);
Double_t* xValPHOStat0510 = graphPHOSYieldPi0SysErrPbPb0510->GetX();
Double_t* yValPHOSStat0510 = graphPHOSYieldPi0SysErrPbPb0510->GetY();
for (Int_t i = 0; i < 17; i++){
graphPHOSYieldPi0SysErrPbPb0510Red->SetPoint(i,xValPHOStat0510[i+phosOffset], yValPHOSStat0510[i+phosOffset]);
graphPHOSYieldPi0SysErrPbPb0510Red->SetPointError(i, graphPHOSYieldPi0SysErrPbPb0510->GetErrorXlow(i+phosOffset),graphPHOSYieldPi0SysErrPbPb0510->GetErrorXhigh(i+phosOffset), graphPHOSYieldPi0SysErrPbPb0510->GetErrorYlow(i+phosOffset), graphPHOSYieldPi0SysErrPbPb0510->GetErrorYhigh(i+phosOffset));
graphSysErrRAAYieldPi0PHOSPbPb0510Red->SetPoint(i,xValPHOStat0510[i+phosOffset], yValPHOSStat0510[i+phosOffset]);
graphSysErrRAAYieldPi0PHOSPbPb0510Red->SetPointError(i, graphSysErrRAAYieldPi0PHOSPbPb0510->GetErrorXlow(i+phosOffset),graphSysErrRAAYieldPi0PHOSPbPb0510->GetErrorXhigh(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb0510->GetErrorYlow(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb0510->GetErrorYhigh(i+phosOffset));
}
graphPHOSYieldPi0SysErrPbPb0510Red->SetPoint(0,0.9, 0);
graphSysErrRAAYieldPi0PHOSPbPb0510Red->SetPoint(0,0.9, 0);
histoPi0PHOSPbPb0510Red = new TH1D("histoPi0PHOSPbPb0510Red","",18,fBinsPi0HIPtPHOS);
for (Int_t i =1; i < 18; i++){
// cout << histoPi0PHOSPbPb0510Red->GetBinCenter(i) << "\t"<< histoPi0PHOSPbPb0510->GetBinCenter(i+phosOffset) << "\t"<< histoPi0PHOSPbPb0510->GetBinContent(i+phosOffset) << "\t"<< histoPi0PHOSPbPb0510->GetBinError(i+phosOffset) << endl;
histoPi0PHOSPbPb0510Red->SetBinContent(i,histoPi0PHOSPbPb0510->GetBinContent(i+phosOffset));
histoPi0PHOSPbPb0510Red->SetBinError(i,histoPi0PHOSPbPb0510->GetBinError(i+phosOffset));
}
histoPi0PHOSPbPb0510Red->SetBinContent(1,0);
cout << "PHOS: 10-20%" << endl;
histoPi0PHOSPbPb1020 = (TH1D*)directoryPHOSPi0PbPb1020->Get("hPi0_PbPb_cen2_NoBW_Stat");
histoPi0PHOSSysPbPb1020 = (TH1D*)directoryPHOSPi0PbPb1020->Get("hPi0_PbPb_cen2_NoBW_Syst");
graphPHOSYieldPi0SysErrPbPb1020 = new TGraphAsymmErrors(histoPi0PHOSSysPbPb1020);
histoPi0PHOSSysRAAPbPb1020 = (TH1D*)directoryPHOSPi0PbPb1020->Get("hPi0_PbPb_cen2_SystRaa");
graphSysErrRAAYieldPi0PHOSPbPb1020 = new TGraphAsymmErrors(histoPi0PHOSSysRAAPbPb1020);
histoPHOSMassData1020 = (TH1D*)directoryPHOSPi0PbPb1020->Get("mass1_GS_Both2core_cen2");
histoPHOSMassMC1020 = (TH1D*)directoryPHOSPi0PbPb1020->Get("MC_mass1_GS_Both2core_cen2");
histoPHOSWidthData1020 = (TH1D*)directoryPHOSPi0PbPb1020->Get("width1_GS_Both2core_cen2");
histoPHOSWidthMC1020 = (TH1D*)directoryPHOSPi0PbPb1020->Get("MC_width1_GS_Both2core_cen2");
histoPHOSWidthData1020->Scale(1000.);
histoPHOSWidthMC1020->Scale(1000.);
histoPHOSMassData1020->Scale(1000.);
histoPHOSMassMC1020->Scale(1000.);
for (Int_t i = 0; i < histoPHOSWidthData1020->GetXaxis()->FindBin(1.0); i++){
histoPHOSWidthData1020->SetBinContent(i,10000.);
histoPHOSMassData1020->SetBinContent(i,10000.);
}
for (Int_t i = 0; i < histoPHOSWidthMC1020->GetXaxis()->FindBin(1.0); i++){
histoPHOSWidthMC1020->SetBinContent(i,10000.);
histoPHOSMassMC1020->SetBinContent(i,10000.);
}
histoPHOSMassData1020->SetBinContent(histoPHOSMassData1020->GetNbinsX(),0);
histoPHOSMassMC1020->SetBinContent(histoPHOSMassMC1020->GetNbinsX(),0);;
histoPHOSWidthData1020->SetBinContent(histoPHOSWidthData1020->GetNbinsX(),10000.);
histoPHOSWidthMC1020->SetBinContent(histoPHOSWidthMC1020->GetNbinsX(),10000.);
// graphPHOSYieldPi0SysErrPbPb1020->Print();
graphPHOSYieldPi0SysErrPbPb1020Red = new TGraphAsymmErrors(17);
graphSysErrRAAYieldPi0PHOSPbPb1020Red = new TGraphAsymmErrors(17);
Double_t* xValPHOStat1020 = graphPHOSYieldPi0SysErrPbPb1020->GetX();
Double_t* yValPHOSStat1020 = graphPHOSYieldPi0SysErrPbPb1020->GetY();
for (Int_t i = 0; i < 17; i++){
graphPHOSYieldPi0SysErrPbPb1020Red->SetPoint(i,xValPHOStat1020[i+phosOffset], yValPHOSStat1020[i+phosOffset]);
graphPHOSYieldPi0SysErrPbPb1020Red->SetPointError(i, graphPHOSYieldPi0SysErrPbPb1020->GetErrorXlow(i+phosOffset),graphPHOSYieldPi0SysErrPbPb1020->GetErrorXhigh(i+phosOffset), graphPHOSYieldPi0SysErrPbPb1020->GetErrorYlow(i+phosOffset), graphPHOSYieldPi0SysErrPbPb1020->GetErrorYhigh(i+phosOffset));
graphSysErrRAAYieldPi0PHOSPbPb1020Red->SetPoint(i,xValPHOStat1020[i+phosOffset], yValPHOSStat1020[i+phosOffset]);
graphSysErrRAAYieldPi0PHOSPbPb1020Red->SetPointError(i, graphSysErrRAAYieldPi0PHOSPbPb1020->GetErrorXlow(i+phosOffset),graphSysErrRAAYieldPi0PHOSPbPb1020->GetErrorXhigh(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb1020->GetErrorYlow(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb1020->GetErrorYhigh(i+phosOffset));
}
graphPHOSYieldPi0SysErrPbPb1020Red->SetPoint(0,0.9, 0);
graphSysErrRAAYieldPi0PHOSPbPb1020Red->SetPoint(0,0.9, 0);
histoPi0PHOSPbPb1020Red = new TH1D("histoPi0PHOSPbPb1020Red","",18,fBinsPi0HIPtPHOS);
for (Int_t i =1; i < 18; i++){
// cout << histoPi0PHOSPbPb1020Red->GetBinCenter(i) << "\t"<< histoPi0PHOSPbPb1020->GetBinCenter(i+phosOffset) << "\t"<< histoPi0PHOSPbPb1020->GetBinContent(i+phosOffset) << "\t"<< histoPi0PHOSPbPb1020->GetBinError(i+phosOffset) << endl;
histoPi0PHOSPbPb1020Red->SetBinContent(i,histoPi0PHOSPbPb1020->GetBinContent(i+phosOffset));
histoPi0PHOSPbPb1020Red->SetBinError(i,histoPi0PHOSPbPb1020->GetBinError(i+phosOffset));
}
histoPi0PHOSPbPb1020Red->SetBinContent(1,0);
cout << "PHOS: 20-40%" << endl;
histoPi0PHOSPbPb2040 = (TH1D*)directoryPHOSPi0PbPb2040->Get("hPi0_PbPb_cen3_NoBW_Stat");
histoPi0PHOSSysPbPb2040 = (TH1D*)directoryPHOSPi0PbPb2040->Get("hPi0_PbPb_cen3_NoBW_Syst");
graphPHOSYieldPi0SysErrPbPb2040 = new TGraphAsymmErrors(histoPi0PHOSSysPbPb2040);
histoPi0PHOSSysRAAPbPb2040 = (TH1D*)directoryPHOSPi0PbPb2040->Get("hPi0_PbPb_cen3_SystRaa");
graphSysErrRAAYieldPi0PHOSPbPb2040 = new TGraphAsymmErrors(histoPi0PHOSSysRAAPbPb2040);
histoPHOSMassData2040 = (TH1D*)directoryPHOSPi0PbPb2040->Get("mass1_GS_Both2core_cen3");
histoPHOSMassMC2040 = (TH1D*)directoryPHOSPi0PbPb2040->Get("MC_mass1_GS_Both2core_cen3");
histoPHOSWidthData2040 = (TH1D*)directoryPHOSPi0PbPb2040->Get("width1_GS_Both2core_cen3");
histoPHOSWidthMC2040 = (TH1D*)directoryPHOSPi0PbPb2040->Get("MC_width1_GS_Both2core_cen3");
histoPHOSWidthData2040->Scale(1000.);
histoPHOSWidthMC2040->Scale(1000.);
histoPHOSMassData2040->Scale(1000.);
histoPHOSMassMC2040->Scale(1000.);
for (Int_t i = 0; i < histoPHOSWidthData2040->GetXaxis()->FindBin(1.0); i++){
histoPHOSWidthData2040->SetBinContent(i,10000.);
histoPHOSMassData2040->SetBinContent(i,10000.);
}
for (Int_t i = 0; i < histoPHOSWidthMC2040->GetXaxis()->FindBin(1.0); i++){
histoPHOSWidthMC2040->SetBinContent(i,10000.);
histoPHOSMassMC2040->SetBinContent(i,10000.);
}
histoPHOSMassData2040->SetBinContent(histoPHOSMassData2040->GetNbinsX(),0);
histoPHOSMassMC2040->SetBinContent(histoPHOSMassMC2040->GetNbinsX(),0);;
histoPHOSWidthData2040->SetBinContent(histoPHOSWidthData2040->GetNbinsX(),10000.);
histoPHOSWidthMC2040->SetBinContent(histoPHOSWidthMC2040->GetNbinsX(),10000.);
graphPHOSYieldPi0SysErrPbPb2040Red = new TGraphAsymmErrors(17);
graphSysErrRAAYieldPi0PHOSPbPb2040Red = new TGraphAsymmErrors(17);
Double_t* xValPHOStat2040 = graphPHOSYieldPi0SysErrPbPb2040->GetX();
Double_t* yValPHOSStat2040 = graphPHOSYieldPi0SysErrPbPb2040->GetY();
for (Int_t i = 0; i < 17; i++){
graphPHOSYieldPi0SysErrPbPb2040Red->SetPoint(i,xValPHOStat2040[i+phosOffset], yValPHOSStat2040[i+phosOffset]);
graphPHOSYieldPi0SysErrPbPb2040Red->SetPointError(i, graphPHOSYieldPi0SysErrPbPb2040->GetErrorXlow(i+phosOffset),graphPHOSYieldPi0SysErrPbPb2040->GetErrorXhigh(i+phosOffset), graphPHOSYieldPi0SysErrPbPb2040->GetErrorYlow(i+phosOffset), graphPHOSYieldPi0SysErrPbPb2040->GetErrorYhigh(i+phosOffset));
graphSysErrRAAYieldPi0PHOSPbPb2040Red->SetPoint(i,xValPHOStat2040[i+phosOffset], yValPHOSStat2040[i+phosOffset]);
graphSysErrRAAYieldPi0PHOSPbPb2040Red->SetPointError(i, graphSysErrRAAYieldPi0PHOSPbPb2040->GetErrorXlow(i+phosOffset),graphSysErrRAAYieldPi0PHOSPbPb2040->GetErrorXhigh(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb2040->GetErrorYlow(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb2040->GetErrorYhigh(i+phosOffset));
}
graphPHOSYieldPi0SysErrPbPb2040Red->SetPoint(0,0.9, 0);
graphPHOSYieldPi0SysErrPbPb2040Red->SetPoint(0,0.9, 0);
// cout << "" << endl;
// graphPHOSYieldPi0SysErrPbPb2040Red->Print();
histoPi0PHOSPbPb2040Red = new TH1D("histoPi0PHOSPbPb2040Red","",18,fBinsPi0HIPtPHOS);
for (Int_t i =1; i < 18; i++){
// cout << histoPi0PHOSPbPb2040Red->GetBinCenter(i) << "\t"<< histoPi0PHOSPbPb2040->GetBinCenter(i+phosOffset) << "\t"<< histoPi0PHOSPbPb2040->GetBinContent(i+phosOffset) << "\t"<< histoPi0PHOSPbPb2040->GetBinError(i+phosOffset) << endl;
histoPi0PHOSPbPb2040Red->SetBinContent(i,histoPi0PHOSPbPb2040->GetBinContent(i+phosOffset));
histoPi0PHOSPbPb2040Red->SetBinError(i,histoPi0PHOSPbPb2040->GetBinError(i+phosOffset));
}
histoPi0PHOSPbPb2040Red->SetBinContent(1,0);
cout << "PHOS: 40-60%" << endl;
histoPi0PHOSPbPb4060 = (TH1D*)directoryPHOSPi0PbPb4060->Get("hPi0_PbPb_cen4_NoBW_Stat");
histoPi0PHOSSysPbPb4060 = (TH1D*)directoryPHOSPi0PbPb4060->Get("hPi0_PbPb_cen4_NoBW_Syst");
graphPHOSYieldPi0SysErrPbPb4060 = new TGraphAsymmErrors(histoPi0PHOSSysPbPb4060);
histoPi0PHOSSysRAAPbPb4060 = (TH1D*)directoryPHOSPi0PbPb4060->Get("hPi0_PbPb_cen4_SystRaa");
graphSysErrRAAYieldPi0PHOSPbPb4060 = new TGraphAsymmErrors(histoPi0PHOSSysRAAPbPb4060);
histoPHOSMassData4060 = (TH1D*)directoryPHOSPi0PbPb4060->Get("mass1_GS_Both2core_cen4");
histoPHOSMassMC4060 = (TH1D*)directoryPHOSPi0PbPb4060->Get("MC_mass1_GS_Both2core_cen4");
histoPHOSWidthData4060 = (TH1D*)directoryPHOSPi0PbPb4060->Get("width1_GS_Both2core_cen4");
histoPHOSWidthMC4060 = (TH1D*)directoryPHOSPi0PbPb4060->Get("MC_width1_GS_Both2core_cen4");
histoPHOSWidthData4060->Scale(1000.);
histoPHOSWidthMC4060->Scale(1000.);
histoPHOSMassData4060->Scale(1000.);
histoPHOSMassMC4060->Scale(1000.);
for (Int_t i = 0; i < histoPHOSWidthData4060->GetXaxis()->FindBin(1.0); i++){
histoPHOSWidthData4060->SetBinContent(i,10000.);
histoPHOSMassData4060->SetBinContent(i,10000.);
}
for (Int_t i = 0; i < histoPHOSWidthMC4060->GetXaxis()->FindBin(1.0); i++){
histoPHOSWidthMC4060->SetBinContent(i,10000.);
histoPHOSMassMC4060->SetBinContent(i,10000.);
}
histoPHOSMassData4060->SetBinContent(histoPHOSMassData4060->GetNbinsX(),0);
histoPHOSMassMC4060->SetBinContent(histoPHOSMassMC4060->GetNbinsX(),0);;
histoPHOSWidthData4060->SetBinContent(histoPHOSWidthData4060->GetNbinsX(),10000.);
histoPHOSWidthMC4060->SetBinContent(histoPHOSWidthMC4060->GetNbinsX(),10000.);
graphPHOSYieldPi0SysErrPbPb4060Red = new TGraphAsymmErrors(17);
graphSysErrRAAYieldPi0PHOSPbPb4060Red = new TGraphAsymmErrors(17);
Double_t* xValPHOStat4060 = graphPHOSYieldPi0SysErrPbPb4060->GetX();
Double_t* yValPHOSStat4060 = graphPHOSYieldPi0SysErrPbPb4060->GetY();
for (Int_t i = 0; i < 17; i++){
graphPHOSYieldPi0SysErrPbPb4060Red->SetPoint(i,xValPHOStat4060[i+phosOffset], yValPHOSStat4060[i+phosOffset]);
graphPHOSYieldPi0SysErrPbPb4060Red->SetPointError(i, graphPHOSYieldPi0SysErrPbPb4060->GetErrorXlow(i+phosOffset),graphPHOSYieldPi0SysErrPbPb4060->GetErrorXhigh(i+phosOffset), graphPHOSYieldPi0SysErrPbPb4060->GetErrorYlow(i+phosOffset), graphPHOSYieldPi0SysErrPbPb4060->GetErrorYhigh(i+phosOffset));
graphSysErrRAAYieldPi0PHOSPbPb4060Red->SetPoint(i,xValPHOStat4060[i+phosOffset], yValPHOSStat4060[i+phosOffset]);
graphSysErrRAAYieldPi0PHOSPbPb4060Red->SetPointError(i, graphSysErrRAAYieldPi0PHOSPbPb4060->GetErrorXlow(i+phosOffset),graphSysErrRAAYieldPi0PHOSPbPb4060->GetErrorXhigh(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb4060->GetErrorYlow(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb4060->GetErrorYhigh(i+phosOffset));
}
// cout << "" << endl;
// graphPHOSYieldPi0SysErrPbPb4060Red->Print();
histoPi0PHOSPbPb4060Red = new TH1D("histoPi0PHOSPbPb4060Red","",18,fBinsPi0HIPtPHOS);
for (Int_t i =1; i < 18; i++){
// cout << histoPi0PHOSPbPb4060Red->GetBinCenter(i) << "\t"<< histoPi0PHOSPbPb4060->GetBinCenter(i+phosOffset) << "\t"<< histoPi0PHOSPbPb4060->GetBinContent(i+phosOffset) << "\t"<< histoPi0PHOSPbPb4060->GetBinError(i+phosOffset) << endl;
histoPi0PHOSPbPb4060Red->SetBinContent(i,histoPi0PHOSPbPb4060->GetBinContent(i+phosOffset));
histoPi0PHOSPbPb4060Red->SetBinError(i,histoPi0PHOSPbPb4060->GetBinError(i+phosOffset));
}
cout << "PHOS: 60-80%" << endl;
histoPi0PHOSPbPb6080 = (TH1D*)directoryPHOSPi0PbPb6080->Get("hPi0_PbPb_cen5_NoBW_Stat");
histoPi0PHOSSysPbPb6080 = (TH1D*)directoryPHOSPi0PbPb6080->Get("hPi0_PbPb_cen5_NoBW_Syst");
graphPHOSYieldPi0SysErrPbPb6080 = new TGraphAsymmErrors(histoPi0PHOSSysPbPb6080);
histoPi0PHOSSysRAAPbPb6080 = (TH1D*)directoryPHOSPi0PbPb6080->Get("hPi0_PbPb_cen5_SystRaa");
graphSysErrRAAYieldPi0PHOSPbPb6080 = new TGraphAsymmErrors(histoPi0PHOSSysRAAPbPb6080);
histoPHOSMassData6080 = (TH1D*)directoryPHOSPi0PbPb6080->Get("mass1_GS_Both2core_cen5");
histoPHOSMassMC6080 = (TH1D*)directoryPHOSPi0PbPb6080->Get("MC_mass1_GS_Both2core_cen5");
histoPHOSWidthData6080 = (TH1D*)directoryPHOSPi0PbPb6080->Get("width1_GS_Both2core_cen5");
histoPHOSWidthMC6080 = (TH1D*)directoryPHOSPi0PbPb6080->Get("MC_width1_GS_Both2core_cen5");
histoPHOSWidthData6080->Scale(1000.);
histoPHOSWidthMC6080->Scale(1000.);
histoPHOSMassData6080->Scale(1000.);
histoPHOSMassMC6080->Scale(1000.);
for (Int_t i = 0; i < histoPHOSWidthData6080->GetXaxis()->FindBin(1.0); i++){
histoPHOSWidthData6080->SetBinContent(i,10000.);
histoPHOSMassData6080->SetBinContent(i,10000.);
}
for (Int_t i = histoPHOSWidthMC6080->GetXaxis()->FindBin(10.1); i < histoPHOSWidthMC6080->GetNbinsX()+1; i++){
histoPHOSWidthMC6080->SetBinContent(i,10000.);
histoPHOSMassMC6080->SetBinContent(i,10000.);
}
for (Int_t i = 0; i < histoPHOSWidthMC6080->GetXaxis()->FindBin(1.0); i++){
histoPHOSWidthMC6080->SetBinContent(i,10000.);
histoPHOSMassMC6080->SetBinContent(i,10000.);
}
for (Int_t i = histoPHOSWidthData6080->GetXaxis()->FindBin(10.1); i < histoPHOSWidthData6080->GetNbinsX()+1; i++){
histoPHOSWidthData6080->SetBinContent(i,10000.);
histoPHOSMassData6080->SetBinContent(i,10000.);
}
graphPHOSYieldPi0SysErrPbPb6080Red = new TGraphAsymmErrors(16);
graphSysErrRAAYieldPi0PHOSPbPb6080Red = new TGraphAsymmErrors(16);
Double_t* xValPHOStat6080 = graphPHOSYieldPi0SysErrPbPb6080->GetX();
Double_t* yValPHOSStat6080 = graphPHOSYieldPi0SysErrPbPb6080->GetY();
for (Int_t i = 0; i < 16; i++){
graphPHOSYieldPi0SysErrPbPb6080Red->SetPoint(i,xValPHOStat6080[i+phosOffset], yValPHOSStat6080[i+phosOffset]);
graphPHOSYieldPi0SysErrPbPb6080Red->SetPointError(i, graphPHOSYieldPi0SysErrPbPb6080->GetErrorXlow(i+phosOffset),graphPHOSYieldPi0SysErrPbPb6080->GetErrorXhigh(i+phosOffset), graphPHOSYieldPi0SysErrPbPb6080->GetErrorYlow(i+phosOffset), graphPHOSYieldPi0SysErrPbPb6080->GetErrorYhigh(i+phosOffset));
graphSysErrRAAYieldPi0PHOSPbPb6080Red->SetPoint(i,xValPHOStat6080[i+phosOffset], yValPHOSStat6080[i+phosOffset]);
graphSysErrRAAYieldPi0PHOSPbPb6080Red->SetPointError(i, graphSysErrRAAYieldPi0PHOSPbPb6080->GetErrorXlow(i+phosOffset),graphSysErrRAAYieldPi0PHOSPbPb6080->GetErrorXhigh(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb6080->GetErrorYlow(i+phosOffset), graphSysErrRAAYieldPi0PHOSPbPb6080->GetErrorYhigh(i+phosOffset));
}
histoPi0PHOSPbPb6080Red = new TH1D("histoPi0PHOSPbPb6080Red","",17,fBinsPi0HIPtPHOS);
for (Int_t i =1; i < 17; i++){
histoPi0PHOSPbPb6080Red->SetBinContent(i,histoPi0PHOSPbPb6080->GetBinContent(i+phosOffset));
histoPi0PHOSPbPb6080Red->SetBinError(i,histoPi0PHOSPbPb6080->GetBinError(i+phosOffset));
}
filePHOSPP = new TFile(fileNameCaloPHOSPP);
directoryPHOSPi0PP = (TDirectory*)filePHOSPP->Get("pp2760");
histoPHOSMassDataPP = (TH1D*)directoryPHOSPi0PP->Get("mass2_GS_Data");
histoPHOSWidthDataPP = (TH1D*)directoryPHOSPi0PP->Get("width2_GS_Data");
histoPHOSMassMCPP = (TH1D*)directoryPHOSPi0PP->Get("mass2_GS_MC");
histoPHOSWidthMCPP = (TH1D*)directoryPHOSPi0PP->Get("width2_GS_MC");
histoPHOSMassDataPP->Scale(1000.);
histoPHOSMassMCPP->Scale(1000.);
histoPHOSWidthDataPP->Scale(1000.);
histoPHOSWidthMCPP->Scale(1000.);
histoPHOSMassDataPP->SetBinContent(histoPHOSMassDataPP->GetNbinsX(),0);
histoPHOSMassDataPP->SetBinContent(1,0);
histoPHOSMassMCPP->SetBinContent(histoPHOSMassMCPP->GetNbinsX(),0);
histoPHOSMassMCPP->SetBinContent(1,0);
histoPHOSWidthDataPP->SetBinContent(histoPHOSWidthDataPP->GetNbinsX(),10000.);
histoPHOSWidthDataPP->SetBinContent(1,10000.);
histoPHOSWidthMCPP->SetBinContent(histoPHOSWidthMCPP->GetNbinsX(),10000.);
histoPHOSWidthMCPP->SetBinContent(1,10000.);
maxPtPi0PbPb0005 = histoPi0PHOSPbPb0005Red->GetXaxis()->GetBinUpEdge(histoPi0PHOSPbPb0005Red->GetNbinsX()-1);
cout << maxPtPi0PbPb0005 << endl;
maxPtPi0PbPb0010 = histoPi0PHOSPbPb0010Red->GetXaxis()->GetBinUpEdge(histoPi0PHOSPbPb0010Red->GetNbinsX()-1);
cout << maxPtPi0PbPb0010 << endl;
maxPtPi0PbPb0510 = histoPi0PHOSPbPb0510Red->GetXaxis()->GetBinUpEdge(histoPi0PHOSPbPb0510Red->GetNbinsX()-1);
cout << maxPtPi0PbPb0510 << endl;
maxPtPi0PbPb1020 = histoPi0PHOSPbPb1020Red->GetXaxis()->GetBinUpEdge(histoPi0PHOSPbPb1020Red->GetNbinsX()-1);
cout << maxPtPi0PbPb4060 << endl;
cout << maxPtPi0PbPb1020 << endl;
maxPtPi0PbPb2040 = histoPi0PHOSPbPb2040Red->GetXaxis()->GetBinUpEdge(histoPi0PHOSPbPb2040Red->GetNbinsX()-1);
cout << maxPtPi0PbPb2040 << endl;
maxPtPi0PbPb4060 = histoPi0PHOSPbPb4060Red->GetXaxis()->GetBinUpEdge(histoPi0PHOSPbPb4060Red->GetNbinsX()-1);
maxPtPi0PbPb6080 = histoPi0PHOSPbPb6080Red->GetXaxis()->GetBinUpEdge(histoPi0PHOSPbPb6080Red->GetNbinsX()-1);
cout << maxPtPi0PbPb6080 << endl;
fileEMCALPbPb = new TFile(fileNameCaloEMCALPbPb);
directoryEMCALPi0PbPb0010 = (TDirectory*)fileEMCALPbPb->Get("Pi02.76TeV_PbPb_0-10");
cout << "**************************************************************************" << endl;
cout << "*****************************EMCAL mass data******************************" << endl;
cout << "**************************************************************************" << endl;
graphEMCALMassData0010 = (TGraphErrors*)directoryEMCALPi0PbPb0010->Get("MassPi0");
for (Int_t i = graphEMCALMassData0010->GetN()-1; i > 8; i--){
graphEMCALMassData0010->RemovePoint(graphEMCALMassData0010->GetN()-1);
}
graphEMCALMassData0010 = ScaleGraph(graphEMCALMassData0010,1000);
cout << "**************************************************************************" << endl;
cout << "*****************************EMCAL mass MC********************************" << endl;
cout << "**************************************************************************" << endl;
graphEMCALMassMC0010 = (TGraphErrors*)directoryEMCALPi0PbPb0010->Get("TrueMassPi0");
graphEMCALMassMC0010->Print();
for (Int_t i = graphEMCALMassMC0010->GetN()-1; i > 8; i--){
graphEMCALMassMC0010->RemovePoint(graphEMCALMassMC0010->GetN()-1);
}
graphEMCALMassMC0010->Print();
graphEMCALMassMC0010 = ScaleGraph(graphEMCALMassMC0010,1000);
graphEMCALWidthData0010 = (TGraphErrors*)directoryEMCALPi0PbPb0010->Get("FWHMPi0MeV");
for (Int_t i = graphEMCALWidthData0010->GetN()-1; i > 8; i--){
graphEMCALWidthData0010->RemovePoint(graphEMCALWidthData0010->GetN()-1);
}
graphEMCALWidthData0010->Print();
graphEMCALWidthMC0010 = (TGraphErrors*)directoryEMCALPi0PbPb0010->Get("TrueFWHMPi0MeV");
for (Int_t i = graphEMCALWidthMC0010->GetN()-1; i > 8; i--){
graphEMCALWidthMC0010->RemovePoint(graphEMCALWidthMC0010->GetN()-1);
}
graphEMCALWidthMC0010->Print();
//
// histoEMCALWidthData0005->Scale(1000.);
// histoEMCALWidthMC0005->Scale(1000.);
// histoEMCALMassData0010->Scale(1000.);
// histoEMCALMassMC0010->Scale(1000.);
// for (Int_t i = 0; i < histoEMCALWidthData0005->GetXaxis()->FindBin(2.0); i++){
// histoEMCALWidthData0005->SetBinContent(i,10000.);
// histoEMCALMassData0005->SetBinContent(i,10000.);
// }
// for (Int_t i = 0; i < histoEMCALWidthMC0005->GetXaxis()->FindBin(2.0); i++){
// histoEMCALWidthMC0005->SetBinContent(i,10000.);
// histoEMCALMassMC0005->SetBinContent(i,10000.);
// }
// histoEMCALMassData0005->SetBinContent(histoEMCALMassData0005->GetNbinsX(),0);
// histoEMCALMassMC0005->SetBinContent(histoEMCALMassMC0005->GetNbinsX(),0);;
// histoEMCALWidthData0005->SetBinContent(histoEMCALWidthData0005->GetNbinsX(),10000.);
// histoEMCALWidthMC0005->SetBinContent(histoEMCALWidthMC0005->GetNbinsX(),10000.);
nColl0005 = GetNCollFromName("0005");
nColl0010 = GetNCollFromName("0010");
nColl0510 = GetNCollFromName("0510");
nColl1020 = GetNCollFromName("1020");
nColl2040 = GetNCollFromName("2040");