I'm not a physics major, just very interested in some of the things about physics, when I read in the book some particles are composed of quarks and will these particles and their antiparticles annihilation reaction, such as a proton and an antiproton two gamma photon annihilation reaction will happen, but the proton and quarks, why at the time of annihilation does not produce positive and negative quarks annihilating particles? I wonder if quarks can actually annihilate, would the annihilation of protons and antiprotons produce several photons with the same mass as the quarks inside them instead of just two photons with the same mass as the protons? This point really makes me confused, I hope there is a big god can give me guidance, thank you!
Quarks and antiquarks do annihilate, but generally in an indirect way, by forming a meson first.
For example, in proton-antiproton annihilation, the strong interaction overwhelms the electromagnetic interaction, and the quarks and antiquarks rearrange into some number of pions. (The mean number of pions is about five; see this talk by Goldhaber for an insider’s perspective on why this was a puzzle, and its resolution.) The charged pions can’t decay to photons while preserving electric charge; charged pions primarily decay to muons via the weak interaction. Neutral pions do decay to photon pairs. However if you are new to quarks, you may be unsettled to learn that the neutral pion doesn’t have a well-defined quark flavor; the $\pi^0$ is a mixture of $u\bar u$ and $d\bar d$.
This “mediated annihilation” isn’t limited to quarks. Regular old positrons in matter generally form a bound state with an electron before annihilating to photons. There are actually two species of this bound state, positronium, which differ in the symmetry of the wavefunction’s spin piece and the spin of of the ground state. The spinless para-positronium annihilates to two photons; the spin-triplet ortho-positronium must annihilate to at least three photons. The ortho-positronium annihilation is roughly 1000 times slower than the annihilation of para-positronium.
I may be misinterpreting your question, but it seems like you are asking:
- Can quarks and anti quarks annihilate?
- What happens when protons and antiprotons collide?
The answer to 1) is yes, what you've read in books is correct. Quarks and antiquarks can annihilate into two photons. Perhaps the subtlety here is related to confinement: quark and gluon interactions behave very differently at different energy scales. At high energies, quarks do not bind to form protons. Instead, a quark and an antiquark are free to exist in an initial state at some time long before the annihilation takes place. So we can say: we start with a quark and an antiquark, then they annihilate, and we end up with two photons.
At low energy scales, things are more complicated. Quarks interact very strongly with gluons, so much so that the simple picture of initial state - interaction - final state (as the experts would say, the S-matrix in perturbation theory) breaks down. Instead, we have to work with the bound states the quarks form: protons, neutrons, pions, etc. Then these bound states can be analyzed in the way we did before: a proton can be an initial state that proceeds to participate in an interaction.
This brings us to 2) What happens when protons and antiprotons collide? A famous example of this is the Tevatron, a collider that collided protons and antiprotons at high energies. At high energies, the constituent quarks and gluons inside these bound states find each other and annihilate (or interact in other ways) and these fundamental annihilations would also create two photons each. Because the proton and antiproton are made up of many quarks and antiquarks (and at high energies more quark-antiquark pairs can pop up out of the vacuum and interact as well), then in total many more than two photons can be produced from these several underlying annihilation events. Really, these bound states are a bit of a mess, so it's better to imagine two blobs of a bunch of particles crashing into each other, and the particles can interact in various ways, throwing out a bunch of different stuff: quarks or gluons being ejected and forming jets, photons, and other types of particles. Because these bound states are complicated, their final states are also more complicated, and there are many possibilities of what can be produced in these interactions. The simple picture of particle + antiparticle -> two photons doesn't fully capture the physics for proton-antiproton collisions.