VBS inefficiency

Asked by Michele Selvaggi on 2018-09-25

Dear experts,

I am having issues in efficiently generating VBS WW same sign events using v2.6.1.
The generation efficiency is merely 5% (asking 100 events, leads to 5 in LHE file).

That would be ok, but I am interested in LL polarized events that are 5% of the above, which makes the generation impossible.
Any trick that could make the generation more efficient?

The following commands have been used:

generate p p > w+ w+ j j QED=4
add process p p > w- w- j j QED=4

set lhapdf /afs/cern.ch/work/s/selvaggi/public/LHAPDF-6.1.6/build/bin/lhapdf-config

launch DUMMYPROCESS

set iseed DUMMYSEED
set nevents DUMMYNEVENTS

set ebeam1 50000
set ebeam2 50000

set pdlabel lhapdf
set lhaid 260000

set use_syst False
set mmjj 500.
set deltaeta 2.5

set ptj 25.
set etaj 6.5

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
2018-10-02
Last reply:
2018-10-03

Hi,

In which frame do you want the longitudinal W?

If you want them in the rest-frame of the partonic collision (and not in the lab frame)
then you can force MG to only generate LL W.
by hacking all the matrix.f

If you want them in another frame this is obviously
more complicated since you would need to change the way events are generated.

Otherwise I have made some update to the t-channel handling recently that was improving the situation
for some same sign case. But this seems to be included in 2.6.2 or 2.6.3 (not sure)
This also does not seem to have been included in a single patch that I can provide for 2.6.1
Now for the test that I have made the efficiency was better by a factor.of 3 ( from 1k events generated before the. patch to 3k events generated)

Actually with the dev version and your script, I get the 100 events requested without any issue and very fast (note that I do not use the same pdf as you but ok). On the other hand, If I ask for 10k events, this is much slower, it is not yet finished but I currently estimate around 3k events generated.

Cheers,

Olivier

> On 25 Sep 2018, at 14:57, Michele Selvaggi <email address hidden> wrote:
>
> New question #674407 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/674407
>
> Dear experts,
>
> I am having issues in efficiently generating VBS WW same sign events using v2.6.1.
> The generation efficiency is merely 5% (asking 100 events, leads to 5 in LHE file).
>
> That would be ok, but I am interested in LL polarized events that are 5% of the above, which makes the generation impossible.
> Any trick that could make the generation more efficient?
>
> The following commands have been used:
>
> generate p p > w+ w+ j j QED=4
> add process p p > w- w- j j QED=4
>
> set lhapdf /afs/cern.ch/work/s/selvaggi/public/LHAPDF-6.1.6/build/bin/lhapdf-config
>
> launch DUMMYPROCESS
>
> set kw 1.00
>
> set iseed DUMMYSEED
> set nevents DUMMYNEVENTS
>
> set ebeam1 50000
> set ebeam2 50000
>
> set pdlabel lhapdf
> set lhaid 260000
>
> set use_syst False
> set mmjj 500.
> set deltaeta 2.5
>
> set ptj 25.
> set etaj 6.5
>
>
>
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Hi Olivier,

thanks for your suggestion. I do see an improvement with the dev version in terms of speed. However I found that requesting 1k events leads to 1k, but if I ask for 2k or more I get less than I ask (sometimes even 200 events).

Is there a way to run until we get the needed precision? (even if that takes a week)
For this study I need an estimate of the cross section of better than 1%.
This should be obtained by asking > 10k events but it seems impossible to get 10k events as you also noticed.

Thanks
Michele

Hi,

> Is there a way to run until we get the needed precision? (even if that takes a week)

Gridpack should have that option actually.
Otherwise, you need to create a plugin where you change the maximal number of iteration that are trying before given up.

You can also try to use the job_strategy "2" (the one designed for loop-induced)

Cheers,

Olivier

> On 27 Sep 2018, at 11:43, Michele Selvaggi <email address hidden> wrote:
>
> Question #674407 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/674407
>
> Status: Answered => Open
>
> Michele Selvaggi is still having a problem:
> Hi Olivier,
>
> thanks for your suggestion. I do see an improvement with the dev version
> in terms of speed. However I found that requesting 1k events leads to
> 1k, but if I ask for 2k or more I get less than I ask (sometimes even
> 200 events).
>
> Is there a way to run until we get the needed precision? (even if that takes a week)
> For this study I need an estimate of the cross section of better than 1%.
> This should be obtained by asking > 10k events but it seems impossible to get 10k events as you also noticed.
>
> Thanks
> Michele
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Hi Olivier,

which parameters exactly you suggest I should change in addition to :

set gridpack true

if I want X% accuracy on the cross section?

Also, setting job_strategy to 2 make the run crashing for me (at compilation time, not sure why).

>Otherwise, you need to create a plugin where you change the maximal number of iteration that are trying before given up.

do you have an example for such a plugin? Or at least point me to where in the code I should have a look?

Thanks

Hi,

When you set gridpack to True, you .. do not generate any events.
You just run the survey (at higher accuracy)
then you have a code that allow you to generate X events for the given seed.
(i.e. the only two parameters that you can change are the number of events and the seed)

And when you request a given number of events, it has an infinite loop over the actual generation to
not have any time-out.

Also, setting job_strategy to 2 make the run crashing for me (at
compilation time, not sure why).

