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

    r1196 r1340  
    6161}
    6262
    63 
     63#if defined(NON_INTEGER_A_Z)
    6464void G4Fancy3DNucleus::Init(G4double theA, G4double theZ)
     65{
     66  G4int intZ = G4int(theZ);
     67  G4int intA= ( G4UniformRand()>theA-G4int(theA) ) ? G4int(theA) : G4int(theA)+1;
     68   // forward to integer Init()
     69  Init(intA, intZ);
     70
     71}
     72#endif
     73
     74void G4Fancy3DNucleus::Init(G4int theA, G4int theZ)
    6575{
    6676//  G4cout << "G4Fancy3DNucleus::Init(theA, theZ) called"<<G4endl;
     
    7080  theRWNucleons.clear();
    7181
    72   myZ = G4int(theZ);
    73   myA= ( G4UniformRand()>theA-G4int(theA) ) ? G4int(theA) : G4int(theA)+1;
     82  myZ = theZ;
     83  myA= theA;
    7484
    7585  theNucleons = new G4Nucleon[myA];
     
    144154        if (theRWNucleons.size() < 2 ) return;
    145155
    146         sort( theRWNucleons.begin(),theRWNucleons.end(),G4Fancy3DNucleusHelperForSortInZ);
     156        std::sort( theRWNucleons.begin(),theRWNucleons.end(),G4Fancy3DNucleusHelperForSortInZ);
    147157
    148158// now copy sorted nucleons to theNucleons array. TheRWNucleons are pointers in theNucleons
     
    169179
    170180        if (theRWNucleons.size() < 2 ) return;
    171         sort( theRWNucleons.begin(),theRWNucleons.end(),G4Fancy3DNucleusHelperForSortInZ);
     181        std::sort( theRWNucleons.begin(),theRWNucleons.end(),G4Fancy3DNucleusHelperForSortInZ);
    172182
    173183// now copy sorted nucleons to theNucleons array. TheRWNucleons are pointers in theNucleons
Note: See TracChangeset for help on using the changeset viewer.