Patch cross-section scaling when filtering weight streams
When filtering weight-streams at run time (--match-weight
, --unmatch-weights
, --nominal-weight
), the wrong cross-sections might be picked up in finalize. This change set fixes this and also streamlines the behaviour of --nominal-weight
which supplies a custom nominal weight name.
The logic is as follows:
- Rivet runs its usual heuristic to identify the nominal weight stream
- If it finds more than one, it will use the first one and print a warning that there were potentially other candidates, thereby giving the option to abort and re-run using a suitable
--nominal-weight
value. - If it can't find one (that's a bug in the generator HepMC interface ...), it checks if the user has supplied a custom weight name that ought to be treated as the nominal and uses that instead
- If the user didn't supply one, Rivet falls back to the assumption that the first weight is the nominal (technically a HepMC convention) but will write out all weights streams in "variation weight" style (i.e. with
[weight_name]
suffix in the path). A warning is printed.
- If the user didn't supply one, Rivet falls back to the assumption that the first weight is the nominal (technically a HepMC convention) but will write out all weights streams in "variation weight" style (i.e. with
- If it can find the nominal weight stream and the user supplied a custom one that isn't the actual nominal weight stream, Rivet will internally continue to use the actual nominal (e.g. for the cross-section scaling) but write out the user-supplied weight stream in "nominal weight" style (and the actual nominal in "variation weight" style)
If the user runs with the --skip-weights
flag:
- All weights, except for the actual default weight stream are unmatched. Only one weight stream is written out to file (in "nominal weight" style).
- If the user additionally supplied
--match-weight
and--unmatch-weight
flags, it's probably safe to assume they don't know what they're doing. Preference is given to--skip-weights
in this case. - If the user also supplies the
--nominal-weight
flag and asks that a variation weight be treated as the nominal, two weight streams are written out to file: the actual default weight stream (needed for scaling) and the custom nominal weight stream. The former will be written out in "variation weight" style, the latter in "nominal weight" style.
Edited by Christian Gutschow