Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation Issues with reweight MG265 and SMEFTsim LO (master) #3084

Open
GiacomoBoldrini opened this issue Jan 14, 2022 · 10 comments
Open

Comments

@GiacomoBoldrini
Copy link
Contributor

Dear experts,

I've been trying to generate the following process

import model SMEFTsim_U35_MwScheme_UFO-cW_massless
p p > w- z j j SMHLOOP=0 QCD=0 NP=1

where vector bosons are decayed with madspin.

The reweight is made changing model (and reweight folder) at each hypothesis such as:

change helicity False
change rwgt_dir rwgt

# SM rwgt_1
launch
   set SMEFT 2 0


# cHB=-1 rwgt_2
change rwgt_dir rwgt_cHB_m1
change model SMEFTsim_U35_MwScheme_UFO-cHB_m1_massless
launch


# cHB=1 rwgt_3
change rwgt_dir rwgt_cHB
change model SMEFTsim_U35_MwScheme_UFO-cHB_massless
launch

...

The extramodel and restriction cards needed to reproduce the issue can be found here http://gboldrin.web.cern.ch/gboldrin/generators/SMEFTsim_U35_MwScheme_UFO.tar.gz

While this reweight card works in mg 265 interactive mode (generating events and then run LO reweighting), it fails with central tools while producing a gridpack.

Issuing submit_cmsconnect_gridpack_generation.sh does not yield errors either in codegen or during the pilot-run. Furthermore the newly computed weights do make sense:

...
INFO: rwgt_1 : 0.128092881201 +- 0.0235318499042 pb 
INFO: rwgt_10 : 0.130294475328 +- 0.0238281954965 pb 
INFO: rwgt_2 : 0.128219142979 +- 0.0235681106426 pb 
INFO: rwgt_3 : 0.128084704947 +- 0.0235022582933 pb 
INFO: rwgt_4 : 0.127178232336 +- 0.0231560548401 pb 
INFO: rwgt_5 : 0.130256502527 +- 0.0239023502625 pb 
INFO: rwgt_6 : 0.131295610868 +- 0.0244409604249 pb 
INFO: rwgt_7 : 0.128144614266 +- 0.0234360069449 pb 
INFO: rwgt_8 : 0.130140455041 +- 0.0238656962503 pb 
INFO: rwgt_9 : 0.128083643585 +- 0.0234087584305 pb
...

However they are not present in the pilot-run lhe file at WmTo2JZto2L_dim6_ewk/WmTo2JZto2L_dim6_ewk_gridpack/work/unweighted_events.lhe

