Reweighting at NLO using SMEFT@NLO-NLO

Asked by Abdellah Tnourji on 2021-05-03

Dear Expert,

I am generation my ttbar event at NLO using SMEFTNLO-NLO model (MadGraph version: MG5_aMC_v2_9_1_2) :

proc_card :
--------------------------------------------------------------------
import model SMEFTatNLO-NLO_1_5_ctg
define p = p b b~
generate p p > t t~ QED=0 QCD=2 NP=2 [QCD]
output ctg_NLO_SMEFT
--------------------------------------------------------------------
where SMEFTatNLO-NLO_1_5_ctg is a restricted card were ctg=1.5 and all other operates are zero (DIM64F) or e-10 ( as indicated here https://feynrules.irmp.ucl.ac.be/wiki/SMEFTatNLO )

I would like to use MadGraph to reweight the generated events at NLO with a different set of ctg :

reweighing_card :
--------------------------------------------------------------------
change mode NLO
change helicity False
launch --rwgt_name=ctg_neg_1_5
  set DIM62F 24 -1.5
launch --rwgt_name=ctg_neg_1_2
  set DIM62F 24 -1.2
--------------------------------------------------------------------

I am also using MadSpin for decay particles :
--------------------------------------------------------------------
decay t > w+ b, w+ > l+ vl NP=0
decay t~ > w- b~, w- > l- vl~ NP=0
decay w+ > l+ vl
decay w- > l- vl~
--------------------------------------------------------------------

At generation level, I am working with this set up :
order = NLO; fixed_order = OFF; shower = PYTHIA8; madspin = ON; reweight = ON; madanalysis = ON

But unfortunately, I got compilations issue? , I will put the log file in a separate message.

Comment :
    * Using SMEFTNLO-LO; I was able to generate weight event (at LO) without any issues

Thanks in advance
A.Tnourji

Question information

Language:
English Edit question
Status:
Open
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Looks like you have to re-install the collier library since that one was not compiled with the -fPIC flag which prevents the re-weighting functionallity.

If you are not using ATLAS/CMS installation you can just do "install collier" and this will fix the issue.

Cheers,

Olivier

> On 4 May 2021, at 01:00, Abdellah Tnourji <email address hidden> wrote:
>
> Question #696897 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/696897
>
> Abdellah Tnourji gave more information on the question:
> The log file: https://cernbox.cern.ch/index.php/s/9yPTTaqAr0VY1A6
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Abdellah Tnourji (atnourji) said : #3

Dear Olivier,

Thank you for your quick response.

Re-installing the collier library fixes the compilation issue.

I am having a problem reading the LHE file (at NLO): https://cernbox.cern.ch/index.php/s/ZVFGMc9L2yHwiCA

Normally, when I generate a reweighted sample at LO, I can easily see the value of the weighted sample for each event, for instance :
....
<rwgt>
<wgt id='operator_1'> 4.55278761371e-06 </wgt>
<wgt id='mg_reweight_1'> 2.65941887458e-06 </wgt>
<wgt id='mg_reweight_2'> 8.68203803896e-06 </wgt>
</rwgt>
</event>
.....

But at NLO, I was not able to see such a structure in the output lhe file?

Cheers,
A.Tnourji

I see a lot of nan in your lhe file, this can likely be the issue onn why the reweighting is not writting those additional weight since they will all be nan as well.

So the question is at which stage does nan arrives?
Can you check before and after madspin if those nan are already there?

Cheers,

Olivier

> On 4 May 2021, at 11:31, Abdellah Tnourji <email address hidden> wrote:
>
> Question #696897 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/696897
>
> Status: Answered => Open
>
> Abdellah Tnourji is still having a problem:
> Dear Olivier,
>
> Thank you for your quick response.
>
> Re-installing the collier library fixes the compilation issue.
>
> I am having a problem reading the LHE file (at NLO):
> https://cernbox.cern.ch/index.php/s/ZVFGMc9L2yHwiCA
>
> Normally, when I generate a reweighted sample at LO, I can easily see the value of the weighted sample for each event, for instance :
> ....
> <rwgt>
> <wgt id='operator_1'> 4.55278761371e-06 </wgt>
> <wgt id='mg_reweight_1'> 2.65941887458e-06 </wgt>
> <wgt id='mg_reweight_2'> 8.68203803896e-06 </wgt>
> </rwgt>
> </event>
> .....
>
> But at NLO, I was not able to see such a structure in the output lhe
> file?
>
> Cheers,
> A.Tnourji
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Abdellah Tnourji (atnourji) said : #5

Dear Olivier,

Thank you.

==> Can you check before and after madspin if those nan are already there?

I have checked, the non are before madspin :

------------------------------------------------------------

sum of cpu time of last step: 0 second
INFO: Updating the number of unweighted events per channel

      Intermediate results:
      Random seed: 12345
      Total cross section: 9.401e+02 +- 5.3e+00 pb
      Total abs(cross section): nan +- nan pb
------------------------------------------------------------
-.... .
....
...
   --------------------------------------------------------------
      Summary:
      Process p p > t t~ QED=0 QCD=2 NP=2 [QCD]
      Run at p-p collider (6500.0 + 6500.0 GeV)
      Number of events generated: 10000
      Total cross section: 2.966e+00 +- 1.8e-02 pb
   --------------------------------------------------------------
      Scale variation (computed from LHE events):
          Dynamical_scale_choice -1 (envelope of 9 values):
                   nan pb +nan% -nan%
   --------------------------------------------------------------

Comment [I hope this will help to solve the error] :

  * I tried to set DIM64F to e-5 and avoid setting them explicitly to zero and I got the following error (previously, MG show no error but the computed cross-section was nan) :

Error detected in "launch "
write debug file /AtlasDisk/user/tnourji/MG5_aMC_v2_9_1_2/Abdellah/Reweighting/smeft/ctg_NLO/ctg_NLO_SMEFT/run_01_tag_1_debug.log
If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
str : An error occurred during the collection of results.
 Please check the .log files inside the directories which failed:
 /AtlasDisk/user/tnourji/MG5_aMC_v2_9_1_2/Abdellah/Reweighting/smeft/ctg_NLO/ctg_NLO_SMEFT/SubProcesses/P0_uux_ttx/GF4/log.txt
 /AtlasDisk/user/tnourji/MG5_aMC_v2_9_1_2/Abdellah/Reweighting/smeft/ctg_NLO/ctg_NLO_SMEFT/SubProcesses/P0_ccx_ttx/GF4/log.txt
 /AtlasDisk/user/tnourji/MG5_aMC_v2_9_1_2/Abdellah/Reweighting/smeft/ctg_NLO/ctg_NLO_SMEFT/SubProcesses/P0_uxu_ttx/GF4/log.txt

Please find the link for the log files :
https://cernbox.cern.ch/index.php/s/t7KYpuIWyM4aMyi

* * I am using Pdf set = NNPDF30_nlo_as_0118 (id= 260000)

Cheers,
A.Tnourji

Is your model four or five flavour?
You should never use (especially at NLO) the following command
define p = p b b~

This might be the reason of the issue actually, if you want to be in five flavour, you have to set the b mass to zero in the restriction file (or at least at the model level)

Cheers,

Olivier

Abdellah Tnourji (atnourji) said : #7

Hello,

==> Is your model four or five flavour?

five flavour.

==> You should never use (especially at NLO) the following command
define p = p b b~

Thank you

I have updated my proc_card.dat:
proc_card :
--------------------------------------------------------------------
import model SMEFTatNLO-NLO_1_5_ctg
generate p p > t t~ QED=0 QCD=2 NP=2 [QCD]
output ctg_NLO_SMEFT
--------------------------------------------------------------------

But I still have the 'nan' cross-section :

Total abs(cross section): nan +- nan pb
...
...

 --------------------------------------------------------------
      Scale variation (computed from LHE events):
          Dynamical_scale_choice -1 (envelope of 9 values):
                   nan pb +nan% -nan%
   --------------------------------------------------------------
......

Cheers,
A.Tnourji

Yes if you are in five flavor model your line was not needed at all and therefore removing it would keep the previous behavior.

Otherwise, I have run the same run as you (I copy restrict_NLO.dat and set all DIM2F and DIM4F to zero but Ctg to 1.4) and I do not reproduce the issue:
      Summary:
      Process p p > t t~ QED=0 QCD=2 NP=2 [QCD]
      Run at p-p collider (6500.0 + 6500.0 GeV)
      Number of events generated: 10000
      Total cross section: 1.006e+03 +- 6.2e+00 pb
   --------------------------------------------------------------
      Scale variation (computed from LHE events):
          Dynamical_scale_choice -1 (envelope of 9 values):
              1.010e+03 pb +5.4% -9.6%

Did you change anything else? in the cards?
This could means that the issue would be within lhapdf. which version did you have install?

Olivier

Abdellah Tnourji (atnourji) said : #9

Hello,

Thank you.
== > Did you change anything else? in the cards?
No. I am using the default NLO card and I have only changed the value of BSM operators.

== > This could mean that the issue would be within lhapdf. which version did you have install?
LHAPDF-6.3.0/

However, I tried to use the most recent MG version: MG5_aMC_v3_1_0 (previously: MG5_aMC_v2_9_1_2 ), and indeed, the issue is gone :

   --------------------------------------------------------------
      Summary:
      Process p p > t t~ QED=0 QCD=2 NP=2 [QCD]
      Run at p-p collider (6500.0 + 6500.0 GeV)
      Number of events generated: 10000
      Total cross section: 9.732e+02 +- 6.8e+00 pb
   --------------------------------------------------------------
      Scale variation (computed from LHE events):
          Dynamical_scale_choice -1 (envelope of 9 values):
              9.792e+02 pb +5.6% -8.0%
   --------------------------------------------------------------

But, After Madspin, I got a compilation error :

--------------------------------------------------------------
INFO: starts to compute weight for events with the following modification to the param_card:
INFO: set param_card dim62f 24 -1.5 # orig: 1.5
KEEP:
INFO: Event nb 0 current time: 23h01
Command "reweight /AtlasDisk/user/tnourji/MG5_aMC_v3_1_0/ctg_NLO/2test_ctg_NLO_SMEFT/Events/run_01/events.lhe.gz_0.lhe -from_cards --multicore=create" interrupted with error:
ValueError : invalid literal for int() with base 10: '0.11563392e+01'
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in '/AtlasDisk/user/tnourji/MG5_aMC_v3_1_0/ctg_NLO/2test_ctg_NLO_SMEFT/Events/run_01/events.lhe.gz_0.lhe_tag_1_debug.log'.
Please attach this file to your report.
--------------------------------------------------------------

The log file: https://cernbox.cern.ch/index.php/s/0Fba5S9sbbUTxqN

Cheers,
A.Tnourji

Yes re-weighting is not working with the 3.x branch, I have to investigate the situation.
Maybe you can try 2.9.3 since this is the one I tried (and the long term stable version)

Cheers,

Olivier
> On 4 May 2021, at 23:41, Abdellah Tnourji <email address hidden> wrote:
>
> Question #696897 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/696897
>
> Status: Answered => Open
>
> Abdellah Tnourji is still having a problem:
> Hello,
>
> Thank you.
> == > Did you change anything else? in the cards?
> No. I am using the default NLO card and I have only changed the value of BSM operators.
>
> == > This could mean that the issue would be within lhapdf. which version did you have install?
> LHAPDF-6.3.0/
>
> However, I tried to use the most recent MG version: MG5_aMC_v3_1_0
> (previously: MG5_aMC_v2_9_1_2 ), and indeed, the issue is gone :
>
> --------------------------------------------------------------
> Summary:
> Process p p > t t~ QED=0 QCD=2 NP=2 [QCD]
> Run at p-p collider (6500.0 + 6500.0 GeV)
> Number of events generated: 10000
> Total cross section: 9.732e+02 +- 6.8e+00 pb
> --------------------------------------------------------------
> Scale variation (computed from LHE events):
> Dynamical_scale_choice -1 (envelope of 9 values):
> 9.792e+02 pb +5.6% -8.0%
> --------------------------------------------------------------
>
> But, After Madspin, I got a compilation error :
>
> --------------------------------------------------------------
> INFO: starts to compute weight for events with the following modification to the param_card:
> INFO: set param_card dim62f 24 -1.5 # orig: 1.5
> KEEP:
> INFO: Event nb 0 current time: 23h01
> Command "reweight /AtlasDisk/user/tnourji/MG5_aMC_v3_1_0/ctg_NLO/2test_ctg_NLO_SMEFT/Events/run_01/events.lhe.gz_0.lhe -from_cards --multicore=create" interrupted with error:
> ValueError : invalid literal for int() with base 10: '0.11563392e+01'
> Please report this bug on https://bugs.launchpad.net/mg5amcnlo
> More information is found in '/AtlasDisk/user/tnourji/MG5_aMC_v3_1_0/ctg_NLO/2test_ctg_NLO_SMEFT/Events/run_01/events.lhe.gz_0.lhe_tag_1_debug.log'.
> Please attach this file to your report.
> --------------------------------------------------------------
>
> The log file: https://cernbox.cern.ch/index.php/s/0Fba5S9sbbUTxqN
>
>
> Cheers,
> A.Tnourji
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Abdellah Tnourji (atnourji) said : #11

Thanks Olivier Mattelaer, that solved my question.

Abdellah Tnourji (atnourji) said : #12

Hello,

Sorry to re-open this question again.

When I generate 10k events at NLO using re-weighting, everything works perfectly fine, but when i tried to generate 500k events a got the following error :

---------------------------------------------
INFO: reducing number of print status. Next status update in 10000 events
INFO: All event done (nb_event: 12500) 11m 10s
INFO: Event /AtlasDisk/user/tnourji/MG5_aMC_v2_9_3/ctg_NLO/500k_ctg_NLO_SMEFT/Events/run_01/events.lhe.gz_0.lhe have now the additional weight
INFO: quit rwgt
quit
INFO:
INFO: Idle: 0, Running: 0, Completed: 40 [ 2h 38m ]
INFO: Collect and combine the various output file.
Command "launch " interrupted with error:
Exception : Some of the run failed: Please read /AtlasDisk/user/tnourji/MG5_aMC_v2_9_3/ctg_NLO/500k_ctg_NLO_SMEFT/Events/run_01/events.lhe.gz_36.lhe_tag_1_debug.log
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in '/AtlasDisk/user/tnourji/MG5_aMC_v2_9_3/ctg_NLO/500k_ctg_NLO_SMEFT/run_01_tag_1_debug.log'.
Please attach this file to your report.
quit
INFO:
---------------------------------------------

Please find below the link to the log file :
https://cernbox.cern.ch/index.php/s/LnDL8zwTgIPagiU

Cheers,
A.Tnourji

ksajsd shasj (kage67) said : #13

If you are facing this issue and still have no solution to solve this issue you can take guide from here https://bestgearly.com/ there are so many guides are available about NLO.

Can you help with this problem?

Provide an answer of your own, or ask Abdellah Tnourji for more information if necessary.

To post a message you must log in.