Ignore:
Timestamp:
Dec 22, 2010, 3:52:27 PM (13 years ago)
Author:
garnier
Message:

geant4 tag 9.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/lowenergy/src/G4hLowEnergyIonisation.cc

    r1315 r1347  
    174174  shellCS = new G4teoCrossSection("analytical");
    175175
     176  deexcitationManager.InitialiseForNewRun();
     177  deexcitationManager.SetAugerActive(false);
     178  deexcitationManager.SetPIXEActive(true);
     179
    176180}
    177181
     
    990994  if(newpart != 0) {
    991995
     996    //    G4cout << "AlongStep DEEXCTATION!!!" << G4endl; //debug
    992997    size_t nSecondaries = newpart->size();
    993998    aParticleChange.SetNumberOfSecondaries(nSecondaries);
     
    12961301              ||  bindingEnergy >= minElectronEnergy) ) {
    12971302       
    1298         G4int shellId = atomicShell->ShellId();
    1299         secondaryVector = deexcitationManager.GenerateParticles(Z, shellId);
     1303        //      G4int shellId = atomicShell->ShellId();
     1304        deexcitationManager.GenerateParticles(secondaryVector, atomicShell, Z, minGammaEnergy, minElectronEnergy);
    13001305       
    13011306        if (secondaryVector != 0) {
    1302          
     1307          // debug        G4cout << "DEEXCTATION!!!" << G4endl; //debug 
    13031308          nSecondaries = secondaryVector->size();
    13041309          for (size_t i = 0; i<nSecondaries; i++) {
     
    14501455
    14511456  // create vector of tracks of secondary particles
    1452 
     1457 
    14531458  std::vector<G4DynamicParticle*>* partVector =
    14541459         new std::vector<G4DynamicParticle*>;
    1455   std::vector<G4DynamicParticle*>* secVector = 0;
     1460  std::vector<G4DynamicParticle*>* secVector = new std::vector<G4DynamicParticle*>;
    14561461  G4DynamicParticle* aSecondary = 0;
    14571462  G4ParticleDefinition* type = 0;
    14581463  G4double e, tkin, grej;
    14591464  G4ThreeVector position;
    1460   G4int shell, shellId;
     1465  G4int shell;
    14611466
    14621467  // sample secondaries
     
    14821487        } while( G4UniformRand() > grej );
    14831488
     1489        // Atom total cross section     
     1490        shellCS->SetTotalCS(totalCrossSectionMap[Z]); 
     1491       
    14841492        shell = shellCS->SelectRandomShell(Z,incidentEnergy,hMass,tkin);
    1485 
    1486         shellId = transitionManager->Shell(Z, shell)->ShellId();
     1493       
     1494        //        shellId = transitionManager->Shell(Z, shell)->ShellId();
    14871495        G4double maxE = transitionManager->Shell(Z, shell)->BindingEnergy();
    1488 
    1489         if (maxE>minGammaEnergy || maxE>minElectronEnergy ) {
    1490           secVector = deexcitationManager.GenerateParticles(Z, shellId);
    1491         } else {
    1492           secVector = 0;
    1493         }
    1494 
    1495         if (secVector) {
    1496 
    1497           for (size_t l = 0; l<secVector->size(); l++) {
    1498 
    1499             aSecondary = (*secVector)[l];
    1500             if(aSecondary) {
    1501 
    1502               e = aSecondary->GetKineticEnergy();
    1503               type = aSecondary->GetDefinition();
    1504               if ( etot + e <= eLoss &&
    1505                    ( (type == G4Gamma::Gamma() && e > minGammaEnergy ) ||
    1506                    (type == G4Electron::Electron() && e > minElectronEnergy) ) ) {
    1507 
    1508                      etot += e;
    1509                      partVector->push_back(aSecondary);
    1510 
    1511               } else {
    1512                      delete aSecondary;
     1496       
     1497        if (maxE>minGammaEnergy || maxE>minElectronEnergy )
     1498          {
     1499          deexcitationManager.GenerateParticles(secVector, transitionManager->Shell(Z, shell), Z, minGammaEnergy, minElectronEnergy);
     1500          }
     1501
     1502          if (!(secVector->empty())) {
     1503            size_t secN = secVector->size();
     1504            for (size_t l = 0; l<secN; l++) {
     1505             
     1506              aSecondary = (*secVector)[l];
     1507              if(aSecondary) {
     1508               
     1509                e = aSecondary->GetKineticEnergy();
     1510                type = aSecondary->GetDefinition();
     1511                if ( etot + e <= eLoss &&
     1512                     ( (type == G4Gamma::Gamma() && e > minGammaEnergy ) ||
     1513                       (type == G4Electron::Electron() && e > minElectronEnergy) ) )
     1514                  {
     1515                    etot += e;
     1516                    partVector->push_back(aSecondary); 
     1517                  }
     1518                else
     1519                  {
     1520                    delete aSecondary;
     1521                  }
     1522                aSecondary = 0;
    15131523              }
     1524              (*secVector)[l] = 0;
     1525              delete (*secVector)[l];
    15141526            }
     1527           
     1528            //      secVector = 0;
     1529
    15151530          }
    1516           delete secVector;
    1517         }
    15181531      }
    15191532    }
    15201533  }
     1534
     1535  delete secVector;
    15211536
    15221537  if(partVector->empty()) {
     
    20132028void G4hLowEnergyIonisation::ActivateAugerElectronProduction(G4bool val)
    20142029{
    2015   deexcitationManager.ActivateAugerElectronProduction(val);
     2030  deexcitationManager.SetAugerActive(val);
    20162031}
    20172032
Note: See TracChangeset for help on using the changeset viewer.