| 1 | == Frequently Asked Questions: Normal Mode == |
| 2 | |
| 3 | This page includes remedies to the queries that we get on a daily basis. Hope the answer to your next question will be included here in the future. |
| 4 | |
| 5 | ---- |
| 6 | |
| 7 | * '''How can I create a differential cross-section plot?''' |
| 8 | |
| 9 | Okay, first of all, let's assume that you know what plots you want to prepare and you know that MadAnalysis assumes the cross-section is always in pb. So let's start running !MadAnalysis. |
| 10 | {{{ |
| 11 | $ ./bin/ma5 |
| 12 | }}} |
| 13 | You should be able to see that all necessary functionality is available to you. Now import your sample and set its cross-section |
| 14 | {{{ |
| 15 | ma5>import samples/zz.lhe.gz as my_sample |
| 16 | ma5>set my_sample.xsection = 123 |
| 17 | }}} |
| 18 | note that if you press tab after {{{ set my_sample.}}} you will see all the available options for the sample. Now let's plot transverse momentum for leading positron. |
| 19 | {{{ |
| 20 | ma5>plot PT(e+[1]) |
| 21 | }}} |
| 22 | Note that automatically this will create a {{{selection}}} |
| 23 | {{{ |
| 24 | ma5>display selection[1] |
| 25 | MA5: * Plot: PT ( e+[1] ) |
| 26 | MA5: * Binning: nbins=100, xmin=0.0, xmax=1000.0, regions=[] |
| 27 | MA5: * Stacking method: stacked |
| 28 | MA5: * Particles under consideration: finalstate |
| 29 | MA5: * Particle ordering: PTordering |
| 30 | }}} |
| 31 | ''Note try pressing tab after everything, you will see available options!'' By default, MadAnalysis is designed to plot the number of events, not cross-section so let's change the luminosity value to get the cross-section. Note that luminosity, by default, is always inverse fb. Also lets modify the y-axis label with proper units. |
| 32 | {{{ |
| 33 | ma5>set main.lumi = 1e-3 * 10 # see the bin size up there |
| 34 | set selection[1].titleY = "#frac{d#sigma}{dp_{T}} [pb/GeV]" |
| 35 | }}} |
| 36 | Note that my rendering engine for histogramming is ROOT that's why I used ROOT's LaTeX convention if you have a different engine, make sure that you are using proper LaTeX convention. And here is the final result: |
| 37 | |