When unpacking the tarball and running runcmsgrid.sh the compilation breaks at the reweighting step because it is missing some fortran file (same as #2100 (comment)):

Command "reweight GridRun_1" interrupted with error:
OSError : [Errno 2] No such file or directory: '/home/gboldrin/genproductions/bin/MadGraph5_aMCatNLO/local_Wm2JZ2L/WmTo2JZto2L_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball/mgbasedir/models/template_files/fortran/printout.f'
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in '/home/gboldrin/genproductions/bin/MadGraph5_aMCatNLO/local_Wm2JZ2L/WmTo2JZto2L_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball/process/madevent/GridRun_1_tag_1_debug.log'.
Please attach this file to your report.
INFO: storing files of previous run 
gzipping output file: unweighted_events.lhe
INFO: Done 
INFO:  
INFO: Original cross-section: 0.2224051 +- 0.004573287 pb 
INFO: Computed cross-section: 
Exception AttributeError: "'ReweightInterface' object has no attribute 'id_to_path'" in <bound method ReweightInterface.__del__ of <madgraph.interface.reweight_interface.ReweightInterface object at 0x7f7789f94790>> ignored

Also compile the madevent folder fails due to some other missing files:

[gboldrin@login-el7 Source]$ make
make: *** No rule to make target `dsample.f', needed by `dsample.o'.  Stop.

that means that also the generation without the reweighting is broken.

This also holds by generating the same gridpack locally (gridpack_generation.sh) and without madspin.

Furthermore it is unclear the structure of the reweight folders which seems to be nested (highlighted with **):

process/madevent/rwgt/rw_me/SubProcesses/**rwgt_cHB_m1**/rw_me_second/SubProcesses/**rwgt_cHB**/rw_me_second/SubProcesses/**rwgt_cHW_m1**/rw_me_second/SubProcesses/**rwgt_cHW**/rw_me_second/SubProcesses/**rwgt_cHWB_m1**/rw_me_second/SubProcesses/**rwgt_cHWB**/rw_me_second/SubProcesses/**rwgt_cHB_cHW**/rw_me_second/SubProcesses/**rwgt_cHB_cHWB**/

while in the interactive reweighting they are created in the same directory.

I feel like this behaviour is unexpected. Could you have a look at it? Maybe i'm missing something here.

Thank you.

Best,
Giacomo


Logs & Tarball

At this link you can find the logs and the gridpack tarball that also contains the input cards if you need to have a look at them: http://gboldrin.web.cern.ch/gboldrin/gp_errors/

@Saptaparna
Copy link
Contributor

Hi @GiacomoBoldrini which version of SMEFTSim is this? SMEFTSim 3.0?

@GiacomoBoldrini
Copy link
Contributor Author

Hi @Saptaparna, thanks for the prompt answer.

Yes it is v3.0.2 from https://github.com/SMEFTsim/SMEFTsim

I should also add that a generation with the same model but different logic (one rwgt directory) works such as:

import model SMEFTsim_U35_MwScheme_UFO-cW_cHWB_cHDD_cHbox_cHW_cHl1_cHl3_cHq1_cHq3_cqq1_cqq11_cqq31_cqq3_cll_cll1_massless
...
generate    p p > w+ l+ l- j j QCD=0 SMHLOOP=0 NP=1 @1
add process p p > w- l+ l- j j QCD=0 SMHLOOP=0 NP=1 @2
...

And reweight card something like:

change helicity False
change rwgt_dir rwgt

# SM rwgt_1
launch
   set SMEFT 2 0
   set SMEFT 4 0
   set SMEFT 5 0
   set SMEFT 7 0
   set SMEFT 9 0
   set SMEFT 21 0
   set SMEFT 22 0
   set SMEFT 24 0
   set SMEFT 25 0
   set SMEFT 29 0
   set SMEFT 30 0
   set SMEFT 31 0
   set SMEFT 32 0
   set SMEFT 33 0
   set SMEFT 34 0

# cW=-1 rwgt_2
launch
   set SMEFT 2 -1
   set SMEFT 4 0
   set SMEFT 5 0
   set SMEFT 7 0
   set SMEFT 9 0
   set SMEFT 21 0
   set SMEFT 22 0
   set SMEFT 24 0
   set SMEFT 25 0
   set SMEFT 29 0
   set SMEFT 30 0
   set SMEFT 31 0
   set SMEFT 32 0
   set SMEFT 33 0
   set SMEFT 34 0

....

As this method works, i deduced the issue stands in the reweight card difference.

The latter approach is not feasible for a semileptonic final state due to the high number of diagrams. So we came up with the "change model" approach.

Best,
Giacomo

@GiacomoBoldrini
Copy link
Contributor Author

Actually i have to correct myself: pilotrun events do have reweighting weights and they seem to be plausible. I was looking at the wrong lhe.

I'll copy here the cat of the partial lhe after two reweight steps with the "change model" reweight card. Weights are there and they differ, according to different hypothesis.

<event>
 6      1 +8.6884712e-04 3.01948400e+02 7.56146200e-03 1.00669800e-01
        1 -1    0    0  501    0 +0.0000000000e+00 +0.0000000000e+00 +1.8331318950e+03 1.8331318950e+03 0.0000000000e+00 0.0000e+00 -1.0000e+00
        1 -1    0    0  502    0 -0.0000000000e+00 -0.0000000000e+00 -1.0165944700e+03 1.0165944700e+03 0.0000000000e+00 0.0000e+00 -1.0000e+00
      -24  1    1    2    0    0 +4.2557031432e+01 -1.4482070466e+02 -4.2255678571e+02 4.5585134018e+02 8.0387000000e+01 0.0000e+00 -1.0000e+00
       23  1    1    2    0    0 -4.8315128287e+02 -3.4335292046e+01 -3.5690408746e+01 4.9416905821e+02 9.1187600000e+01 0.0000e+00 1.0000e+00
        2  1    1    2  501    0 -7.3423429638e+01 -1.0067031059e+02 +1.3076133159e+03 1.3135364842e+03 0.0000000000e+00 0.0000e+00 -1.0000e+00
        1  1    1    2  502    0 +5.1401768108e+02 +2.7982630730e+02 -3.2828696454e+01 5.8616948235e+02 0.0000000000e+00 0.0000e+00 -1.0000e+00
<mgrwt>
<rscale>  0 0.19396701E+03</rscale>
<asrwt>0</asrwt>
<pdfrwt beam="1">  1        1 0.28202029E+00 0.12460141E+03</pdfrwt>
<pdfrwt beam="2">  1        1 0.15639915E+00 0.30194842E+03</pdfrwt>
<totfact> 0.88359560E+00</totfact>
</mgrwt>
<rwgt>
<wgt id='rwgt_1'> +1.6305605e-04 </wgt>
<wgt id='rwgt_2'> +1.6225115e-04 </wgt>
</rwgt>
</event>

@agrohsje
Copy link
Collaborator

hi @GiacomoBoldrini . so pilot run looks good when using different rwgt pathes, but the pathes are still nested as you wrote above? and ./runcmsgrid.sh fails because the additional reweight pathes are not compiled when making the gridpack?

@GiacomoBoldrini
Copy link
Contributor Author

Hi @agrohsje,

Yes pilotrun is ok but rwgt dirs are still nested. I agree with you they won't be compiled by gridpack_generation.sh as it only look for the "rwgt" directory Here. But still i do not understand the nested structure, do you think it's expected?
I'm trying to come up with a solution to make prepare_reweight function as general as possible.

@agrohsje
Copy link
Collaborator

Right. I wanted to ask you to extend the logic of prepare_reweight to account for these special cases. However, I fail to understand the nested structure.
https://github.com/cms-sw/genproductions/blob/master/bin/MadGraph5_aMCatNLO/Utilities/gridpack_helpers.sh#L121
./bin/madevent --debug reweight pilotrun
is all you are doing. From your message I understand that you were running the reweighting standalone and don't get the nested structure. Is that true?

@GiacomoBoldrini
Copy link
Contributor Author

Indeed ./bin/madevent --debug reweight pilotrun is not expected to give such nested folders. So the nesting is coming from somewhere else. I'm inspecting the process to understand it better and to see if the compilation of the nested folders can be successful.

If i run the reweighting step from a gridpack outside the genproduction environment ( ./bin/madevent --debug reweight run_01 ) i find this structure:

[gboldrin@lxplus7109 Zjj_cHl1_SM_LI_QU_v2]$ ls
Cards   HTML             README              Source        TemplateVersion.txt  crossx.html  lib              nsqso_born.inc  run_01_gridpack.tar.gz  rwgt_cHl1
Events  MGMEVersion.txt  README.systematics  SubProcesses  bin                  index.html   madevent.tar.gz  py.py           rwgt_cHbox              rwgt_cW

Where you can see that the "rwgt_*" directories are side by side.

I'll attach also the reweight card:

change helicity False

# cW=-1 rwgt_2
change rwgt_dir rwgt_cW
change model SMEFTsim_U35_MwScheme_UFO-cW_massless
launch


# cW=1 rwgt_3
change rwgt_dir rwgt_cHbox
change model SMEFTsim_U35_MwScheme_UFO-cHbox_massless
launch


# cHW=-1 rwgt_4
change rwgt_dir rwgt_cHl1
change model SMEFTsim_U35_MwScheme_UFO-cHl1_massless
launch

@GiacomoBoldrini
Copy link
Contributor Author

Hi,

I tried to compile the nested directories. I also tried to move them all in the same directory and then compile them. It does not solve the situation, the same error appear. Tried on both cmsconnect and lxplus.

runcmsgrid.sh is able to generate events but the reweight breaks as before. I'll attach it here for completness [1].

However i tried changing reweight folder only once. That works fine, the event generation runs smoothly. Does this suggest something?

Best,
Giacomo


[1]

[gboldrin@lxplus785 epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball]$ ./runcmsgrid.sh 10 1
%MSG-MG5 number of events requested = 10
%MSG-MG5 random seed used for the run = 1
%MSG-MG5 number of cpus = 
%MSG-MG5 SCRAM_ARCH version = slc7_amd64_gcc700
%MSG-MG5 CMSSW version = CMSSW_10_6_19
/afs/cern.ch/work/g/gboldrin/public/public/genproductions_EFT/bin/MadGraph5_aMCatNLO/epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball/CMSSW_10_6_19 area for SCRAM_ARCH slc7_amd64_gcc700.
Running MG5_aMC for the 1 time
produced_lhe  0 nevt  10 submitting_event  10  remaining_event  10
run.sh 10 10
Now generating 10 events with random seed 10 and granularity 1
No handlers could be found for logger "madgraph.stdout"
WRITE GRIDCARD /afs/cern.ch/work/g/gboldrin/public/public/genproductions_EFT/bin/MadGraph5_aMCatNLO/epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball/process/madevent
P1_qq_llqq
DONE
write ./events.lhe.gz
run 1 finished, total number of produced events: 10/10

-rw-r--r--. 1 gboldrin zh 8882 Jan 19 11:36 events_1.lhe.gz
run finished, produced number of events:
10
reweighting events
Running MG5 in debug mode
No module named madgraph
************************************************************
*                                                          *
*                      W E L C O M E to                    *
*             M A D G R A P H 5 _ a M C @ N L O            *
*                      M A D E V E N T                     *
*                                                          *
*                 *                       *                *
*                   *        * *        *                  *
*                     * * * * 5 * * * *                    *
*                   *        * *        *                  *
*                 *                       *                *
*                                                          *
*         VERSION 2.6.5                 20xx-xx-xx         *
*                                                          *
*    The MadGraph5_aMC@NLO Development Team - Find us at   *
*    https://server06.fynu.ucl.ac.be/projects/madgraph     *
*                                                          *
*               Type 'help' for in-line help.              *
*                                                          *
************************************************************
INFO: load configuration from /afs/cern.ch/work/g/gboldrin/public/public/genproductions_EFT/bin/MadGraph5_aMCatNLO/epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball/process/madevent/Cards/me5_configuration.txt  
INFO: load configuration from /afs/cern.ch/work/g/gboldrin/public/public/genproductions_EFT/bin/MadGraph5_aMCatNLO/epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball/mgbasedir/input/mg5_configuration.txt  
INFO: load configuration from /afs/cern.ch/work/g/gboldrin/public/public/genproductions_EFT/bin/MadGraph5_aMCatNLO/epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball/process/madevent/Cards/me5_configuration.txt  
WARNING: Option nb_core from config file not understood 
Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt
Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt
reweight GridRun_1
Do you want to edit a card (press enter to bypass editing)?
/------------------------------------------------------------\
|  1. reweight : reweight_card.dat                           |
\------------------------------------------------------------/
 you can also
   - enter the path to a valid card.
 [0, done, 1, reweight, enter path][90s to answer] 
>INFO: Extracting the banner ... 
INFO: process: p p > e+ e- j j SMHLOOP=0 QCD=0  
INFO: options: NP=1 
INFO: Running Reweighting 
change helicity False
change rwgt_dir rwgt
launch
INFO: detected model: SMEFTsim_U35_MwScheme_UFO-cW_massless. Loading... 
INFO: generating the square matrix element for reweighting 
INFO: generate p p > e+ e- j j SMHLOOP=0 QCD=0 NP=1 ; 
Command "reweight GridRun_1" interrupted with error:
OSError : [Errno 2] No such file or directory: '/afs/cern.ch/work/g/gboldrin/public/public/genproductions_EFT/bin/MadGraph5_aMCatNLO/epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball/mgbasedir/models/template_files/fortran/printout.f'
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in '/afs/cern.ch/work/g/gboldrin/public/public/genproductions_EFT/bin/MadGraph5_aMCatNLO/epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball/process/madevent/GridRun_1_tag_2_debug.log'.
Please attach this file to your report.
INFO: storing files of previous run 
gzipping output file: unweighted_events.lhe
INFO: Done 
INFO:  
INFO: Original cross-section: 11.45845 +- 1.299319 pb 
INFO: Computed cross-section: 
Exception AttributeError: "'ReweightInterface' object has no attribute 'id_to_path'" in <bound method ReweightInterface.__del__ of <madgraph.interface.reweight_interface.ReweightInterface object at 0x7f9412592d10>> ignored
quit
INFO:  
mkdir: cannot create directory 'process/madevent/Events/GridRun_PostProc_1': File exists
/afs/cern.ch/work/g/gboldrin/public/public/genproductions_EFT/bin/MadGraph5_aMCatNLO/epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball/process/madevent /afs/cern.ch/work/g/gboldrin/public/public/genproductions_EFT/bin/MadGraph5_aMCatNLO/epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball
launch in debug mode
************************************************************
*                                                          *
*                      W E L C O M E to                    *
*             M A D G R A P H 5 _ a M C @ N L O            *
*                      M A D E V E N T                     *
*                                                          *
*                 *                       *                *
*                   *        * *        *                  *
*                     * * * * 5 * * * *                    *
*                   *        * *        *                  *
*                 *                       *                *
*                                                          *
*         VERSION 2.6.5                 20xx-xx-xx         *
*                                                          *
*    The MadGraph5_aMC@NLO Development Team - Find us at   *
*    https://server06.fynu.ucl.ac.be/projects/madgraph     *
*                                                          *
*               Type 'help' for in-line help.              *
*                                                          *
************************************************************
INFO: load configuration from /afs/cern.ch/work/g/gboldrin/public/public/genproductions_EFT/bin/MadGraph5_aMCatNLO/epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball/process/madevent/Cards/me5_configuration.txt  
INFO: load configuration from /afs/cern.ch/work/g/gboldrin/public/public/genproductions_EFT/bin/MadGraph5_aMCatNLO/epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball/mgbasedir/input/mg5_configuration.txt  
INFO: load configuration from /afs/cern.ch/work/g/gboldrin/public/public/genproductions_EFT/bin/MadGraph5_aMCatNLO/epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball/process/madevent/Cards/me5_configuration.txt  
WARNING: Option nb_core from config file not understood 
Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt
Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt
madevent>INFO: Running Systematics computation 
INFO: # events generated with PDF: NNPDF31_nnlo_as_0118_nf_4_mc_hessian (325500) 
INFO: #Will Compute 1021 weights per event. 
INFO: # currently at event 0 [elapsed time: 0.34 s] 
INFO: #***************************************************************************
#
# original cross-section: 11.458447
#     scale variation: +5.35% -7.26%
#     emission scale variation: + 0% -7.26%
#     central scheme variation: +12.3% - 0%
# PDF variation: +2.41% -2.41%
#
#PDF NNPDF31_nnlo_as_0118_nf_4: 11.459 +2.41% -2.41%
#PDF MMHT2014nlo68cl_nf4: 10.6313 +2.92% -2.76%
#PDF MMHT2014nnlo68cl_nf4: 11.2865 +2.88% -3.5%
#PDF MSTW2008nlo68cl_nf4: 10.7825 +3.02% -2.16%
#PDF NNPDF30_nlo_nf_4_pdfas: 10.693 +2.04% -2.04%
#PDF NNPDF30_nlo_as_0118_nf_4: 10.693 +2.04% -2.04%
#PDF MMHT2014nlo68clas118_nf4: 10.5512 +2.78% -2.87%
#PDF MSTW2008nnlo68cl_nf4: 11.3367 +2.37% -2.1%
#PDF MSTW2008lo68cl_nf4: 10.1655 +1.43% -1.63%
#PDF NNPDF31_nnlo_hessian_pdfas: 11.4702 +2.31% -2.31%
#PDF PDF4LHC15_nlo_nf4_30: 10.7552 +3.13% -3.13%
#PDF NNPDF31_nlo_as_0118_nf_4: 11.2745 +2.29% -2.29%
# dynamical scheme # 1 : 12.0782 +3.59% -4.59% # \sum ET
# dynamical scheme # 2 : 12.0782 +3.59% -4.59% # \sum\sqrt{m^2+pt^2}
# dynamical scheme # 3 : 11.5238 +4.81% -6.18% # 0.5 \sum\sqrt{m^2+pt^2}
# dynamical scheme # 4 : 12.8641 +1.85% -2.35% # \sqrt{\hat s}
# PDF 292400 : 11.0907351658
#***************************************************************************
 
INFO: End of systematics computation 
madevent>INFO:  
/afs/cern.ch/work/g/gboldrin/public/public/genproductions_EFT/bin/MadGraph5_aMCatNLO/epem_dim6_ewk_slc7_amd64_gcc700_CMSSW_10_6_19_tarball

Run xml check
Number of weights that are NaN:
0
All checks passed 

total 816
drwxr-xr-x. 17 gboldrin zh   2048 Jan 19 11:20 CMSSW_10_6_19
drwxr-xr-x.  2 gboldrin zh   2048 Jan 19 11:24 InputCards
-rw-r--r--.  1 gboldrin zh 523047 Jan 19 11:38 cmsgrid_final.lhe
-rw-r--r--.  1 gboldrin zh 283216 Jan 19 11:19 gridpack_generation.log
-rwxr-xr-x.  1 gboldrin zh  11507 Jan 19 11:19 merge.pl
drwxr-xr-x. 15 gboldrin zh   2048 Jan 19 11:23 mgbasedir
drwxr-xr-x.  3 gboldrin zh   2048 Jan 19 11:37 process
-rwxr-xr-x.  1 gboldrin zh   7192 Jan 19 11:19 runcmsgrid.sh

@GiacomoBoldrini
Copy link
Contributor Author

Hello,

I'll reopen the conversation as I'm finding new infos.
I tried to change rwgt_dir by giving the absolute path to the target location. It's hardcoded and it's not general-purpose:

change helicity False
change rwgt_dir rwgt
change process u d~ > w+ NP=1 SMHLOOP=0 QCD=0 # starting point from proc card is u d~ > w+ NP=0 SMHLOOP=0 QCD=0

# cW=1 rwgt_1
change rwgt_dir /afs/cern.ch/work/g/gboldrin/public/public/genproductions/bin/MadGraph5_aMCatNLO/emVjj_ewk_dim6/emVjj_ewk_dim6_gridpack/work/process/madevent/rwgt/rwgt_cW
change model SMEFTsim_U35_MwScheme_UFO_b_massless-cW_massless
launch

# cll1=1 rwgt_2
change rwgt_dir /afs/cern.ch/work/g/gboldrin/public/public/genproductions/bin/MadGraph5_aMCatNLO/emVjj_ewk_dim6/emVjj_ewk_dim6_gridpack/work/process/madevent/rwgt/rwgt_cll1
change model SMEFTsim_U35_MwScheme_UFO_b_massless-cll1_massless
launch

In this way the folders are correctly placed:

[gboldrin@lxplus716 work]$ ls process/madevent/rwgt
rwgt_cll1  rwgt_cW

Note here that the compilation path for the reweight needs an extra * here

for file in $(ls -d rwgt/*/SubProcesses/P*); do

becomes

for file in $(ls -d rwgt/*/*/SubProcesses/P*); do

If one tests this gridpack by placing an exit 0 at this point everything runs smoothly and new weights are correctly assigned to events.

However, the process directory is moved at this point so the reweight card is no longer valid.

A possible solution would be to change the reweight card (in work/gridpack/process/madevent/Cards) with a new one which does not depend on an absolute path, just before tarring the gridpack:

change helicity False
change rwgt_dir rwgt
change process u d~ > w+ NP=1 SMHLOOP=0 QCD=0

# cW=-1 rwgt_2
change rwgt_dir rwgt/rwgt_cW
change model SMEFTsim_U35_MwScheme_UFO_b_massless-cW_massless
launch

# cll1=1 rwgt_3
change rwgt_dir ../../rwgt_cll1
change model SMEFTsim_U35_MwScheme_UFO_b_massless-cll1_massless
launch

This seems to work at the moment. I'll carry new tests and hopefully come up with a PR if you'd like

@GiacomoBoldrini
Copy link
Contributor Author

GiacomoBoldrini commented May 19, 2022

Actually a generation starting with reweight card the following

change helicity False
change rwgt_dir rwgt
change process u d~ > w+ NP=1 SMHLOOP=0 QCD=0

# cW=-1 rwgt_2
change rwgt_dir rwgt/rwgt_cW
change model SMEFTsim_U35_MwScheme_UFO_b_massless-cW_massless
launch

# cll1=1 rwgt_3
change rwgt_dir ../../../rwgt_cll1
change model SMEFTsim_U35_MwScheme_UFO_b_massless-cll1_massless
launch

does work and should not need of any modification to the reweight card neither genproduction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants