KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public final class KZero extends Kaon {
11         /**
12         * Constructs a K0.
13         */

14         public KZero() {}
15         /**
16         * Returns the rest mass (MeV).
17         * @return 497.672
18         */

19         public double restMass() {return 497.672;}
20         /**
21         * Returns the electric charge.
22         * @return 0
23         */

24         public int charge() {return 0;}
25         /**
26         * Returns the number of 1/2 units of the z-component of isospin.
27         * @return -1
28         */

29         public int isospinZ() {return -1;}
30         /**
31         * Returns the quark composition.
32         */

33         public QuantumParticle[] quarks() {
34                 QuantumParticle comp[]={new Down(),new AntiStrange()};
35                 return comp;
36         }
37         /**
38         * Returns the antiparticle of this particle.
39         */

40         public QuantumParticle anti() {
41                 return new AntiKZero();
42         }
43         /**
44         * Returns true if qp is the antiparticle.
45         */

46         public boolean isAnti(QuantumParticle qp) {
47                 return (qp!=null) && (qp instanceof AntiKZero);
48         }
49         /**
50         * Returns a string representing this class.
51         */

52         public String JavaDoc toString() {
53                 return new String JavaDoc("K0");
54         }
55 }
56
57
Popular Tags