Skip to content

Commit

Permalink
adaptation to histos in combinedhisto.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lopezzot committed Nov 17, 2022
1 parent 8f441ae commit 18ea2d3
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions util/combinedhisto.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def OverlapHisto(pl, energy, material):

celoss = TCanvas("e_loss", "e_loss", 500, 500)
legende_loss = TLegend(0.1, 0.7, 0.48, 0.9)
h1eloss1103.SetAxisRange(0., 3800., "Y")
h1eloss1103.Draw("histo")
legende_loss.AddEntry(h1eloss1103, "G411.0.p03-"+pl, "lep")
h1eloss1071.SetMarkerColor(kRed)
Expand Down Expand Up @@ -44,24 +45,25 @@ def OverlapHisto(pl, energy, material):

cmom = TCanvas("mom", "mom", 500, 500)
legende_mom = TLegend(0.1, 0.7, 0.48, 0.9)
h1mom1103.Draw("histo")
legende_mom.AddEntry(h1mom1103, "G411.0.p03-"+pl, "lep")
h1mom1071.SetMarkerColor(kRed)
h1mom1071.SetLineColor(kRed)
h1mom1071.Draw("same histo")
legende_mom.AddEntry(h1mom1071, "G410.7.p01-"+pl, "lep")
h1mom1063.SetMarkerColor(kBlue)
h1mom1063.SetLineColor(kBlue)
h1mom1063.Draw("same histo")
legende_mom.AddEntry(h1mom1063, "G410.6.p03-"+pl, "lep")
h1mom1043.SetMarkerColor(6)
h1mom1043.SetLineColor(6)
h1mom1043.SetAxisRange(0., 18000., "Y")
h1mom1043.Draw("histo")
legende_mom.AddEntry(h1mom1043, "G410.4.p03-"+pl, "lep")
h1mom1051.SetMarkerColor(kGreen)
h1mom1051.SetLineColor(kGreen)
h1mom1051.Draw("same histo")
legende_mom.AddEntry(h1mom1051, "G410.5.p01-"+pl, "lep")
h1mom1043.SetMarkerColor(6)
h1mom1043.SetLineColor(6)
h1mom1043.Draw("same histo")
legende_mom.AddEntry(h1mom1043, "G410.4.p03-"+pl, "lep")
h1mom1063.SetMarkerColor(kBlue)
h1mom1063.SetLineColor(kBlue)
h1mom1063.Draw("same histo")
legende_mom.AddEntry(h1mom1063, "G410.6.p03-"+pl, "lep")
h1mom1071.SetMarkerColor(kRed)
h1mom1071.SetLineColor(kRed)
h1mom1071.Draw("same histo")
legende_mom.AddEntry(h1mom1071, "G410.7.p01-"+pl, "lep")
h1mom1103.Draw("same histo")
legende_mom.AddEntry(h1mom1103, "G411.0.p03-"+pl, "lep")
legende_mom.Draw()

h1pi01043 = file1043.Get("Pi0_energy")
Expand Down Expand Up @@ -128,5 +130,7 @@ def OverlapHisto(pl, energy, material):
outputfile.Close()


OverlapHisto("QGSP", "100.", "G4_N")
#OverlapHisto("BERT", "2.00", "G4_N")
#OverlapHisto("QGSP", "100.", "G4_N")
#OverlapHisto("FTFP", "100.", "G4_N")
#OverlapHisto("FTFP", "10.0", "G4_Cu")
OverlapHisto("BERT", "2.00", "G4_Cu")

0 comments on commit 18ea2d3

Please sign in to comment.