Closed jacoterh closed 7 months ago
Do I understand correctly that the external chi2 will have to accept the WC in the same order and length of the ones in the runcard? This means that one would need to write a different external chi2 for different fits, e.g. if i change the number of operators I am fitting
Thanks Luca, good point, so perhaps it is more convenient to pass a dictionary to the external chi2 such that there is a clear mapping between operator name and corresponding value.
Yes, I think that's a good idea. I think we need to find a smart way to have it such that one can call subsets of the WC defined in the external chi2 but also that it doesn't mess up if the external chi2 doesn't depend on some of the coeffs. For example,
def external_chi2(c1=0, c2=0, c3=0)
And we fit (c1, c2 and c4). It should understand that c3 is zero (that's why the default value) and should understand that c4 is only internal.
Hi @jacoterh, as a suggestion, maybe here it would be helpful and easier to write also some unit test.
Hi @jacoterh @LucaMantani , regarding the order of the basis, I implemented a solution in my interface for the external likelihood of the optimal observables. My solution uses the knowledge of the basis that the external likelihood is written in, then reads the run card and constructs the mapping between one and the other automatically. You can see the code here: https://github.com/LHCfitNikhef/smefit_ewpo/blob/FCC_optimal/benchmarks/add_optimal_chi2/interface_oos.py I guess something like this could be generalized, allowing the user to specify the ordered basis of the external likelihood and then the function builds the mapping automatically.
Attention: 11 lines
in your changes are missing coverage. Please review.
Comparison is base (
d37742c
) 42.88% compared to head (0721105
) 43.24%. Report is 9 commits behind head on main.:exclamation: Current head 0721105 differs from pull request most recent head 2033214. Consider uploading reports for the commit 2033214 to get more accurate results
This PR adds functionality for the addition of external chi2-modules on top of the SMEFiT chi2. Please check the updated documentation for instructions.