KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public final class Eta extends Meson {
11         /**
12         * Constructs an eta.
13         */

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

19         public double restMass() {return 547.45;}
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 isospin.
27         * @return 0
28         */

29         public int isospin() {return 0;}
30         /**
31         * Returns the number of 1/2 units of the z-component of isospin.
32         * @return 0
33         */

34         public int isospinZ() {return 0;}
35         /**
36         * Returns the strangeness number.
37         * @return 0
38         */

39         public int strangeQN() {return 0;}
40         /**
41         * Returns the quark composition.
42         */

43         public QuantumParticle[] quarks() {
44                 QuantumParticle comp[]={new Down(),new AntiDown(),new Up(),new AntiUp()};
45                 return comp;
46         }
47         /**
48         * Returns the antiparticle of this particle.
49         */

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

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

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