KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > JSci > physics > particles > Quark


1 package JSci.physics.particles;
2
3 import JSci.physics.quantum.QuantumParticle;
4
5 /**
6 * A class representing quarks.
7 * @version 1.5
8 * @author Mark Hale
9 */

10 public abstract class Quark extends QuantumParticle {
11         public final static int RED=1;
12         public final static int GREEN=2;
13         public final static int BLUE=3;
14         /**
15         * The color.
16         */

17         public int color;
18         /**
19         * Constructs a quark.
20         */

21         public Quark() {}
22         /**
23         * Returns the number of 1/2 units of spin.
24         * @return 1
25         */

26         public final int spin() {return 1;}
27         /**
28         * Returns the electron lepton number.
29         * @return 0
30         */

31         public final int eLeptonQN() {return 0;}
32         /**
33         * Returns the muon lepton number.
34         * @return 0
35         */

36         public final int muLeptonQN() {return 0;}
37         /**
38         * Returns the tau lepton number.
39         * @return 0
40         */

41         public final int tauLeptonQN() {return 0;}
42         /**
43         * Returns the number of 1/3 units of baryon number.
44         * @return 1
45         */

46         public final int baryonQN() {return 1;}
47         /**
48         * Returns the number of 1/2 units of isospin.
49         * @return 0
50         */

51         public final int isospin() {return 0;}
52         /**
53         * Returns the number of 1/2 units of the z-component of isospin.
54         * @return 0
55         */

56         public final int isospinZ() {return 0;}
57         /**
58         * Emits a gluon.
59         */

60         public Quark emit(Gluon g) {
61                 momentum=momentum.subtract(g.momentum);
62                 return this;
63         }
64         /**
65         * Absorbs a gluon.
66         */

67         public Quark absorb(Gluon g) {
68                 momentum=momentum.add(g.momentum);
69                 return this;
70         }
71 }
72
73
Popular Tags