Changeset 1340 for trunk/source/processes/hadronic/models/cascade/cascade/include/G4ExitonConfiguration.hh
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/cascade/cascade/include/G4ExitonConfiguration.hh
r819 r1340 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4ExitonConfiguration.hh,v 1.7 2010/09/24 06:26:06 mkelsey Exp $ 25 26 // 27 // 20100909 Add function to reset values to zero 28 // 20100924 Migrate to integer A and Z 29 26 30 #ifndef G4EXITON_CONFIGURATION_HH 27 31 #define G4EXITON_CONFIGURATION_HH 28 32 29 33 class G4ExitonConfiguration { 34 public: 35 G4ExitonConfiguration() 36 : protonQuasiParticles(0), neutronQuasiParticles(0), 37 protonHoles(0), neutronHoles(0) {} 30 38 31 public: 39 G4ExitonConfiguration(G4int qpp, G4int qnp, G4int qph, G4int qnh) 40 : protonQuasiParticles(qpp), neutronQuasiParticles(qnp), 41 protonHoles(qph), neutronHoles(qnh) {} 32 42 33 G4ExitonConfiguration() { 34 protonQuasiParticles = 0.0; 35 neutronQuasiParticles = 0.0; 36 protonHoles = 0.0; 37 neutronHoles = 0.0; 38 }; 43 void clear() { 44 protonQuasiParticles = neutronQuasiParticles = 0; 45 protonHoles = neutronHoles = 0; 46 } 39 47 40 G4ExitonConfiguration(G4double qpp,41 G4double qnp,42 G4double qph,43 G4double qnh)44 : protonQuasiParticles(qpp),45 neutronQuasiParticles(qnp),46 protonHoles(qph),47 neutronHoles(qnh) {48 };49 50 48 void incrementQP(G4int ip) { 51 if(ip < 3) { 52 if(ip == 1) { 53 protonQuasiParticles += 1.0; 54 } 55 else if(ip == 2) { 56 neutronQuasiParticles += 1.0; 57 }; 58 }; 59 }; 49 if (ip == 1) protonQuasiParticles++; 50 else if (ip == 2) neutronQuasiParticles++; 51 } 60 52 61 53 void incrementHoles(G4int ip) { 62 if(ip < 3) { 63 if(ip == 1) { 64 protonHoles += 1.0; 65 } 66 else if(ip == 2) { 67 neutronHoles += 1.0; 68 }; 69 }; 70 }; 54 if (ip == 1) protonHoles++; 55 else if (ip == 2) neutronHoles++; 56 } 71 57 72 58 void print() const { … … 76 62 << " neutron particles " << neutronQuasiParticles << " holes " 77 63 << neutronHoles << G4endl; 78 } ;64 } 79 65 80 G4double protonQuasiParticles; 81 G4double neutronQuasiParticles; 82 G4double protonHoles; 83 G4double neutronHoles; 84 66 G4int protonQuasiParticles; 67 G4int neutronQuasiParticles; 68 G4int protonHoles; 69 G4int neutronHoles; 85 70 }; 86 71
Note: See TracChangeset
for help on using the changeset viewer.