Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File:
1 edited

Legend:

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

    r1228 r1315  
    100100//               parametrised proton model: min(user value, model limit)
    101101// 26 Jan   2005 S. Chauvie added PrintInfoDefinition() for antiproton
    102 
    103 
     102// 30 Sep   2009 A.Mantero Removed dependencies to old shell Ionisation XS models
     103// 07 Jun    2010 Code Celaning for June beta Release
    104104// -----------------------------------------------------------------------
    105105
     
    121121#include "G4ShellVacancy.hh"
    122122#include "G4VhShellCrossSection.hh"
    123 #include "G4hShellCrossSection.hh"
    124 #include "G4hShellCrossSectionExp.hh"
    125 #include "G4hShellCrossSectionDoubleExp.hh"
    126123#include "G4VEMDataSet.hh"
    127124#include "G4EMDataSet.hh"
     
    132129#include "G4ProcessManager.hh"
    133130#include "G4ProductionCutsTable.hh"
    134 
     131#include "G4teoCrossSection.hh"
     132#include "G4empCrossSection.hh"
    135133//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    136134
     
    153151    shellVacancy(0),
    154152    shellCS(0),
    155     theFluo(false),
    156     expFlag(false)
     153    theFluo(false)
    157154{
    158155  InitializeMe();
     
    175172  verboseLevel         = 0;
    176173
    177 //****************************************************************************
    178 // By default the method of cross section's calculation is swiched on an
    179 // 2nd implementation empirical model (G4hShellCrossSectionDoubleExp),
    180 // if you want to use Gryzinski's model (G4hShellCrossSection()) or the
    181 // 1st empiric one (G4hShellCrossSectionExp), you must change the
    182 // selection below and switching expFlag to FALSE
    183 //****************************************************************************
    184 
    185   //shellCS = new G4hShellCrossSection();
    186   //shellCS = new G4hShellCrossSectionExp();
    187   shellCS = new G4hShellCrossSectionDoubleExp();
    188   expFlag=true;
     174  shellCS = new G4teoCrossSection("analytical");
     175
    189176}
    190177
     
    12801267  //   G4cout << "Fluorescence is switched :" << theFluo << G4endl;
    12811268
     1269  // Fluorescence data start from element 6
    12821270  if(theFluo && Z > 5) {
    12831271
    12841272
    12851273
    1286     // Atom total cross section for the Empiric Model   
    1287     if (expFlag) {   
     1274    // Atom total cross section     
    12881275    shellCS->SetTotalCS(totalCrossSectionMap[Z]);   
    1289     }
     1276
    12901277    G4int shell = shellCS->SelectRandomShell(Z, KineticEnergy,ParticleMass,DeltaKineticEnergy);
    12911278
    1292     if (expFlag && shell==1) {       
    1293       aParticleChange.ProposeLocalEnergyDeposit (KineticEnergy);
    1294       aParticleChange.ProposeEnergy(0);     
    1295     }
    1296 
    1297 
    1298     const G4AtomicShell* atomicShell =
    1299                 (G4AtomicTransitionManager::Instance())->Shell(Z, shell);
    1300     G4double bindingEnergy = atomicShell->BindingEnergy();
    1301 
    1302     if(verboseLevel > 1) {
    1303       G4cout << "PostStep Z= " << Z << " shell= " << shell
    1304              << " bindingE(keV)= " << bindingEnergy/keV
    1305              << " finalE(keV)= " << finalKineticEnergy/keV
    1306              << G4endl;
    1307     }
    1308 
    1309     // Fluorescence data start from element 6
    1310 
    1311     if (finalKineticEnergy >= bindingEnergy
    1312          && (bindingEnergy >= minGammaEnergy
    1313          ||  bindingEnergy >= minElectronEnergy) ) {
    1314 
    1315       G4int shellId = atomicShell->ShellId();
    1316       secondaryVector = deexcitationManager.GenerateParticles(Z, shellId);
    1317 
    1318       if (secondaryVector != 0) {
    1319 
    1320         nSecondaries = secondaryVector->size();
    1321         for (size_t i = 0; i<nSecondaries; i++) {
    1322 
    1323           aSecondary = (*secondaryVector)[i];
    1324           if (aSecondary) {
    1325 
    1326             G4double e = aSecondary->GetKineticEnergy();
    1327             type = aSecondary->GetDefinition();
    1328             if (e < finalKineticEnergy &&
    1329                  ((type == G4Gamma::Gamma() && e > minGammaEnergy ) ||
    1330                   (type == G4Electron::Electron() && e > minElectronEnergy ))) {
    1331 
    1332               finalKineticEnergy -= e;
    1333               totalNumber++;
    1334 
    1335             } else {
    1336 
    1337               delete aSecondary;
    1338               (*secondaryVector)[i] = 0;
     1279    if (shell!=-1) {       
     1280     
     1281      const G4AtomicShell* atomicShell =
     1282        (G4AtomicTransitionManager::Instance())->Shell(Z, shell);
     1283      G4double bindingEnergy = atomicShell->BindingEnergy();
     1284     
     1285      if(verboseLevel > 1) {
     1286        G4cout << "PostStep Z= " << Z << " shell= " << shell
     1287               << " bindingE(keV)= " << bindingEnergy/keV
     1288               << " finalE(keV)= " << finalKineticEnergy/keV
     1289               << G4endl;
     1290      }
     1291     
     1292     
     1293     
     1294      if (finalKineticEnergy >= bindingEnergy
     1295          && (bindingEnergy >= minGammaEnergy
     1296              ||  bindingEnergy >= minElectronEnergy) ) {
     1297       
     1298        G4int shellId = atomicShell->ShellId();
     1299        secondaryVector = deexcitationManager.GenerateParticles(Z, shellId);
     1300       
     1301        if (secondaryVector != 0) {
     1302         
     1303          nSecondaries = secondaryVector->size();
     1304          for (size_t i = 0; i<nSecondaries; i++) {
     1305           
     1306            aSecondary = (*secondaryVector)[i];
     1307            if (aSecondary) {
     1308             
     1309              G4double e = aSecondary->GetKineticEnergy();
     1310              type = aSecondary->GetDefinition();
     1311              if (e < finalKineticEnergy &&
     1312                  ((type == G4Gamma::Gamma() && e > minGammaEnergy ) ||
     1313                   (type == G4Electron::Electron() && e > minElectronEnergy ))) {
     1314               
     1315                finalKineticEnergy -= e;
     1316                totalNumber++;
     1317               
     1318              } else {
     1319               
     1320                delete aSecondary;
     1321                (*secondaryVector)[i] = 0;
     1322              }
    13391323            }
    13401324          }
     
    13431327    }
    13441328  }
    1345 
     1329 
    13461330  // Save delta-electrons
    13471331
     
    14011385//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    14021386
    1403 std::vector<G4DynamicParticle*>*
    1404 G4hLowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple,
     1387
     1388
     1389void G4hLowEnergyIonisation::SelectShellIonisationCS(G4String val) {
     1390
     1391  if (val == "analytical" )  { 
     1392    if (shellCS) delete shellCS;
     1393    shellCS = new G4teoCrossSection(val);
     1394  }
     1395  else if (val == "empirical") {
     1396    if (shellCS) delete shellCS;
     1397    shellCS = new G4empCrossSection();
     1398  }
     1399}
     1400
     1401
     1402
     1403//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     1404
     1405
     1406std::vector<G4DynamicParticle*>* G4hLowEnergyIonisation::DeexciteAtom(const G4MaterialCutsCouple* couple,
    14051407                                           G4double incidentEnergy,
    14061408                                           G4double hMass,
Note: See TracChangeset for help on using the changeset viewer.