Reweight with change process

Asked by Jon Wilson

I am using SMEFTsim with MadGraph 2.9.18.

I am trying to generate events with only the SM term and EFT quadratic terms included. That is, I want to exclude the SM-EFT interference term.

```
generate p p > t t~ @0 NPprop=0 SMHLOOP=0 NP=1 NP^2==0
add process p p > t t~ @0 NPprop=0 SMHLOOP=0 NP=1 NP^2==2
```

Then I want to reweight using the entire EFT model, including the interference term.

```
change process p p > t t~ NPprop=0 SMHLOOP=0 NP=1

launch --rwgt_name=dummy

launch --rwgt_name=EFTrwgt0_ctGRe_0.000000_ctWRe_0.000000
set ctGRe 0.000000
set ctWRe 0.000000

launch --rwgt_name=EFTrwgt1_ctGRe_1.000000_ctWRe_0.000000
set ctGRe 1.000000
set ctWRe 0.000000
```

But when I use the resulting weights, I do not get even close to reproducing a sample generated using the entire model at the points in parameter space that I reweight to.

What am I doing wrong?
Regards,
Jon

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

when I see this syntax:
generate p p > t t~ @0 NPprop=0 SMHLOOP=0 NP=1 NP^2==0
add process p p > t t~ @0 NPprop=0 SMHLOOP=0 NP=1 NP^2==2

I'm actually surprised the MG5aMC is able to generate what you want.
The surprise is that you set both process to @0, so madgraph will use a single directory for both (which is likely fine but MG5aMC was not really designed for this).

Now, in that mode, the event within the lhef file will be produce with either the first or the second matrix-element.
But since for both the event type number will be to 0, the reweighting module will have no clue which one of the two is used (and will likely always pick the same without realizing this ambiguity).

So one solution might be to ask the second process to have @1 and to be sure that the re-weighting is using that you will likely need to set "change use_eventid True" in the reweight_card.
But this is likely leading to a different reweighting method that the one, you would like...
So here the best is either to write a plugin to the reweighting method or to implement such reweighting yourself.

Cheers,

Olivier

Revision history for this message
Jon Wilson (jsw-bu) said :
#2

Hi Olivier,
Ah. I was hoping the denominator of the reweighting would be the total cross section, not just one subprocess's cross section. In order to implement this, I suppose I will have to do as you say and write a plugin or implement it myself. Is there any guide or documentation about writing a plugin?
Regards,
Jon

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#3

PLUgin for reweighting was only done once and is actually not in the documentation. So doing it by hand might be simpler.

But for other type of plugin the documentation are here (and this type of plugin follows the same strategy):

Here is the example: the __init__ file indicating to MG to add a reweighitng mode (and provide the class that handles it)
https://github.com/maddmhep/maddm/blob/master/__init__.py

and here the actual definition of the special handling:
https://github.com/maddmhep/maddm/blob/bb8d8614fb60b39cb466bc040f08ccf97873fe6f/MGoutput.py#L968

In this plugin, we first change the kinematics of the event (which will change the weight of the event).

Cheers,

Olivier

Can you help with this problem?

Provide an answer of your own, or ask Jon Wilson for more information if necessary.

To post a message you must log in.