Error in writing param_card internally when importing a modified loop_sm

Asked by Hesham El Faham

Hi,

I am trying to modify the default loop_sm by adding some external parameters in a new block to alter the hWW and hZZ couplings. I define the new parameters in parameters.py and then multiply them to the relevant expressions in couplings.py. I delete all restrict_xx.dat and then run a simple process pp>vh.

Doing the above I run into this error which I do not understand:
IOError: [Errno 2] No such file or directory: '/home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v3_3_1/PROC_loop_sm_modified_hww_hzz_0/bin/internal/ufomodel/param_card.dat'
Related File: /home/users/e/l/elfaham/pheno_work/working_dir/MG5_aMC_v3_3_1/PROC_loop_sm_modified_hww_hzz_0/bin/internal/ufomodel/param_card.dat

Please note that doing the exact above changes in the default sm works fine. Also, loop_sm works fine without the changes, so in conclusion, loop_sm does not like the changes I am doing. Do you perhaps know what is going wrong?

I am using the most updated version of MG3_3_1.

Best,
Hesham

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
Last query:
Last reply:
Revision history for this message
Hesham El Faham (helfaham) said :
#1

I think the problem has to do the relative packages importing used in the loop_sm but I am not sure how to fix this. H.

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

Can you generate a param_card with the standard UFO method?

If you do python(3) write_param_card.py does it work?

Cheers,

Olivier

Revision history for this message
Hesham El Faham (helfaham) said :
#3

No, it does not. I get this error:
Traceback (most recent call last):
  File "write_param_card.py", line 8, in <module>
    from .function_library import *
ModuleNotFoundError: No module named '__main__.function_library'; '__main__' is not a package

Revision history for this message
Hesham El Faham (helfaham) said :
#4

The param_card is generated properly, the problem is that it does not get copied to /bin/internal/ufo/, as far as I understand.

Revision history for this message
Hesham El Faham (helfaham) said :
#5

I fixed this issue by using loop_qcd_qed_sm which does not use relative packages importing. Now, I need to define a new parameter block in parameters.py but with keeping all restrict_xx.dat in. Is there a way around that? It seems I need to delete restrict_xx.dat for the new block to function. Thanks!

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

Yes indeed if you add a block in a model, you have to update all the restrict_xx.dat and adding that block to all of them (or remove them) otherwise the associated restriction will be crashing

Olivier

Revision history for this message
Hesham El Faham (helfaham) said :
#7

Do I simply add the new block to the cards or there is more modification needed?

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

Yes just adding the block is what is required.
Should be enough but if you also have a second file defined for the default param_card for that model.
(in which you would also need to add the block but if you have set your restriction file such that such block should not appear in the param_card obviously)

Cheers,

Olivier

> On 21 Oct 2022, at 13:55, Hesham El Faham <email address hidden> wrote:
>
> Question #703529 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/703529
>
> Status: Answered => Open
>
> Hesham El Faham is still having a problem:
> Do I simply add the new block to the cards or there is more modification
> needed?
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Hesham El Faham (helfaham) said :
#9

I did add the new block in all restrict cards. Also python write_param_card.py produce the correct param_card.dat with the new block. However, in importing the model I get this error:
Error detected in "import model loop_qcd_qed_sm_modified_hww_hzz"
write debug file MG5_debug
If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
str : Invalid restriction card (not same block)
     set(['wolfenstein', 'yukawa', 'decay', 'technical', 'mass', 'sminputs', 'loop']) != set(['modifiers', 'yukawa', 'decay', 'technical', 'wolfenstein', 'mass', 'sminputs', 'loop']).
     Missing block: modifiers
     Unknown block :

Best,
Hesham

Revision history for this message
Hesham El Faham (helfaham) said :
#10

sorry, there was a typo, fixed now. Thanks!

Revision history for this message
Hesham El Faham (helfaham) said :
#11

Thanks Olivier Mattelaer, that solved my question.