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/src/G4NuclWatcher.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4NuclWatcher.cc,v 1.3 2010/06/25 09:44:54 gunter Exp $
    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 $
    2828//
    2929// 20100202  M. Kelsey -- Move most code here from .hh file, clean up
    3030// 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"
    3133
    3234#include "G4NuclWatcher.hh"
     
    3739#include <cmath>
    3840
    39 G4NuclWatcher::G4NuclWatcher(G4double z,
     41G4NuclWatcher::G4NuclWatcher(G4int z,
    4042                             const std::vector<G4double>& expa,
    4143                             const std::vector<G4double>& expcs,
     
    4749    exper_err(experr), checkable(check), nucleable(nucl) {}
    4850
    49 void G4NuclWatcher::watch(G4double a, G4double z) {
     51void G4NuclWatcher::watch(G4int a, G4int z) {
    5052  const G4double small = 0.001;
    5153 
    52   if (std::fabs(z-nuclz) >= small) return;
     54  if (std::abs(z-nuclz) >= small) return;
    5355
    5456  G4bool here = false;          // Increment specified nucleus count
    5557  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) {
    5860      simulated_cs[i] += 1.0;
    5961      here = true;              // Terminates loop
Note: See TracChangeset for help on using the changeset viewer.