== Frequently Asked Questions: Normal Mode == MOTTO: {{{Tab}}} is your friend, use it! Second MOTTO: Read the reference card and the manual, they are your friends too! === '''How can I create a differential cross-section plot?''' === 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. {{{ $ ./bin/ma5 }}} You should be able to see that all necessary functionality is available to you. Now import your sample and set its cross-section {{{ ma5>import samples/zz.lhe.gz as my_sample ma5>set my_sample.xsection = 123 }}} 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. {{{ ma5>plot PT(e+[1]) }}} Note that automatically this will create a {{{selection}}} {{{ ma5>display selection[1] MA5: * Plot: PT ( e+[1] ) MA5: * Binning: nbins=100, xmin=0.0, xmax=1000.0, regions=[] MA5: * Stacking method: stacked MA5: * Particles under consideration: finalstate MA5: * Particle ordering: PTordering }}} ''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 let's modify the y-axis label with proper units. {{{ ma5>set main.lumi = 1e-3 * 10 # see the bin size up there ma5>set selection[1].titleY = "#frac{d#sigma}{dp_{T}} [pb/GeV]" }}} 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 the proper LaTeX convention. And here is the final result: [[Image(http://madanalysis.irmp.ucl.ac.be/raw-attachment/wiki/FAQNormalMode/diffxsec.png)]] Note that if I wanted to use Matplotlib as my graphic renderer I could have chosen using {{{set main.graphic_render = matplotlib}}} command, given that matplotlib is available in the system. Then the title should be modified as follows {{{set selection[1].titleY = "$\\frac{d\\sigma}{dp_{T}}\ {\\rm [pb/GeV]}$"}}} since this is following the matplotlib's LaTeX convention. [[BR]] === '''Where do I see all the plot options?''' === 1) press the tab after typing the plot. 2) Read the reference card in your local {{{madanalysis/doc}}} folder. === '''How can I modify my plot?''' === Plots are stored under {{{selection}}} objects so first check which selection your plot is in by typing {{{display selection}}}. Once you find the selection ID, lets say {{{1}}} simply type {{{set selection[1].}}} and you will see all the available options to play with. === '''How can I modify my sample''' === First import your sample {{{ import my_sample.lhe as my_sample}}} then type {{{set my_sample.}}} to see all available options.