Skip to content

Allow muon scattering #265

@felixhekhorn

Description

@felixhekhorn
          this isn't always true, right? Compass at least is muon scattering ... yadism and the whole of NNPDF is actually completely lepton-blind, so maybe it is not important, but I believe you can just do an simple `if` similar to the one above
    obs["ProjectileDIS"] = "muon" if "_mup_" in str(src_path.stem) or blub or bla else "electron"

Originally posted by @felixhekhorn in #232 (comment)

          but will yadism work then? 

proj = observables.get("ProjectileDIS", "electron")
projectile_pids = {
"electron": 11,
"positron": -11,
"neutrino": 12,
"antineutrino": -12,
}
if proj not in projectile_pids:
raise ValueError(f"Unknown projectile {proj}")

Originally posted by @giacomomagni in #232 (comment)

the answer to the last question is: it won't - let's fix that;

note that "electron" there gets translated to 11 and then later there are a few more of those in the code e.g. here:

if projectile_pid in [-11, 12]:

a relevant function may be is_left_handed_lepton

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions