# how many diagrams ?

Dear mg5 team

the process that I generate is "generate g g > e+ ve mu- vm~ b b~ b b~ [virt=QCD]"
then I get "INFO: Contributing diagrams generated: 3904 Born, 172416(+53912) loops, 90804 R2, 142528 UV"
so, how many 1-loop diagrams do I have??

Best regards
Huanyu

## Question information

Language:
English Edit question
Status:
Solved
For:
Assignee:
Valentin Hirschi Edit question
Solved by:
Olivier Mattelaer
Solved:
Last query:
 HuanyuBi (bihuanyu) said on 2021-04-21: #1

hi Olivier

The question is asked in English. I didnt notice that I choose Haida. but I modified it.

Best regards
Huanyu

>
> Assignee: None => Valentin Hirschi
>
> WARNING: This question is asked in a language (Haida)
>
> --

 Olivier Mattelaer (olivier-mattelaer) said on 2021-04-21: #2

The number of 1-loop diagram is given by 172416(+53912)
the 53k information is probably loop which are identical to another loop and therefore does not need to be computed (typically different mass-less flavor in a loop). So the number of loop that we evaluated is 172k. Which are then interfere with the 4k born amplitude.
Then in order to compute the finite piece of the loop you have to add 90k R2 term.
and then add the 142k UV counter-term.

PS: Valentin correct me if I'm wrong

 HuanyuBi (bihuanyu) said on 2021-04-21: #3

hi Olivier

is it possoble for mg5 to generate (or export/print out) diagrams of specified loop topology.
for example. i need only self-energy diagrams or Octagon-type diagrams.

Best regards
Huanyu

 Olivier Mattelaer (olivier-mattelaer) said on 2021-04-21: #4

You need to hardcode some filtering:

 HuanyuBi (bihuanyu) said on 2021-04-21: #5

I find this example in the file, madgraph/loop/loop_diagram_generation.py.
# Ex. 1: Chose the topology, i.e. number of loop line.
# Notice that here particles and antiparticles are not
# differentiated and always the particle PDG is returned.
# In this example, only boxes are selected.
# if len(diag.get_loop_lines_pdgs())>2 and \
# any([i in diag.get_loop_lines_pdgs() for i in[24,-24,23]]):
# valid_diag=False

so if I only need boxes then I uncomment the last 3 lines.
but I am not sure what should I do if I only need Self-energy, Vertex, Pentagon-type, Hexagon-type, Heptagon-type and Octagon-type diagrams.

best regards
Huanyu

 Olivier Mattelaer (olivier-mattelaer) said on 2021-04-22: #6

I guess that the second line is not needed for what you want to do and this does not "only" select boxes for sure.
If I were you, I would test something like
if len(diag.get_loop_lines_pdgs())==2:
if len(diag.get_loop_lines_pdgs())==3:
if len(diag.get_loop_lines_pdgs())==4:
if len(diag.get_loop_lines_pdgs())==5:
if len(diag.get_loop_lines_pdgs())==6:
if len(diag.get_loop_lines_pdgs())==7:
if len(diag.get_loop_lines_pdgs())==8:

and obviously check the drawing of the diagram to check if this correspond to what you want or not

 HuanyuBi (bihuanyu) said on 2021-04-27: #7

Hi Olivier,

just one comment:
actually if I only need Octagon-type diagrams, I need
if len(diag.get_loop_lines_pdgs())!=8:
valid_diag=False

Best regards
Huanyu

 HuanyuBi (bihuanyu) said on 2021-04-27: #8

Thanks Olivier Mattelaer, that solved my question.