[WIP] Adding options for restrict cards#5
Conversation
mcgeneration/helpers/Gridpack.py
Outdated
| if self.ops['restrict']: new += f'-massless_{self.ops["process"]}' | ||
| if len(list(self.ops['coeffs'])) == 1: | ||
| new += f'_{list(self.ops["coeffs"])[0]}' |
There was a problem hiding this comment.
@Andrew42 I had to make this change. I know you prefer each block of code to do one thing, but I found that when we submit 1 WC at a time, the restrict card has been overwritten before the previous job is finished packaging up everything. This tacks on the WC to the name in the replace line.
There was a problem hiding this comment.
thanks for trying it out already. I knew that something like this was going to be an issue, but needed to test it myself before figuring out how I wanted to fix it. I think this is close to what I had in mind, but I think I'll move it outside of the Gridpack class
mcgeneration/helpers/Gridpack.py
Outdated
| if len(list(self.ops['coeffs'])) == 1: | ||
| ompath = ompath[:-4] + f'_{list(self.ops["coeffs"])[0]}.dat' | ||
| make_restrict_card(mpath, ompath, keep=True, SMEFT=list(self.ops['coeffs'])) |
There was a problem hiding this comment.
@Andrew42 similar thing here, if there's only 1 WC, it adds the it to the name.
mcgeneration/helpers/helper_tools.py
Outdated
| x = l.split(' # ') | ||
| if len(x) == 1: | ||
| continue |
There was a problem hiding this comment.
I found some lines that matched this ' # ' but had nothing else, so they failed list unpacking below.
This is a very rough sketch for dynamically making restrict cards. Right now I have a lot of WCs hard coded (and they're the
SMEFTsim_topU3lversions so we need to change them toSMEFTsim_top) so this will require some refactoring if we want to automate things.The basic idea is we set all the WCs not passed in the
dof_listto zero, and the ones indof_listto their starting points. I haven't tested this withSLINSPACEyet, but I think this option loops overdof_listso it might work as is for each single WC.