KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public final class Gluon extends GaugeBoson {
11         public final static int RED_ANTIGREEN=12;
12         public final static int RED_ANTIBLUE=13;
13         public final static int GREEN_ANTIRED=21;
14         public final static int GREEN_ANTIBLUE=23;
15         public final static int BLUE_ANTIRED=31;
16         public final static int BLUE_ANTIGREEN=32;
17         /**
18         * The state (rr~-gg~)/sqrt(2).
19         */

20         public final static int MIXED_RED_GREEN=11-22;
21         /**
22         * The state (rr~+gg~-2bb~)/sqrt(6).
23         */

24         public final static int MIXED_RED_GREEN_2BLUE=11+22-2*(33);
25         /**
26         * Constructs a gluon.
27         */

28         public Gluon() {}
29         /**
30         * The color.
31         */

32         public int color;
33         /**
34         * Returns the rest mass (MeV).
35         * @return 0.0
36         */

37         public double restMass() {return 0.0;}
38         /**
39         * Returns the number of 1/2 units of spin.
40         * @return 2
41         */

42         public int spin() {return 2;}
43         /**
44         * Returns the electric charge.
45         * @return 0
46         */

47         public int charge() {return 0;}
48         /**
49         * Returns the antiparticle of this particle.
50         */

51         public QuantumParticle anti() {
52                 return new Gluon();
53         }
54         /**
55         * Returns true if qp is the antiparticle.
56         */

57         public boolean isAnti(QuantumParticle qp) {
58                 return (qp!=null) && (qp instanceof Gluon);
59         }
60         /**
61         * Returns a string representing this class.
62         */

63         public String JavaDoc toString() {
64                 return new String JavaDoc("Gluon");
65         }
66 }
67
68
Popular Tags