424 for Particle
in Particles:
425 inputFile = ROOT.TFile.Open(
'{}/{}/Properities_{}.root'.
format(ResultDir,Particle,Particle))
426 inputFile2 = ROOT.TFile.Open(
'{}/data/data.root'.
format(ResultDir))
429 outputFile = ROOT.TFile.Open(
'{}/{}/{}_Ratio.root'.
format(ResultDir, Particle, Particle),
'RECREATE')
433 LateralSpreadList = []
434 ResponseRatioList = []
435 ResolutionRatioList = []
436 LateralSpreadRatioList = []
439 ger_dataresponse = inputFile2.Get(
"{}_Response".
format(Particle))
440 ger_dataresolution = inputFile2.Get(
"{}_Resolution".
format(Particle))
441 ger_datalateralspread = inputFile2.Get(
"{}_LateralSpread".
format(Particle))
443 datalongitudinalprofilelist = []
444 datanormalizedlongitudinalprofilelist = []
447 mclongitudinalprofilelists = []
448 mcnormalizedlongitudinalprofilelists = []
450 longitudinalprofileratiolists = []
451 normalizedlongitudinalprofileratiolists = []
454 for Energy
in Energies:
456 if Particle==
'pr' and Energy==20000:
continue
457 datalongitudinalprofilelist.append(inputFile2.Get(
"{}_LongitudinalProfile_{}GeV".
format(Particle, Energy/1000)))
458 datanormalizedlongitudinalprofilelist.append(inputFile2.Get(
"{}_NormalizedLongitudinalProfile{}GeV".
format(Particle, Energy/1000)))
462 for PhysicsList
in PhysicsLists:
463 ger_mcresponse = inputFile.Get(
"{}_{}_Response".
format(Particle, PhysicsList))
464 ger_mcresponse.SetTitle(PhysicsList)
465 ger_mcresolution = inputFile.Get(
"{}_{}_Resolution".
format(Particle, PhysicsList))
466 ger_mcresolution.SetTitle(PhysicsList)
467 ger_mclateralspread = inputFile.Get(
"{}_{}_LateralSpread".
format(Particle, PhysicsList))
468 ger_mclateralspread.SetTitle(PhysicsList)
470 ResponseList.append(ger_mcresponse)
471 ResolutionList.append(ger_mcresolution)
472 LateralSpreadList.append(ger_mclateralspread)
474 N = ger_dataresponse.GetN()
478 h_data_response = ROOT.TH1F(
"h_data_response",
"data",N, 0, N) ;
479 h_data_resolution = ROOT.TH1F(
"h_data_resolution",
"data",N, 0, N) ;
480 h_data_lateralspread = ROOT.TH1F(
"h_data_lateralspread",
"data",N, 0, N) ;
481 Xs = ger_dataresponse.GetX()
482 Xerrors = ger_dataresponse.GetEX()
483 dataresponses = ger_dataresponse.GetY()
484 dataresolutions = ger_dataresolution.GetY()
485 datalateralspreads = ger_datalateralspread.GetY()
488 h_data_response.SetBinContent(i+1, dataresponses[i])
489 h_data_response.SetBinError(i+1, ger_dataresponse.GetErrorY(i))
490 h_data_resolution.SetBinContent(i+1, dataresolutions[i])
491 h_data_resolution.SetBinError(i+1, ger_dataresolution.GetErrorY(i))
492 h_data_lateralspread.SetBinContent(i+1, datalateralspreads[i])
493 h_data_lateralspread.SetBinError(i+1, ger_datalateralspread.GetErrorY(i))
495 h_mc_response = ROOT.TH1F(
"h_mc_response",
"",N, 0, N) ;
496 h_mc_resolution = ROOT.TH1F(
"h_mc_resolution",
"",N, 0, N) ;
497 h_mc_lateralspread = ROOT.TH1F(
"h_mc_lateralspread",
"",N, 0, N) ;
498 mcresponses = ger_mcresponse.GetY()
499 mcresolutions = ger_mcresolution.GetY()
500 mclateralspreads = ger_mclateralspread.GetY()
504 h_mc_response.SetBinContent(i+1, mcresponses[i+1])
505 h_mc_response.SetBinError(i+1, ger_mcresponse.GetErrorY(i+1))
506 h_mc_resolution.SetBinContent(i+1, mcresolutions[i+1])
507 h_mc_resolution.SetBinError(i+1, ger_mcresolution.GetErrorY(i+1))
508 h_mc_lateralspread.SetBinContent(i+1, mclateralspreads[i])
509 h_mc_lateralspread.SetBinError(i+1, ger_mclateralspread.GetErrorY(i+1))
511 h_mc_response.SetBinContent(i+1, mcresponses[i])
512 h_mc_response.SetBinError(i+1, ger_mcresponse.GetErrorY(i))
513 h_mc_resolution.SetBinContent(i+1, mcresolutions[i])
514 h_mc_resolution.SetBinError(i+1, ger_mcresolution.GetErrorY(i))
515 h_mc_lateralspread.SetBinContent(i+1, mclateralspreads[i])
516 h_mc_lateralspread.SetBinError(i+1, ger_mclateralspread.GetErrorY(i))
518 h_response_ratio = h_mc_response.Clone()
519 h_response_ratio.Divide(h_data_response)
520 h_resolution_ratio = h_mc_resolution.Clone()
521 h_resolution_ratio.Divide(h_data_resolution)
522 h_lateralspread_ratio = h_mc_lateralspread.Clone()
523 h_lateralspread_ratio.Divide(h_data_lateralspread)
525 ger_response_ratio = ROOT.TGraphErrors()
526 ger_response_ratio.SetName(
"{}_{}_Response_Ratio".
format(Particle, PhysicsList))
527 ger_response_ratio.SetTitle(PhysicsList)
528 ger_resolution_ratio = ROOT.TGraphErrors()
529 ger_resolution_ratio.SetName(
"{}_{}_Resolution_Ratio".
format(Particle, PhysicsList))
530 ger_resolution_ratio.SetTitle(PhysicsList)
531 ger_lateralspread_ratio = ROOT.TGraphErrors()
532 ger_lateralspread_ratio.SetName(PhysicsList)
533 ger_lateralspread_ratio.SetTitle(PhysicsList)
536 ger_response_ratio.SetPoint(i, Xs[i], h_response_ratio.GetBinContent(i+1))
537 ger_response_ratio.SetPointError(i, Xerrors[i], h_response_ratio.GetBinError(i+1))
538 ger_resolution_ratio.SetPoint(i, Xs[i], h_resolution_ratio.GetBinContent(i+1))
539 ger_resolution_ratio.SetPointError(i, Xerrors[i], h_resolution_ratio.GetBinError(i+1))
540 ger_lateralspread_ratio.SetPoint(i, Xs[i], h_lateralspread_ratio.GetBinContent(i+1))
541 ger_lateralspread_ratio.SetPointError(i, Xerrors[i], h_lateralspread_ratio.GetBinError(i+1))
542 ger_response_ratio.GetXaxis().SetTitle(
"E_{beam}[GeV]")
543 ger_response_ratio.GetYaxis().SetTitle(
"MC/Data")
544 ger_resolution_ratio.GetXaxis().SetTitle(
"E_{beam}[GeV]")
545 ger_resolution_ratio.GetYaxis().SetTitle(
"MC/Data")
546 ger_lateralspread_ratio.GetXaxis().SetTitle(
"E_{beam}[GeV]")
547 ger_lateralspread_ratio.GetYaxis().SetTitle(
"MC/Data")
551 ger_response_ratio.Write()
552 ger_resolution_ratio.Write()
553 ger_lateralspread_ratio.Write()
555 ResponseRatioList.append(ger_response_ratio)
556 ResolutionRatioList.append(ger_resolution_ratio)
557 LateralSpreadRatioList.append(ger_lateralspread_ratio)
560 DrawSingleGraphErrorsOnCanvas(
"{}/{}/{}_{}_LateralSpread_Ratio".
format(PlotDir, Particle, Particle, PhysicsList), ger_lateralspread_ratio,
"AP",
False,
False,
False, PhysicsList)
561 DrawSingleGraphErrorsOnCanvas(
"{}/{}/{}_{}_Resolution_Ratio".
format(PlotDir, Particle, Particle, PhysicsList), ger_resolution_ratio,
"AP",
False,
False,
False, PhysicsList)
566 mclongitudinalprofilelist=[]
567 mcnormalizedlongitudinalprofilelist=[]
568 mclongitudinalprofileratiolist=[]
569 mcnormalizedlongitudinalprofileratiolist=[]
570 for Energy
in Energies:
572 if Particle==
'pr' and Energy==20000:
continue
573 mclongitudinalprofilelist.append(inputFile.Get(
"{}_{}GeV_{}_LongitudinalProfile".
format(Particle, Energy/1000,PhysicsList)))
574 mcnormalizedlongitudinalprofilelist.append(inputFile.Get(
"{}_{}GeV_{}_NormalizedLongitudinalProfile".
format(Particle, Energy/1000, PhysicsList)))
575 print mclongitudinalprofilelist, mcnormalizedlongitudinalprofilelist
578 for i
in range(len(mclongitudinalprofilelist)):
579 longitudinalprofilelistratio = mclongitudinalprofilelist[i].Clone()
580 longitudinalprofilelistratio.Divide(datalongitudinalprofilelist[i])
581 longitudinalprofilelistratio.SetName(longitudinalprofilelistratio.GetName()+
"_Ratio")
582 longitudinalprofilelistratio.GetYaxis().SetTitle(
"MC/Data")
583 longitudinalprofilelistratio.GetYaxis().SetRangeUser(0.65, 1.45)
584 longitudinalprofilelistratio.Write()
585 mclongitudinalprofileratiolist.append(longitudinalprofilelistratio)
586 normalizedlongitudinalprofilelistratio = mcnormalizedlongitudinalprofilelist[i].Clone()
587 normalizedlongitudinalprofilelistratio.Divide(datanormalizedlongitudinalprofilelist[i])
588 normalizedlongitudinalprofilelistratio.SetName(normalizedlongitudinalprofilelistratio.GetName()+
"_Ratio")
589 normalizedlongitudinalprofilelistratio.GetYaxis().SetTitle(
"MC/Data")
590 normalizedlongitudinalprofilelistratio.GetYaxis().SetRangeUser(0.65, 1.45)
591 normalizedlongitudinalprofilelistratio.Write()
592 mcnormalizedlongitudinalprofileratiolist.append(normalizedlongitudinalprofilelistratio)
595 DrawSingleHistOnCanvas(
"{}/{}/{}_{}_{}_LongitudinalProfile_Ratio".
format(PlotDir, Particle, Particle, Energies[i+1]/1000, PhysicsList),longitudinalprofilelistratio,
"PE",
False,
False)
596 DrawSingleHistOnCanvas(
"{}/{}/{}_{}_{}_NormalizedLongitudinalProfile_Ratio".
format(PlotDir, Particle, Particle, Energies[i+1]/1000, PhysicsList),normalizedlongitudinalprofilelistratio,
"PE",
False,
False)
598 DrawSingleHistOnCanvas(
"{}/{}/{}_{}_{}_LongitudinalProfile_Ratio".
format(PlotDir, Particle, Particle, Energies[i]/1000, PhysicsList),longitudinalprofilelistratio,
"PE",
False,
False)
599 DrawSingleHistOnCanvas(
"{}/{}/{}_{}_{}_NormalizedLongitudinalProfile_Ratio".
format(PlotDir, Particle, Particle, Energies[i]/1000, PhysicsList),normalizedlongitudinalprofilelistratio,
"PE",
False,
False)
601 mclongitudinalprofilelists.append(mclongitudinalprofilelist)
602 mcnormalizedlongitudinalprofilelists.append(mcnormalizedlongitudinalprofilelist)
603 longitudinalprofileratiolists.append(mclongitudinalprofileratiolist)
604 normalizedlongitudinalprofileratiolists.append(mcnormalizedlongitudinalprofileratiolist)
608 FullParticleName =
"Pion"
609 DrawFourHistsOnCanvas(
"{}/{}/{}_{}_LongitudinalProfile_Ratio".
format(PlotDir, Particle, Particle, PhysicsList),mclongitudinalprofileratiolist[0],mclongitudinalprofileratiolist[1],mclongitudinalprofileratiolist[2],mclongitudinalprofileratiolist[3],
"PE",
"pesame",
"pesame",
"pesame",
False,
False,
False, FullParticleName, PhysicsList)
610 DrawFourHistsOnCanvas(
"{}/{}/{}_{}_NormalizedLongitudinalProfile_Ratio".
format(PlotDir, Particle, Particle, PhysicsList),mcnormalizedlongitudinalprofileratiolist[0],mcnormalizedlongitudinalprofileratiolist[1],mcnormalizedlongitudinalprofileratiolist[2],mcnormalizedlongitudinalprofileratiolist[3],
"PE",
"pesame",
"pesame",
"pesame",
False,
False,
False, FullParticleName,PhysicsList)
612 FullParticleName =
"Proton"
613 DrawThreeHistsOnCanvas(
"{}/{}/{}_{}_LongitudinalProfile_Ratio".
format(PlotDir, Particle, Particle, PhysicsList),mclongitudinalprofileratiolist[0],mclongitudinalprofileratiolist[1],mclongitudinalprofileratiolist[2],
"PE",
"pesame",
"pesame",
False,
False,
False, FullParticleName, PhysicsList)
614 DrawThreeHistsOnCanvas(
"{}/{}/{}_{}_NormalizedLongitudinalProfile_Ratio".
format(PlotDir, Particle, Particle, PhysicsList),mcnormalizedlongitudinalprofileratiolist[0],mcnormalizedlongitudinalprofileratiolist[1],mcnormalizedlongitudinalprofileratiolist[2],
"PE",
"pesame",
"pesame",
False,
False,
False, FullParticleName, PhysicsList)
618 FullParticleName =
"Pion"
619 ger_dataresponse.SetTitle(
"Data")
620 ger_dataresolution.SetTitle(
"Data")
621 ger_datalateralspread.SetTitle(
"Data")
623 FullParticleName =
"Proton"
624 ger_dataresponse.GetXaxis().SetRangeUser(40, 190)
625 ger_dataresolution.GetXaxis().SetRangeUser(40, 190)
626 ger_datalateralspread.GetXaxis().SetRangeUser(40, 190)
627 ger_dataresponse.SetTitle(
"Data")
628 ger_dataresolution.SetTitle(
"Data")
629 ger_datalateralspread.SetTitle(
"Data")
630 for npr
in range(len(ResponseList)):
631 ResponseList[npr].GetXaxis().SetRangeUser(40, 190)
632 ResolutionList[npr].GetXaxis().SetRangeUser(40, 190)
633 LateralSpreadList[npr].GetXaxis().SetRangeUser(40, 190)
634 ResponseRatioList[npr].GetXaxis().SetRangeUser(40, 190)
635 ResolutionRatioList[npr].GetXaxis().SetRangeUser(40, 190)
636 LateralSpreadRatioList[npr].GetXaxis().SetRangeUser(40, 190)
637 ResponseList[npr].RemovePoint(0)
638 ResolutionList[npr].RemovePoint(0)
639 LateralSpreadList[npr].RemovePoint(0)
644 DrawFourGraphErrorsOnCanvas(
"{}/{}/{}_Response_Ratio".
format(PlotDir, Particle, Particle),ResponseRatioList[0], ResponseRatioList[1], ResponseRatioList[2],ResponseRatioList[3],
"AP",
"AP",
"AP",
"AP",
False,
False,
False, FullParticleName)
645 DrawTopFiveGraphErrorsAndBottomFourGraphErrorsOnCanvas(
"{}/{}/{}_TopResponseBottomRatio".
format(PlotDir, Particle, Particle),ger_dataresponse, ResponseList[0], ResponseList[1], ResponseList[2],ResponseList[3], ResponseRatioList[0], ResponseRatioList[1], ResponseRatioList[2],ResponseRatioList[3],
"AP",
"AP",
"AP",
"AP",
"AP",
"AP",
"AP",
"AP",
"AP",
False,
False,
False,
False, FullParticleName)
646 DrawFourGraphErrorsOnCanvas(
"{}/{}/{}_Resolution_Ratio".
format(PlotDir, Particle, Particle),ResolutionRatioList[0], ResolutionRatioList[1], ResolutionRatioList[2],ResolutionRatioList[3],
"AP",
"AP",
"AP",
"AP",
False,
False,
False,FullParticleName)
647 DrawTopFiveGraphErrorsAndBottomFourGraphErrorsOnCanvas(
"{}/{}/{}_TopResolutionBottomRatio".
format(PlotDir, Particle, Particle),ger_dataresolution, ResolutionList[0], ResolutionList[1], ResolutionList[2],ResolutionList[3], ResolutionRatioList[0], ResolutionRatioList[1], ResolutionRatioList[2],ResolutionRatioList[3],
"AP",
"AP",
"AP",
"AP",
"AP",
"AP",
"AP",
"AP",
"AP",
False,
False,
False,
False, FullParticleName)
648 DrawFourGraphErrorsOnCanvas(
"{}/{}/{}_LateralSpread_Ratio".
format(PlotDir, Particle, Particle),LateralSpreadRatioList[0], LateralSpreadRatioList[1], LateralSpreadRatioList[2],LateralSpreadRatioList[3],
"AP",
"AP",
"AP",
"AP",
False,
False,
False,FullParticleName)
649 DrawTopFiveGraphErrorsAndBottomFourGraphErrorsOnCanvas(
"{}/{}/{}_TopLateralSpreadBottomRatio".
format(PlotDir, Particle, Particle),ger_datalateralspread, LateralSpreadList[0], LateralSpreadList[1], LateralSpreadList[2],LateralSpreadList[3], LateralSpreadRatioList[0], LateralSpreadRatioList[1], LateralSpreadRatioList[2],LateralSpreadRatioList[3],
"AP",
"AP",
"AP",
"AP",
"AP",
"AP",
"AP",
"AP",
"AP",
False,
False,
False,
False, FullParticleName)
651 for i
in range(len(Energies)):
653 datalongitudinalprofilelist[i].GetYaxis().SetRangeUser(5E-3, 100.)
654 if(Energies[i]==20000):
655 datalongitudinalprofilelist[i].GetYaxis().SetRangeUser(5E-3, 10.)
656 datalongitudinalprofilelist[i].SetTitle(
"Data")
657 mclongitudinalprofilelists[0][i].SetTitle(PhysicsLists[0])
658 mclongitudinalprofilelists[1][i].SetTitle(PhysicsLists[1])
659 mclongitudinalprofilelists[2][i].SetTitle(PhysicsLists[2])
660 mclongitudinalprofilelists[3][i].SetTitle(PhysicsLists[3])
661 longitudinalprofileratiolists[0][i].SetTitle(PhysicsLists[0])
662 longitudinalprofileratiolists[1][i].SetTitle(PhysicsLists[1])
663 longitudinalprofileratiolists[2][i].SetTitle(PhysicsLists[2])
664 longitudinalprofileratiolists[3][i].SetTitle(PhysicsLists[3])
665 datanormalizedlongitudinalprofilelist[i].GetYaxis().SetRangeUser(5E-5, 1.)
666 datanormalizedlongitudinalprofilelist[i].SetTitle(
"Data")
667 mcnormalizedlongitudinalprofilelists[0][i].SetTitle(PhysicsLists[0])
668 mcnormalizedlongitudinalprofilelists[1][i].SetTitle(PhysicsLists[1])
669 mcnormalizedlongitudinalprofilelists[2][i].SetTitle(PhysicsLists[2])
670 mcnormalizedlongitudinalprofilelists[3][i].SetTitle(PhysicsLists[3])
671 normalizedlongitudinalprofileratiolists[0][i].SetTitle(PhysicsLists[0])
672 normalizedlongitudinalprofileratiolists[1][i].SetTitle(PhysicsLists[1])
673 normalizedlongitudinalprofileratiolists[2][i].SetTitle(PhysicsLists[2])
674 normalizedlongitudinalprofileratiolists[3][i].SetTitle(PhysicsLists[3])
677 DrawFiveHistsOnCanvas(
"{}/{}/{}_LongitudinalProfileWithData_{}GeV".
format(PlotDir, Particle, Particle, Energies[i]/1000),datalongitudinalprofilelist[i],mclongitudinalprofilelists[0][i], mclongitudinalprofilelists[1][i],mclongitudinalprofilelists[2][i],mclongitudinalprofilelists[3][i],
"PE",
"PESame",
"PESame",
"PESame",
"PESame",
False,
True,
False,
"Pion",
"E_{beam}="+
"{}GeV".
format(Energies[i]/1000))
678 DrawFiveHistsOnCanvas(
"{}/{}/{}_NormalizedLongitudinalProfileWithData_{}GeV".
format(PlotDir, Particle, Particle, Energies[i]/1000),datanormalizedlongitudinalprofilelist[i],mcnormalizedlongitudinalprofilelists[0][i], mcnormalizedlongitudinalprofilelists[1][i],mcnormalizedlongitudinalprofilelists[2][i],mcnormalizedlongitudinalprofilelists[3][i],
"PE",
"PESame",
"PESame",
"PESame",
"PESame",
False,
True,
False,
"Pion",
"E_{beam}="+
"{}GeV".
format(Energies[i]/1000))
679 DrawFourHistsOnCanvas(
"{}/{}/{}_LongitudinalProfile_Ratio_{}GeV".
format(PlotDir, Particle, Particle, Energies[i]/1000),longitudinalprofileratiolists[0][i], longitudinalprofileratiolists[1][i],longitudinalprofileratiolists[2][i],longitudinalprofileratiolists[3][i],
"PE",
"PESame",
"PESame",
"PESame",
False,
False,
False,
"Pion",
"E_{beam}="+
"{}GeV".
format(Energies[i]/1000))
680 DrawFourHistsOnCanvas(
"{}/{}/{}_NormalizedLongitudinalProfile_Ratio_{}GeV".
format(PlotDir, Particle, Particle, Energies[i]/1000),normalizedlongitudinalprofileratiolists[0][i], normalizedlongitudinalprofileratiolists[1][i],normalizedlongitudinalprofileratiolists[2][i],normalizedlongitudinalprofileratiolists[3][i],
"PE",
"PESame",
"PESame",
"PESame",
False,
False,
False,
"Pion",
"E_{beam}="+
"{}GeV".
format(Energies[i]/1000))
681 DrawTopFiveHistsAndBottomFourHistsOnCanvas(
"{}/{}/{}_TopLongitudinalProfileBottomRatio_{}GeV".
format(PlotDir, Particle, Particle, Energies[i]/1000),datalongitudinalprofilelist[i], mclongitudinalprofilelists[0][i], mclongitudinalprofilelists[1][i],mclongitudinalprofilelists[2][i],mclongitudinalprofilelists[3][i], longitudinalprofileratiolists[0][i], longitudinalprofileratiolists[1][i],longitudinalprofileratiolists[2][i],longitudinalprofileratiolists[3][i],
"PE",
"PESame",
"PESame",
"PESame",
"PESame",
"PE",
"PESame",
"PESame",
"PESame",
False,
True,
False,
False,
"Pion",
"E_{beam}="+
"{}GeV".
format(Energies[i]/1000))
682 DrawTopFiveHistsAndBottomFourHistsOnCanvas(
"{}/{}/{}_TopNormalizedLongitudinalProfileBottomRatio_{}GeV".
format(PlotDir, Particle, Particle, Energies[i]/1000),datanormalizedlongitudinalprofilelist[i], mcnormalizedlongitudinalprofilelists[0][i], mcnormalizedlongitudinalprofilelists[1][i],mcnormalizedlongitudinalprofilelists[2][i],mcnormalizedlongitudinalprofilelists[3][i], normalizedlongitudinalprofileratiolists[0][i], normalizedlongitudinalprofileratiolists[1][i],normalizedlongitudinalprofileratiolists[2][i],normalizedlongitudinalprofileratiolists[3][i],
"PE",
"PESame",
"PESame",
"PESame",
"PESame",
"PE",
"PESame",
"PESame",
"PESame",
False,
True,
False,
False,
"Pion",
"E_{beam}="+
"{}GeV".
format(Energies[i]/1000))
685 if Energies[i]==20000:
continue
686 datalongitudinalprofilelist[i-1].GetYaxis().SetRangeUser(5E-3, 100.)
687 datalongitudinalprofilelist[i-1].SetTitle(
"Data")
688 mclongitudinalprofilelists[0][i-1].SetTitle(PhysicsLists[0])
689 mclongitudinalprofilelists[1][i-1].SetTitle(PhysicsLists[1])
690 mclongitudinalprofilelists[2][i-1].SetTitle(PhysicsLists[2])
691 mclongitudinalprofilelists[3][i-1].SetTitle(PhysicsLists[3])
692 longitudinalprofileratiolists[0][i-1].SetTitle(PhysicsLists[0])
693 longitudinalprofileratiolists[1][i-1].SetTitle(PhysicsLists[1])
694 longitudinalprofileratiolists[2][i-1].SetTitle(PhysicsLists[2])
695 longitudinalprofileratiolists[3][i-1].SetTitle(PhysicsLists[3])
696 datanormalizedlongitudinalprofilelist[i-1].GetYaxis().SetRangeUser(5E-5, 1.)
697 datanormalizedlongitudinalprofilelist[i-1].SetTitle(
"Data")
698 mcnormalizedlongitudinalprofilelists[0][i-1].SetTitle(PhysicsLists[0])
699 mcnormalizedlongitudinalprofilelists[1][i-1].SetTitle(PhysicsLists[1])
700 mcnormalizedlongitudinalprofilelists[2][i-1].SetTitle(PhysicsLists[2])
701 mcnormalizedlongitudinalprofilelists[3][i-1].SetTitle(PhysicsLists[3])
702 normalizedlongitudinalprofileratiolists[0][i-1].SetTitle(PhysicsLists[0])
703 normalizedlongitudinalprofileratiolists[1][i-1].SetTitle(PhysicsLists[1])
704 normalizedlongitudinalprofileratiolists[2][i-1].SetTitle(PhysicsLists[2])
705 normalizedlongitudinalprofileratiolists[3][i-1].SetTitle(PhysicsLists[3])
706 DrawFiveHistsOnCanvas(
"{}/{}/{}_LongitudinalProfileWithData_{}GeV".
format(PlotDir, Particle, Particle, Energies[i]/1000),datalongitudinalprofilelist[i-1],mclongitudinalprofilelists[0][i-1], mclongitudinalprofilelists[1][i-1],mclongitudinalprofilelists[2][i-1], mclongitudinalprofilelists[3][i-1],
"PE",
"PESame",
"PESame",
"PESame",
"PESame",
False,
True,
False,
"Proton",
"E_{beam}="+
"{}GeV".
format(Energies[i]/1000))
707 DrawFiveHistsOnCanvas(
"{}/{}/{}_NormalizedLongitudinalProfileWithData_{}GeV".
format(PlotDir, Particle, Particle, Energies[i]/1000),datanormalizedlongitudinalprofilelist[i-1],mcnormalizedlongitudinalprofilelists[0][i-1], mcnormalizedlongitudinalprofilelists[1][i-1],mcnormalizedlongitudinalprofilelists[2][i-1], mcnormalizedlongitudinalprofilelists[3][i-1],
"PE",
"PESame",
"PESame",
"PESame",
"PESame",
False,
True,
False,
"Proton",
"E_{beam}="+
"{}GeV".
format(Energies[i]/1000))
708 DrawFourHistsOnCanvas(
"{}/{}/{}_LongitudinalProfile_Ratio_{}GeV".
format(PlotDir, Particle, Particle, Energies[i]/1000),longitudinalprofileratiolists[0][i-1], longitudinalprofileratiolists[1][i-1],longitudinalprofileratiolists[2][i-1], longitudinalprofileratiolists[3][i-1],
"PE",
"PESame",
"PESame",
"PESame",
False,
False,
False,
"Proton",
"E_{beam}="+
"{}GeV".
format(Energies[i]/1000))
709 DrawFourHistsOnCanvas(
"{}/{}/{}_NormalizedLongitudinalProfile_Ratio_{}GeV".
format(PlotDir, Particle, Particle, Energies[i]/1000),normalizedlongitudinalprofileratiolists[0][i-1], normalizedlongitudinalprofileratiolists[1][i-1],normalizedlongitudinalprofileratiolists[2][i-1], normalizedlongitudinalprofileratiolists[3][i-1],
"PE",
"PESame",
"PESame",
"PESame",
False,
False,
False,
"Proton",
"E_{beam}="+
"{}GeV".
format(Energies[i]/1000))
710 DrawTopFiveHistsAndBottomFourHistsOnCanvas(
"{}/{}/{}_TopLongitudinalProfileBottomRatio_{}GeV".
format(PlotDir, Particle, Particle, Energies[i]/1000),datalongitudinalprofilelist[i-1], mclongitudinalprofilelists[0][i-1], mclongitudinalprofilelists[1][i-1],mclongitudinalprofilelists[2][i-1],mclongitudinalprofilelists[3][i-1], longitudinalprofileratiolists[0][i-1], longitudinalprofileratiolists[1][i-1],longitudinalprofileratiolists[2][i-1],longitudinalprofileratiolists[3][i-1],
"PE",
"PESame",
"PESame",
"PESame",
"PESame",
"PE",
"PESame",
"PESame",
"PESame",
False,
True,
False,
False,
"Proton",
"E_{beam}="+
"{}GeV".
format(Energies[i]/1000))
711 DrawTopFiveHistsAndBottomFourHistsOnCanvas(
"{}/{}/{}_TopNormalizedLongitudinalProfileBottomRatio_{}GeV".
format(PlotDir, Particle, Particle, Energies[i]/1000),datanormalizedlongitudinalprofilelist[i-1], mcnormalizedlongitudinalprofilelists[0][i-1], mcnormalizedlongitudinalprofilelists[1][i-1],mcnormalizedlongitudinalprofilelists[2][i-1],mcnormalizedlongitudinalprofilelists[3][i-1], normalizedlongitudinalprofileratiolists[0][i-1], normalizedlongitudinalprofileratiolists[1][i-1],normalizedlongitudinalprofileratiolists[2][i-1],normalizedlongitudinalprofileratiolists[3][i-1],
"PE",
"PESame",
"PESame",
"PESame",
"PESame",
"PE",
"PESame",
"PESame",
"PESame",
False,
True,
False,
False,
"Proton",
"E_{beam}="+
"{}GeV".
format(Energies[i]/1000))