- Timestamp:
- Dec 22, 2010, 3:52:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/lowenergy/src/G4hLowEnergyIonisation.cc
r1315 r1347 174 174 shellCS = new G4teoCrossSection("analytical"); 175 175 176 deexcitationManager.InitialiseForNewRun(); 177 deexcitationManager.SetAugerActive(false); 178 deexcitationManager.SetPIXEActive(true); 179 176 180 } 177 181 … … 990 994 if(newpart != 0) { 991 995 996 // G4cout << "AlongStep DEEXCTATION!!!" << G4endl; //debug 992 997 size_t nSecondaries = newpart->size(); 993 998 aParticleChange.SetNumberOfSecondaries(nSecondaries); … … 1296 1301 || bindingEnergy >= minElectronEnergy) ) { 1297 1302 1298 G4int shellId = atomicShell->ShellId();1299 secondaryVector = deexcitationManager.GenerateParticles(Z, shellId);1303 // G4int shellId = atomicShell->ShellId(); 1304 deexcitationManager.GenerateParticles(secondaryVector, atomicShell, Z, minGammaEnergy, minElectronEnergy); 1300 1305 1301 1306 if (secondaryVector != 0) { 1302 1307 // debug G4cout << "DEEXCTATION!!!" << G4endl; //debug 1303 1308 nSecondaries = secondaryVector->size(); 1304 1309 for (size_t i = 0; i<nSecondaries; i++) { … … 1450 1455 1451 1456 // create vector of tracks of secondary particles 1452 1457 1453 1458 std::vector<G4DynamicParticle*>* partVector = 1454 1459 new std::vector<G4DynamicParticle*>; 1455 std::vector<G4DynamicParticle*>* secVector = 0;1460 std::vector<G4DynamicParticle*>* secVector = new std::vector<G4DynamicParticle*>; 1456 1461 G4DynamicParticle* aSecondary = 0; 1457 1462 G4ParticleDefinition* type = 0; 1458 1463 G4double e, tkin, grej; 1459 1464 G4ThreeVector position; 1460 G4int shell , shellId;1465 G4int shell; 1461 1466 1462 1467 // sample secondaries … … 1482 1487 } while( G4UniformRand() > grej ); 1483 1488 1489 // Atom total cross section 1490 shellCS->SetTotalCS(totalCrossSectionMap[Z]); 1491 1484 1492 shell = shellCS->SelectRandomShell(Z,incidentEnergy,hMass,tkin); 1485 1486 shellId = transitionManager->Shell(Z, shell)->ShellId();1493 1494 // shellId = transitionManager->Shell(Z, shell)->ShellId(); 1487 1495 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; 1513 1523 } 1524 (*secVector)[l] = 0; 1525 delete (*secVector)[l]; 1514 1526 } 1527 1528 // secVector = 0; 1529 1515 1530 } 1516 delete secVector;1517 }1518 1531 } 1519 1532 } 1520 1533 } 1534 1535 delete secVector; 1521 1536 1522 1537 if(partVector->empty()) { … … 2013 2028 void G4hLowEnergyIonisation::ActivateAugerElectronProduction(G4bool val) 2014 2029 { 2015 deexcitationManager. ActivateAugerElectronProduction(val);2030 deexcitationManager.SetAugerActive(val); 2016 2031 } 2017 2032
Note: See TracChangeset
for help on using the changeset viewer.