Can you be more specific?
I tested it with a simple top pair production and it went trough nicely.

Otherwise, you need to create a plugin where you change the maximal
number of iteration that are trying before given up.

do you have an example for such a plugin? Or at least point me to where
in the code I should have a look?

Not for that type of plugin.
You basically have to create a plugin which overwrites the class in
madgraph/madevent/gen_ximprove.py
(or just modify the copy which is in bin/internal)

and replace all the value for the maximum number of iteration (depending which scenario you are in)
Since those are class variable, you can in principle use the plugin to modify those values on the flight.

class gen_ximprove(object):

    # some hardcoded value which impact the generation
    gen_events_security = 1.2 # multiply the number of requested event by this number for security
    combining_job = 0 # allow to run multiple channel in sequence
    max_request_event = 1000 # split jobs if a channel if it needs more than that
    max_event_in_iter = 5000
    min_event_in_iter = 1000
    max_splitting = 130 # maximum duplication of a given channel
    min_iter = 3
    max_iter = 9
    keep_grid_for_refine = False # only apply if needed to split the job

Cheers,

Olivier

On 28 Sep 2018, at 13:16, Michele Selvaggi <<email address hidden><mailto:<email address hidden>>> wrote:

Question #674407 on MadGraph5_aMC@NLO changed:
https://answers.launchpad.net/mg5amcnlo/+question/674407

   Status: Answered => Open

Michele Selvaggi is still having a problem:
Hi Olivier,

which parameters exactly you suggest I should change in addition to :

set gridpack true

if I want X% accuracy on the cross section?

Also, setting job_strategy to 2 make the run crashing for me (at
compilation time, not sure why).

Otherwise, you need to create a plugin where you change the maximal
number of iteration that are trying before given up.

do you have an example for such a plugin? Or at least point me to where
in the code I should have a look?

Thanks

--
You received this question notification because you are an answer
contact for MadGraph5_aMC@NLO.

Hi Olivier,

can you suggest specifically which parameters I should try to change in the gen_ximprove class?
I have tried the following (and I don't know what I am doing), but nothing seems to change (requesting for 10k leads to only 179 events)?

gen_events_security = 1.2 # multiply the number of requested event by this number for security
combining_job = 0 # allow to run multiple channel in sequence
max_request_event = 100000 # split jobs if a channel if it needs more than that
max_event_in_iter = 500000
min_event_in_iter = 1000
max_splitting = 130 # maximum duplication of a given channel
min_iter = 3
max_iter = 99999
keep_grid_for_refine = False # only apply if needed to split the job

Could be you please tell me exactly what parameters I should change to make sure I get the 10k requested events?

Thanks
Michele

HI,

Did you check that you max_iter was effectively changed in your run directory.
(you should have a file with that info or simply in the log of each channel where you can see how many iteration was performed and why it stops at that iteration.

As you can see in that file, the class gen_ximprove is the mother class for many other class.
So you typically never use that one but one of the child (which one depends of many parameter present in your run_card)

So depending of your run_card, you sometimes use
gen_ximprove_share, gen_ximprove_v4,...
some of them keep the default value of the class that you modify (like gen_ximprove_share)
but not all of them (like gen_ximprove_v4 and gen_ximprove_gridpack)

If you do not observe any change, it is likely that you are using a class in the second category.
If you only observe a slow down and not progress then it might indicate that you have an integrable singularity.
But I do not think that this is the case here.

Could be you please tell me exactly what parameters I should change to
make sure I get the 10k requested events?

Naively, I would only change max_iter.
Now you can basically change all those parameter in a quite free way and observe the effects.
The only two you should not touch are keep_grid_for_refine and combining_job.
All the rests are paremeters that you can play with.

max_event_in_iter = 500000
min_event_in_iter = 1000

Here I would not suggest to increase the max to high number. On the contrary, it is better to have it quite low but having more iteration. Now you can increase the min to something to 10k and see if this helps.
Note that your process is likely to trigger the function "increase_precision" which is going to overwrite some of the parameters including
min_event_in_iter
max_event_in_iter
gen_events_security

Cheers,

Olivier

On 2 Oct 2018, at 17:02, Michele Selvaggi <<email address hidden><mailto:<email address hidden>>> wrote:

Question #674407 on MadGraph5_aMC@NLO changed:
https://answers.launchpad.net/mg5amcnlo/+question/674407

   Status: Answered => Open

Michele Selvaggi is still having a problem:
Hi Olivier,

can you suggest specifically which parameters I should try to change in the gen_ximprove class?
I have tried the following (and I don't know what I am doing), but nothing seems to change (requesting for 10k leads to only 179 events)?

gen_events_security = 1.2 # multiply the number of requested event by this number for security
combining_job = 0 # allow to run multiple channel in sequence
max_request_event = 100000 # split jobs if a channel if it needs more than that
max_event_in_iter = 500000
min_event_in_iter = 1000
max_splitting = 130 # maximum duplication of a given channel
min_iter = 3
max_iter = 99999
keep_grid_for_refine = False # only apply if needed to split the job

Could be you please tell me exactly what parameters I should change to
make sure I get the 10k requested events?

Thanks
Michele

--
You received this question notification because you are an answer
contact for MadGraph5_aMC@NLO.

Can you help with this problem?

Provide an answer of your own, or ask Michele Selvaggi for more information if necessary.

To post a message you must log in.