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/G4DNABornIonisationModel.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4DNABornIonisationModel.cc,v 1.14 2009/11/12 03:08:58 sincerti Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: G4DNABornIonisationModel.cc,v 1.16 2010/03/26 18:10:43 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929
     
    239239  // InitialiseElementSelectors(particle,cuts);
    240240
    241   // Test if water material
    242 
    243   flagMaterialIsWater= false;
    244   densityWater = 0;
    245 
    246   const G4ProductionCutsTable* theCoupleTable = G4ProductionCutsTable::GetProductionCutsTable();
    247 
    248   if(theCoupleTable)
    249   {
    250     G4int numOfCouples = theCoupleTable->GetTableSize();
    251  
    252     if(numOfCouples>0)
    253     {
    254           for (G4int i=0; i<numOfCouples; i++)
    255           {
    256             const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i);
    257             const G4Material* material = couple->GetMaterial();
    258 
    259             if (material->GetName() == "G4_WATER")
    260             {
    261               G4double density = material->GetAtomicNumDensityVector()[1];
    262               flagMaterialIsWater = true;
    263               densityWater = density;
    264              
    265               if (verboseLevel > 3)
    266               G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl;
    267             }
    268  
    269           }
    270 
    271     } // if(numOfCouples>0)
    272 
    273   } // if (theCoupleTable)
    274 
    275241}
    276242
    277243//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    278244
    279 G4double G4DNABornIonisationModel::CrossSectionPerVolume(const G4Material*,
     245G4double G4DNABornIonisationModel::CrossSectionPerVolume(const G4Material* material,
    280246                                           const G4ParticleDefinition* particleDefinition,
    281247                                           G4double ekin,
     
    300266  G4double sigma=0;
    301267
    302   if (flagMaterialIsWater)
     268  if (material->GetName() == "G4_WATER")
    303269  {
    304270    const G4String& particleName = particleDefinition->GetParticleName();
     
    341307      G4cout << "---> Kinetic energy(eV)=" << ekin/eV << G4endl;
    342308      G4cout << " - Cross section per water molecule (cm^2)=" << sigma/cm/cm << G4endl;
    343       G4cout << " - Cross section per water molecule (cm^-1)=" << sigma*densityWater/(1./cm) << G4endl;
     309      G4cout << " - Cross section per water molecule (cm^-1)=" << sigma*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl;
    344310    }
    345311 
    346312  } // if (waterMaterial)
    347313 
    348  return sigma*densityWater;               
     314 return sigma*material->GetAtomicNumDensityVector()[1];           
    349315
    350316}
     
    429395    G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic) ;
    430396    fvect->push_back(dp);
    431     /*
    432     // creating neutral water molechule...
    433 
    434     G4DNAGenericMoleculeManager *instance;
    435     instance = G4DNAGenericMoleculeManager::Instance();
    436     G4ParticleDefinition* waterDef = NULL;
    437     G4Molecule* water = instance->GetMolecule("H2O");
    438     waterDef = (G4ParticleDefinition*)water;
    439 
    440     direction.set(0.,0.,0.);
    441 
    442     //G4DynamicParticle* dynamicWater = new G4DynamicParticle(waterDef, direction, bindingEnergy);
    443         G4DynamicMolecule* dynamicWater = new G4DynamicMolecule(water, direction, bindingEnergy);
    444 
    445 
    446         //dynamicWater->RemoveElectron(ionizationShell, 1);
    447 
    448     G4DynamicMolecule* dynamicWater2 = new G4DynamicMolecule(water, direction, bindingEnergy);
    449     G4DynamicMolecule* dynamicWater3 = new G4DynamicMolecule(water, direction, bindingEnergy);
    450 
    451     fvect->push_back(dynamicWater);
    452     fvect->push_back(dynamicWater2);
    453     fvect->push_back(dynamicWater3);
    454     */
     397
    455398  }
    456399
     
    512455  if (particleDefinition == G4Proton::ProtonDefinition())
    513456  {
    514     G4double maximumKineticEnergyTransfer = 4.* (electron_mass_c2 / proton_mass_c2) * k - (waterStructure.IonisationEnergy(shell));
     457    G4double maximumKineticEnergyTransfer = 4.* (electron_mass_c2 / proton_mass_c2) * k;
    515458
    516459    G4double crossSectionMaximum = 0.;
Note: See TracChangeset for help on using the changeset viewer.