-
Notifications
You must be signed in to change notification settings - Fork 1
[WIP] Adding options for restrict cards #5
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
base: SMEFTsim_run3
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.