Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sergi Rodriguez Bosca
athena
Commits
7b012c2f
Commit
7b012c2f
authored
4 years ago
by
Daniela Kuechler
Browse files
Options
Downloads
Patches
Plain Diff
add legend for comparison plots
parent
be58f780
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Reconstruction/egamma/egammaValidation/scripts/EgammaARTmonitoring_plotsMaker.py
+29
-2
29 additions, 2 deletions
...gammaValidation/scripts/EgammaARTmonitoring_plotsMaker.py
with
29 additions
and
2 deletions
Reconstruction/egamma/egammaValidation/scripts/EgammaARTmonitoring_plotsMaker.py
+
29
−
2
View file @
7b012c2f
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
import
sys
import
sys
from
ROOT
import
gDirectory
,
gROOT
,
gStyle
,
kTRUE
,
kFALSE
,
\
from
ROOT
import
gDirectory
,
gROOT
,
gStyle
,
kTRUE
,
kFALSE
,
\
TCanvas
,
TFile
,
TH1
,
\
TCanvas
,
TFile
,
TH1
,
\
TH1D
,
TLegend
,
TPad
,
kBlack
,
kBlue
,
kRed
,
kGreen
,
kOrange
,
kCyan
,
kPink
TH1D
,
TLegend
,
TPad
,
kBlack
,
kBlue
,
kRed
,
kGreen
,
kOrange
,
kCyan
,
kPink
,
kGray
# gROOT.SetBatch(kTRUE)
# gROOT.SetBatch(kTRUE)
gStyle
.
SetOptStat
(
0
)
gStyle
.
SetOptStat
(
0
)
...
@@ -267,6 +267,9 @@ def make_conversion_plot(f_base, f_nightly, result_file):
...
@@ -267,6 +267,9 @@ def make_conversion_plot(f_base, f_nightly, result_file):
leg
=
TLegend
(
0.1
,
0.75
,
0.9
,
0.9
)
leg
=
TLegend
(
0.1
,
0.75
,
0.9
,
0.9
)
leg
.
SetNColumns
(
2
)
leg
.
SetNColumns
(
2
)
leg2
=
TLegend
(
0.5
,
0.7
,
0.9
,
0.75
)
leg2
.
SetNColumns
(
2
)
for
i
,
folder
in
enumerate
(
photon_conversion_list
):
for
i
,
folder
in
enumerate
(
photon_conversion_list
):
baseline
=
f_base
.
Get
(
baseline
=
f_base
.
Get
(
...
@@ -284,7 +287,7 @@ def make_conversion_plot(f_base, f_nightly, result_file):
...
@@ -284,7 +287,7 @@ def make_conversion_plot(f_base, f_nightly, result_file):
baseline
.
SetMinimum
(
baseline
.
SetMinimum
(
min
(
baseline
.
GetMinimum
(),
baseline
.
GetMinimum
())
*
0.7
)
min
(
baseline
.
GetMinimum
(),
baseline
.
GetMinimum
())
*
0.7
)
baseline
.
SetMaximum
(
baseline
.
SetMaximum
(
max
(
baseline
.
GetMaximum
(),
baseline
.
GetMaximum
())
*
1.
3
)
max
(
baseline
.
GetMaximum
(),
baseline
.
GetMaximum
())
*
1.
4
)
baseline
.
GetXaxis
().
SetTitle
(
baseline
.
GetXaxis
().
SetTitle
(
"
R^{reco}_{conv. vtx} - R^{true}_{conv. vtx} [mm]
"
)
"
R^{reco}_{conv. vtx} - R^{true}_{conv. vtx} [mm]
"
)
...
@@ -302,12 +305,22 @@ def make_conversion_plot(f_base, f_nightly, result_file):
...
@@ -302,12 +305,22 @@ def make_conversion_plot(f_base, f_nightly, result_file):
if
i
==
0
:
if
i
==
0
:
baseline
.
Draw
(
"
hist
"
)
baseline
.
Draw
(
"
hist
"
)
baselineDummy
=
baseline
.
Clone
()
baselineDummy
.
SetLineColor
(
kGray
+
3
)
baselineDummy
.
SetMarkerColor
(
kGray
+
3
)
nightlyDummy
=
nightly
.
Clone
()
nightlyDummy
.
SetLineColor
(
kGray
+
3
)
nightlyDummy
.
SetMarkerColor
(
kGray
+
3
)
leg2
.
AddEntry
(
baselineDummy
,
"
Baseline
"
,
"
l
"
)
leg2
.
AddEntry
(
nightlyDummy
,
"
Nightly
"
,
"
p
"
)
else
:
else
:
baseline
.
Draw
(
"
same hist
"
)
baseline
.
Draw
(
"
same hist
"
)
nightly
.
Draw
(
"
p same
"
)
nightly
.
Draw
(
"
p same
"
)
leg
.
Draw
()
leg
.
Draw
()
leg2
.
Draw
()
c1
.
Update
()
c1
.
Update
()
...
@@ -335,6 +348,9 @@ def make_photon_fraction_plot(f_base, f_nightly, result_file):
...
@@ -335,6 +348,9 @@ def make_photon_fraction_plot(f_base, f_nightly, result_file):
leg
=
TLegend
(
0.1
,
0.75
,
0.9
,
0.9
)
leg
=
TLegend
(
0.1
,
0.75
,
0.9
,
0.9
)
leg
.
SetNColumns
(
2
)
leg
.
SetNColumns
(
2
)
leg2
=
TLegend
(
0.5
,
0.7
,
0.9
,
0.75
)
leg2
.
SetNColumns
(
2
)
for
i
,
folder
in
enumerate
(
photon_fraction_list
):
for
i
,
folder
in
enumerate
(
photon_fraction_list
):
baseline
=
f_base
.
Get
(
baseline
=
f_base
.
Get
(
...
@@ -363,12 +379,23 @@ def make_photon_fraction_plot(f_base, f_nightly, result_file):
...
@@ -363,12 +379,23 @@ def make_photon_fraction_plot(f_base, f_nightly, result_file):
if
i
==
0
:
if
i
==
0
:
baseline
.
Draw
(
"
hist
"
)
baseline
.
Draw
(
"
hist
"
)
baselineDummy
=
baseline
.
Clone
()
baselineDummy
.
SetLineColor
(
kGray
+
3
)
baselineDummy
.
SetMarkerColor
(
kGray
+
3
)
nightlyDummy
=
nightly
.
Clone
()
nightlyDummy
.
SetLineColor
(
kGray
+
3
)
nightlyDummy
.
SetMarkerColor
(
kGray
+
3
)
leg2
.
AddEntry
(
baselineDummy
,
"
Baseline
"
,
"
l
"
)
leg2
.
AddEntry
(
nightlyDummy
,
"
Nightly
"
,
"
p
"
)
else
:
else
:
baseline
.
Draw
(
"
same hist
"
)
baseline
.
Draw
(
"
same hist
"
)
nightly
.
Draw
(
"
p same
"
)
nightly
.
Draw
(
"
p same
"
)
leg
.
Draw
()
leg
.
Draw
()
leg2
.
Draw
()
c1
.
Update
()
c1
.
Update
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment