- 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/src/G4FissionStore.cc
r1315 r1340 23 23 // * acceptance of all terms of the Geant4 Software license. * 24 24 // ******************************************************************** 25 // $Id: G4FissionStore.cc,v 1.16 2010/10/19 21:33:58 mkelsey Exp $ 25 26 // 27 // 20100728 Move ::addConfig() implementation to .cc file 28 26 29 #include "G4FissionStore.hh" 30 #include "G4FissionConfiguration.hh" 27 31 #include <cmath> 28 32 29 G4FissionStore::G4FissionStore() 30 : verboseLevel(0){ 33 G4FissionStore::G4FissionStore() : verboseLevel(0) { 34 if (verboseLevel > 1) 35 G4cout << " >>> G4FissionStore::G4FissionStore" << G4endl; 36 } 31 37 32 if (verboseLevel > 3) { 33 G4cout << " >>> G4FissionStore::G4FissionStore" << G4endl; 34 } 38 void G4FissionStore::addConfig(G4double a, G4double z, G4double ez, 39 G4double ek, G4double ev) { 40 G4FissionConfiguration config(a, z, ez, ek, ev); 41 configurations.push_back(config); 42 if (verboseLevel > 2) config.print(); 35 43 } 36 44 37 45 G4FissionConfiguration G4FissionStore::generateConfiguration(G4double amax, 38 46 G4double rand) const { 39 40 if (verboseLevel > 3) { 47 if (verboseLevel > 1) 41 48 G4cout << " >>> G4FissionStore::generateConfiguration" << G4endl; 42 }43 49 44 50 const G4double small = -30.0; 45 51 46 52 G4double totProb = 0.0; 47 std::vector<G4double> probs( configurations.size());53 std::vector<G4double> probs(size()); 48 54 49 // G4cout << " amax " << amax << " ic " << configurations.size() << G4endl; 55 if (verboseLevel > 3) 56 G4cout << " amax " << amax << " ic " << size() << G4endl; 50 57 51 for (G4int i = 0; i < G4int(configurations.size()); i++) {58 for (G4int i = 0; i < size(); i++) { 52 59 G4double ez = configurations[i].ezet; 53 60 G4double pr = ez - amax; … … 64 71 G4int igen = 0; 65 72 66 while (probs[igen] <= st && igen < G4int(configurations.size())) igen++;73 while (probs[igen] <= st && igen < size()) igen++; 67 74 68 //G4cout << " igen " << igen << G4endl;75 if (verboseLevel > 3) G4cout << " igen " << igen << G4endl; 69 76 70 77 return configurations[igen];
Note: See TracChangeset
for help on using the changeset viewer.