Import Geant4 6.2.0 source tree
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PenelopeBremsstrahlung.cc,v 1.14 2003/11/18 17:29:43 pia Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4PenelopeBremsstrahlung.cc,v 1.15 2004/06/01 15:07:10 pandola Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
@@ -38,6 +38,7 @@
|
||||
// 23.05.2003 MGP - Removed memory leak (fix in destructor)
|
||||
// 07.11.2003 L.Pandola - Bug fixed in LoadAngularData()
|
||||
// 11.11.2003 L.Pandola - Code review: use std::map for angular data
|
||||
// 01.06.2004 L.Pandola - StopButAlive for positrons on PostStepDoIt
|
||||
//
|
||||
//----------------------------------------------------------------
|
||||
|
||||
@@ -55,7 +56,7 @@
|
||||
#include "G4MaterialCutsCouple.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
G4PenelopeBremsstrahlung::G4PenelopeBremsstrahlung(const G4String& nam)
|
||||
: G4eLowEnergyLoss(nam),
|
||||
@@ -66,7 +67,6 @@ G4PenelopeBremsstrahlung::G4PenelopeBremsstrahlung(const G4String& nam)
|
||||
angularData = new std::map<G4int,G4PenelopeBremsstrahlungAngular*>;
|
||||
cutForPhotons = 0.;
|
||||
verboseLevel = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -321,11 +321,12 @@ G4VParticleChange* G4PenelopeBremsstrahlung::PostStepDoIt(const G4Track& track,
|
||||
G4String excep = "Not found the angular data for material " + material->GetName();
|
||||
G4Exception(excep);
|
||||
}
|
||||
G4PenelopeBremsstrahlungAngular* elementAngularData = angularData->find(Z)->second;
|
||||
|
||||
//Check if the loaded angular data are right
|
||||
//G4cout << "Material Z: " << elementAngularData->GetAtomicNumber() << " !!" << G4endl;
|
||||
//G4cout << "Material Z: " << angularData->find(Z)->second->GetAtomicNumber() << " !!" << G4endl;
|
||||
|
||||
// Sample gamma angle (Z - axis along the parent particle).
|
||||
G4double dirZ = elementAngularData->ExtractCosTheta(kineticEnergy,tGamma);
|
||||
G4double dirZ = angularData->find(Z)->second->ExtractCosTheta(kineticEnergy,tGamma);
|
||||
G4double totalEnergy = kineticEnergy + electron_mass_c2;
|
||||
G4double phi = twopi * G4UniformRand();
|
||||
G4double sinTheta = sqrt(1. - dirZ*dirZ);
|
||||
@@ -336,7 +337,7 @@ G4VParticleChange* G4PenelopeBremsstrahlung::PostStepDoIt(const G4Track& track,
|
||||
G4ThreeVector electronDirection = track.GetMomentumDirection();
|
||||
|
||||
gammaDirection.rotateUz(electronDirection);
|
||||
|
||||
|
||||
//
|
||||
// Update the incident particle
|
||||
//
|
||||
@@ -358,7 +359,27 @@ G4VParticleChange* G4PenelopeBremsstrahlung::PostStepDoIt(const G4Track& track,
|
||||
aParticleChange.SetNumberOfSecondaries(1);
|
||||
G4double norm = 1./sqrt(finalX*finalX + finalY*finalY + finalZ*finalZ);
|
||||
aParticleChange.SetMomentumChange(finalX*norm, finalY*norm, finalZ*norm);
|
||||
aParticleChange.SetEnergyChange( finalEnergy );
|
||||
|
||||
const G4ParticleDefinition* particle = track.GetDefinition();
|
||||
|
||||
if (finalEnergy > 0.)
|
||||
{
|
||||
aParticleChange.SetEnergyChange(finalEnergy) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
aParticleChange.SetEnergyChange(0.) ;
|
||||
if (particle->GetProcessManager()->GetAtRestProcessVector()->size())
|
||||
//In this case there is at least one AtRest process
|
||||
{
|
||||
aParticleChange.SetStatusChange(fStopButAlive);
|
||||
}
|
||||
else
|
||||
{
|
||||
aParticleChange.SetStatusChange(fStopAndKill);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create G4DynamicParticle object for the gamma
|
||||
G4DynamicParticle* aGamma= new G4DynamicParticle (G4Gamma::Gamma(),
|
||||
@@ -421,8 +442,7 @@ void G4PenelopeBremsstrahlung::LoadAngularData()
|
||||
G4int Z = (G4int)((*theElementVector)[iel]->GetZ());
|
||||
//if the material is not present yet --> insert it in the map
|
||||
if (!(angularData->count(Z))) {
|
||||
G4PenelopeBremsstrahlungAngular* elementAngular = new G4PenelopeBremsstrahlungAngular(Z);
|
||||
angularData->insert(std::make_pair(Z,elementAngular));
|
||||
angularData->insert(std::make_pair(Z,new G4PenelopeBremsstrahlungAngular(Z)));
|
||||
//G4cout << "Loaded......... Z= " << Z << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PenelopeIonisation.cc,v 1.12 2004/03/18 13:44:44 pandola Exp $
|
||||
// GEANT4 tag $Name: geant4-06-01 $
|
||||
// $Id: G4PenelopeIonisation.cc,v 1.13 2004/06/01 15:09:12 pandola Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
@@ -46,6 +46,7 @@
|
||||
// 10.03.04 L.Pandola Bug fixed with reference system of delta rays
|
||||
// 17.03.04 L.Pandola Removed unnecessary calls to pow(a,b)
|
||||
// 18.03.04 L.Pandola Bug fixed in the destructor
|
||||
// 01.06.04 L.Pandola StopButAlive for positrons on PostStepDoIt
|
||||
// --------------------------------------------------------------
|
||||
|
||||
#include "G4PenelopeIonisation.hh"
|
||||
@@ -65,6 +66,7 @@
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
G4PenelopeIonisation::G4PenelopeIonisation(const G4String& nam)
|
||||
: G4eLowEnergyLoss(nam),
|
||||
@@ -329,7 +331,15 @@ G4VParticleChange* G4PenelopeIonisation::PostStepDoIt(const G4Track& track,
|
||||
else
|
||||
{
|
||||
aParticleChange.SetEnergyChange(0.) ;
|
||||
aParticleChange.SetStatusChange(fStopAndKill);
|
||||
if (aParticleType->GetProcessManager()->GetAtRestProcessVector()->size())
|
||||
//In this case there is at least one AtRest process
|
||||
{
|
||||
aParticleChange.SetStatusChange(fStopButAlive);
|
||||
}
|
||||
else
|
||||
{
|
||||
aParticleChange.SetStatusChange(fStopAndKill);
|
||||
}
|
||||
}
|
||||
|
||||
//Generate the delta day
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
//
|
||||
//
|
||||
// File name: G4PhotoElectricAngularGenerator462
|
||||
//
|
||||
// Author: Andreia Trindade (andreia@lip.pt)
|
||||
//
|
||||
// Creation date: 10 May 2004
|
||||
//
|
||||
// Modifications:
|
||||
// 10 May 2003 A. Trindade First implementation acording with new design
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Concrete class for PhotoElectric Electron Angular Distribution Generation - ( < 4.6.2 model)
|
||||
//
|
||||
// Class Description: End
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
||||
#include "G4PhotoElectricAngularGenerator462.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
//
|
||||
|
||||
G4PhotoElectricAngularGenerator462::G4PhotoElectricAngularGenerator462(const G4String& name):G4VPhotoElectricAngularDistribution(name)
|
||||
{;}
|
||||
|
||||
//
|
||||
|
||||
G4PhotoElectricAngularGenerator462::~G4PhotoElectricAngularGenerator462()
|
||||
{;}
|
||||
|
||||
//
|
||||
|
||||
G4ThreeVector G4PhotoElectricAngularGenerator462::GetPhotoElectronDirection(G4ThreeVector direction, G4double)
|
||||
{
|
||||
return direction;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
void G4PhotoElectricAngularGenerator462::PrintGeneratorInformation() const
|
||||
{
|
||||
G4cout << "\n" << G4endl;
|
||||
G4cout << "Simple Photoelectric Angular Generator" << G4endl;
|
||||
G4cout << "Photoelectron is emmited with the same direction " << G4endl;
|
||||
G4cout << "than the incident photon (see Physics Reference Manual) \n" << G4endl;
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
//
|
||||
//
|
||||
// File name: G4PhotoElectricAngularGeneratorStandard
|
||||
//
|
||||
// Creation date: 10 May 2004
|
||||
//
|
||||
// Modifications:
|
||||
// 10 May 2003 P. Rodrigues First implementation acording with new design
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Concrete class for PhotoElectric Electron Angular Distribution Generation
|
||||
// This model is a re-implementation of the Photolectric angular distribution
|
||||
// developed my M. Maire for the Standard EM Physics G4PhotoElectricEffect
|
||||
//
|
||||
// Class Description: End
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
||||
#include "G4PhotoElectricAngularGeneratorStandard.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
//
|
||||
|
||||
G4PhotoElectricAngularGeneratorStandard::G4PhotoElectricAngularGeneratorStandard(const G4String& name):G4VPhotoElectricAngularDistribution(name)
|
||||
{;}
|
||||
|
||||
//
|
||||
|
||||
G4PhotoElectricAngularGeneratorStandard::~G4PhotoElectricAngularGeneratorStandard()
|
||||
{;}
|
||||
|
||||
//
|
||||
|
||||
G4ThreeVector G4PhotoElectricAngularGeneratorStandard::GetPhotoElectronDirection(G4ThreeVector direction, G4double eKineticEnergy)
|
||||
{
|
||||
|
||||
// Compute Theta distribution of the emitted electron, with respect to the
|
||||
// incident Gamma.
|
||||
// The Sauter-Gavrila distribution for the K-shell is used. (adapted from G4PhotoElectricEffect)
|
||||
|
||||
G4double costeta = 1.;
|
||||
G4double Phi = twopi * G4UniformRand();
|
||||
G4double cosphi = cos(Phi);
|
||||
G4double sinphi = sin(Phi);
|
||||
G4double sinteta = 0;
|
||||
G4double gamma = 1. + eKineticEnergy/electron_mass_c2;
|
||||
|
||||
if (gamma > 5.) {
|
||||
G4ThreeVector direction (sinteta*cosphi, sinteta*sinphi, costeta);
|
||||
return costeta;
|
||||
}
|
||||
|
||||
G4double beta = sqrt(gamma*gamma-1.)/gamma;
|
||||
G4double b = 0.5*gamma*(gamma-1.)*(gamma-2);
|
||||
|
||||
G4double rndm,term,greject,grejsup;
|
||||
if (gamma < 2.) grejsup = gamma*gamma*(1.+b-beta*b);
|
||||
else grejsup = gamma*gamma*(1.+b+beta*b);
|
||||
|
||||
do { rndm = 1.-2*G4UniformRand();
|
||||
costeta = (rndm+beta)/(rndm*beta+1.);
|
||||
term = 1.-beta*costeta;
|
||||
greject = (1.-costeta*costeta)*(1.+b*term)/(term*term);
|
||||
} while(greject < G4UniformRand()*grejsup);
|
||||
|
||||
|
||||
sinteta = sqrt(1.-costeta*costeta);
|
||||
G4ThreeVector photoelectrondirection (sinteta*cosphi, sinteta*sinphi, costeta);
|
||||
photoelectrondirection.rotateUz(direction);
|
||||
return photoelectrondirection;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
void G4PhotoElectricAngularGeneratorStandard::PrintGeneratorInformation() const
|
||||
{
|
||||
G4cout << "\n" << G4endl;
|
||||
G4cout << "" << G4endl;
|
||||
G4cout << "Re-implementation of the photolectric angular distribution" << G4endl;
|
||||
G4cout << "developed my M. Maire for the Standard EM Physics G4PhotoElectricEffect" << G4endl;
|
||||
G4cout << "It computes the theta distribution of the emitted electron, with respect to the" << G4endl;
|
||||
G4cout << "incident Gamma, using the Sauter-Gavrila distribution for the K-shell\n" << G4endl;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
//
|
||||
//
|
||||
// File name: G4VPhotoElectricAngularDistribution
|
||||
//
|
||||
// Author: Andreia Trindade (andreia@lip.pt)
|
||||
// Pedro Rodrigues (psilva@lip.pt)
|
||||
//
|
||||
// Creation date: 10 May 2004
|
||||
//
|
||||
// Modifications:
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Abstract base class for PhotoElectricsstrahlung Angular Distribution Generation
|
||||
//
|
||||
// Class Description: End
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
||||
#include "G4VPhotoElectricAngularDistribution.hh"
|
||||
|
||||
//
|
||||
|
||||
G4VPhotoElectricAngularDistribution::G4VPhotoElectricAngularDistribution(const G4String& ) // name
|
||||
{;}
|
||||
|
||||
//
|
||||
|
||||
G4VPhotoElectricAngularDistribution::~G4VPhotoElectricAngularDistribution()
|
||||
{;}
|
||||
|
||||
void G4VPhotoElectricAngularDistribution::PrintGeneratorInformation() const
|
||||
{;}
|
||||
|
||||
//
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4eLowEnergyLoss.cc,v 1.31 2003/06/16 17:00:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4eLowEnergyLoss.cc,v 1.32 2004/06/01 14:03:55 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// -----------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -58,6 +58,7 @@
|
||||
// 03/06/02 MGP - Restore fStopAndKill
|
||||
// 28/10/02 VI Optimal binning for dE/dx
|
||||
// 21/01/03 VI cut per region
|
||||
// 01/06/04 VI check if stopped particle has AtRest processes
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -451,7 +452,8 @@ G4VParticleChange* G4eLowEnergyLoss::AlongStepDoIt( const G4Track& trackData,
|
||||
if (finalT <= 0. )
|
||||
{
|
||||
finalT = 0.;
|
||||
aParticleChange.SetStatusChange(fStopAndKill);
|
||||
if(Charge > 0.0) aParticleChange.SetStatusChange(fStopButAlive);
|
||||
else aParticleChange.SetStatusChange(fStopAndKill);
|
||||
}
|
||||
|
||||
G4double edep = E - finalT;
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
// 12 Apr 2003 V.Ivanchenko Cut per region for fluo AlongStep
|
||||
// 18 Apr 2003 V.Ivanchenko finalRange redefinition
|
||||
// 26 Apr 2003 V.Ivanchenko fix for stepLimit
|
||||
// 28 May 2004 V.Ivanchenko fix for ionisation of antiprotons in complex materials
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
@@ -932,7 +933,7 @@ G4VParticleChange* G4hLowEnergyIonisation::AlongStepDoIt(
|
||||
}
|
||||
|
||||
// stop particle if the kinetic energy <= MinKineticEnergy
|
||||
if (finalT <= MinKineticEnergy ) {
|
||||
if (finalT*massRatio <= MinKineticEnergy ) {
|
||||
|
||||
finalT = 0.0;
|
||||
if(!particle->GetDefinition()->GetProcessManager()->
|
||||
@@ -1060,14 +1061,15 @@ G4double G4hLowEnergyIonisation::AntiProtonParametrisedDEDX(
|
||||
// The proton model is used + Barkas correction
|
||||
} else {
|
||||
if(kineticEnergy < protonLowEnergy) {
|
||||
eloss = theProtonModel->TheValue(G4Proton::Proton(),material,protonLowEnergy);
|
||||
eloss = theProtonModel->TheValue(G4Proton::Proton(),material,protonLowEnergy)
|
||||
* sqrt(kineticEnergy/protonLowEnergy) ;
|
||||
|
||||
// Parametrisation
|
||||
} else {
|
||||
eloss = theProtonModel->TheValue(G4Proton::Proton(),material,
|
||||
kineticEnergy);
|
||||
}
|
||||
if(theBarkas) eloss -= 2.0*BarkasTerm(material, kineticEnergy);
|
||||
//if(theBarkas) eloss -= 2.0*BarkasTerm(material, kineticEnergy);
|
||||
}
|
||||
|
||||
// Delta rays energy
|
||||
|
||||
@@ -51,6 +51,16 @@ G4hShellCrossSection::~G4hShellCrossSection()
|
||||
{ }
|
||||
|
||||
|
||||
std::vector<G4double> G4hShellCrossSection::GetCrossSection(G4int Z,
|
||||
G4double incidentEnergy,
|
||||
G4double mass,
|
||||
G4double deltaEnergy,
|
||||
G4bool) const
|
||||
{
|
||||
return Probabilities(Z,incidentEnergy,mass,deltaEnergy);
|
||||
}
|
||||
|
||||
|
||||
std::vector<G4double> G4hShellCrossSection::Probabilities(
|
||||
G4int Z,
|
||||
G4double incidentEnergy,
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
//
|
||||
//
|
||||
// File name: G4hShellCrossSectionExp.cc
|
||||
//
|
||||
// Author: Simona Saliceti (simona.saliceti@ge.infn.it)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// From 23 Oct 2001 A. Mantero G4hShellCrossSection
|
||||
// 30/03/2004 Simona Saliceti 1st implementation
|
||||
// -------------------------------------------------------------------
|
||||
// Class Description:
|
||||
// Empiric Model for shell cross sections in proton ionisation
|
||||
// -------------------------------------------------------------------
|
||||
// $Id: G4hShellCrossSectionExp.cc,v 1.2 2004/06/07 07:42:45 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
|
||||
#include "globals.hh"
|
||||
#include <vector>
|
||||
#include "G4hShellCrossSectionExp.hh"
|
||||
#include "G4AtomicTransitionManager.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4hShellCrossSectionExpData.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
G4hShellCrossSectionExp::G4hShellCrossSectionExp()
|
||||
{
|
||||
kShellData = new G4hShellCrossSectionExpData();
|
||||
}
|
||||
|
||||
G4hShellCrossSectionExp::~G4hShellCrossSectionExp()
|
||||
{ }
|
||||
|
||||
std::vector<G4double> G4hShellCrossSectionExp::GetCrossSection(G4int Z,
|
||||
G4double incidentEnergy,
|
||||
G4double mass,
|
||||
G4double deltaEnergy,
|
||||
G4bool testFlag) const
|
||||
{
|
||||
mass = 0.0;
|
||||
deltaEnergy = 0.0;
|
||||
|
||||
std::vector<G4double> aCrossSection;
|
||||
|
||||
// Fill the vector of cross sections with the value just calculated
|
||||
aCrossSection.push_back(GetCrossSectionExp(Z,incidentEnergy));
|
||||
|
||||
if (testFlag)
|
||||
{
|
||||
G4cout <<"Element: " <<Z<<" Particle Energy: "<<incidentEnergy/MeV<<" MeV" <<G4endl;
|
||||
G4cout <<"Cross Section: "<<aCrossSection[0]/barn<<" barns"<< G4endl;
|
||||
}
|
||||
return aCrossSection;
|
||||
}
|
||||
|
||||
//This function calculated the cross section with the Empiric model
|
||||
G4double G4hShellCrossSectionExp::GetCrossSectionExp(G4int Z,
|
||||
G4double incidentEnergy) const
|
||||
{
|
||||
// Vector that stores the calculated cross-sections for each shell:
|
||||
G4double crossSectionsInBarn = 0.0;
|
||||
G4double crossSections = 0.0;
|
||||
|
||||
std::vector<G4double>* parVec = kShellData->GetParam(Z);
|
||||
std::vector<G4double>::iterator i = (*parVec).begin();
|
||||
|
||||
G4double a = *i;
|
||||
G4double b = *(i+1);
|
||||
G4double c = *(i+2);
|
||||
|
||||
G4double incidentEnergyInMeV = incidentEnergy/MeV;
|
||||
|
||||
if(Z<26 && Z>=6 && Z!=17)
|
||||
{
|
||||
crossSectionsInBarn = a*(pow(b,(1./incidentEnergyInMeV)))*(pow(incidentEnergyInMeV,c));
|
||||
}
|
||||
else if(Z<66 && Z>=26 || Z==17)
|
||||
{
|
||||
crossSectionsInBarn = exp(a+(b/incidentEnergyInMeV)+(c*log(incidentEnergyInMeV)));
|
||||
}
|
||||
else if(Z<=92 && Z>=66)
|
||||
{
|
||||
crossSectionsInBarn = (pow(incidentEnergyInMeV,a))*exp(b-(c*incidentEnergyInMeV));
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << "Error: there is not that Z" << G4endl;
|
||||
}
|
||||
|
||||
crossSections = crossSectionsInBarn*barn;
|
||||
return crossSections;
|
||||
}
|
||||
|
||||
// This function gives the atomic cross section of k shell only
|
||||
void G4hShellCrossSectionExp::SetTotalCS(G4double value)
|
||||
{
|
||||
atomTotalCrossSection = value;
|
||||
}
|
||||
|
||||
//A new implementation of Probability to calculate the cross section probability for k shell only
|
||||
std::vector<G4double> G4hShellCrossSectionExp::Probabilities(
|
||||
G4int Z,
|
||||
G4double incidentEnergy,
|
||||
G4double hMass,
|
||||
G4double deltaEnergy
|
||||
) const
|
||||
{
|
||||
hMass = 0.0;
|
||||
deltaEnergy = 0.0;
|
||||
|
||||
std::vector<G4double> kProbability;
|
||||
kProbability.push_back(GetCrossSectionExp(Z,incidentEnergy)/atomTotalCrossSection);
|
||||
kProbability.push_back(1 - kProbability[1]);
|
||||
|
||||
return kProbability;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,251 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// Author: Simona Saliceti (simona.saliceti@ge.infn.it)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 22 Apr 2004 First committed to cvs
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// $Id: G4hShellCrossSectionExpData.cc,v 1.1 2004/04/27 09:45:49 saliceti Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
|
||||
#include "G4hShellCrossSectionExpData.hh"
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
G4hShellCrossSectionExpData::G4hShellCrossSectionExpData()
|
||||
{
|
||||
|
||||
|
||||
FillVectorValues();
|
||||
|
||||
FillParameterMap();
|
||||
|
||||
}
|
||||
|
||||
G4hShellCrossSectionExpData::~G4hShellCrossSectionExpData()
|
||||
{
|
||||
std::map< G4int,std::vector<G4double>*,std::less<G4int> >::iterator pos;
|
||||
for (pos = parameterMap.begin(); pos != parameterMap.end(); ++pos)
|
||||
{
|
||||
std::vector<G4double>* dataSet = (*pos).second;
|
||||
delete dataSet;
|
||||
}
|
||||
}
|
||||
|
||||
inline void G4hShellCrossSectionExpData::InitializeVector(std::vector<G4double> &vect, G4double value1, G4double value2, G4double value3) const
|
||||
{
|
||||
vect.push_back(value1);
|
||||
vect.push_back(value2);
|
||||
vect.push_back(value3);
|
||||
}
|
||||
|
||||
void G4hShellCrossSectionExpData::FillVectorValues()
|
||||
{
|
||||
InitializeVector(parameter6C, 25965819., 0.1974268719, -0.9746342);
|
||||
InitializeVector(parameter7N, 14254204., 0.09584816998, -0.8908825);
|
||||
InitializeVector(parameter8O, 14257000., 0.9582500E-01, -0.8909900);
|
||||
InitializeVector(parameter9F, 5628098., 0.2221402E-01, -0.7857742);
|
||||
InitializeVector(parameter10Ne, 3866500., 0.9298651E-02, -0.7569925);
|
||||
InitializeVector(parameter11Na, 2816614., 0.3161790E-02, -0.7429561);
|
||||
InitializeVector(parameter12Mg, 2113709., 0.9267687E-03, -0.7342144);
|
||||
InitializeVector(parameter13Al, 1647127., 0.2344573E-03, -0.7305032);
|
||||
InitializeVector(parameter14Si, 1267490., 0.5787061E-04, -0.7184879);
|
||||
InitializeVector(parameter15P, 1035792., 0.1101495E-04, -0.7199858);
|
||||
InitializeVector(parameter16S, 825871.6, 0.2326387E-05, -0.7095044);
|
||||
InitializeVector(parameter17Cl, 13.41653, -14.66877, -0.7017217);
|
||||
InitializeVector(parameter18Ar, 555038.1, 0.6543986E-07, -0.6968985);
|
||||
InitializeVector(parameter19K, 469063.8, 0.8876799E-08, -0.6940991);
|
||||
InitializeVector(parameter20Ca, 405918.4, 0.9881247E-09, -0.6953619);
|
||||
InitializeVector(parameter21Sc, 351611.0, 0.1054022E-09, -0.6950487);
|
||||
InitializeVector(parameter22Ti, 313223.2, 0.8541349E-11, -0.6984913);
|
||||
InitializeVector(parameter23V, 257752.3, 0.1092866E-11, -0.6841001);
|
||||
InitializeVector(parameter24Cr, 230064.8, 0.7874358E-13, -0.6862135);
|
||||
InitializeVector(parameter25Mn, 151740.8, 0.7988999E-13, -0.6279536);
|
||||
InitializeVector(parameter26Fe, 12.21083, -35.54018, -0.7140945);
|
||||
InitializeVector(parameter27Co, 12.14600, -38.73178, -0.7229655);
|
||||
InitializeVector(parameter28Ni, 12.10570, -42.25900, -0.7354265);
|
||||
InitializeVector(parameter29Cu, 11.87911, -44.37304, -0.7089269);
|
||||
InitializeVector(parameter30Zn, 11.86411, -48.35208, -0.7252861);
|
||||
InitializeVector(parameter31Ga, 11.66042, -50.73798, -0.7029260);
|
||||
InitializeVector(parameter32Ge, 11.66824, -55.26208, -0.7218891);
|
||||
InitializeVector(parameter33As, 11.47804, -57.94218, -0.7016547);
|
||||
InitializeVector(parameter34Se, 11.30017, -60.70304, -0.6836499);
|
||||
InitializeVector(parameter35Br, 11.32571, -65.77174, -0.7042627);
|
||||
InitializeVector(parameter36Kr, 10.44025, -61.74093, -0.5383769);
|
||||
InitializeVector(parameter37Rb, 10.27499, -64.44025, -0.5236434);
|
||||
InitializeVector(parameter38Sr, 10.31786, -69.83844, -0.5475903);
|
||||
InitializeVector(parameter39Y, 10.14157, -72.55550, -0.5302060);
|
||||
InitializeVector(parameter40Zr, 10.03310, -76.52999, -0.5243382);
|
||||
InitializeVector(parameter41Nb, 10.03804, -81.38335, -0.5404782);
|
||||
InitializeVector(parameter42Mo, 9.872166, -84.24110, -0.5245091);
|
||||
InitializeVector(parameter43Tc, 9.941685, -90.72401, -0.5503877);
|
||||
InitializeVector(parameter44Ru, 9.771618, -93.50847, -0.5334178);
|
||||
InitializeVector(parameter45Rh, 9.819192, -99.99145, -0.5543751);
|
||||
InitializeVector(parameter46Pd, 9.680034, -103.5450, -0.5387755);
|
||||
InitializeVector(parameter47Ag, 9.703977, -109.8104, -0.5550457);
|
||||
InitializeVector(parameter48Cd, 9.548004, -113.0565, -0.5399088);
|
||||
InitializeVector(parameter49In, 9.378392, -115.8466, -0.5226109);
|
||||
InitializeVector(parameter50Sn, 9.406608, -122.6137, -0.5386317);
|
||||
InitializeVector(parameter51Sb, 9.254029, -125.8533, -0.5238908);
|
||||
InitializeVector(parameter52Te, 9.311451, -133.6049, -0.5440237);
|
||||
InitializeVector(parameter53I, 9.158569, -136.7913, -0.5291739);
|
||||
InitializeVector(parameter54Xe, 9.011420, -140.1908, -0.5150210);
|
||||
InitializeVector(parameter55Cs, 9.112158, -149.6160, -0.5411919);
|
||||
InitializeVector(parameter56Ba, 7.696734, -124.4350, -0.3181673);
|
||||
InitializeVector(parameter57La, 7.728227, -130.9067, -0.3348193);
|
||||
InitializeVector(parameter58Ce, 7.595518, -134.1356, -0.3233585);
|
||||
InitializeVector(parameter59Pr, 7.451400, -136.9318, -0.3102762);
|
||||
InitializeVector(parameter60Nd, 7.493138, -144.0968, -0.3273972);
|
||||
InitializeVector(parameter61Pm, 7.358854, -147.1354, -0.3155824);
|
||||
InitializeVector(parameter62Sm, 7.231769, -150.3722, -0.3048225);
|
||||
InitializeVector(parameter63Eu, 7.060385, -152.3517, -0.2873322);
|
||||
InitializeVector(parameter64Gd, 7.179881, -161.9544, -0.3162093);
|
||||
InitializeVector(parameter65Tb, 7.048202, -164.9670, -0.3046019);
|
||||
InitializeVector(parameter66Dy, 1.962871, -4.620275, 0.5748519E-02);
|
||||
InitializeVector(parameter67Ho, 1.992797, -4.863559, 0.5772170E-02);
|
||||
InitializeVector(parameter68Er, 2.013621, -5.068997, 0.5749294E-02);
|
||||
InitializeVector(parameter69Tm, 2.026489, -5.243042, 0.5671808E-02);
|
||||
InitializeVector(parameter70Yb, 1.946252, -5.047087, 0.5011610E-02);
|
||||
InitializeVector(parameter71Lu, 1.968246, -5.253083, 0.5007004E-02);
|
||||
InitializeVector(parameter72Hf, 1.980888, -5.421401, 0.4949681E-02);
|
||||
InitializeVector(parameter73Ta, 1.925043, -5.310529, 0.4504530E-02);
|
||||
InitializeVector(parameter74W, 1.939689, -5.484359, 0.4464923E-02);
|
||||
InitializeVector(parameter75Re, 1.951746, -5.645718, 0.4415765E-02);
|
||||
InitializeVector(parameter76Os, 2.249802, -6.974045, 0.5965646E-02);
|
||||
InitializeVector(parameter77Ir, 2.257475, -7.121614, 0.5873831E-02);
|
||||
InitializeVector(parameter78Pt, 2.262231, -7.255240, 0.5769194E-02);
|
||||
InitializeVector(parameter79Au, 2.188981, -7.080360, 0.5161316E-02);
|
||||
InitializeVector(parameter80Hg, 2.199681, -7.233214, 0.5111361E-02);
|
||||
InitializeVector(parameter81Tl, 2.211119, -7.389515, 0.5064001E-02);
|
||||
InitializeVector(parameter82Pb, 2.204573, -7.468263, 0.4934075E-02);
|
||||
InitializeVector(parameter83Bi, 2.148083, -7.348053, 0.4494417E-02);
|
||||
InitializeVector(parameter84Po, 2.154512, -7.479838, 0.4433237E-02);
|
||||
InitializeVector(parameter85At, 2.164621, -7.626572, 0.4388465E-02);
|
||||
InitializeVector(parameter86Rn, 2.288465, -8.212229, 0.5807703E-02);
|
||||
InitializeVector(parameter87Fr, 2.294291, -8.336506, 0.5753172E-02);
|
||||
InitializeVector(parameter88Ra, 2.318430, -8.525764, 0.5849121E-02);
|
||||
InitializeVector(parameter89Ac, 2.306637, -8.578354, 0.5672658E-02);
|
||||
InitializeVector(parameter90Th, 2.254484, -8.479531, 0.5163647E-02);
|
||||
InitializeVector(parameter91Pa, 2.246310, -8.540535, 0.5044748E-02);
|
||||
InitializeVector(parameter92U, 2.276106, -8.748476, 0.5186345E-02);
|
||||
}
|
||||
|
||||
void G4hShellCrossSectionExpData::FillParameterMap()
|
||||
{
|
||||
parameterMap [6] = ¶meter6C ;
|
||||
parameterMap [7] = ¶meter7N ;
|
||||
parameterMap [8] = ¶meter8O ;
|
||||
parameterMap [9] = ¶meter9F ;
|
||||
parameterMap [10] = ¶meter10Ne;
|
||||
parameterMap [11] = ¶meter11Na;
|
||||
parameterMap [12] = ¶meter12Mg;
|
||||
parameterMap [13] = ¶meter13Al;
|
||||
parameterMap [14] = ¶meter14Si;
|
||||
parameterMap [15] = ¶meter15P ;
|
||||
parameterMap [16] = ¶meter16S ;
|
||||
parameterMap [17] = ¶meter17Cl;
|
||||
parameterMap [18] = ¶meter18Ar;
|
||||
parameterMap [19] = ¶meter19K ;
|
||||
parameterMap [20] = ¶meter20Ca;
|
||||
parameterMap [21] = ¶meter21Sc;
|
||||
parameterMap [22] = ¶meter22Ti;
|
||||
parameterMap [23] = ¶meter23V ;
|
||||
parameterMap [24] = ¶meter24Cr;
|
||||
parameterMap [25] = ¶meter25Mn;
|
||||
parameterMap [26] = ¶meter26Fe;
|
||||
parameterMap [27] = ¶meter27Co;
|
||||
parameterMap [28] = ¶meter28Ni;
|
||||
parameterMap [29] = ¶meter29Cu;
|
||||
parameterMap [30] = ¶meter30Zn;
|
||||
parameterMap [31] = ¶meter31Ga;
|
||||
parameterMap [32] = ¶meter32Ge;
|
||||
parameterMap [33] = ¶meter33As;
|
||||
parameterMap [34] = ¶meter34Se;
|
||||
parameterMap [35] = ¶meter35Br;
|
||||
parameterMap [36] = ¶meter36Kr;
|
||||
parameterMap [37] = ¶meter37Rb;
|
||||
parameterMap [38] = ¶meter38Sr;
|
||||
parameterMap [39] = ¶meter39Y ;
|
||||
parameterMap [40] = ¶meter40Zr;
|
||||
parameterMap [41] = ¶meter41Nb;
|
||||
parameterMap [42] = ¶meter42Mo;
|
||||
parameterMap [43] = ¶meter43Tc;
|
||||
parameterMap [44] = ¶meter44Ru;
|
||||
parameterMap [45] = ¶meter45Rh;
|
||||
parameterMap [46] = ¶meter46Pd;
|
||||
parameterMap [47] = ¶meter47Ag;
|
||||
parameterMap [48] = ¶meter48Cd;
|
||||
parameterMap [49] = ¶meter49In;
|
||||
parameterMap [50] = ¶meter50Sn;
|
||||
parameterMap [51] = ¶meter51Sb;
|
||||
parameterMap [52] = ¶meter52Te;
|
||||
parameterMap [53] = ¶meter53I ;
|
||||
parameterMap [54] = ¶meter54Xe;
|
||||
parameterMap [55] = ¶meter55Cs;
|
||||
parameterMap [56] = ¶meter56Ba;
|
||||
parameterMap [57] = ¶meter57La;
|
||||
parameterMap [58] = ¶meter58Ce;
|
||||
parameterMap [59] = ¶meter59Pr;
|
||||
parameterMap [60] = ¶meter60Nd;
|
||||
parameterMap [61] = ¶meter61Pm;
|
||||
parameterMap [62] = ¶meter62Sm;
|
||||
parameterMap [63] = ¶meter63Eu;
|
||||
parameterMap [64] = ¶meter64Gd;
|
||||
parameterMap [65] = ¶meter65Tb;
|
||||
parameterMap [66] = ¶meter66Dy;
|
||||
parameterMap [67] = ¶meter67Ho;
|
||||
parameterMap [68] = ¶meter68Er;
|
||||
parameterMap [69] = ¶meter69Tm;
|
||||
parameterMap [70] = ¶meter70Yb;
|
||||
parameterMap [71] = ¶meter71Lu;
|
||||
parameterMap [72] = ¶meter72Hf;
|
||||
parameterMap [73] = ¶meter73Ta;
|
||||
parameterMap [74] = ¶meter74W ;
|
||||
parameterMap [75] = ¶meter75Re;
|
||||
parameterMap [76] = ¶meter76Os;
|
||||
parameterMap [77] = ¶meter77Ir;
|
||||
parameterMap [78] = ¶meter78Pt;
|
||||
parameterMap [79] = ¶meter79Au;
|
||||
parameterMap [80] = ¶meter80Hg;
|
||||
parameterMap [81] = ¶meter81Tl;
|
||||
parameterMap [82] = ¶meter82Pb;
|
||||
parameterMap [83] = ¶meter83Bi;
|
||||
parameterMap [84] = ¶meter84Po;
|
||||
parameterMap [85] = ¶meter85At;
|
||||
parameterMap [86] = ¶meter86Rn;
|
||||
parameterMap [87] = ¶meter87Fr;
|
||||
parameterMap [88] = ¶meter88Ra;
|
||||
parameterMap [89] = ¶meter89Ac;
|
||||
parameterMap [90] = ¶meter90Th;
|
||||
parameterMap [91] = ¶meter91Pa;
|
||||
parameterMap [92] = ¶meter92U ;
|
||||
}
|
||||
|
||||
std::vector<G4double>* G4hShellCrossSectionExpData::GetParam(G4int Z)
|
||||
{
|
||||
return parameterMap[Z];
|
||||
}
|
||||
Reference in New Issue
Block a user