Instalación, y generación de datos con MadGraph
Descarga e instalación.
El sitio oficial está en:
https://launchpad.net/mg5amcnlo
Ahí se puede consultar la versión mas reciente de dicho paquete, que para el momento de describir este Wiki era la versión
v2.5.2.
Se puede descargar directamente en el link (aquí o en la pagina oficial), o también usando el comando
wget (que es el caso nuestro). luego se debe de descomprimir, ejecutar e instalar complementos necesarios.
A continuación se muestra paso a paso el procedimiento anteriormente descrito en una terminal de bash (puede usarse como script)
#!/bin/bash
#Descarga del paquete
wget https://launchpad.net/mg5amcnlo/2.0/2.5.x/+download/MG5_aMC_v2.5.2.tar.gz
#Descompresión del paquete
tar -xzvf MG5_aMC_v2.5.2.tar.gz
cd MG5_aMC_v2.5.2
./bin/mg5_aMC
Dentro de la linea de comandos de MadGraph(MG) se instalan las otras dependencias que se van a usar.
- Notas:
- Para salir de la interfaz de MG se escribe el comando exit o se termina con ctr + C.
- Para poder instalar Delphes, debe de tener root instalado y cargado el path en el sistema (ver Instalación de root)
- Si se quiere se puede guardar los siguientes comandos como un archivo de texto y pasarlos a mg5_aMC como argumento, e.g. ./bin/mg5_aMC comandos.txt (sin MG5_aMC> esto es para indicar que estamos dentro de la linea de comandos de MG.)
MG5_aMC> install lhapdf6
MG5_aMC> install hepmc
MG5_aMC> install pythia8
MG5_aMC> install Delphes
Parche
En la versión v2.5.2, hay un error, que se corrige ejecutando el siguiente código en la terminal, ubicados en la carpeta MG5_aMC_v2.5.2
cd HEPTools/lhapdf6/share/LHAPDF
wget https://www.hepforge.org/archive/lhapdf/pdfsets/6.1/NNPDF23_lo_as_0130_qed.tar.gz
tar -xzvf NNPDF23_lo_as_0130_qed.tar.gz
...page...
Sintaxis Básica
De aquí en adelante, se supone que se está dentro de la interfaz de
MadGraph (i.e. ejecutando el comando ./bin/mg5_MC, luego se omite el
MG5_aMC>)
- El símbolo " > " se usa para separar estados finales de iniciales.
- Usando x x > y > z z z , se requiere que en el proceso de dos particulars x a tres ys, la partícula z sea la intermediaria, i.e. esté en el canal s.
- para prohibir una partícula en el canal s de un proceso, se usa " $ ", e.g. x x > z z $y, en el proceso de dos xs a dos zs, no puede haber ninguna partícula y en el canal s.
- De forma general con " / " se puede prohibir que una partícula aparezca en los diagramas internos, e.g. x x > z z / y, prohíbe que en el proceso se tengan ys internos.
- Se puede especificar procesos en cadena, usando comas, por ejemplo, si se quiere que dos partículas x, vayan a w y, y luego w vaya a z e y a e, entonces la sintaxis será: x x > w y, w > z, y > e.
- El comando define sirve para definir multi-partículas.
- Se pueden añadir tantos procesos como se quieran por medio del comando add process
Ejemplo: Para hacer la simulación de el proceso de producción de un par de quarks top a partir de dos protones
define p = u u~ d d~ c c~ s s~ b b~ g
generate p p > t t~
output ExclusiveTTbar5Flavourp
Donde en la primera linea lo que se hace es declarar una multi-partícula, en el segundo se pide que se generen eventos de dos protones a un par top anti-top, y en la tercera y última linea se indica la carpeta de salida del programa, i.e. donde
MadGraph generará todas los archivos resultado (MadGraph, Delphes, Pythia..)
En este punto solo genera los archivos de configuración de los programas, para llevar a cavo la simulación hay dos maneras:
- Directamente en la linea de comandos de MG, luego del comando generate, se ejecuta el comando launch, lo cual hará que MG pregunte por el uso de programas complemento así
************************************************************
* *
* W E L C O M E to *
* M A D G R A P H 5 _ a M C @ N L O *
* M A D E V E N T *
* *
* * * *
* * * * * *
* * * * * 5 * * * * *
* * * * * *
* * * *
* *
* VERSION 2.5.2 2016-12-10 *
* *
* The MadGraph5_aMC@NLO Development Team - Find us at *
* https://server06.fynu.ucl.ac.be/projects/madgraph *
* *
* Type 'help' for in-line help. *
* *
************************************************************
INFO: load configuration from /scratch/cms/Datos/ExclusiveTTbar5Flavourp/Cards/me5_configuration.txt
INFO: load configuration from /home/camilo/HEPTools/MadGraph/MG5_aMC_v2_5_2-root6/input/mg5_configuration.txt
INFO: load configuration from /scratch/cms/Datos/ExclusiveTTbar5Flavourp/Cards/me5_configuration.txt
Using default text editor "vi". Set another one in ./input/mg5_configuration.txt
generate_events run_01
The following switches determine which programs are run:
/--------------------------------------------------------------------------------------------------\
| 1. Choose the shower/hadronization program: shower = Not installed |
| 2. Choose the detector simulation program: detector = Requires a shower|
| 3. Run an analysis package on the events generated: analysis = No analysis tool interfaced to MG5aMC.|
| 4. Decay particles with the MadSpin module: madspin = OFF |
| 5. Add weights to events for different model hypothesis: reweight = OFF |
\--------------------------------------------------------------------------------------------------/
Either type the switch number (1 to 5) to change its setting,
Set any switch explicitly (e.g. type 'madspin=ON' at the prompt)
Type 'help' for the list of all valid option
Type '0', 'auto', 'done' or just press enter when you are done.
[0, auto, done, madspin=ON, madspin=OFF, madspin, reweight=ON, reweight=OFF, reweight, parton, ... ][60s to answer]
Por el momento se usarán las opciones por defecto, i.e. (ambas cero)
- La segunda opción (mas adecuada para el scripting), es la de salir de la linea de comandos de MG, e ir a la carpeta (dentro de la carpeta de salida) y ejecutar
Lo cual como en el primer caso mostrara las opciones del uso de programas complementarios (por el momento 0, 0)
Niveles de la simulación
Usando las diferentes herramientas que se instalaron dentro de MG, se puede escoger hasta que punto se quieren simular los eventos, esto es:
- MadEvent: Cuando solo se usa la utilidad de MadEvent?, se llega hasta el nivel partónico en la simulación (opciones por defecto).
- Pythia: Esta herramienta simula la hadronización y las lluvias (Showering). Cuando se ejecuta ./bin/mg5_aMC o se hace launch se da la opción 1, o se ejecuta directamente ./bin/madevent opciones 0 y 0.
- Delphes: En esté punto se puede simular la interacción con los diferentes detectores. Cuando se ejecuta madevent o se hace launch se da la opción 2.
...page...
Tarjetas de configuración
Dependiendo del grado de la simulación (partónico, hadrónico o detector), MG generará las llamadas tarjetas de configuración de las diferentes herramientas (MadEvent, Pythia, Delphes), dentro de la carpeta
Cards en la carpeta de salida del programa. Cada una de estas tarjetas indica como se configuró los programas para la generación de los eventos. A continuación se listan algunas de ellas, y se muestran ejemplos de modificaciones posibles.
proc_card_mg5.dat
Ésta tarjeta se genera automáticamente, cuando se genera la salida (output) de MG, contiene el proceso que se declaró.
Ejemplo: presione [ + ] para ver
[+]
#************************************************************
#* MadGraph5_aMC@NLO *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 2.5.2 2016-12-10 *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https://server06.fynu.ucl.ac.be/projects/madgraph *
#* *
#************************************************************
#* *
#* Command File for MadGraph5_aMC@NLO *
#* *
#* run as ./bin/mg5_aMC filename *
#* *
#************************************************************
set group_subprocesses Auto
set ignore_six_quark_processes False
set loop_optimized_output True
set loop_color_flows False
set gauge unitary
set complex_mass_scheme False
set max_npoint_for_channel 0
define p = u u~ d d~ c c~ s s~ b b~ g
define p = g u c d s u~ c~ d~ s~
define j = g u c d s u~ c~ d~ s~
define l+ = e+ mu+
define l- = e- mu-
define vl = ve vm vt
define vl~ = ve~ vm~ vt~
define p = u u~ d d~ c c~ s s~ b b~ g
define j = p
generate p p > w+ w- @0, (w+ > mu+ vm), (w- > mu- vm~)
add process p p > w+ w- j @1, (w+ > mu+ vm), (w- > mu- vm~)
add process p p > w+ w- j j @2, (w+ > mu+ vm), (w- > mu- vm~)
add process p p > w+ w- j j j @3, (w+ > mu+ vm), (w- > mu- vm~)
output /scratch/cms/Datos/BackGround-WW
param_card.dat
En ésa tarjeta se tienen los parámetros del modelo que se usa para generar los eventos. Por defecto el modelo estándar (SM).
Nota: Para ver como se implementan otros modelos ver
https://arxiv.org/abs/1507.06349.
Ejemplo: presione [ + ] para ver
[+]
######################################################################
## PARAM_CARD AUTOMATICALY GENERATED BY MG5 FOLLOWING UFO MODEL ####
######################################################################
## ##
## Width set on Auto will be computed following the information ##
## present in the decay.py files of the model. ##
## See arXiv:1402.1178 for more details. ##
## ##
######################################################################
###################################
## INFORMATION FOR MASS
###################################
Block mass
5 4.700000e+00 # MB
6 1.730000e+02 # MT
15 1.777000e+00 # MTA
23 9.118800e+01 # MZ
25 1.250000e+02 # MH
## Dependent parameters, given by model restrictions.
## Those values should be edited following the
## analytical expression. MG5 ignores those values
## but they are important for interfacing the output of MG5
## to external program such as Pythia.
1 0.000000 # d : 0.0
2 0.000000 # u : 0.0
3 0.000000 # s : 0.0
4 0.000000 # c : 0.0
11 0.000000 # e- : 0.0
12 0.000000 # ve : 0.0
13 0.000000 # mu- : 0.0
14 0.000000 # vm : 0.0
16 0.000000 # vt : 0.0
21 0.000000 # g : 0.0
22 0.000000 # a : 0.0
24 80.419002 # w+ : cmath.sqrt(MZ__exp__2/2. + cmath.sqrt(MZ__exp__4/4. - (aEW*cmath.pi*MZ__exp__2)/(Gf*sqrt__2)))
###################################
## INFORMATION FOR SMINPUTS
###################################
Block sminputs
1 1.325070e+02 # aEWM1
2 1.166390e-05 # Gf
3 1.180000e-01 # aS
###################################
## INFORMATION FOR YUKAWA
###################################
Block yukawa
5 4.700000e+00 # ymb
6 1.730000e+02 # ymt
15 1.777000e+00 # ymtau
###################################
## INFORMATION FOR DECAY
###################################
DECAY 6 1.491500e+00 # WT
DECAY 23 2.441404e+00 # WZ
DECAY 24 2.047600e+00 # WW
DECAY 25 6.382339e-03 # WH
## Dependent parameters, given by model restrictions.
## Those values should be edited following the
## analytical expression. MG5 ignores those values
## but they are important for interfacing the output of MG5
## to external program such as Pythia.
DECAY 1 0.000000 # d : 0.0
DECAY 2 0.000000 # u : 0.0
DECAY 3 0.000000 # s : 0.0
DECAY 4 0.000000 # c : 0.0
DECAY 5 0.000000 # b : 0.0
DECAY 11 0.000000 # e- : 0.0
DECAY 12 0.000000 # ve : 0.0
DECAY 13 0.000000 # mu- : 0.0
DECAY 14 0.000000 # vm : 0.0
DECAY 15 0.000000 # ta- : 0.0
DECAY 16 0.000000 # vt : 0.0
DECAY 21 0.000000 # g : 0.0
DECAY 22 0.000000 # a : 0.0
run_card.dat
En la run card, se controlan los parámetros de la simulación. Contiene, por ejemplo el número de eventos a generar (por defecto 10000, no se recomienda mas de 50000), las propiedades del haz de partículas del acelerador, restricciones cinemáticas, etc.
Ejemplo: presione [ + ] para ver
[+]
#*********************************************************************
# MadGraph5_aMC@NLO *
# *
# run_card.dat MadEvent *
# *
# This file is used to set the parameters of the run. *
# *
# Some notation/conventions: *
# *
# Lines starting with a '# ' are info or comments *
# *
# mind the format: value = variable ! comment *
#*********************************************************************
#
#*******************
# Running parameters
#*******************
#
#*********************************************************************
# Tag name for the run (one word) *
#*********************************************************************
tag_1 = run_tag ! name of the run
#*********************************************************************
# Number of events and rnd seed *
# Warning: Do not generate more than 1M events in a single run *
# If you want to run Pythia, avoid more than 50k events in a run. *
#*********************************************************************
1000 = nevents ! Number of unweighted events requested
0 = iseed ! rnd seed (0=assigned automatically=default))
#*********************************************************************
# Collider type and energy *
# lpp: 0=No PDF, 1=proton, -1=antiproton, 2=photon from proton, *
# 3=photon from electron *
#*********************************************************************
1 = lpp1 ! beam 1 type
1 = lpp2 ! beam 2 type
6500.0 = ebeam1 ! beam 1 total energy in GeV
6500.0 = ebeam2 ! beam 2 total energy in GeV
#*********************************************************************
# Beam polarization from -100 (left-handed) to 100 (right-handed) *
#*********************************************************************
0.0 = polbeam1 ! beam polarization for beam 1
0.0 = polbeam2 ! beam polarization for beam 2
#*********************************************************************
# PDF CHOICE: this automatically fixes also alpha_s and its evol. *
#*********************************************************************
nn23lo1 = pdlabel ! PDF set
230000 = lhaid ! if pdlabel=lhapdf, this is the lhapdf number
#*********************************************************************
# Renormalization and factorization scales *
#*********************************************************************
False = fixed_ren_scale ! if .true. use fixed ren scale
False = fixed_fac_scale ! if .true. use fixed fac scale
91.188 = scale ! fixed ren scale
91.188 = dsqrt_q2fact1 ! fixed fact scale for pdf1
91.188 = dsqrt_q2fact2 ! fixed fact scale for pdf2
-1 = dynamical_scale_choice ! Choose one of the preselected dynamical choices
1.0 = scalefact ! scale factor for event-by-event scales
#*********************************************************************
# Type and output format
#*********************************************************************
False = gridpack !True = setting up the grid pack
-1.0 = time_of_flight ! threshold (in mm) below which the invariant livetime is not written (-1 means not written)
3.0 = lhe_version ! Change the way clustering information pass to shower.
True = clusinfo ! include clustering tag in output
average = event_norm ! average/sum. Normalization of the weight in the LHEF
#*********************************************************************
# Matching parameter (MLM only)
#*********************************************************************
1 = ickkw ! 0 no matching, 1 MLM
1.0 = alpsfact ! scale factor for QCD emission vx
False = chcluster ! cluster only according to channel diag
5 = asrwgtflavor ! highest quark flavor for a_s reweight
False = auto_ptj_mjj ! Automatic setting of ptj and mjj if xqcut >0
! (turn off for VBF and single top processes)
30.0 = xqcut ! minimum kt jet measure between partons
#*********************************************************************
#
#*********************************************************************
# handling of the helicities:
# 0: sum over all helicities
# 1: importance sampling over helicities
#*********************************************************************
0 = nhel ! using helicities importance sampling or not.
#*********************************************************************
# Generation bias, check the wiki page below for more information: *
# 'cp3.irmp.ucl.ac.be/projects/madgraph/wiki/LOEventGenerationBias' *
#*********************************************************************
None = bias_module ! Bias type of bias, [None, ptj_bias, -custom_folder-]
{} = bias_parameters ! Specifies the parameters of the module.
#
#*******************************
# Parton level cuts definition *
#*******************************
#
#
#*********************************************************************
# BW cutoff (M+/-bwcutoff*Gamma) ! Define on/off-shell for "$" and decay
#*********************************************************************
15.0 = bwcutoff ! (M+/-bwcutoff*Gamma)
#*********************************************************************
# Apply pt/E/eta/dr/mij/kt_durham cuts on decay products or not
# (note that etmiss/ptll/ptheavy/ht/sorted cuts always apply)
#*********************************************************************
False = cut_decays ! Cut decay products
#*********************************************************************
# Standard Cuts *
#*********************************************************************
# Minimum and maximum pt's (for max, -1 means no cut) *
#*********************************************************************
20.0 = ptj ! minimum pt for the jets
0.0 = ptb ! minimum pt for the b
10.0 = pta ! minimum pt for the photons
10.0 = ptl ! minimum pt for the charged leptons
0.0 = misset ! minimum missing Et (sum of neutrino's momenta)
0.0 = ptheavy ! minimum pt for one heavy final state
-1.0 = ptjmax ! maximum pt for the jets
-1.0 = ptbmax ! maximum pt for the b
-1.0 = ptamax ! maximum pt for the photons
-1.0 = ptlmax ! maximum pt for the charged leptons
-1.0 = missetmax ! maximum missing Et (sum of neutrino's momenta)
#*********************************************************************
# Minimum and maximum E's (in the center of mass frame) *
#*********************************************************************
0.0 = ej ! minimum E for the jets
0.0 = eb ! minimum E for the b
0.0 = ea ! minimum E for the photons
0.0 = el ! minimum E for the charged leptons
-1.0 = ejmax ! maximum E for the jets
-1.0 = ebmax ! maximum E for the b
-1.0 = eamax ! maximum E for the photons
-1.0 = elmax ! maximum E for the charged leptons
#*********************************************************************
# Maximum and minimum absolute rapidity (for max, -1 means no cut) *
#*********************************************************************
5.0 = etaj ! max rap for the jets
-1.0 = etab ! max rap for the b
2.5 = etaa ! max rap for the photons
2.5 = etal ! max rap for the charged leptons
0.0 = etajmin ! min rap for the jets
0.0 = etabmin ! min rap for the b
0.0 = etaamin ! min rap for the photons
0.0 = etalmin ! main rap for the charged leptons
#*********************************************************************
# Minimum and maximum DeltaR distance *
#*********************************************************************
0.0 = drjj ! min distance between jets
0.0 = drbb ! min distance between b's
0.4 = drll ! min distance between leptons
0.4 = draa ! min distance between gammas
0.0 = drbj ! min distance between b and jet
0.4 = draj ! min distance between gamma and jet
0.0 = drjl ! min distance between jet and lepton
0.0 = drab ! min distance between gamma and b
0.0 = drbl ! min distance between b and lepton
0.4 = dral ! min distance between gamma and lepton
-1.0 = drjjmax ! max distance between jets
-1.0 = drbbmax ! max distance between b's
-1.0 = drllmax ! max distance between leptons
-1.0 = draamax ! max distance between gammas
-1.0 = drbjmax ! max distance between b and jet
-1.0 = drajmax ! max distance between gamma and jet
-1.0 = drjlmax ! max distance between jet and lepton
-1.0 = drabmax ! max distance between gamma and b
-1.0 = drblmax ! max distance between b and lepton
-1.0 = dralmax ! maxdistance between gamma and lepton
#*********************************************************************
# Minimum and maximum invariant mass for pairs *
# WARNING: for four lepton final state mmll cut require to have *
# different lepton masses for each flavor! *
#*********************************************************************
0.0 = mmjj ! min invariant mass of a jet pair
0.0 = mmbb ! min invariant mass of a b pair
0.0 = mmaa ! min invariant mass of gamma gamma pair
50.0 = mmll ! min invariant mass of l+l- (same flavour) lepton pair
-1.0 = mmjjmax ! max invariant mass of a jet pair
-1.0 = mmbbmax ! max invariant mass of a b pair
-1.0 = mmaamax ! max invariant mass of gamma gamma pair
-1.0 = mmllmax ! max invariant mass of l+l- (same flavour) lepton pair
#*********************************************************************
# Minimum and maximum invariant mass for all letpons *
#*********************************************************************
0.0 = mmnl ! min invariant mass for all letpons (l+- and vl)
-1.0 = mmnlmax ! max invariant mass for all letpons (l+- and vl)
#*********************************************************************
# Minimum and maximum pt for 4-momenta sum of leptons *
#*********************************************************************
0.0 = ptllmin ! Minimum pt for 4-momenta sum of leptons(l and vl)
-1.0 = ptllmax ! Maximum pt for 4-momenta sum of leptons(l and vl)
#*********************************************************************
# Inclusive cuts *
#*********************************************************************
0.0 = xptj ! minimum pt for at least one jet
0.0 = xptb ! minimum pt for at least one b
0.0 = xpta ! minimum pt for at least one photon
0.0 = xptl ! minimum pt for at least one charged lepton
#*********************************************************************
# Control the pt's of the jets sorted by pt *
#*********************************************************************
0.0 = ptj1min ! minimum pt for the leading jet in pt
0.0 = ptj2min ! minimum pt for the second jet in pt
0.0 = ptj3min ! minimum pt for the third jet in pt
0.0 = ptj4min ! minimum pt for the fourth jet in pt
-1.0 = ptj1max ! maximum pt for the leading jet in pt
-1.0 = ptj2max ! maximum pt for the second jet in pt
-1.0 = ptj3max ! maximum pt for the third jet in pt
-1.0 = ptj4max ! maximum pt for the fourth jet in pt
0 = cutuse ! reject event if fails any (0) / all (1) jet pt cuts
#*********************************************************************
# Control the pt's of leptons sorted by pt *
#*********************************************************************
0.0 = ptl1min ! minimum pt for the leading lepton in pt
0.0 = ptl2min ! minimum pt for the second lepton in pt
0.0 = ptl3min ! minimum pt for the third lepton in pt
0.0 = ptl4min ! minimum pt for the fourth lepton in pt
-1.0 = ptl1max ! maximum pt for the leading lepton in pt
-1.0 = ptl2max ! maximum pt for the second lepton in pt
-1.0 = ptl3max ! maximum pt for the third lepton in pt
-1.0 = ptl4max ! maximum pt for the fourth lepton in pt
#*********************************************************************
# Control the Ht(k)=Sum of k leading jets *
#*********************************************************************
0.0 = htjmin ! minimum jet HT=Sum(jet pt)
-1.0 = htjmax ! maximum jet HT=Sum(jet pt)
0.0 = ihtmin !inclusive Ht for all partons (including b)
-1.0 = ihtmax !inclusive Ht for all partons (including b)
0.0 = ht2min ! minimum Ht for the two leading jets
0.0 = ht3min ! minimum Ht for the three leading jets
0.0 = ht4min ! minimum Ht for the four leading jets
-1.0 = ht2max ! maximum Ht for the two leading jets
-1.0 = ht3max ! maximum Ht for the three leading jets
-1.0 = ht4max ! maximum Ht for the four leading jets
#***********************************************************************
# Photon-isolation cuts, according to hep-ph/9801442 *
# When ptgmin=0, all the other parameters are ignored *
# When ptgmin>0, pta and draj are not going to be used *
#***********************************************************************
0.0 = ptgmin ! Min photon transverse momentum
0.4 = r0gamma ! Radius of isolation code
1.0 = xn ! n parameter of eq.(3.4) in hep-ph/9801442
1.0 = epsgamma ! epsilon_gamma parameter of eq.(3.4) in hep-ph/9801442
True = isoem ! isolate photons from EM energy (photons and leptons)
#*********************************************************************
# WBF cuts *
#*********************************************************************
0.0 = xetamin ! minimum rapidity for two jets in the WBF case
0.0 = deltaeta ! minimum rapidity for two jets in the WBF case
#***********************************************************************
# Turn on either the ktdurham or ptlund cut to activate *
# CKKW(L) merging with Pythia8 [arXiv:1410.3012, arXiv:1109.4829] *
#***********************************************************************
-1.0 = ktdurham
0.4 = dparameter
-1.0 = ptlund
1, 2, 3, 4, 5, 6, 21 = pdgs_for_merging_cut ! PDGs for two cuts above
#*********************************************************************
# maximal pdg code for quark to be considered as a light jet *
# (otherwise b cuts are applied) *
#*********************************************************************
5 = maxjetflavor ! Maximum jet pdg code
#*********************************************************************
#
#*********************************************************************
# Store info for systematics studies *
# WARNING: Do not use for interference type of computation *
#*********************************************************************
False = use_syst ! Enable systematics studies
#
#**************************************
# Parameter of the systematics study
# will be used by SysCalc (if installed)
#**************************************
#
0.5 1 2 = sys_scalefact # factorization/renormalization scale factor
0.5 1 2 = sys_alpsfact # \alpha_s emission scale factors
auto = sys_matchscale # variation of merging scale
# PDF sets and number of members (0 or none for all members).
NNPDF23_lo_as_0130_qed = sys_pdf # list of pdf sets
# MSTW2008nlo68cl.LHgrid 1 = sys_pdf
#
pythia_card.dat
Controla el funcionamiento de pythia, que es la herramienta encargada de hacer la hadronización,
Ejemplo: presione [ + ] para ver
[+]
!
! Pythia8 cmd card automatically generated by MadGraph5_aMC@NLO
! For more information on the use of the MG5aMC / Pythia8 interface, visit
! https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/LOPY8Merging
!
! ==================
! General parameters
! ==================
!
Main:numberOfEvents = -1
!
! -------------------------------------------------------------------
! Specify the HEPMC output of the Pythia8 shower. You can set it to:
! auto : MG5aMC will automatically place it the run_<i> directory
! /dev/null : to turn off the HEPMC output.
! <path> : to select where the HEPMC file must written. It will
! therefore not be placed in the run_<i> directory. The
! specified path, if not absolute, will be relative to
! the Event/run_<i> directory of the process output.
! fifo : to have MG5aMC setup the piping of the PY8 output to
! analysis tools such as MadAnalysis5.
! fifo@<fifo_path> :
! Same as 'fifo', but selecting a custom path to create the
! fifo pipe. (useful to select a mounted drive that supports
! fifo). Note that the fifo file extension *must* be '.hepmc.fifo'.
! -------------------------------------------------------------------
!
HEPMCoutput:file = auto
!
! --------------------------------------------------------------------
! Parameters relevant only when performing MLM merging, which can be
! turned on by setting ickkw to '1' in the run_card and chosing a
! positive value for the parameter xqcut.
! For details, see section 'Jet Matching' on the left-hand menu of
! http://home.thep.lu.se/~torbjorn/pythia81html/Welcome.html
! --------------------------------------------------------------------
! If equal to -1.0, MadGraph5_aMC@NLO will set it automatically based
! on the parameter 'xqcut' of the run_card.dat
JetMatching:qCut = 50
! Use default kt-MLM to match parton level jets to those produced by the
! shower. But the other Shower-kt scheme is available too with this option.
JetMatching:doShowerKt = on
! A value of -1 means that it is automatically guessed by MadGraph.
! It is however always safer to explicitly set it.
JetMatching:nJetMax = 2
!
! --------------------------------------------------------------------
! Parameters relevant only when performing CKKW-L merging, which can
! be turned on by setting the parameter 'ptlund' *or* 'ktdurham' to
! a positive value.
! For details, see section 'CKKW-L Merging' on the left-hand menu of
! http://home.thep.lu.se/~torbjorn/pythia81html/Welcome.html
! --------------------------------------------------------------------
! Central merging scale values you want to be used.
! If equal to -1.0, then MadGraph5_aMC@NLO will set this automatically
! based on the parameter 'ktdurham' of the run_card.dat
Merging:TMS = -1.0
! This must be set manually, according to Pythia8 directives.
! An example of possible value is 'pp>LEPTONS,NEUTRINOS'
Merging:Process = <set_by_user>
! A value of -1 means that it is automatically guessed by MadGraph.
! It is however always safer to explicitly set it.
Merging:nJetMax = -1
!
! For all merging schemes, decide wehter you want the merging scale
! variation computed for only the central weights or all other
! PDF and scale variation weights as well
SysCalc:fullCutVariation = off
!
! ==========================
! User customized parameters
! ==========================
!
! By default, Pythia8 generates multi-parton interaction events. This is
! often irrelevant for phenomenology and very slow. You can turn this
! feature off by uncommenting the line below if so desired.
!partonlevel:mpi = off
pgs_card.dat y/o delphes_card.dat
Controla los parámetros del detector, en este tutorial se usa Delphes configurado para CMS (Por defecto).
Ejemplo: presione [ + ] para ver
[+]
#######################################
# Order of execution of various modules
#######################################
set ExecutionPath {
ParticlePropagator
ChargedHadronTrackingEfficiency
ElectronTrackingEfficiency
MuonTrackingEfficiency
ChargedHadronMomentumSmearing
ElectronMomentumSmearing
MuonMomentumSmearing
TrackMerger
Calorimeter
EFlowMerger
PhotonEfficiency
PhotonIsolation
ElectronFilter
ElectronEfficiency
ElectronIsolation
MuonEfficiency
MuonIsolation
MissingET
NeutrinoFilter
GenJetFinder
GenMissingET
FastJetFinder
JetEnergyScale
JetFlavorAssociation
BTagging
TauTagging
UniqueObjectFinder
ScalarHT
TreeWriter
}
#################################
# Propagate particles in cylinder
#################################
module ParticlePropagator ParticlePropagator {
set InputArray Delphes/stableParticles
set OutputArray stableParticles
set ChargedHadronOutputArray chargedHadrons
set ElectronOutputArray electrons
set MuonOutputArray muons
# radius of the magnetic field coverage, in m
set Radius 1.29
# half-length of the magnetic field coverage, in m
set HalfLength 3.00
# magnetic field
set Bz 3.8
}
####################################
# Charged hadron tracking efficiency
####################################
module Efficiency ChargedHadronTrackingEfficiency {
set InputArray ParticlePropagator/chargedHadrons
set OutputArray chargedHadrons
# add EfficiencyFormula {efficiency formula as a function of eta and pt}
# tracking efficiency formula for charged hadrons
set EfficiencyFormula { (pt <= 0.1) * (0.00) +
(abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.70) +
(abs(eta) <= 1.5) * (pt > 1.0) * (0.95) +
(abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.60) +
(abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.85) +
(abs(eta) > 2.5) * (0.00)}
}
##############################
# Electron tracking efficiency
##############################
module Efficiency ElectronTrackingEfficiency {
set InputArray ParticlePropagator/electrons
set OutputArray electrons
# set EfficiencyFormula {efficiency formula as a function of eta and pt}
# tracking efficiency formula for electrons
set EfficiencyFormula { (pt <= 0.1) * (0.00) +
(abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.73) +
(abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e2) * (0.95) +
(abs(eta) <= 1.5) * (pt > 1.0e2) * (0.99) +
(abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.50) +
(abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e2) * (0.83) +
(abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.90) +
(abs(eta) > 2.5) * (0.00)}
}
##########################
# Muon tracking efficiency
##########################
module Efficiency MuonTrackingEfficiency {
set InputArray ParticlePropagator/muons
set OutputArray muons
# set EfficiencyFormula {efficiency formula as a function of eta and pt}
# tracking efficiency formula for muons
set EfficiencyFormula { (pt <= 0.1) * (0.00) +
(abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) +
(abs(eta) <= 1.5) * (pt > 1.0) * (0.99) +
(abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) +
(abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) +
(abs(eta) > 2.5) * (0.00)}
}
########################################
# Momentum resolution for charged tracks
########################################
module MomentumSmearing ChargedHadronMomentumSmearing {
set InputArray ChargedHadronTrackingEfficiency/chargedHadrons
set OutputArray chargedHadrons
# set ResolutionFormula {resolution formula as a function of eta and pt}
# resolution formula for charged hadrons
# based on arXiv:1405.6569
set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.5e-4^2) +
(abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*2.5e-4^2) +
(abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*5.5e-4^2)}
}
###################################
# Momentum resolution for electrons
###################################
module MomentumSmearing ElectronMomentumSmearing {
set InputArray ElectronTrackingEfficiency/electrons
set OutputArray electrons
# set ResolutionFormula {resolution formula as a function of eta and energy}
# resolution formula for electrons
# based on arXiv:1405.6569
set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) +
(abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) +
(abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)}
}
###############################
# Momentum resolution for muons
###############################
module MomentumSmearing MuonMomentumSmearing {
set InputArray MuonTrackingEfficiency/muons
set OutputArray muons
# set ResolutionFormula {resolution formula as a function of eta and pt}
# resolution formula for muons
set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.0e-4^2) +
(abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*1.5e-4^2) +
(abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*3.5e-4^2)}
}
##############
# Track merger
##############
module Merger TrackMerger {
# add InputArray InputArray
add InputArray ChargedHadronMomentumSmearing/chargedHadrons
add InputArray ElectronMomentumSmearing/electrons
add InputArray MuonMomentumSmearing/muons
set OutputArray tracks
}
#############
# Calorimeter
#############
module Calorimeter Calorimeter {
set ParticleInputArray ParticlePropagator/stableParticles
set TrackInputArray TrackMerger/tracks
set TowerOutputArray towers
set PhotonOutputArray photons
set EFlowTrackOutputArray eflowTracks
set EFlowPhotonOutputArray eflowPhotons
set EFlowNeutralHadronOutputArray eflowNeutralHadrons
set ECalEnergyMin 0.5
set HCalEnergyMin 1.0
set ECalEnergySignificanceMin 1.0
set HCalEnergySignificanceMin 1.0
set SmearTowerCenter true
set pi [expr {acos(-1)}]
# lists of the edges of each tower in eta and phi
# each list starts with the lower edge of the first tower
# the list ends with the higher edged of the last tower
# 5 degrees towers
set PhiBins {}
for {set i -36} {$i <= 36} {incr i} {
add PhiBins [expr {$i * $pi/36.0}]
}
foreach eta {-1.566 -1.479 -1.392 -1.305 -1.218 -1.131 -1.044 -0.957 -0.87 -0.783 -0.696 -0.609 -0.522 -0.435 -0.348 -0.261 -0.174 -0.087 0 0.087 0.174 0.261 0.348 0.435 0.522 0.609 0.696 0.783 0.87 0.957 1.044 1.131 1.218 1.305 1.392 1.479 1.566 1.653} {
add EtaPhiBins $eta $PhiBins
}
# 10 degrees towers
set PhiBins {}
for {set i -18} {$i <= 18} {incr i} {
add PhiBins [expr {$i * $pi/18.0}]
}
foreach eta {-4.35 -4.175 -4 -3.825 -3.65 -3.475 -3.3 -3.125 -2.95 -2.868 -2.65 -2.5 -2.322 -2.172 -2.043 -1.93 -1.83 -1.74 -1.653 1.74 1.83 1.93 2.043 2.172 2.322 2.5 2.65 2.868 2.95 3.125 3.3 3.475 3.65 3.825 4 4.175 4.35 4.525} {
add EtaPhiBins $eta $PhiBins
}
# 20 degrees towers
set PhiBins {}
for {set i -9} {$i <= 9} {incr i} {
add PhiBins [expr {$i * $pi/9.0}]
}
foreach eta {-5 -4.7 -4.525 4.7 5} {
add EtaPhiBins $eta $PhiBins
}
# default energy fractions {abs(PDG code)} {Fecal Fhcal}
add EnergyFraction {0} {0.0 1.0}
# energy fractions for e, gamma and pi0
add EnergyFraction {11} {1.0 0.0}
add EnergyFraction {22} {1.0 0.0}
add EnergyFraction {111} {1.0 0.0}
# energy fractions for muon, neutrinos and neutralinos
add EnergyFraction {12} {0.0 0.0}
add EnergyFraction {13} {0.0 0.0}
add EnergyFraction {14} {0.0 0.0}
add EnergyFraction {16} {0.0 0.0}
add EnergyFraction {1000022} {0.0 0.0}
add EnergyFraction {1000023} {0.0 0.0}
add EnergyFraction {1000025} {0.0 0.0}
add EnergyFraction {1000035} {0.0 0.0}
add EnergyFraction {1000045} {0.0 0.0}
# energy fractions for K0short and Lambda
add EnergyFraction {310} {0.3 0.7}
add EnergyFraction {3122} {0.3 0.7}
# set ECalResolutionFormula {resolution formula as a function of eta and energy}
# Eta shape from arXiv:1306.2016, Energy shape from arXiv:1502.02701
set ECalResolutionFormula { (abs(eta) <= 1.5) * (1+0.64*eta^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) +
(abs(eta) > 1.5 && abs(eta) <= 2.5) * (2.16 + 5.6*(abs(eta)-2)^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) +
(abs(eta) > 2.5 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
# set HCalResolutionFormula {resolution formula as a function of eta and energy}
set HCalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) +
(abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)}
}
####################
# Energy flow merger
####################
module Merger EFlowMerger {
# add InputArray InputArray
add InputArray Calorimeter/eflowTracks
add InputArray Calorimeter/eflowPhotons
add InputArray Calorimeter/eflowNeutralHadrons
set OutputArray eflow
}
###################
# Photon efficiency
###################
module Efficiency PhotonEfficiency {
set InputArray Calorimeter/eflowPhotons
set OutputArray photons
# set EfficiencyFormula {efficiency formula as a function of eta and pt}
# efficiency formula for photons
set EfficiencyFormula { (pt <= 10.0) * (0.00) +
(abs(eta) <= 1.5) * (pt > 10.0) * (0.95) +
(abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) +
(abs(eta) > 2.5) * (0.00)}
}
##################
# Photon isolation
##################
module Isolation PhotonIsolation {
set CandidateInputArray PhotonEfficiency/photons
set IsolationInputArray EFlowMerger/eflow
set OutputArray photons
set DeltaRMax 0.5
set PTMin 0.5
set PTRatioMax 0.12
}
#################
# Electron filter
#################
module PdgCodeFilter ElectronFilter {
set InputArray Calorimeter/eflowTracks
set OutputArray electrons
set Invert true
add PdgCode {11}
add PdgCode {-11}
}
#####################
# Electron efficiency
#####################
module Efficiency ElectronEfficiency {
set InputArray ElectronFilter/electrons
set OutputArray electrons
# set EfficiencyFormula {efficiency formula as a function of eta and pt}
# efficiency formula for electrons
set EfficiencyFormula { (pt <= 10.0) * (0.00) +
(abs(eta) <= 1.5) * (pt > 10.0) * (0.95) +
(abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) +
(abs(eta) > 2.5) * (0.00)}
}
####################
# Electron isolation
####################
module Isolation ElectronIsolation {
set CandidateInputArray ElectronEfficiency/electrons
set IsolationInputArray EFlowMerger/eflow
set OutputArray electrons
set DeltaRMax 0.5
set PTMin 0.5
set PTRatioMax 0.12
}
#################
# Muon efficiency
#################
module Efficiency MuonEfficiency {
set InputArray MuonMomentumSmearing/muons
set OutputArray muons
# set EfficiencyFormula {efficiency as a function of eta and pt}
# efficiency formula for muons
set EfficiencyFormula { (pt <= 10.0) * (0.00) +
(abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) +
(abs(eta) <= 1.5) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) +
(abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) +
(abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) +
(abs(eta) > 2.4) * (0.00)}
}
################
# Muon isolation
################
module Isolation MuonIsolation {
set CandidateInputArray MuonEfficiency/muons
set IsolationInputArray EFlowMerger/eflow
set OutputArray muons
set DeltaRMax 0.5
set PTMin 0.5
set PTRatioMax 0.25
}
###################
# Missing ET merger
###################
module Merger MissingET {
# add InputArray InputArray
add InputArray EFlowMerger/eflow
set MomentumOutputArray momentum
}
##################
# Scalar HT merger
##################
module Merger ScalarHT {
# add InputArray InputArray
add InputArray UniqueObjectFinder/jets
add InputArray UniqueObjectFinder/electrons
add InputArray UniqueObjectFinder/photons
add InputArray UniqueObjectFinder/muons
set EnergyOutputArray energy
}
#####################
# Neutrino Filter
#####################
module PdgCodeFilter NeutrinoFilter {
set InputArray Delphes/stableParticles
set OutputArray filteredParticles
set PTMin 0.0
add PdgCode {12}
add PdgCode {14}
add PdgCode {16}
add PdgCode {-12}
add PdgCode {-14}
add PdgCode {-16}
}
#####################
# MC truth jet finder
#####################
module FastJetFinder GenJetFinder {
set InputArray NeutrinoFilter/filteredParticles
set OutputArray jets
# algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
set JetAlgorithm 6
set ParameterR 0.5
set JetPTMin 20.0
}
#########################
# Gen Missing ET merger
########################
module Merger GenMissingET {
# add InputArray InputArray
add InputArray NeutrinoFilter/filteredParticles
set MomentumOutputArray momentum
}
############
# Jet finder
############
module FastJetFinder FastJetFinder {
# set InputArray Calorimeter/towers
set InputArray EFlowMerger/eflow
set OutputArray jets
# algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
set JetAlgorithm 6
set ParameterR 0.5
set JetPTMin 20.0
}
##################
# Jet Energy Scale
##################
module EnergyScale JetEnergyScale {
set InputArray FastJetFinder/jets
set OutputArray jets
# scale formula for jets
set ScaleFormula {sqrt( (2.5 - 0.15*(abs(eta)))^2 / pt + 1.0 )}
}
########################
# Jet Flavor Association
########################
module JetFlavorAssociation JetFlavorAssociation {
set PartonInputArray Delphes/partons
set ParticleInputArray Delphes/allParticles
set ParticleLHEFInputArray Delphes/allParticlesLHEF
set JetInputArray JetEnergyScale/jets
set DeltaR 0.5
set PartonPTMin 1.0
set PartonEtaMax 2.5
}
###########
# b-tagging
###########
module BTagging BTagging {
set JetInputArray JetEnergyScale/jets
set BitNumber 0
# add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
# PDG code = the highest PDG code of a quark or gluon inside DeltaR cone around jet axis
# gluon's PDG code has the lowest priority
# based on arXiv:1211.4462
# default efficiency formula (misidentification rate)
add EfficiencyFormula {0} {0.01+0.000038*pt}
# efficiency formula for c-jets (misidentification rate)
add EfficiencyFormula {4} {0.25*tanh(0.018*pt)*(1/(1+ 0.0013*pt))}
# efficiency formula for b-jets
add EfficiencyFormula {5} {0.85*tanh(0.0025*pt)*(25.0/(1+0.063*pt))}
}
#############
# tau-tagging
#############
module TauTagging TauTagging {
set ParticleInputArray Delphes/allParticles
set PartonInputArray Delphes/partons
set JetInputArray JetEnergyScale/jets
set DeltaR 0.5
set TauPTMin 1.0
set TauEtaMax 2.5
# add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
# default efficiency formula (misidentification rate)
add EfficiencyFormula {0} {0.01}
# efficiency formula for tau-jets
add EfficiencyFormula {15} {0.6}
}
#####################################################
# Find uniquely identified photons/electrons/tau/jets
#####################################################
module UniqueObjectFinder UniqueObjectFinder {
# earlier arrays take precedence over later ones
# add InputArray InputArray OutputArray
add InputArray PhotonIsolation/photons photons
add InputArray ElectronIsolation/electrons electrons
add InputArray MuonIsolation/muons muons
add InputArray JetEnergyScale/jets jets
}
##################
# ROOT tree writer
##################
# tracks, towers and eflow objects are not stored by default in the output.
# if needed (for jet constituent or other studies), uncomment the relevant
# "add Branch ..." lines.
module TreeWriter TreeWriter {
# add Branch InputArray BranchName BranchClass
add Branch Delphes/allParticles Particle GenParticle
add Branch TrackMerger/tracks Track Track
add Branch Calorimeter/towers Tower Tower
add Branch Calorimeter/eflowTracks EFlowTrack Track
add Branch Calorimeter/eflowPhotons EFlowPhoton Tower
add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower
add Branch GenJetFinder/jets GenJet Jet
add Branch GenMissingET/momentum GenMissingET MissingET
add Branch UniqueObjectFinder/jets Jet Jet
add Branch UniqueObjectFinder/electrons Electron Electron
add Branch UniqueObjectFinder/photons Photon Photon
add Branch UniqueObjectFinder/muons Muon Muon
add Branch MissingET/momentum MissingET MissingET
add Branch ScalarHT/energy ScalarHT ScalarHT
}
plot_card.dat o pythia8_card.dat
Controla los plots que se quieren hacer luego de que se generan los eventos.
Ejemplo: presione [ + ] para ver
[+]
#**************************************************************************
# Card for MadAnalysis *
# *
# This file is used to set the classes and options for *
# the MadAnalysis program. *
# *
# *
# Some comments about the classes *
# 1. Plots are for classes of particles. *
# 2. Each particle is identified by its PDG code. *
# 3. Classes names are arbitrary (4 symbols max, no spaces allowed). *
# 4. Particles in the same class will be ordered with the 'ordering *
# function' in the file in_func.f. *
# 5. Classes can be added/edited/removed at will, and given a name *
# that will then appear in the plots. *
# 6. A particle can be put in one class only. Putting a particle in *
# two or more classes can lead to double counting of events. *
# 7. The class name mET is missing Energy and its name is reserved. *
# If used, it must be put last in the classes list below. *
# 8. If events contain particles not belonging to an existing class, *
# a new class will automatically be generated. *
# 9. For LHCO events the PDG code 21 is assigned to a jet (not *
# b-tagged), 5 to a b-tagged jet and 12 to missing ET. *
# *
# *
# Some comments about the cuts *
# 1. In the file kin_func.f the functions on which cuts can be applied *
# are given. *
# 2. The syntax is as follows. *
# etmin 1 3 30d0 *
# means that from the first class the Et of the first three particles *
# has to be greater than 30 GeV. *
# *
# etmissmin 20d0 *
# means that there must be at least 20 GeV of missing Et *
# *
# dRmin 2 1 4 3 3d0 *
# means that the distance between the first particle in the second *
# class and the first three particles in the fourth class has to be *
# greater than 3. *
# *
# ptmax 1 3 10d0 *
# ptmax 1 2 15d0 *
# means that the maximum pt of the third particle in the first class *
# has to smaller than 10 GeV, and the first two particles of this *
# class has to be smaller than 15 GeV *
# 3. The ordering of the particles within a class can be set with the *
# 'ordering function' in the file kin_func.f. *
# 4. For all the 'min' cuts, an event will be thrown away if the particle *
# does not exist. On the other hand, for all the 'max' cuts the cut *
# will be ignored if the particle does not exist *
# (Only dRij is an exception, for which it is the other way around) *
# *
# *
# *
# Some comments about the plotting options *
# 1. In the file kin_func.f the functions can be found that can be *
# plotted. (only for off-line usage) *
# 2. With the plotting options one can set the number of plots for each *
# of these functions. *
# 3. One has to specify for each variable which particles from which *
# class are used to set the plots. Syntax: *
# et 2 4 *
# means that the transverse energy of the first four particles in the *
# second class will be plotted. *
# mij 1 3 *
# mij 2 2 *
# means that for the invariant mass plots the first three particles *
# from the first class and the first two from the second class will be *
# used to plot the invariant mass of two particles. (10 plots) *
# 4. The ordering of the particles in a class can be set with the *
# 'ordering_function'. pt, e and et are valid functions. (For off-line *
# users X1, X2 and X3 can also be used, if defined in kin_func.f.) *
# 5. Max number of plots is 200. *
# *
# *
#**************************************************************************
# Put here your list of classes
#**************************************************************************
# Do NOT put spaces before class names!
# Begin Classes # This is TAG. Do not modify this line
jet 1 -1 2 -2 3 -3 4 -4 21 # Class number 1
b 5 -5 # Class number 2
mET 12 -12 14 -14 16 -16 1000022 # Missing ET class, name is reserved
# End Classes # This is TAG. Do not modify this line
#**************************************************************************
ordering_function pt # orders particles in classes according to their pt
normalization xsec # histogram normalization, xsec or number (e.g. 1)
#**************************************************************************
# Put here list of minimum pt for the classes
#**************************************************************************
# Begin Minpts # This is TAG. Do not modify this line
#1 30
#2 40
#3 10
# End Minpts # This is TAG. Do not modify this line
#**************************************************************************
# Cuts on plotted events
#**************************************************************************
# Modify the cuts and remove the pounds/hashes to apply those cuts
# Do NOT put spaces at the beginning of the following lines!
# Begin Cuts # This is TAG. Do not modify this line
#etmin 2 2 40d0
#etmin 2 1 80d0
#etmin 1 3 20d0
#etmax 2 1 200d0
#ptmin 3 1 0d0
#etmissmin 20d0
#etmissmax 80d0
#etamax 1 1 1d0
#etamax 2 1 2d0
#etamin 2 2 1.5d0
#etamin 2 1 2d0
#mijmax 2 1 2 2 200d0
#mijmin 2 1 2 2 100d0
#X1min 2 1 40d0
#X1max 2 2 50d0
#dRijmin 2 1 2 2 0.7d0
#dRijmax 1 3 2 2 0.7d0
#XY1min 2 2 2 2 20d0
#XYZA2max 2 2 2 2 4 1 5 1 40d0
# End Cuts # This is TAG. Do not modify this line
#**************************************************************************
# Put here the required plots
#**************************************************************************
# Do NOT put spaces at the beginning of the following lines!
# Begin PlotDefs # This is TAG. Do not modify this line
pt 1 4 # plot pt for the first four particles in class 1
pt 2 4 # plot pt for the first four particles in class 2
pt 3 4 # plot pt for the first four particles in class 3
pt 4 4 # plot pt for the first four particles in class 4
pt 5 4 # etc.
pt 6 4
pt 7 4
#e 2 2
y 1 4 # plot rapidity for the first four particles in class 1
y 2 4
y 3 4
y 4 4
y 5 4
y 6 4
y 7 4
#eta 2 2 # plot pseudo-rapidity for the first two part in the 2nd class
#mom 4 1
#costh 5 1
#phi 2 2
#delta_eta 2 2
#delta_eta 4 1
mij 1 4 # use the first four particles in the 1st class to plot inv. mass
mij 2 2 # use the first two particles from the second class as well
mij 3 1 # etc.
mij 4 1
mij 5 1
mij 6 1
mij 7 1
#cosij 1 2
#cosij 2 2
#cosij 3 1
#cosij 4 1
dRij 1 4
dRij 2 2
dRij 3 1
dRij 4 1
dRij 5 1
dRij 6 1
dRij 7 1
#delta_phi 2 2
#delta_phi 4 1
#delta_phi 5 1
#X1 2 2 # plot X1 (defined in kin_func.f)
#XYZA1 2 2
#XYZA1 4 1
#XYZA1 5 1
# End PlotDefs # This is TAG. Do not modify this line
#**************************************************************************
#**************************************************************************
# Put here the plot ranges
#**************************************************************************
# Do NOT put spaces at the beginning of the following lines!
# Begin PlotRange # This is TAG. Do not modify this line
pt 10 0 500 # bin size, min value, max value
et 10 0 500 # bin size, min value, max value
etmiss 10 0 500 # bin size, min value, max value
ht 20 0 1500
y 0.2 -5 5 # etc.
mij 20 0 1500
dRij 0.1 0 5
#delta_phi 0.1 0 3.1
#X1 1 0 100
#XYZA1 1 0 100
# End PlotRange # This is TAG. Do not modify this line
#**************************************************************************
#**************************************************************************
# Output for plots
#**************************************************************************
# Do NOT put spaces at the beginning of the following lines!
# Begin PlotOutput # This is TAG. Do not modify this line
output topdrawer # set to topdrawer or gnuplot
plot_decayed no # plot (and cut) dec. res.? (Only for LHE events)
# End PlotOutput # This is TAG. Do not modify this line
#**************************************************************************
#
#
me5 configuration.txt
En ésta tarjeta se encuentran las configuraciones várias, como el uso del cluster, compiladores, uso del navegador, etc.
Ejemplo: presione [ + ] para ver
[+]
################################################################################
#
# Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors
#
# This file is a part of the MadGraph5_aMC@NLO project, an application which
# automatically generates Feynman diagrams and matrix elements for arbitrary
# high-energy processes in the Standard Model and beyond.
#
# It is subject to the MadGraph5_aMC@NLO license which should accompany this
# distribution.
#
# For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch
#
################################################################################
#
# This File contains some configuration variable for MadGraph/MadEvent
#
# Line starting by #! are comment and should remain commented
# Line starting with # should be uncommented if you want to modify the default
# value.
# Current value for all options can seen by typing "display options"
# after either ./bin/mg5_aMC or ./bin/madevent
#
# You can place this files in ~/.mg5/mg5_configuration.txt if you have more than
# one version of MG5.
#
################################################################################
#! Prefered Fortran Compiler
#! If None: try to find g77 or gfortran on the system
#!
# fortran_compiler = None
# f2py_compiler = None
#! Prefered C++ Compiler
#! If None: try to find g++ or clang on the system
#!
# cpp_compiler = None
#! Prefered Text Editor
#! Default: use the shell default Editor
#! or try to find one available on the system
#! Be careful: Only shell based editor are allowed
# text_editor = None
#! Prefered WebBrower
#! If None: try to find one available on the system
# web_browser = None
#! Prefered PS viewer
#! If None: try to find one available on the system
# eps_viewer = None
#! Time allowed to answer question (if no answer takes default value)
#! 0: No time limit
# timeout = 60
#! Pythia8 path.
#! Defines the path to the pythia8 installation directory (i.e. the
#! on containing the lib, bin and include directories) .
#! If using a relative path, that starts from the mg5 directory
# pythia8_path = ./HEPTools/pythia8
#! MG5aMC_PY8_interface path
#! Defines the path of the C++ driver file that is used by MG5_aMC to
#! steer the Pythia8 shower.
#! Can be installed directly from within MG5_aMC with the following command:
#! MG5_aMC> install mg5amc_py8_interface
# mg5amc_py8_interface_path = ./HEPTools/MG5aMC_PY8_interface
#! Herwig++/Herwig7 paths
#! specify here the paths also to HepMC ant ThePEG
#! define the path to the herwig++, thepeg and hepmc directories.
#! paths can be absolute or relative from mg5 directory
#! WARNING: if Herwig7 has been installed with the bootstrap script,
#! then please set thepeg_path and hepmc_path to the same value as
#! hwpp_path
# hwpp_path =
# thepeg_path =
# hepmc_path =
#! Control when MG5 checks if he is up-to-date.
#! Enter the number of day between two check (0 means never)
#! A question is always asked before any update
# auto_update = 7
################################################################################
# INFO FOR MADEVENT / aMC@NLO
################################################################################
# If this file is in a MADEVENT Template. 'main directory' is the directory
# containing the SubProcesses directory. Otherwise this is the MadGraph5_aMC@NLO main
# directory (containing the directories madgraph and Template)
#! Allow/Forbid the automatic opening of the web browser (on the status page)
#! when launching MadEvent [True/False]
automatic_html_opening = False
#! allow notification of finished job in the notification center (Mac Only)
# notification_center = True
#! Default Running mode
#! 0: single machine/ 1: cluster / 2: multicore
# run_mode = 2
#! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only
#! And cluster queue (or partition for slurm)
#! And size of the cluster (some part of the code can adapt splitting accordingly)
# cluster_type = condor
# cluster_queue = madgraph
# cluster_size = 150
#! Path to a node directory to avoid direct writing on the central disk
#! Note that condor clusters avoid direct writing by default (therefore this
#! options does not affect condor clusters)
# cluster_temp_path = None
#! path to a node directory where local file can be found (typically pdf)
#! to avoid to send them to the node (if cluster_temp_path is on True or condor)
# cluster_local_path = None # example: /cvmfs/cp3.uclouvain.be/madgraph/
#! Cluster waiting time for status update
#! First number is when the number of waiting job is higher than the number
#! of running one (time in second). The second number is in the second case.
# cluster_status_update = 600 30
#! How to deal with failed submission (can occurs on cluster mode)
#! 0: crash, -1: print error, hangs the program up to manual instructions, N(>0) retry up to N times.
# cluster_nb_retry = 1
#! How much time to wait for the output file before resubmission/crash (filesystem can be very slow)
# cluster_retry_wait = 300
#! Nb_core to use (None = all) This is use only for multicore run
#! This correspond also to the number core used for code compilation for cluster mode
# nb_core = None
#! Pythia-PGS Package
#! relative path start from main directory
# pythia-pgs_path = ./pythia-pgs
#! Delphes Package
#! relative path start from main directory
# delphes_path = ./Delphes
#! MadAnalysis4 fortran-based package [for basic analysis]
#! relative path start from main directory
# madanalysis_path = ./MadAnalysis
#! MadAnalysis5 python-based Package [For advanced analysis]
#! relative path start from main directory
# madanalysis5_path = ./HEPTools/madanalysis5/madanalysis5
#! ExRootAnalysis Package
#! relative path start from main directory
# exrootanalysis_path = ./ExRootAnalysis
#! TOPDRAWER PATH
#! Path to the directory containing td executables
#! relative path start from main directory
# td_path = ./td
#! lhapdf-config
#! If None: try to find one available on the system
# lhapdf = lhapdf-config
#! fastjet-config
#! If None: try to find one available on the system
# fastjet = fastjet-config
#! MCatNLO-utilities
#! relative path starting from main directory
# MCatNLO-utilities_path = ./MCatNLO-utilities
#! Set what OLP to use for the loop ME generation
# OLP = MadLoop
#! Set the PJFRy++ directory containing pjfry's library
#! if auto: try to find it automatically on the system (default)
#! if '' or None: disabling pjfry
#! if pjfry=/PATH/TO/pjfry/lib: use that specific installation path for PJFry++
# pjfry = auto
#! Set the Golem95 directory containing golem's library
#! It only supports version higher than 1.3.0
#! if auto: try to find it automatically on the system (default)
#! if '' or None: disabling Golem95
#! if golem=/PATH/TO/golem/lib: use that speficif installation path for Golem95
# golem = auto
#! Set the samurai directory containing samurai's library
#! It only supports version higher than 2.0.0
#! if auto: try to find it automatically on the system (default)
#! if '' or None: disabling samurai
#! if samurai=/PATH/TO/samurai/lib: use that specific installation path for samurai
# samurai = None
#! Set the Ninja directory containing ninja's library
#! if '' or None: disabling ninja
#! if ninja=/PATH/TO/ninja/lib: use that specific installation path for ninja
# ninja = ./HEPTools/lib
#! Set the COLLIER directory containing COLLIER's library
#! if '' or None: disabling COLLIER
#! if ninja=/PATH/TO/ninja/lib: use that specific installation path for COLLIER
# Note that it is necessary that you have generated a static library for COLLIER
# collier = ./HEPTools/lib
#! Set how MadLoop dependencies (such as CutTools) should be handled
#! > external : ML5 places a link to the MG5_aMC-wide libraries
#! > internal : ML5 copies all dependencies in the output so that it is independent
#! > environment_paths : ML5 searches for the dependencies in your environment path
# output_dependencies = external
#! SysCalc PATH
#! Path to the directory containing syscalc executables
#! relative path start from main directory
# syscalc_path = ./SysCalc
#! Absolute paths to config scripts in the bin directories for APPLgrid and aMCFast.
# applgrid = applgrid-config
# amcfast = amcfast-config
mg5_path = /home/camilo/HEPTools/MadGraph/MG5_aMC_v2_5_2-root5
# MG5 MAIN DIRECTORY
mg5_path = /home/camilo/HEPTools/MadGraph/MG5_aMC_v2_5_2-root5
...page...
Simulación Hadrónica
Como se dijo anteriormente, la simulación hadrónica, se hace luego de que MadEvent(ME) genera los eventos a nivel partónico. En éste tutorial se utilizará el paquete Pythia8 previamente instalado. Recordando que Pythia se puede ejecutar directamente desde MG, creando una tarjeta de configuración
pythya8.dat en la carpeta
Cards y ejecutando
./bin/mg5_aMC, o ejecutando en la carpeta de salida
./bin/madevent opciones 0 y 0. A continuación se muestran las tres opciones suponiendo una carpeta de salida (output) llamada "InclusiveTTbar1J".
Directamente desde MG:
Primero se ejecuta MG,
./PATH_TO_MADGRAPH/bin/mg5_aMC
Luego se introducen cuales procesos se quieren simular
define p = u u~ d d~ c c~ s s~ b b~ g
define j = p
generate p p > t t~ @0
add process p p > t t~ j @1
output InclusiveTTbar1J
launch
Nota: En la primera linea se define el elemento
j (jet) como una multi-partícula igual al proton (se puede definir como se quiera).
En la segunda linea se pide que el proceso que se genere sea el de dos protones yendo a un par quarks top anti-top, donde
"@0" quiere decir que es no hay elementos extras.
Por último en la tercera linea se le pide genere eventos de dos protones yendo a un par quarks top anti-top, donde
"@1" quiere decir que el jet es un elemento extra.
A continuación,
MadGraph mostrará un set de opciones, así:
************************************************************
* *
* W E L C O M E to *
* M A D G R A P H 5 _ a M C @ N L O *
* M A D E V E N T *
* *
* * * *
* * * * * *
* * * * * 5 * * * * *
* * * * * *
* * * *
* *
* VERSION 2.5.2 2016-12-10 *
* *
* The MadGraph5_aMC@NLO Development Team - Find us at *
* https://server06.fynu.ucl.ac.be/projects/madgraph *
* *
* Type 'help' for in-line help. *
* *
************************************************************
INFO: load configuration from /scratch/cms/Datos/Trash/ejemplo/Cards/me5_configuration.txt
INFO: load configuration from /home/camilo/HEPTools/MadGraph/MG5_aMC_v2_5_2-root6/input/mg5_configuration.txt
INFO: load configuration from /scratch/cms/Datos/Trash/ejemplo/Cards/me5_configuration.txt
Using default text editor "vi". Set another one in ./input/mg5_configuration.txt
generate_events run_01
The following switches determine which programs are run:
/--------------------------------------------------------------------------------------------------\
| 1. Choose the shower/hadronization program: shower = OFF |
| 2. Choose the detector simulation program: detector = OFF |
| 3. Run an analysis package on the events generated: analysis = No analysis tool interfaced to MG5aMC.|
| 4. Decay particles with the MadSpin module: madspin = OFF |
| 5. Add weights to events for different model hypothesis: reweight = OFF |
\--------------------------------------------------------------------------------------------------/
Either type the switch number (1 to 5) to change its setting,
Set any switch explicitly (e.g. type 'madspin=ON' at the prompt)
Type 'help' for the list of all valid option
Type '0', 'auto', 'done' or just press enter when you are done.
[0, auto, done, delphes, delphes=ON, delphes=OFF, shower=OFF, shower=PYTHIA8, shower, detector=OFF, ... ][60s to answer]
>
donde se pone
1 para activar la opción de shower, así:
The following switches determine which programs are run:
/--------------------------------------------------------------------------------------------------\
| 1. Choose the shower/hadronization program: shower = PYTHIA8 |
| 2. Choose the detector simulation program: detector = OFF |
| 3. Run an analysis package on the events generated: analysis = No analysis tool interfaced to MG5aMC.|
| 4. Decay particles with the MadSpin module: madspin = OFF |
| 5. Add weights to events for different model hypothesis: reweight = OFF |
\--------------------------------------------------------------------------------------------------/
Either type the switch number (1 to 5) to change its setting,
Set any switch explicitly (e.g. type 'madspin=ON' at the prompt)
Type 'help' for the list of all valid option
Type '0', 'auto', 'done' or just press enter when you are done.
[0, auto, done, delphes, delphes=ON, delphes=OFF, shower=OFF, shower=PYTHIA8, shower, detector=OFF, ... ][60s to answer]
>
finalizando con la cantidad de enters necesarios para que el programa se ejecute. Pythia entrega como resultado un archivo comprimido llamado (por defecto) "tag_1_pythia8_events.hepmc.gz"
Usando una targeta de configuración:
Dentro de la carpeta "InclusiveTTbar1J/Cards/" está la tarjeta por defecto de pythia8 llamada "pythia8_card_default.dat", si se copia esta tarjeta con el nombre de "pythia8_card.dat" (con los cambios que se necesiten) en este mismo directorio y se ejecuta Madgraph, la opción de usar Pythia8 estará por defecto. (muy útil cuando se hace scripting)
Usando MadEvent?
Luego de haber generado la carpeta de salida, se procede a dicha carpeta y se llama a
madevent
luego que se abra la linea de comandos del madevent, se pone lo siguiente:
ExclusiveTTbar>pythia8 run_##
>0
>0
donde ## es el número del run que se quiere hadronizar con Pythia.
...page...
Merging - Matching
El objetivo de cualquier procedimiento de Matching (emparejamiento) de parton-jets es principalmente evitar la superposición entre descripciones en el espacio de fase dadas por generadores de elementos de matriz y softwares de showering o hadronización, cuando se simula un proceso de múltiples jets. Podría surgir la pregunta de ¿porque usar ambos en primer lugar? La motivación es la siguiente:
- Los programas Monte Carlo de Parton Shower (PS) como Pythia y Herwig describen la radiación de los partones como sucesivas emisiones del parton utilizando técnicas de cadena de Markov basadas en factores de forma Sudakov. Esta descripción es formalmente correcta sólo en el límite de las emisiones blandas y colineales. Sin embargo, para la producción de showering de radiación de QCD duros y ampliamente separados, ésta descripción se descompone debido a la falta de términos de subleading e interferencia. Para ese caso, es necesario utilizar las amplitudes completas a nivel de árbol (perturbative QCD) para la producción de partículas pesadas más partes duras adicionales.
Así la descripción del Elemento Matriz (ME) diverge cuando los componentes se vuelven suaves o colineales, mientras que la descripción de la PS se rompe cuando los partos se vuelven duros y están muy separados
Para realizar un buen merging (primera aprox, para una descripción completa ver la referencia al final) se debe de tener en cuenta dos variables sobre las cuales se debe cortar:
xqcut y
qcut. La primera se configura en MG (se configura en la run_card.dat) y la segunda en Pythia (pythia8_card.dat). Para encontrar los valores óptimos de las variables de merging debe realizarse la simulación de los eventos del proceso de interés por MG y Pythia, y para cada valor del xqcut se debe realizar un scan sobre qcut hasta encontrar un valor óptimo, teniendo en cuenta que xqcut < qcut. El valor óptimo se determina cuando la sección eficaz se estabiliza.
Nota: Los siguientes parámetros de la run card deben ser ajustados:
30.0
= xqcut ! minimum kt jet measure between partons
#*********************************************************************
# Store info for systematics studies
*
# WARNING: Do not use for interference type of computation
*
#*********************************************************************
False = use_syst ! Enable systematics studies
#
Y en la pythia8 card
! --------------------------------------------------------------------
! Parameters relevant only when performing MLM merging, which can be
! turned on by setting ickkw to ’1’ in the run_card and chosing a
! positive value for the parameter xqcut.
! For details, see section ’Jet Matching’ on the left-hand menu of
!
http://home.thep.lu.se/~torbjorn/pythia81html/Welcome.html
! --------------------------------------------------------------------
! If equal to -1.0, MadGraph5_aMC@NLO will set it automatically based
! on the parameter ’xqcut’ of the run_card.dat
JetMatching:qCut
= 45.0
! Use default kt-MLM to match parton level jets to those produced by the
! shower. But the other Shower-kt scheme is available too with this option.
JetMatching:doShowerKt
= on
! A value of -1 means that it is automatically guessed by MadGraph.
! It is however always safer to explicitly set it.
JetMatching:nJetMax
= 2
Ver mas en
madgraph-wiki
...page...
Simulación del Detector