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/G4FissionStore.cc

    r1315 r1340  
    2323// * acceptance of all terms of the Geant4 Software license.          *
    2424// ********************************************************************
     25// $Id: G4FissionStore.cc,v 1.16 2010/10/19 21:33:58 mkelsey Exp $
    2526//
     27// 20100728  Move ::addConfig() implementation to .cc file
     28
    2629#include "G4FissionStore.hh"
     30#include "G4FissionConfiguration.hh"
    2731#include <cmath>
    2832
    29 G4FissionStore::G4FissionStore()
    30   : verboseLevel(0){
     33G4FissionStore::G4FissionStore() : verboseLevel(0) {
     34  if (verboseLevel > 1)
     35    G4cout << " >>> G4FissionStore::G4FissionStore" << G4endl;
     36}
    3137
    32   if (verboseLevel > 3) {
    33     G4cout << " >>> G4FissionStore::G4FissionStore" << G4endl;
    34   }
     38void 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();
    3543}
    3644
    3745G4FissionConfiguration G4FissionStore::generateConfiguration(G4double amax,
    3846                                                             G4double rand) const {
    39 
    40   if (verboseLevel > 3) {
     47  if (verboseLevel > 1)
    4148    G4cout << " >>> G4FissionStore::generateConfiguration" << G4endl;
    42   }
    4349 
    4450  const G4double small = -30.0;
    4551
    4652  G4double totProb = 0.0;
    47   std::vector<G4double> probs(configurations.size());
     53  std::vector<G4double> probs(size());
    4854
    49 // G4cout << " amax " << amax << " ic " << configurations.size() << G4endl;
     55  if (verboseLevel > 3)
     56    G4cout << " amax " << amax << " ic " << size() << G4endl;
    5057
    51   for (G4int i = 0; i < G4int(configurations.size()); i++) {
     58  for (G4int i = 0; i < size(); i++) {
    5259    G4double ez = configurations[i].ezet;
    5360    G4double pr = ez - amax;
     
    6471  G4int igen = 0;
    6572
    66   while (probs[igen] <= st && igen < G4int(configurations.size())) igen++;
     73  while (probs[igen] <= st && igen < size()) igen++;
    6774
    68 // G4cout << " igen " << igen << G4endl;
     75  if (verboseLevel > 3) G4cout << " igen " << igen << G4endl;
    6976
    7077  return configurations[igen];
Note: See TracChangeset for help on using the changeset viewer.