source: trunk/source/processes/hadronic/models/cascade/cascade/include/G4ExitonConfiguration.hh @ 1340

Last change on this file since 1340 was 1340, checked in by garnier, 14 years ago

update ti head

File size: 2.9 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25// $Id: G4ExitonConfiguration.hh,v 1.7 2010/09/24 06:26:06 mkelsey Exp $
26//
27// 20100909  Add function to reset values to zero
28// 20100924  Migrate to integer A and Z
29
30#ifndef G4EXITON_CONFIGURATION_HH
31#define G4EXITON_CONFIGURATION_HH
32
33class G4ExitonConfiguration {
34public:
35  G4ExitonConfiguration() 
36    : protonQuasiParticles(0), neutronQuasiParticles(0),
37      protonHoles(0), neutronHoles(0) {}
38
39  G4ExitonConfiguration(G4int qpp, G4int qnp, G4int qph, G4int qnh) 
40    : protonQuasiParticles(qpp), neutronQuasiParticles(qnp), 
41      protonHoles(qph), neutronHoles(qnh) {}
42
43  void clear() {
44    protonQuasiParticles = neutronQuasiParticles = 0;
45    protonHoles = neutronHoles = 0;
46  }
47
48  void incrementQP(G4int ip) {
49    if (ip == 1) protonQuasiParticles++;
50    else if (ip == 2) neutronQuasiParticles++;
51  }
52
53  void incrementHoles(G4int ip) {
54    if (ip == 1) protonHoles++;
55    else if (ip == 2) neutronHoles++;
56  }
57
58  void print() const {
59    G4cout << " Exiton configuration " << G4endl
60           << " proton particles " << protonQuasiParticles << " holes " 
61           << protonHoles << G4endl
62           << " neutron particles " << neutronQuasiParticles << " holes " 
63           << neutronHoles << G4endl;
64  }
65     
66  G4int protonQuasiParticles;
67  G4int neutronQuasiParticles;
68  G4int protonHoles;
69  G4int neutronHoles;
70};       
71
72#endif // G4EXITON_CONFIGURATION_HH
Note: See TracBrowser for help on using the repository browser.