Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/cascade/cascade/include/G4ExitonConfiguration.hh

    r819 r1340  
    2323// * acceptance of all terms of the Geant4 Software license.          *
    2424// ********************************************************************
     25// $Id: G4ExitonConfiguration.hh,v 1.7 2010/09/24 06:26:06 mkelsey Exp $
    2526//
     27// 20100909  Add function to reset values to zero
     28// 20100924  Migrate to integer A and Z
     29
    2630#ifndef G4EXITON_CONFIGURATION_HH
    2731#define G4EXITON_CONFIGURATION_HH
    2832
    2933class G4ExitonConfiguration {
     34public:
     35  G4ExitonConfiguration()
     36    : protonQuasiParticles(0), neutronQuasiParticles(0),
     37      protonHoles(0), neutronHoles(0) {}
    3038
    31 public:
     39  G4ExitonConfiguration(G4int qpp, G4int qnp, G4int qph, G4int qnh)
     40    : protonQuasiParticles(qpp), neutronQuasiParticles(qnp),
     41      protonHoles(qph), neutronHoles(qnh) {}
    3242
    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  }
    3947
    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  
    5048  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  }
    6052
    6153  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  }
    7157
    7258  void print() const {
     
    7662           << " neutron particles " << neutronQuasiParticles << " holes "
    7763           << neutronHoles << G4endl;
    78   };
     64  }
    7965     
    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;
    8570};       
    8671
Note: See TracChangeset for help on using the changeset viewer.