impy-project / chromo

Hadronic Interaction Model interface in PYthon
Other
30 stars 7 forks source link

Support for e+e- collisions in PYTHIA8 #200

Open davo417 opened 4 months ago

davo417 commented 4 months ago

Trying to set up en event kinematics for e+e- collisions fails with error

ValueError: target e-[11] is not among allowed, see Pythia8.targets

Is there a reason why both projectiles and targets are limited?

afedynitch commented 4 months ago

Hi!

What kind of process do you want to run? I tried running a few cases with e+ e- , and usually one needs to specify more clearly which process to simulate. I also noticed that most cases I tried had hangups or segfaults with electron positron beams. Do you have an example of the config you would like to run?

One thing, you may try is to override the default limitation like this:

import chromo.models as im
im.Pythia8._projectiles = im.Pythia8._projectiles | {
    lp.e_minus.pdgid,
    lp.e_plus.pdgid,
}
im.Pythia8._targets = im.Pythia8._targets | {
    lp.e_minus.pdgid,
    lp.e_plus.pdgid,
}
m = im.Pythia8(kin, config...)

then try your specific case and let me know if it works. If yes, we can further think about how to extend the class in a more robust fashion, or with sensible default values.