fionn / feynman

Calculate allowed interactions in QED
9 stars 3 forks source link

refactor particle class again #2

Closed fionn closed 6 years ago

fionn commented 6 years ago

Re: position and momentum, we absolutely don't. I was thinking that it might be nice if at some point we wanted to use momentum to decide what particles can be produced. Similarly, position can be used to place the particles on the diagram. Let's get rid of both of them, at least for now.

The factory is also mostly unnecessary at this stage. It seemed reasonable that you would want to produce particles without knowing what they are in advance. I still think this might be true, depending on how much of a refactor the Interaction class undergoes, so I'll leave it for now mostly as a place for particle_instances to live. Feel free to disagree.

flavour is an instance of a (non-neutrino) lepton, so we can compose our neutrino with properties of that object. At the moment I'm quite unhappy with this design, but not sure if my sense of aesthetic should guide me here since it seems to work ok.

fionn commented 6 years ago

Yay! Yeah, I'm happy to merge I think. You've got to check the "Approve" radio button first. I'll merge then.