Changes between Initial Version and Version 1 of FAQNormalMode


Ignore:
Timestamp:
Nov 11, 2021, 12:02:09 AM (3 years ago)
Author:
jackaraz
Comment:

add differential xsec plotting

Legend:

Unmodified
Added
Removed
Modified
  • FAQNormalMode

    v1 v1  
     1== Frequently Asked Questions: Normal Mode ==
     2
     3This 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
     9Okay, 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}}}
     13You should be able to see that all necessary functionality is available to you. Now import your sample and set its cross-section
     14{{{
     15ma5>import samples/zz.lhe.gz as my_sample
     16ma5>set my_sample.xsection = 123
     17}}}
     18note 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{{{
     20ma5>plot PT(e+[1])
     21}}}
     22Note that automatically this will create a {{{selection}}}
     23{{{
     24ma5>display selection[1]
     25MA5:   * Plot: PT ( e+[1] )
     26MA5:   * Binning: nbins=100, xmin=0.0, xmax=1000.0, regions=[]
     27MA5:   * Stacking method: stacked
     28MA5:   * Particles under consideration: finalstate
     29MA5:   * 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{{{
     33ma5>set main.lumi = 1e-3 * 10 # see the bin size up there
     34set selection[1].titleY = "#frac{d#sigma}{dp_{T}} [pb/GeV]"
     35}}}
     36Note 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