Skip to content

Commit 6086449

Browse files
feat: Add differential cross-section plot example
Taken from http://madanalysis.irmp.ucl.ac.be/wiki/FAQNormalMode
1 parent 5e2120e commit 6086449

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

examples/differential_xsec_plot.ma5

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# differential cross-section plot
2+
# c.f. http://madanalysis.irmp.ucl.ac.be/wiki/FAQNormalMode
3+
4+
# install samples
5+
install samples
6+
7+
# load sample and set cross-section
8+
import /root/madanalysis5/samples/zz.lhe.gz as my_sample
9+
set my_sample.xsection = 123
10+
11+
# plot transverse momentum for leading positron
12+
plot PT(e+[1])
13+
14+
# Note that automatically this will create a selection
15+
display selection[1]
16+
17+
# change the luminosity value to get the cross-section
18+
set main.lumi = 1e-3 * 10
19+
20+
# Format the plot
21+
set selection[1].titleY = "$\\frac{d\\sigma}{dp_{T}}\ {\\rm [pb/GeV]}$" # matplotlib formatting
22+
# set selection[1].titleY = "#frac{d#sigma}{dp_{T}} [pb/GeV]" # ROOT formatting
23+
24+
# Run an analysis to make the plot
25+
submit differential_xsec_example

0 commit comments

Comments
 (0)