- 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/G4NuclWatcher.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4NuclWatcher.cc,v 1. 3 2010/06/25 09:44:54 gunterExp $27 // Geant4 tag: $Name: geant4-09-04-beta-01$26 // $Id: G4NuclWatcher.cc,v 1.5 2010/10/19 19:48:57 mkelsey Exp $ 27 // Geant4 tag: $Name: hadr-casc-V09-03-85 $ 28 28 // 29 29 // 20100202 M. Kelsey -- Move most code here from .hh file, clean up 30 30 // 20100405 M. Kelsey -- Pass const-ref std::vector<> 31 // 20101010 M. Kelsey -- Migrate to integer A and Z 32 // 20101019 M. Kelsey -- CoVerity report: "!true" should be "!here" 31 33 32 34 #include "G4NuclWatcher.hh" … … 37 39 #include <cmath> 38 40 39 G4NuclWatcher::G4NuclWatcher(G4 doublez,41 G4NuclWatcher::G4NuclWatcher(G4int z, 40 42 const std::vector<G4double>& expa, 41 43 const std::vector<G4double>& expcs, … … 47 49 exper_err(experr), checkable(check), nucleable(nucl) {} 48 50 49 void G4NuclWatcher::watch(G4 double a, G4doublez) {51 void G4NuclWatcher::watch(G4int a, G4int z) { 50 52 const G4double small = 0.001; 51 53 52 if (std:: fabs(z-nuclz) >= small) return;54 if (std::abs(z-nuclz) >= small) return; 53 55 54 56 G4bool here = false; // Increment specified nucleus count 55 57 G4int simulatedAsSize = simulated_as.size(); 56 for (G4int i = 0; i<simulatedAsSize && ! true; i++) {57 if (std:: fabs(simulated_as[i] - a) < small) {58 for (G4int i = 0; i<simulatedAsSize && !here; i++) { 59 if (std::abs(simulated_as[i] - a) < small) { 58 60 simulated_cs[i] += 1.0; 59 61 here = true; // Terminates loop
Note: See TracChangeset
for help on using the changeset viewer.