81 theOuterRadius(0), theNucleus(0),
 
   82 theFieldMap(0), theEquationMap(0),
 
   90    if(theFieldMap) delete_FieldsAndMap(theFieldMap);
 
   93    if(theEquationMap) delete_EquationsAndMap(theEquationMap);
 
   95    if (theField) 
delete theField;
 
  104    if(theFieldMap) delete_FieldsAndMap(theFieldMap);
 
  107    if(theEquationMap) delete_EquationsAndMap(theEquationMap);
 
  109    if (theField) 
delete theField;
 
  112    theNucleus = nucleus;
 
  115    theFieldMap = 
new std::map <G4int, G4VNuclearField*, std::less<G4int> >;
 
  130    theEquationMap = 
new std::map <G4int, G4Mag_EqRhs*, std::less<G4int> >;
 
  233    std::vector<G4KineticTrack *>::iterator i;
 
  234    for(i = active.begin(); i != active.end(); ++i)
 
  240       std::map <G4int, G4VNuclearField*, std::less<G4int> >::iterator fieldIter= theFieldMap->find(encoding);
 
  243       if ( fieldIter != theFieldMap->end() ) currentField=fieldIter->second;
 
  260 #ifdef debug_1_RKPropagation 
  261       G4cout <<
" kt,timeStep, Intersection times tenter, tleave  " 
  262             <<kt<< 
" / state= " <<kt->
GetState() <<
" / " <<
" "<< currTimeStep << 
" / " << t_enter << 
" / " << t_leave <<
G4endl;
 
  277          if(currTimeStep == 
DBL_MAX)currTimeStep = t_leave*1.05;
 
  278          FreeTransport(kt, currTimeStep);
 
  279          if ( currTimeStep >= t_leave )
 
  294          if(t_enter > currTimeStep)  
 
  296             FreeTransport(kt, currTimeStep);
 
  301             FreeTransport(kt, t_enter);   
 
  302             currTimeStep -= t_enter;
 
  309             if(newE <= kt->GetActualMass())  
 
  313                FreeTransport(kt, 1.1*t_leave);   
 
  347       if(currTimeStep > t_leave)  
 
  349          currTimeStep = t_leave;
 
  353 #ifdef debug_1_RKPropagation 
  354       G4cerr << 
"RKPropagation is_exiting?, t_leave, curTimeStep " <<is_exiting<<
" "<<t_leave << 
" " <<currTimeStep<<
G4endl;
 
  355       G4cout << 
"RKPropagation Ekin, field, projectile potential, p " 
  368       if (currTimeStep > 0 &&
 
  369             ! FieldTransport(kt, currTimeStep)) {
 
  370          FreeTransport(kt,currTimeStep);
 
  373 #ifdef debug_1_RKPropagation 
  374       G4cout << 
"RKPropagation Ekin, field, p " 
  394          if(t_in < 0 && t_out >= 0)   
 
  399             FreeTransport(kt, t_out);
 
  408             if ( std::abs(currentField->
GetField(savePos)) > 0. &&
 
  413                newE += currentField->
GetField(savePos)
 
  419             if(newE < kt->GetActualMass())
 
  421 #ifdef debug_1_RKPropagation 
  422                G4cout << 
"RKPropagation-Transport: problem with particle exiting - ignored" << 
G4endl;
 
  443          if(newE < kt->GetActualMass())
 
  445 #ifdef debug_1_RKPropagation 
  474    return theMomentumTranfer;
 
  507 #ifdef debug_1_RKPropagation 
  508       std::cerr << 
"G4RKPropagation::FieldTransport() warning: integration error." 
  510             <<
G4endl << 
" timestep " <<timeStep
 
  594    G4double sqrtArg = scalarProd*scalarProd -
 
  595          speedMag2*(currentPos.
mag2()-radius*radius);
 
  601    t1 = (-scalarProd - std::sqrt(sqrtArg))/speedMag2/
c_light;
 
  602    t2 = (-scalarProd + std::sqrt(sqrtArg))/speedMag2/
c_light;
 
  614    G4double sqrtArg = scalarProd*scalarProd -
 
  620    t1 = (-scalarProd - std::sqrt(sqrtArg))/speedMag2/
c_light;
 
  621    t2 = (-scalarProd + std::sqrt(sqrtArg))/speedMag2/
c_light;
 
  628 void G4RKPropagation::delete_FieldsAndMap(
 
  634       std::map <G4int, G4VNuclearField *, std::less<G4int> >::iterator cur;
 
  635       for(cur = aMap->begin(); cur != aMap->end(); ++cur)
 
  636          delete (*cur).second;
 
  645 void G4RKPropagation::delete_EquationsAndMap(
 
  651       std::map <G4int, G4Mag_EqRhs *, std::less<G4int> >::iterator cur;
 
  652       for(cur = aMap->begin(); cur != aMap->end(); ++cur)
 
  653          delete (*cur).second;