Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
ZX_PostProcessingPlotter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Christian Weber
ZX_PostProcessingPlotter
Commits
59c85326
Commit
59c85326
authored
6 years ago
by
Christian Weber
Browse files
Options
Downloads
Patches
Plain Diff
Plot Layout: added y-labels and changed spacing between TPads
parent
a04a2e35
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plotPostProcess.py
+16
-5
16 additions, 5 deletions
plotPostProcess.py
with
16 additions
and
5 deletions
plotPostProcess.py
+
16
−
5
View file @
59c85326
...
...
@@ -557,21 +557,26 @@ if __name__ == '__main__':
histPadYStart
=
3.
/
13
histPad
=
ROOT
.
TPad
(
"
histPad
"
,
"
histPad
"
,
0
,
histPadYStart
,
1
,
1
);
ROOT
.
SetOwnership
(
histPad
,
False
)
# Do this to prevent a segfault: https://sft.its.cern.ch/jira/browse/ROOT-9042
histPad
.
SetBottomMargin
(
0.
);
# Upper and lower plot are joined
histPad
.
SetGridx
();
# Vertical grid
histPad
.
SetBottomMargin
(
0.
04
);
# Upper and lower plot are joined
#
histPad.SetGridx(); # Vertical grid
histPad
.
Draw
();
# Draw the upper pad: pad1
histPad
.
cd
();
# pad1 becomes the current pad
backgroundTHStack
.
Draw
(
"
Hist
"
)
backgroundMergedTH1
=
mergeTHStackHists
(
backgroundTHStack
)
backgroundMergedTH1
=
mergeTHStackHists
(
backgroundTHStack
)
# get a merged background to draw uncertainty bars on the total backgroun
backgroundMergedTH1
.
Draw
(
"
same E2
"
)
#backgroundMergedTH1.SetMarkerStyle(25 )
backgroundMergedTH1
.
SetFillStyle
(
3004
)
backgroundMergedTH1
.
SetFillColor
(
1
)
backgroundTHStack
.
GetYaxis
().
SetTitle
(
"
Events /
"
+
str
(
backgroundMergedTH1
.
GetBinWidth
(
1
)
)
+
"
GeV
"
)
backgroundTHStack
.
GetYaxis
().
SetTitleSize
(
0.05
)
backgroundTHStack
.
GetYaxis
().
SetTitleOffset
(
0.8
)
backgroundTHStack
.
GetYaxis
().
CenterTitle
()
statsTexts
.
append
(
"
"
)
statsTexts
.
append
(
"
Background: %.2f #pm %.2f
"
%
(
getHistIntegralWithUnertainty
(
backgroundMergedTH1
))
)
...
...
@@ -604,8 +609,8 @@ if __name__ == '__main__':
ratioPad
=
ROOT
.
TPad
(
"
ratioPad
"
,
"
ratioPad
"
,
0
,
0
,
1
,
histPadYStart
);
ROOT
.
SetOwnership
(
ratioPad
,
False
)
# Do this to prevent a segfault: https://sft.its.cern.ch/jira/browse/ROOT-9042
ratioPad
.
SetTopMargin
(
0.
)
#
ratioPad.SetBottomMargin(0.3)
ratioPad
.
SetGrid
x
();
ratioPad
.
SetGrid
y
();
ratioPad
.
SetBottomMargin
(
0.3
)
ratioPad
.
SetGrid
y
();
#
ratioPad.SetGrid
x
();
ratioPad
.
Draw
();
# Draw the upper pad: pad1
ratioPad
.
cd
();
# pad1 becomes the current pad
...
...
@@ -621,6 +626,12 @@ if __name__ == '__main__':
ratioHist
.
GetYaxis
().
SetNdivisions
(
506
,
True
)
# XYY x minor divisions YY major ones, optimizing around these values = TRUE
ratioHist
.
GetYaxis
().
SetLabelSize
(
0.1
)
ratioHist
.
GetYaxis
().
SetTitle
(
"
Data / MC
"
)
ratioHist
.
GetYaxis
().
SetTitleSize
(
0.13
)
ratioHist
.
GetYaxis
().
SetTitleOffset
(
0.25
)
ratioHist
.
GetYaxis
().
CenterTitle
()
ratioHist
.
GetXaxis
().
SetLabelSize
(
0.12
)
ratioHist
.
GetXaxis
().
SetTitleSize
(
0.12
)
ratioHist
.
Draw
()
...
...
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