00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef G4EXITON_CONFIGURATION_HH
00036 #define G4EXITON_CONFIGURATION_HH
00037
00038 #include "globals.hh"
00039 #include <iosfwd>
00040
00041 class G4ExitonConfiguration {
00042 public:
00043 G4ExitonConfiguration()
00044 : protonQuasiParticles(0), neutronQuasiParticles(0),
00045 protonHoles(0), neutronHoles(0) {}
00046
00047 G4ExitonConfiguration(G4int qpp, G4int qnp, G4int qph, G4int qnh)
00048 : protonQuasiParticles(qpp), neutronQuasiParticles(qnp),
00049 protonHoles(qph), neutronHoles(qnh) {}
00050
00051 void clear() {
00052 protonQuasiParticles = neutronQuasiParticles = 0;
00053 protonHoles = neutronHoles = 0;
00054 }
00055
00056 bool empty() const {
00057 return (protonQuasiParticles==0 && neutronQuasiParticles==0 &&
00058 protonHoles==0 && neutronHoles==0);
00059 }
00060
00061 bool operator==(const G4ExitonConfiguration& right) const {
00062 return ( (&right == this) ||
00063 (protonQuasiParticles == right.protonQuasiParticles &&
00064 neutronQuasiParticles == right.neutronQuasiParticles &&
00065 protonHoles == right.protonHoles &&
00066 neutronHoles == right.neutronHoles) );
00067 }
00068
00069 bool operator!=(const G4ExitonConfiguration& right) const {
00070 return !operator==(right);
00071 }
00072
00073
00074
00075
00076 void incrementQP(G4int ip) {
00077 if (ip == 1) protonQuasiParticles++;
00078 else if (ip == 2) neutronQuasiParticles++;
00079 }
00080
00081 void incrementHoles(G4int ip) {
00082 if (ip == 1) protonHoles++;
00083 else if (ip == 2) neutronHoles++;
00084 }
00085
00086 G4int protonQuasiParticles;
00087 G4int neutronQuasiParticles;
00088 G4int protonHoles;
00089 G4int neutronHoles;
00090 };
00091
00092
00093
00094 std::ostream& operator<<(std::ostream& os, const G4ExitonConfiguration& ex);
00095
00096 #endif // G4EXITON_CONFIGURATION_HH