How to speed up MadGraph if I only want to see the total cross section?

Asked by Qiji Xin on 2018-09-08

Hi all,

I am a newer to Madgraph and using it to calculate a 2 → 3 process with pure electroweak, no QCD.
What I wanna know now is just the total cross section per run.

Now for one run to see the total cross section at one beam energy, it usually takes 40 min.
I have also tried CompHEP, and it only takes a couple minutes.

I think the time difference may be because MadGraph calculates/simulates more things than just the total cross section.
So, if I just want the total cross section, are there anything I can do to speed MadGraph up?

Thanks very much!

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Qiji Xin
Solved:
2018-09-14
Last query:
2018-09-14
Last reply:
2018-09-13
Qiji Xin (xinqijisuper) said : #1

It seems that CompHEP does the phase space integrals to get the total cross sections, without generating events.
For MadGraph&MadEvents, it gets the total cross section after generating a lot of events.
That's why CompHEP gives me the total cross section very fast.

Is my understanding correct?

If so, is there a way to ask MadGraph & MadEvent only do the integrals without generating the events, which takes a log of time?

Thanks very much!

Hi,

The main difference in speed is likely to be due to the method of computation of the matrix-element.
CalcHep/CompHep are computing analytically the amplitude square when we are doing so numerically.

The advantage is the computing numerically appears for large number of diagram.
Indeed the number of operation raises like the number of diagram square in the context of CalcHep/CompHep while it raises linearly in our program. On the other hand if you have a small number of diagram (AND a small number of particle in the final state) then
then analytical computation is much more efficient.

Now the speed for the cross-section also depends on the precision that you want on the cross-section. If you only request 1 event, then we will provide a precision of about 20% and the code will obviously be much faster than if you request a huge amount of events.

Cheers,

Olivier

Hi,

> MadGraph does
> both numerically? Just to confirm this.

Yes that's correct

> 2) You said requesting 1 event could give me a precision of 20% of the cross section.
> Could you explain a little more why only 1 even could give me so good precision?

Before being able to generate events, we need to
1) compute the [order of magnitude] cross-section of each contribution to the integral
2) estimate the efficency for the generation of events for each contribution

At this stage we decide to request that each contribution have an error of at most 20%.
Consequently the total error on the cross-section after that stage is ~20%

In a second step, we look at how many events are requested by the user and then probe more deeply the channel that requires more events generated. If you request a small number of evetns (typically less than 200)
then this second step (called refine) then this stage takes 0 sec.

> I mean, if I want a precision of, say, 1%, how much events do I need roughly?

This is 10k events

Cheers,

Olivier

> On 12 Sep 2018, at 18:07, Bei Zhou <email address hidden> wrote:
>
> Question #673551 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/673551
>
> Bei Zhou requested more information:
> Hi Olivier,
>
> Thanks for your answers! That helps me a lot!
> So
>
> 1) I think CalcHEP/CompHEP do the matrix element analytically while the
> phase space integration (VEGAS Monte Carlo) numerically? MadGraph does
> both numerically? Just to confirm this.
>
> 2) You said requesting 1 event could give me a precision of 20% of the cross section.
> Could you explain a little more why only 1 even could give me so good precision? I would imagine it needs lots of events (points) to cover the phase space to get the total cross section.
> And is there a general rough related between number of events and the precision of total cross section? I mean, if I want a precision of, say, 1%, how much events do I need roughly?
> I will mainly use MadGraph in the future I think so would like to know more about it.
>
> Thanks!
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Qiji Xin (xinqijisuper) said : #6

Thank you Oliver!
A last brief question.
So the relative uncertainty of total xsec roughly scales with 1/sqrt(Nevents) ?
Thanks!

Yes.

> On 13 Sep 2018, at 04:52, Qiji Xin <email address hidden> wrote:
>
> Question #673551 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/673551
>
> Status: Answered => Open
>
> Qiji Xin is still having a problem:
> Thank you Oliver!
> A last brief question.
> So the relative uncertainty of total xsec roughly scales with 1/sqrt(Nevents) ?
> Thanks!
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Qiji Xin (xinqijisuper) said : #8

Thank you very much Olivier. You answers are very helpful!