Import Geant4 9.4.0 source tree
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4materials
|
||||
# Package: Geant4.src.G4materials
|
||||
#
|
||||
# CMakeLists.txt for single level library that may be build global or granular
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:46:27 bmorgan Exp $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
include(Geant4MacroLibraryTargets)
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
else()
|
||||
GEANT4_GLOBAL_LIBRARY_TARGET(COMPONENTS sources.cmake)
|
||||
endif()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.168 2009/12/03 11:09:47 vnivanch Exp $
|
||||
$Id: History,v 1.190 2010/11/23 17:35:54 vnivanch Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,8 +17,76 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
23-11-10 V.Ivanchenko (materials-V09-03-14)
|
||||
- G4SandiaTable - V.Grichine Bug fix in G4_Ar
|
||||
|
||||
12-11-10 V.Ivanchenko (materials-V09-03-13)
|
||||
12-11-10 V.Grichine Bug fix in G4SandiaTable::SandiaMixing adding
|
||||
fVerbose and pedantic variable initialisation
|
||||
|
||||
05-11-10 V.Ivanchenko (materials-V09-03-12)
|
||||
- Removed obsolete unused data classes G4IronStoppingICRU73,
|
||||
G4MaterialStoppingICRU73, G4SimpleMaterialStoppingICRU73,
|
||||
data are uploaded from G4LEDATA
|
||||
|
||||
04-11-10 V.Ivanchenko (materials-V09-03-11)
|
||||
- G4NistMaterialBuilder - added few DNA materials
|
||||
|
||||
01-11-10 V.Ivanchenko (materials-V09-03-10)
|
||||
- G4NistManager - use G4Pow for fast computations
|
||||
- Fixed problems highlighted by the Coverity tool
|
||||
|
||||
26-10-10 V.Ivanchenko (materials-V09-03-09)
|
||||
- G4NistMaterialBuilder - added BioChemicalMaterials and corresponding
|
||||
access methods
|
||||
|
||||
25-10-10 V.Ivanchenko (materials-V09-03-08)
|
||||
- Fixed problems highlighted by the Coverity tool, mainly proper
|
||||
initialisation
|
||||
|
||||
20-05-10 V.Ivanchenko (materials-V09-03-07)
|
||||
- G4NistMaterialBuilder - added G4_LUCITE
|
||||
|
||||
15-05-10 V.Ivanchenko (materials-V09-03-06)
|
||||
- G4DensityEffectData - fixed method GetIndex(Z, state) for Hydrogen
|
||||
and solid states, rename it to GetElementIndex
|
||||
- G4IonisParamMat - fixed typo in the method GetInvA23, use GetElementIndex
|
||||
|
||||
10-05-10 V.Ivanchenko (materials-V09-03-05)
|
||||
- G4IonisParamMat - added member and method GetInvA23
|
||||
|
||||
30-04-10 V.Ivanchenko (materials-V09-03-04)
|
||||
- G4AtomicShells - improved performance by adding an array of indexes
|
||||
- G4Element - moved include of G4AtomicShells header to the source file
|
||||
|
||||
29-04-10 V.Ivanchenko (materials-V09-03-03)
|
||||
- G4NistMaterialBuilder, G4NistManager - added method GetMeanIonisationEnergy
|
||||
- G4IonisParamElm - use mean excitation energy from NIST DB; this modification
|
||||
addressing a problem reported by Wolfgang Lukas for
|
||||
mean energy deposition in compound materials
|
||||
|
||||
23-04-10 V.Ivanchenko (materials-V09-03-02)
|
||||
- G4NistMaterialBuilder - added 6 new materials : G4_BRASS, G4_BRONZE,
|
||||
G4_STAINLESS-STEEL, G4_KEVLAR, G4_DACRON, G4_NEOPRENE
|
||||
- G4IonisParamMat, G4DensityEffectData - added a possibility to access
|
||||
density effect data in the case when pure material is not
|
||||
defined via NIST; atom number and state of such materials
|
||||
are checked.
|
||||
|
||||
22-04-10 P.Gumplinger (materials-V09-03-01) - thanks to Ivana Hrivnacova
|
||||
- G4MaterialPropertyVector.cc: 21% speed up of code by removing new/delete
|
||||
of temporary helper object and modifying GetAdjacentBins to allow for a
|
||||
value to match a bin exactly, thus avoiding a whole extra loop.
|
||||
G4OpticalSurface.hh: change the return of GetAngularDistributionValue
|
||||
no longer dereferencing a pointer but return the value at the
|
||||
array index.
|
||||
|
||||
07-01-10 G.Cosmo (materials-V09-03-00)
|
||||
- G4OpticalSurface - removed left-over debug test function OverWrite() from
|
||||
header.
|
||||
|
||||
03-12-09 V.Ivanchenko (materials-V09-02-24)
|
||||
- G4NIstMessenger - fixed minor memory leak at destruction
|
||||
- G4NistMessenger - fixed minor memory leak at destruction
|
||||
|
||||
01-12-09 G.Cosmo (materials-V09-02-23)
|
||||
- Use G4double in place of G4float in G4DensityEffectData.
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AtomicShells.hh,v 1.7 2006/10/17 15:15:46 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AtomicShells.hh,v 1.8 2010/04/30 13:09:22 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04-beta-01 $
|
||||
|
||||
// class description
|
||||
//
|
||||
@@ -46,6 +46,7 @@
|
||||
// 24-04-98, implementation of the first version, V. Grichine
|
||||
// 16-11-98, GetBindingEnergy(Z,ShellNb), M.Maire
|
||||
// 11-02-05, GetNumberOfElectrons(Z,ShellNb), V.Ivanchenko
|
||||
// 30-04-10, added fIndexOfShells, V.Ivanchenko
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -70,6 +71,7 @@ static G4double GetBindingEnergy (G4int Z, G4int SubshellNb);
|
||||
private :
|
||||
|
||||
static const G4int fNumberOfShells[101];
|
||||
static const G4int fIndexOfShells[101];
|
||||
static const G4int fNumberOfElectrons[1540];
|
||||
static const G4double fBindingEnergies[1540];
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DensityEffectData.hh,v 1.7 2009/12/01 08:24:21 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4DensityEffectData.hh,v 1.10 2010/05/15 15:37:33 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04-beta-01 $
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -50,6 +50,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Material.hh"
|
||||
#include <vector>
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -67,7 +68,7 @@ public:
|
||||
~G4DensityEffectData();
|
||||
|
||||
// return index by Z, -1 if material is not in the table
|
||||
G4int GetIndex(const G4int Z);
|
||||
G4int GetElementIndex(G4int Z, G4State mState);
|
||||
|
||||
// return index by material name, -1 if material is not in the table
|
||||
G4int GetIndex(const G4String& matName);
|
||||
@@ -101,7 +102,10 @@ private:
|
||||
|
||||
G4double data[NDENSDATA][NDENSARRAY];
|
||||
std::vector<G4String> names;
|
||||
|
||||
// indexes defined only for pure materials
|
||||
G4int indexZ[NDENSELEM];
|
||||
G4State state[NDENSELEM];
|
||||
|
||||
G4int index;
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Element.hh,v 1.27 2009/09/19 14:13:03 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4Element.hh,v 1.28 2010/04/30 13:19:26 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04-beta-01 $
|
||||
//
|
||||
|
||||
// class description
|
||||
@@ -80,7 +80,6 @@
|
||||
#include <vector>
|
||||
#include "G4ios.hh"
|
||||
#include "G4Isotope.hh"
|
||||
#include "G4AtomicShells.hh"
|
||||
#include "G4IonisParamElm.hh"
|
||||
#include "G4IsotopeVector.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ExtDEDXTable.hh,v 1.3 2010/10/25 08:35:26 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// ===========================================================================
|
||||
// GEANT4 class header file
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IonStoppingData.hh,v 1.2 2010/10/25 08:41:39 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// ===========================================================================
|
||||
// GEANT4 class header file
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IonisParamMat.hh,v 1.17 2009/11/18 17:42:23 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4IonisParamMat.hh,v 1.18 2010/05/10 10:44:39 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04-beta-01 $
|
||||
//
|
||||
|
||||
// class description
|
||||
@@ -103,6 +103,7 @@ public:
|
||||
G4double GetZeffective() const {return fZeff;};
|
||||
G4double GetFermiEnergy() const {return fFermiEnergy;};
|
||||
G4double GetLFactor() const {return fLfactor;};
|
||||
G4double GetInvA23() const {return fInvA23;};
|
||||
|
||||
// parameters for Birks attenuation:
|
||||
void SetBirksConstant(G4double value) {fBirks = value;};
|
||||
@@ -176,6 +177,7 @@ private:
|
||||
G4double fZeff;
|
||||
G4double fFermiEnergy;
|
||||
G4double fLfactor;
|
||||
G4double fInvA23;
|
||||
|
||||
// parameter for Birks attenuation
|
||||
G4double fBirks;
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4IronStoppingICRU73.hh,v 1.6 2009/11/09 16:51:07 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
|
||||
#ifndef G4IronStoppingICRU73_h
|
||||
#define G4IronStoppingICRU73_h 1
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4IronStoppingICRU73
|
||||
//
|
||||
// Description: Data on stopping powers for light ions in compounds
|
||||
//
|
||||
// Author: A.Ivantchenko 8.08.2008
|
||||
//
|
||||
// in the framework of the ESA Technology Research Programme
|
||||
// (ESA contract 21435/08/NL/AT)
|
||||
//
|
||||
// Modifications:
|
||||
// 03.11.2009 A. Lechner: Added new methods BuildPhysicsVector according
|
||||
// to interface changes in base class G4VIonDEDXTable.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Data on Stopping Powers from the ICRU73 report
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VIonDEDXTable.hh"
|
||||
#include "G4LPhysicsFreeVector.hh"
|
||||
#include <vector>
|
||||
|
||||
|
||||
class G4IronStoppingICRU73 : public G4VIonDEDXTable
|
||||
{
|
||||
public:
|
||||
|
||||
G4IronStoppingICRU73(G4bool splineFlag = true);
|
||||
|
||||
~G4IronStoppingICRU73();
|
||||
|
||||
G4bool BuildPhysicsVector(G4int ionZ,
|
||||
const G4String& matName);
|
||||
|
||||
G4bool BuildPhysicsVector(G4int ionZ,
|
||||
G4int matZ);
|
||||
|
||||
G4bool IsApplicable(G4int ionZ,
|
||||
G4int matZ);
|
||||
|
||||
G4bool IsApplicable(G4int ionZ,
|
||||
const G4String& matName);
|
||||
|
||||
G4PhysicsVector* GetPhysicsVector(G4int ionZ,
|
||||
G4int matZ);
|
||||
|
||||
G4PhysicsVector* GetPhysicsVector(G4int ionZ,
|
||||
const G4String& matName);
|
||||
|
||||
G4double GetDEDX(G4double kinEnergyPerNucleon,
|
||||
G4int ionZ,
|
||||
const G4String& matName);
|
||||
|
||||
G4double GetDEDX(G4double kinEnergyPerNucleon,
|
||||
G4int ionZ,
|
||||
G4int matZ);
|
||||
|
||||
private:
|
||||
// Function for creating a physics vector
|
||||
G4PhysicsVector* CreatePhysicsVector(G4double* energy,
|
||||
G4double* stoppower,
|
||||
G4double factor);
|
||||
|
||||
// Assignment operator and copy constructor
|
||||
G4IronStoppingICRU73 & operator=(const G4IronStoppingICRU73 &right);
|
||||
G4IronStoppingICRU73(const G4IronStoppingICRU73&);
|
||||
|
||||
// Flag indicating the use of spline interpolation for dE/dx vectors
|
||||
G4bool spline;
|
||||
|
||||
// Vectors containing the atomic numbers and names of the materials
|
||||
std::vector<G4int> atomicNumbersMat;
|
||||
std::vector<G4String> namesMat;
|
||||
|
||||
// Keys (material names) corresponding to created dE/dx vectors
|
||||
std::vector<G4String> dedxKeys;
|
||||
|
||||
// Vector of dE/dx vectors
|
||||
std::vector<G4PhysicsVector*> dedx;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Material.hh,v 1.27 2008/11/14 15:14:24 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Material.hh,v 1.28 2010/05/14 14:34:50 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04-beta-01 $
|
||||
//
|
||||
|
||||
// class description
|
||||
@@ -96,7 +96,7 @@
|
||||
#include "G4ElementVector.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
|
||||
enum G4State { kStateUndefined, kStateSolid, kStateLiquid, kStateGas };
|
||||
enum G4State { kStateUndefined = 0, kStateSolid, kStateLiquid, kStateGas };
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MaterialStoppingICRU73.hh,v 1.8 2009/11/09 16:51:07 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
|
||||
#ifndef G4MaterialStoppingICRU73_h
|
||||
#define G4MaterialStoppingICRU73_h 1
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4MaterialStoppingICRU73
|
||||
//
|
||||
// Description: Data on stopping powers for light ions in compounds
|
||||
//
|
||||
// Author: Ivantchenko 10.07.2008
|
||||
//
|
||||
// in the framework of the ESA Technology Research Programme
|
||||
// (ESA contract 21435/08/NL/AT)
|
||||
//
|
||||
// Modifications:
|
||||
// 03.11.2009 A. Lechner: Added new methods BuildPhysicsVector according
|
||||
// to interface changes in base class G4VIonDEDXTable.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Data on Stopping Powers from the ICRU73 report
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VIonDEDXTable.hh"
|
||||
#include "G4LPhysicsFreeVector.hh"
|
||||
#include <vector>
|
||||
|
||||
|
||||
class G4MaterialStoppingICRU73 : public G4VIonDEDXTable
|
||||
{
|
||||
public:
|
||||
|
||||
G4MaterialStoppingICRU73(G4bool splineFlag = true);
|
||||
|
||||
~G4MaterialStoppingICRU73();
|
||||
|
||||
G4bool BuildPhysicsVector(G4int ionZ,
|
||||
const G4String& matName);
|
||||
|
||||
G4bool BuildPhysicsVector(G4int ionZ,
|
||||
G4int matZ);
|
||||
|
||||
G4bool IsApplicable(G4int ionZ,
|
||||
const G4String& matName);
|
||||
|
||||
G4bool IsApplicable(G4int ionZ,
|
||||
G4int matZ);
|
||||
|
||||
G4PhysicsVector* GetPhysicsVector(G4int ionZ,
|
||||
const G4String& matName);
|
||||
|
||||
G4PhysicsVector* GetPhysicsVector(G4int ionZ,
|
||||
G4int matZ);
|
||||
|
||||
G4double GetDEDX(G4double kinEnergyPerNucleon,
|
||||
G4int ionZ,
|
||||
const G4String& matName);
|
||||
|
||||
G4double GetDEDX(G4double kinEnergyPerNucleon,
|
||||
G4int ionZ,
|
||||
G4int matZ);
|
||||
|
||||
private:
|
||||
// Function for creating a physics vector
|
||||
G4PhysicsVector* CreatePhysicsVector(G4double* energy,
|
||||
G4double* stoppower,
|
||||
G4double factor);
|
||||
|
||||
// Function for creating a physics vector (full range up to 1 GeV/u)
|
||||
G4PhysicsVector* CreatePhysicsVectorFullRange(G4double* energy,
|
||||
G4double* stoppower,
|
||||
G4double factor);
|
||||
|
||||
// Assignment operator and copy constructor
|
||||
G4MaterialStoppingICRU73 &
|
||||
operator=(const G4MaterialStoppingICRU73 &right);
|
||||
G4MaterialStoppingICRU73(const G4MaterialStoppingICRU73&);
|
||||
|
||||
// Flag indicating the use of spline interpolation for dE/dx vectors
|
||||
G4bool spline;
|
||||
|
||||
// Minimum and maximum atomic number
|
||||
G4int minIonAtomicNmb;
|
||||
G4int maxIonAtomicNmb;
|
||||
|
||||
// Vector containing the names of the materials
|
||||
std::vector<G4String> namesMat;
|
||||
|
||||
// Keys (ion atomic number and material names) corresponding to created
|
||||
// dE/dx vectors
|
||||
typedef std::pair<G4int, G4String> DEDXKey;
|
||||
std::vector<DEDXKey> dedxKeys;
|
||||
|
||||
// Vector of dE/dx vectors
|
||||
std::vector<G4PhysicsVector*> dedx;
|
||||
};
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NistElementBuilder.hh,v 1.18 2008/08/07 10:15:16 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NistElementBuilder.hh,v 1.19 2010/10/25 13:00:47 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
|
||||
#ifndef G4NistElementBuilder_h
|
||||
#define G4NistElementBuilder_h 1
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
|
||||
inline G4int GetMaxNumElements();
|
||||
|
||||
inline void SetVerbose (G4int);
|
||||
inline void SetVerbose(G4int);
|
||||
|
||||
private:
|
||||
|
||||
@@ -142,7 +142,6 @@ private:
|
||||
G4double sigMass [maxAbundance]; // G4 units
|
||||
G4double relAbundance [maxAbundance];
|
||||
|
||||
G4int limitNumElements; // protection
|
||||
G4int index;
|
||||
G4int verbose;
|
||||
G4bool first;
|
||||
@@ -156,7 +155,7 @@ private:
|
||||
inline G4double G4NistElementBuilder::GetA(G4int Z)
|
||||
{
|
||||
G4double a = 0.0;
|
||||
if(Z>0 && Z<maxNumElements) a = atomicMass[Z];
|
||||
if(Z>0 && Z<maxNumElements) { a = atomicMass[Z]; }
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NistManager.hh,v 1.23 2008/08/07 10:15:16 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NistManager.hh,v 1.25 2010/11/01 18:43:47 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
@@ -45,6 +45,8 @@
|
||||
// 02.05.07 V.Ivanchneko add GetNistFirstIsotopeN and GetNumberOfNistIsotopes
|
||||
// 28.07.07 V.Ivanchneko make simple methods inline
|
||||
// 28.10.07 V.Ivanchneko add state, T, P to maetrial build
|
||||
// 29.04.10 V.Ivanchneko add GetMeanIonisationEnergy method
|
||||
// 01.11.10 V.Ivanchneko add G4Pow for fast computations
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
@@ -69,6 +71,7 @@
|
||||
#include "G4Material.hh"
|
||||
#include "G4NistElementBuilder.hh"
|
||||
#include "G4NistMaterialBuilder.hh"
|
||||
#include "G4Pow.hh"
|
||||
|
||||
class G4NistMessenger;
|
||||
|
||||
@@ -149,6 +152,10 @@ public:
|
||||
//
|
||||
inline const std::vector<G4String>& GetNistElementNames() const;
|
||||
|
||||
// Access mean ionisation energy for atoms (Z <= 98)
|
||||
//
|
||||
inline G4double GetMeanIonisationEnergy(G4int Z) const;
|
||||
|
||||
// Get G4Material by index
|
||||
//
|
||||
inline G4Material* GetMaterial(size_t index);
|
||||
@@ -238,8 +245,7 @@ private:
|
||||
G4NistManager();
|
||||
static G4NistManager* instance;
|
||||
|
||||
G4double POWERZ13[256];
|
||||
G4double LOGA[256];
|
||||
G4Pow* g4pow;
|
||||
G4double POWERA27[101];
|
||||
G4double LOGAZ[101];
|
||||
|
||||
@@ -271,7 +277,7 @@ inline G4Element* G4NistManager::GetElement(size_t index)
|
||||
{
|
||||
G4Element* elm = 0;
|
||||
const G4ElementTable* theElementTable = G4Element::GetElementTable();
|
||||
if(index < theElementTable->size()) elm = (*theElementTable)[index];
|
||||
if(index < theElementTable->size()) { elm = (*theElementTable)[index]; }
|
||||
return elm;
|
||||
}
|
||||
|
||||
@@ -371,6 +377,13 @@ const std::vector<G4String>& G4NistManager::GetNistElementNames() const
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4double G4NistManager::GetMeanIonisationEnergy(G4int Z) const
|
||||
{
|
||||
return matBuilder->GetMeanIonisationEnergy(Z-1);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void G4NistManager::PrintElement(G4int Z)
|
||||
{
|
||||
elmBuilder->PrintElement(Z);
|
||||
@@ -464,20 +477,16 @@ const std::vector<G4String>& G4NistManager::GetNistMaterialNames() const
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4double G4NistManager::GetZ13(G4double Z)
|
||||
inline G4double G4NistManager::GetZ13(G4double A)
|
||||
{
|
||||
G4int iz = G4int(Z);
|
||||
G4double x = (Z - G4double(iz))/(3.0*Z);
|
||||
if(iz > 255) iz = 255;
|
||||
else if(iz < 0) iz = 0;
|
||||
return POWERZ13[iz]*(1.0 + x);
|
||||
return g4pow->A13(A);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4double G4NistManager::GetZ13(G4int Z)
|
||||
{
|
||||
return POWERZ13[Z];
|
||||
return g4pow->Z13(Z);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -485,7 +494,7 @@ inline G4double G4NistManager::GetZ13(G4int Z)
|
||||
inline G4double G4NistManager::GetA27(G4int Z)
|
||||
{
|
||||
G4double res = 0.0;
|
||||
if(Z < 101) res = POWERA27[Z];
|
||||
if(Z < 101) { res = POWERA27[Z]; }
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -493,20 +502,14 @@ inline G4double G4NistManager::GetA27(G4int Z)
|
||||
|
||||
inline G4double G4NistManager::GetLOGZ(G4int Z)
|
||||
{
|
||||
G4double res = 0.0;
|
||||
if(Z < 256) res = LOGA[Z];
|
||||
return res;
|
||||
return g4pow->logZ(Z);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4double G4NistManager::GetLOGA(G4double A)
|
||||
{
|
||||
G4int ia = G4int(A);
|
||||
G4double x = (A - G4double(ia))/A;
|
||||
if(ia > 255) ia = 255;
|
||||
else if(ia < 0) ia = 0;
|
||||
return LOGA[ia] + x*(1.0 - 0.5*x);
|
||||
return g4pow->logA(A);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -514,7 +517,7 @@ inline G4double G4NistManager::GetLOGA(G4double A)
|
||||
inline G4double G4NistManager::GetLOGA(G4int Z)
|
||||
{
|
||||
G4double res = 0.0;
|
||||
if(Z < 101) res = LOGAZ[Z];
|
||||
if(Z < 101) { res = LOGAZ[Z]; }
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NistMaterialBuilder.hh,v 1.13 2008/04/28 08:51:29 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NistMaterialBuilder.hh,v 1.17 2010/10/26 16:25:24 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
|
||||
#ifndef G4NistMaterialBuilder_h
|
||||
#define G4NistMaterialBuilder_h 1
|
||||
@@ -44,6 +44,7 @@
|
||||
// 27.07.06 V.Ivanchneko set defaul warning=true for FindOrBuildMaterial
|
||||
// 27.07.07 V.Ivanchneko add matIndex vector to control built materials
|
||||
// 28.07.07 V.Ivanchneko add BuildMaterial method using Nist index
|
||||
// 29.04.10 V.Ivanchneko add GetMeanIonisationEnergy method using Nist index
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
@@ -124,17 +125,25 @@ public:
|
||||
void ListNistSimpleMaterials();
|
||||
void ListNistCompoundMaterials();
|
||||
void ListHepMaterials();
|
||||
void ListSpaceMaterials();
|
||||
void ListBioChemicalMaterials();
|
||||
|
||||
// access to the list of names of Geant4 predefined materials
|
||||
//
|
||||
const std::vector<G4String>& GetMaterialNames() const;
|
||||
|
||||
// access to the NIST mean ionisation potentials
|
||||
//
|
||||
inline G4double GetMeanIonisationEnergy(G4int index) const;
|
||||
|
||||
private:
|
||||
|
||||
void Initialise();
|
||||
void NistSimpleMaterials();
|
||||
void NistCompoundMaterials();
|
||||
void HepAndNuclearMaterials();
|
||||
void SpaceMaterials();
|
||||
void BioChemicalMaterials();
|
||||
|
||||
// add parameters of material from NIST DB to internal vectors
|
||||
// density in g/cm3, mean ionisation potential in eV
|
||||
@@ -172,6 +181,8 @@ private:
|
||||
G4int nCurrent;
|
||||
G4int nElementary;
|
||||
G4int nNIST;
|
||||
G4int nHEP;
|
||||
G4int nSpace;
|
||||
|
||||
std::vector<G4String> names;
|
||||
std::vector<G4String> chFormulas;
|
||||
@@ -199,4 +210,12 @@ inline const std::vector<G4String>&
|
||||
return names;
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4NistMaterialBuilder::GetMeanIonisationEnergy(G4int index) const
|
||||
{
|
||||
G4double res = 10*index;
|
||||
if(index >= 0 && index < nMaterials) { res = ionPotentials[index]; }
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpticalSurface.hh,v 1.15 2009/11/20 00:57:34 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4OpticalSurface.hh,v 1.17 2010/04/22 21:19:14 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04-beta-01 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -149,39 +149,36 @@ public: // Without description
|
||||
|
||||
public: // With description
|
||||
|
||||
virtual void Overwrite() {G4cout << "G4OpticalSurface" << G4endl;};
|
||||
void SetType(const G4SurfaceType& type);
|
||||
|
||||
void SetType(const G4SurfaceType& type);
|
||||
|
||||
G4OpticalSurfaceFinish GetFinish() const {return theFinish;};
|
||||
inline G4OpticalSurfaceFinish GetFinish() const { return theFinish; }
|
||||
// Returns the optical surface finish.
|
||||
void SetFinish(const G4OpticalSurfaceFinish );
|
||||
void SetFinish(const G4OpticalSurfaceFinish );
|
||||
// Sets the optical surface finish.
|
||||
|
||||
G4OpticalSurfaceModel GetModel() const {return theModel;};
|
||||
inline G4OpticalSurfaceModel GetModel() const { return theModel; }
|
||||
// Returns the optical surface model used.
|
||||
void SetModel(const G4OpticalSurfaceModel model)
|
||||
{theModel = model;};
|
||||
inline void SetModel(const G4OpticalSurfaceModel model)
|
||||
{ theModel = model; }
|
||||
// Sets the optical surface model to be followed.
|
||||
|
||||
G4double GetSigmaAlpha() const {return sigma_alpha;};
|
||||
inline G4double GetSigmaAlpha() const { return sigma_alpha; }
|
||||
// Returns an unified model surface parameter.
|
||||
void SetSigmaAlpha(const G4double s_a)
|
||||
{sigma_alpha = s_a;};
|
||||
inline void SetSigmaAlpha(const G4double s_a) { sigma_alpha = s_a; }
|
||||
// Sets an unified model surface parameter.
|
||||
|
||||
G4double GetPolish() const {return polish;};
|
||||
G4double GetPolish() const { return polish; }
|
||||
// Returns the optical surface polish type.
|
||||
void SetPolish(const G4double plsh) {polish=plsh;};
|
||||
inline void SetPolish(const G4double plsh) { polish=plsh; }
|
||||
// Sets the optical surface polish type.
|
||||
|
||||
G4MaterialPropertiesTable* GetMaterialPropertiesTable() const
|
||||
{ return theMaterialPropertiesTable;};
|
||||
inline G4MaterialPropertiesTable* GetMaterialPropertiesTable() const
|
||||
{ return theMaterialPropertiesTable; }
|
||||
// Retrieves the pointer of the G4MaterialPropertiesTable
|
||||
// attached to optical surface.
|
||||
|
||||
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
|
||||
{ theMaterialPropertiesTable = anMPT;};
|
||||
inline void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
|
||||
{ theMaterialPropertiesTable = anMPT; }
|
||||
// Attaches a G4MaterialPropertiesTable to the optical surface.
|
||||
|
||||
void DumpInfo() const;
|
||||
@@ -190,7 +187,7 @@ public: // With description
|
||||
void ReadFile(void);
|
||||
// Method to read the Look-Up-Table into array AngularDistribution
|
||||
|
||||
G4double GetAngularDistributionValue(G4int, G4int, G4int);
|
||||
inline G4double GetAngularDistributionValue(G4int, G4int, G4int);
|
||||
|
||||
inline G4int GetThetaIndexMax(void) const { return thetaIndexMax; }
|
||||
inline G4int GetPhiIndexMax(void) const { return phiIndexMax; }
|
||||
@@ -226,9 +223,9 @@ inline
|
||||
G4int thetaIndex,
|
||||
G4int phiIndex)
|
||||
{
|
||||
return *(AngularDistribution+angleIncident+
|
||||
thetaIndex*incidentIndexMax+
|
||||
phiIndex*thetaIndexMax*incidentIndexMax);
|
||||
return AngularDistribution[angleIncident+
|
||||
thetaIndex*incidentIndexMax+
|
||||
phiIndex*thetaIndexMax*incidentIndexMax];
|
||||
}
|
||||
|
||||
#endif /* G4OpticalSurface_h */
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SandiaTable.hh,v 1.21 2007/10/02 10:13:33 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4SandiaTable.hh,v 1.23 2010/11/22 08:21:04 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
|
||||
// class description
|
||||
//
|
||||
@@ -82,6 +82,8 @@ public: // with description
|
||||
inline G4double GetSandiaMatTablePAI(G4int,G4int);
|
||||
inline G4OrderedTable* GetSandiaMatrixPAI();
|
||||
|
||||
void SetVerbose(G4int ver){fVerbose = ver;};
|
||||
|
||||
public: // without description
|
||||
|
||||
G4SandiaTable(__void__&);
|
||||
@@ -141,7 +143,7 @@ public: // without description
|
||||
G4int el );
|
||||
|
||||
G4int SandiaMixing( G4int Z[],
|
||||
const G4double fractionW[],
|
||||
const G4double* fractionW,
|
||||
G4int el,
|
||||
G4int mi );
|
||||
|
||||
@@ -164,6 +166,8 @@ private:
|
||||
G4double** fPhotoAbsorptionCof ; // SandiaTable for mixture
|
||||
|
||||
G4int fMaxInterval ;
|
||||
G4int fVerbose;
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4SimpleMaterialStoppingICRU73.hh,v 1.8 2009/11/09 16:51:07 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
|
||||
#ifndef G4SimpleMaterialStoppingICRU73_h
|
||||
#define G4SimpleMaterialStoppingICRU73_h 1
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4SimpleMaterialStoppingICRU73
|
||||
//
|
||||
// Description: Data on stopping powers for light ions in compounds
|
||||
//
|
||||
// Author: Ivantchenko 10.07.2008
|
||||
//
|
||||
// in the framework of the ESA Technology Research Programme
|
||||
// (ESA contract 21435/08/NL/AT)
|
||||
//
|
||||
// Modifications:
|
||||
// 03.11.2009 A. Lechner: Added new methods BuildPhysicsVector according
|
||||
// to interface changes in base class G4VIonDEDXTable.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Data on Stopping Powers from the ICRU73 report
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VIonDEDXTable.hh"
|
||||
#include "G4LPhysicsFreeVector.hh"
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <map>
|
||||
|
||||
|
||||
class G4SimpleMaterialStoppingICRU73 : public G4VIonDEDXTable
|
||||
{
|
||||
public:
|
||||
|
||||
G4SimpleMaterialStoppingICRU73(G4bool splineFlag = true);
|
||||
|
||||
~G4SimpleMaterialStoppingICRU73();
|
||||
|
||||
G4bool BuildPhysicsVector(G4int ionZ,
|
||||
const G4String& matName);
|
||||
|
||||
G4bool BuildPhysicsVector(G4int ionZ,
|
||||
G4int matZ);
|
||||
|
||||
G4bool IsApplicable(G4int ionZ,
|
||||
G4int matZ);
|
||||
|
||||
G4bool IsApplicable(G4int ionZ,
|
||||
const G4String& matName);
|
||||
|
||||
G4PhysicsVector* GetPhysicsVector(G4int ionZ,
|
||||
G4int matZ);
|
||||
|
||||
G4PhysicsVector* GetPhysicsVector(G4int ionZ,
|
||||
const G4String& matName);
|
||||
|
||||
G4double GetDEDX(G4double kinEnergyPerNucleon,
|
||||
G4int ionZ,
|
||||
const G4String& matName);
|
||||
|
||||
G4double GetDEDX(G4double kinEnergyPerNucleon,
|
||||
G4int ionZ,
|
||||
G4int matZ);
|
||||
|
||||
private:
|
||||
// Function for creating a physics vector
|
||||
G4PhysicsVector* CreatePhysicsVector(G4double* energy,
|
||||
G4double* stoppower,
|
||||
G4double factor);
|
||||
|
||||
// Assignment operator and copy constructor
|
||||
G4SimpleMaterialStoppingICRU73 &
|
||||
operator=(const G4SimpleMaterialStoppingICRU73 &right);
|
||||
G4SimpleMaterialStoppingICRU73(const G4SimpleMaterialStoppingICRU73&);
|
||||
|
||||
// Flag indicating the use of spline interpolation for dE/dx vectors
|
||||
G4bool spline;
|
||||
|
||||
// Minimum and maximum atomic number
|
||||
G4int minIonAtomicNmb;
|
||||
G4int maxIonAtomicNmb;
|
||||
|
||||
// Vectors containing the atomic numbers and names of the materials
|
||||
std::vector<G4int> atomicNumbersMat;
|
||||
std::vector<G4String> namesMat;
|
||||
|
||||
// Keys (ion atomic number and material names) corresponding to created
|
||||
// dE/dx vectors
|
||||
typedef std::pair<G4int, G4String> DEDXKey;
|
||||
std::vector<DEDXKey> dedxKeys;
|
||||
|
||||
// Vector of dE/dx vectors
|
||||
std::vector<G4PhysicsVector*> dedx;
|
||||
};
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,92 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4materials
|
||||
# Package: Geant4.src.G4materials
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: sources.cmake,v 1.3 2010/11/29 17:15:46 bmorgan Exp $
|
||||
# GEANT4 Tag $Name: geant4-09-04 $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4materials
|
||||
HEADERS
|
||||
G4Isotope.hh
|
||||
G4NistManager.hh
|
||||
G4AtomicShells.hh
|
||||
G4IsotopeVector.hh
|
||||
G4NistMaterialBuilder.hh
|
||||
G4DensityEffectData.hh
|
||||
G4Material.hh
|
||||
G4NistMessenger.hh
|
||||
G4Element.hh
|
||||
G4MaterialPropertiesTable.hh
|
||||
G4OpticalSurface.hh
|
||||
G4ElementTable.hh
|
||||
G4MaterialPropertiesTable.icc
|
||||
G4SandiaTable.hh
|
||||
G4ElementVector.hh
|
||||
G4MaterialPropertyVector.hh
|
||||
G4StaticSandiaData.hh
|
||||
G4ExtDEDXTable.hh
|
||||
G4MaterialPropertyVector.icc
|
||||
G4SurfaceProperty.hh
|
||||
G4IonisParamElm.hh
|
||||
G4MaterialTable.hh
|
||||
G4VIonDEDXTable.hh
|
||||
G4IonisParamMat.hh
|
||||
G4MPVEntry.hh
|
||||
G4IonStoppingData.hh
|
||||
G4NistElementBuilder.hh
|
||||
SOURCES
|
||||
G4IonStoppingData.cc
|
||||
G4NistManager.cc
|
||||
G4AtomicShells.cc
|
||||
G4Isotope.cc
|
||||
G4NistMaterialBuilder.cc
|
||||
G4DensityEffectData.cc
|
||||
G4Material.cc
|
||||
G4NistMessenger.cc
|
||||
G4Element.cc
|
||||
G4MaterialPropertiesTable.cc
|
||||
G4OpticalSurface.cc
|
||||
G4ExtDEDXTable.cc
|
||||
G4MaterialPropertyVector.cc
|
||||
G4SandiaTable.cc
|
||||
G4IonisParamElm.cc
|
||||
G4MPVEntry.cc
|
||||
G4SurfaceProperty.cc
|
||||
G4IonisParamMat.cc
|
||||
G4NistElementBuilder.cc
|
||||
G4VIonDEDXTable.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
LINK_LIBRARIES
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AtomicShells.cc,v 1.7 2006/10/17 15:15:46 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4AtomicShells.cc,v 1.8 2010/04/30 13:09:22 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04-beta-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
// 16-11-98, GetBindingEnergy(Z,ShellNb), M.Maire
|
||||
// 19-07-04, add a protection in GetNumberOfShells(), mma
|
||||
// 11-02-05, GetNumberOfElectrons(Z,ShellNb), V.Ivanchenko
|
||||
// 30-04-10, added fIndexOfShells, V.Ivanchenko
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -43,7 +44,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
const G4int
|
||||
G4AtomicShells::fNumberOfShells[101] =
|
||||
G4AtomicShells::fNumberOfShells[101] =
|
||||
{
|
||||
0 , // nonexisting zero element
|
||||
|
||||
@@ -76,6 +77,23 @@ G4AtomicShells::fNumberOfShells[101] =
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
const G4int
|
||||
G4AtomicShells::fIndexOfShells[101] =
|
||||
{ 0,
|
||||
1, 2, 3, 5, 7, 10, 13, 17, 21, 24,
|
||||
28, 33, 38, 44, 50, 56, 62, 68, 75, 83,
|
||||
91, 100, 109, 118, 127, 136, 145, 154, 164, 174,
|
||||
184, 195, 206, 217, 228, 239, 251, 264, 277, 291,
|
||||
305, 319, 333, 347, 361, 375, 390, 405, 420, 436,
|
||||
452, 468, 484, 500, 517, 535, 553, 572, 591, 610,
|
||||
629, 648, 667, 686, 706, 725, 744, 763, 782, 801,
|
||||
821, 842, 863, 884, 905, 926, 947, 968, 989, 1011,
|
||||
1033, 1056, 1079, 1102, 1125, 1149, 1173, 1198, 1223, 1249,
|
||||
1275, 1302, 1329, 1356, 1382, 1408, 1435, 1462, 1488, 1514
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
const G4double
|
||||
G4AtomicShells::fBindingEnergies[1540] =
|
||||
{
|
||||
@@ -728,7 +746,7 @@ G4AtomicShells::fNumberOfElectrons[1540] =
|
||||
G4int
|
||||
G4AtomicShells::GetNumberOfShells(G4int Z)
|
||||
{
|
||||
assert (Z>=1 && Z<=101);
|
||||
assert (Z>0 && Z<101);
|
||||
return fNumberOfShells[Z];
|
||||
}
|
||||
|
||||
@@ -737,12 +755,8 @@ G4AtomicShells::GetNumberOfShells(G4int Z)
|
||||
G4double
|
||||
G4AtomicShells::GetBindingEnergy(G4int Z, G4int ShellNb)
|
||||
{
|
||||
assert (Z>=1 && Z<=101 && ShellNb<fNumberOfShells[Z]);
|
||||
|
||||
G4int indice = 1;
|
||||
for (G4int z = 1 ; z < Z ; z++) indice += fNumberOfShells[z];
|
||||
indice += ShellNb;
|
||||
return fBindingEnergies[indice]*eV;
|
||||
assert (Z>0 && Z<101 && ShellNb<fNumberOfShells[Z]);
|
||||
return fBindingEnergies[fIndexOfShells[Z] + ShellNb]*CLHEP::eV;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
@@ -750,26 +764,21 @@ G4AtomicShells::GetBindingEnergy(G4int Z, G4int ShellNb)
|
||||
G4int
|
||||
G4AtomicShells::GetNumberOfElectrons(G4int Z, G4int ShellNb)
|
||||
{
|
||||
assert (Z>=1 && Z<=101 && ShellNb<fNumberOfShells[Z]);
|
||||
|
||||
G4int indice = 1;
|
||||
for (G4int z = 1 ; z < Z ; z++) indice += fNumberOfShells[z];
|
||||
indice += ShellNb;
|
||||
return fNumberOfElectrons[indice];
|
||||
assert (Z>0 && Z<101 && ShellNb<fNumberOfShells[Z]);
|
||||
return fNumberOfElectrons[fIndexOfShells[Z] + ShellNb];
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4double G4AtomicShells::GetTotalBindingEnergy (G4int Z)
|
||||
{
|
||||
assert (Z>=1 && Z<=101);
|
||||
assert (Z>=1 && Z<101);
|
||||
|
||||
G4int idx = 1;
|
||||
for (G4int z = 1 ; z < Z ; z++) idx += fNumberOfShells[z];
|
||||
G4double energy = 0.0;
|
||||
G4int idx = fIndexOfShells[Z];
|
||||
G4int idxmax = idx + fNumberOfShells[Z];
|
||||
for (G4int i=idx; i<idxmax; i++) {energy += fBindingEnergies[i];}
|
||||
return energy*eV;
|
||||
G4double energy = 0.0;
|
||||
for (G4int i=idx; i<idxmax; ++i) {energy += fBindingEnergies[i];}
|
||||
return energy*CLHEP::eV;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DensityEffectData.cc,v 1.9 2009/12/01 08:24:21 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4DensityEffectData.cc,v 1.12 2010/05/15 15:37:33 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04-beta-01 $
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -73,21 +73,24 @@ void G4DensityEffectData::Initialize()
|
||||
for (G4int i=0; i< NDENSELEM; ++i)
|
||||
{
|
||||
indexZ[i] = -1;
|
||||
state[i] = kStateSolid;
|
||||
}
|
||||
|
||||
//G4_H index=0
|
||||
G4double M0[NDENSARRAY]={0.263,1.412,9.5835,1.8639,3.2718,0.14092,5.7273,0.0,0.024};
|
||||
AddMaterial(M0,"G4_H");
|
||||
indexZ[0]=0;
|
||||
|
||||
//G4_lH2 index=1
|
||||
//G4_lH2 index=0
|
||||
G4double M1[NDENSARRAY]={7.031,1.546,3.2632,0.4759,1.9215,0.13483,5.6249,0,0.021};
|
||||
AddMaterial(M1,"G4_lH2");
|
||||
|
||||
//G4_H index=1
|
||||
G4double M0[NDENSARRAY]={0.263,1.412,9.5835,1.8639,3.2718,0.14092,5.7273,0.0,0.024};
|
||||
AddMaterial(M0,"G4_H");
|
||||
indexZ[1]=1;
|
||||
state[1]=kStateGas;
|
||||
|
||||
//G4_He index=2
|
||||
G4double M2[NDENSARRAY]={0.263,1.7,11.1393,2.2017,3.6122,0.13443,5.8347,0,0.024};
|
||||
AddMaterial(M2,"G4_He");
|
||||
indexZ[2]=2;
|
||||
state[2]=kStateGas;
|
||||
|
||||
//G4_Li index=3
|
||||
G4double M3[NDENSARRAY]={13.844,1.535,3.1221,0.1304,1.6397,0.95136,2.4993,0.14,0.062};
|
||||
@@ -113,21 +116,25 @@ void G4DensityEffectData::Initialize()
|
||||
G4double M7[NDENSARRAY]={0.695,1.984,10.5400,1.7378,4.1323,0.15349,3.2125,0.0,0.086};
|
||||
AddMaterial(M7,"G4_N");
|
||||
indexZ[7]=7;
|
||||
state[7]=kStateGas;
|
||||
|
||||
//G4_O index=8
|
||||
G4double M8[NDENSARRAY]={0.744,2.314,10.7004,1.7541,4.3213,0.11778,3.2913,0.0,0.101};
|
||||
AddMaterial(M8,"G4_O");
|
||||
indexZ[8]=8;
|
||||
state[8]=kStateGas;
|
||||
|
||||
//G4_F index=9
|
||||
G4double M9[NDENSARRAY]={0.788,2.450,10.9653,1.8433,4.4096,0.11083,3.2962,0.0,0.121};
|
||||
AddMaterial(M9,"G4_F");
|
||||
indexZ[9]=9;
|
||||
state[9]=kStateGas;
|
||||
|
||||
//G4_Ne index=10
|
||||
G4double M10[NDENSARRAY]={0.587,2.577,11.9041,2.0735,4.6421,0.08064,3.5771,0.0,0.110};
|
||||
AddMaterial(M10,"G4_Ne");
|
||||
indexZ[10]=10;
|
||||
state[10]=kStateGas;
|
||||
|
||||
//G4_Na index=11
|
||||
G4double M11[NDENSARRAY]={19.641,2.648,5.0526,0.2880,3.1962,0.07772,3.6452,0.08,0.098};
|
||||
@@ -163,11 +170,13 @@ void G4DensityEffectData::Initialize()
|
||||
G4double M17[NDENSARRAY]={1.092,1.734,11.1421,1.5555,4.2994,0.19849,2.9702,0.0,0.041};
|
||||
AddMaterial(M17,"G4_Cl");
|
||||
indexZ[17]=17;
|
||||
state[17]=kStateGas;
|
||||
|
||||
//G4_Ar index=18
|
||||
G4double M18[NDENSARRAY]={0.789,1.753,11.9480,1.7635,4.4855,0.19714,2.9618,0.0,0.037};
|
||||
AddMaterial(M18,"G4_Ar");
|
||||
indexZ[18]=18;
|
||||
state[18]=kStateGas;
|
||||
|
||||
//G4_K index=19
|
||||
G4double M19[NDENSARRAY]={18.65,1.830,5.6423,0.3851,3.1724,0.19827,2.9233,0.10,0.035};
|
||||
@@ -242,7 +251,7 @@ void G4DensityEffectData::Initialize()
|
||||
//G4_As index=33
|
||||
G4double M33[NDENSARRAY]={45.779,2.219,5.0510,0.1767,3.5702,0.06633,3.4176,0.00,0.030};
|
||||
AddMaterial(M33,"G4_As");
|
||||
indexZ[33]=33;
|
||||
indexZ[33]=33;
|
||||
|
||||
//G4_Se index=34
|
||||
G4double M34[NDENSARRAY]={40.112,2.104,5.3210,0.2258,3.6264,0.06568,3.4317,0.10,0.024};
|
||||
@@ -253,11 +262,13 @@ void G4DensityEffectData::Initialize()
|
||||
G4double M35[NDENSARRAY]={1.604,1.845,11.7307,1.5262,4.9899,0.06335,3.467,0,0.022};
|
||||
AddMaterial(M35,"G4_Br");
|
||||
indexZ[35]=35;
|
||||
state[35]=kStateGas;
|
||||
|
||||
//G4_Kr index=36
|
||||
G4double M36[NDENSARRAY]={1.114,1.77,12.5115,1.7158,5.0748,0.07446,3.4051,0,0.025};
|
||||
AddMaterial(M36,"G4_Kr");
|
||||
indexZ[36]=36;
|
||||
state[36]=kStateGas;
|
||||
|
||||
//G4_Ru index=37
|
||||
G4double M37[NDENSARRAY]={23.467,1.823,6.4776,0.5737,3.7995,0.07261,3.4177,0.14,0.026};
|
||||
@@ -348,6 +359,7 @@ void G4DensityEffectData::Initialize()
|
||||
G4double M54[NDENSARRAY]={1.369,1.435,12.7281,1.563,4.7371,0.23314,2.7414,0,0.043};
|
||||
AddMaterial(M54,"G4_Xe");
|
||||
indexZ[54]=54;
|
||||
state[54]=kStateGas;
|
||||
|
||||
//G4_Cs index=55
|
||||
G4double M55[NDENSARRAY]={25.37,1.462,6.9135,0.5473,3.5914,0.18233,2.8866,0.14,0.035};
|
||||
@@ -443,6 +455,7 @@ void G4DensityEffectData::Initialize()
|
||||
G4double M73[NDENSARRAY]={74.692,2.07,5.5262,0.2117,3.4805,0.17798,2.7623,0.14,0.03};
|
||||
AddMaterial(M73,"G4_Ta");
|
||||
indexZ[73]=73;
|
||||
|
||||
//G4_W index=74
|
||||
G4double M74[NDENSARRAY]={80.315,1.997,5.4059,0.2167,3.496,0.15509,2.8447,0.14,0.027};
|
||||
AddMaterial(M74,"G4_W");
|
||||
@@ -502,6 +515,7 @@ void G4DensityEffectData::Initialize()
|
||||
G4double M85[NDENSARRAY]={1.708,1.458,13.2839,1.5368,4.9889,0.20798,2.7409,0,0.057};
|
||||
AddMaterial(M85,"G4_Rn");
|
||||
indexZ[86]=85;
|
||||
state[86]=kStateGas;
|
||||
|
||||
//G4_Ra index=86
|
||||
G4double M86[NDENSARRAY]={40.205,1.403,7.0452,0.5991,3.9428,0.08804,3.2454,0.14,0.022};
|
||||
@@ -1283,10 +1297,13 @@ void G4DensityEffectData::Initialize()
|
||||
|
||||
}
|
||||
|
||||
G4int G4DensityEffectData::GetIndex(G4int Z)
|
||||
G4int G4DensityEffectData::GetElementIndex(G4int Z, G4State st)
|
||||
{
|
||||
G4int idx = -1;
|
||||
if(Z >= 0 && Z < NDENSELEM) idx = indexZ[Z];
|
||||
if(Z > 0 && Z < NDENSELEM) {
|
||||
if(st == state[Z]) { idx = indexZ[Z]; }
|
||||
else if(st == kStateUndefined) { idx = indexZ[Z]; }
|
||||
}
|
||||
return idx;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Element.cc,v 1.34 2009/09/18 15:35:36 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4Element.cc,v 1.36 2010/10/25 07:58:15 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4Element.hh"
|
||||
#include "G4AtomicShells.hh"
|
||||
#include <iomanip>
|
||||
|
||||
G4ElementTable G4Element::theElementTable;
|
||||
@@ -137,13 +138,14 @@ void G4Element::AddIsotope(G4Isotope* isotope, G4double abundance)
|
||||
G4cout << "G4Element ERROR: " << fName << G4endl;
|
||||
G4Exception ("ERROR from G4Element::AddIsotope!"
|
||||
" Trying to add an Isotope before contructing the element.");
|
||||
return;
|
||||
}
|
||||
G4int iz = isotope->GetZ();
|
||||
|
||||
// filling ...
|
||||
if ( fNumberOfIsotopes < theIsotopeVector->size() ) {
|
||||
// check same Z
|
||||
if (fNumberOfIsotopes==0) fZeff = G4double(iz);
|
||||
if (fNumberOfIsotopes==0) { fZeff = G4double(iz); }
|
||||
else if (G4double(iz) != fZeff) {
|
||||
G4Exception ("ERROR from G4Element::AddIsotope!"
|
||||
" Try to add isotopes with different Z");
|
||||
@@ -198,6 +200,18 @@ void G4Element::InitializePointers()
|
||||
fIonisation = 0;
|
||||
fNumberOfIsotopes = 0;
|
||||
fNaturalAbandances = false;
|
||||
|
||||
// add initialisation of all remaining members
|
||||
fZeff = 0;
|
||||
fNeff = 0;
|
||||
fAeff = 0;
|
||||
fNbOfAtomicShells = 0;
|
||||
fCountUse = 0;
|
||||
fIndexZ = 0;
|
||||
fIndexInTable = 0;
|
||||
fNaturalAbandances = false;
|
||||
fCoulomb = 0.0;
|
||||
fRadTsai = 0.0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -206,11 +220,9 @@ void G4Element::InitializePointers()
|
||||
// for usage restricted to object persistency
|
||||
|
||||
G4Element::G4Element( __void__& )
|
||||
: fZeff(0), fNeff(0), fAeff(0), fNbOfAtomicShells(0),
|
||||
fAtomicShells(0), fNbOfShellElectrons(0), fNumberOfIsotopes(0), theIsotopeVector(0),
|
||||
fRelativeAbundanceVector(0), fCountUse(0), fIndexInTable(0),
|
||||
fCoulomb(0), fRadTsai(0), fIonisation(0)
|
||||
: fZeff(0), fNeff(0), fAeff(0)
|
||||
{
|
||||
InitializePointers();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -219,11 +231,11 @@ G4Element::~G4Element()
|
||||
{
|
||||
// G4cout << "### Destruction of element " << fName << " started" <<G4endl;
|
||||
|
||||
if (theIsotopeVector) delete theIsotopeVector;
|
||||
if (fRelativeAbundanceVector) delete [] fRelativeAbundanceVector;
|
||||
if (fAtomicShells) delete [] fAtomicShells;
|
||||
if (fNbOfShellElectrons) delete [] fNbOfShellElectrons;
|
||||
if (fIonisation) delete fIonisation;
|
||||
if (theIsotopeVector) { delete theIsotopeVector; }
|
||||
if (fRelativeAbundanceVector) { delete [] fRelativeAbundanceVector; }
|
||||
if (fAtomicShells) { delete [] fAtomicShells; }
|
||||
if (fNbOfShellElectrons) { delete [] fNbOfShellElectrons; }
|
||||
if (fIonisation) { delete fIonisation; }
|
||||
|
||||
//remove this element from theElementTable
|
||||
theElementTable[fIndexInTable] = 0;
|
||||
@@ -252,7 +264,7 @@ void G4Element::ComputeDerivedQuantities()
|
||||
ComputeLradTsaiFactor();
|
||||
|
||||
// parameters for energy loss by ionisation
|
||||
if (fIonisation) delete fIonisation;
|
||||
if (fIonisation) { delete fIonisation; }
|
||||
fIonisation = new G4IonisParamElm(fZeff);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ExtDEDXTable.cc,v 1.4 2010/11/01 18:18:57 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// ===========================================================================
|
||||
// GEANT4 class source file
|
||||
@@ -38,6 +40,9 @@
|
||||
// Modifications:
|
||||
// 03.11.2009 A. Lechner: Added new methods BuildPhysicsVector according
|
||||
// to interface changes in base class G4VIonDEDXTable.
|
||||
// 25.10.2010 V.Ivanchenko fixed bug in usage of iterators reported by the
|
||||
// Coverity tool
|
||||
// 01.11.2010 V.Ivanchenko fixed remaining bugs reported by Coverity
|
||||
//
|
||||
//
|
||||
// Class description:
|
||||
@@ -219,7 +224,7 @@ G4bool G4ExtDEDXTable::AddPhysicsVector(
|
||||
if(physicsVector == 0) {
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
G4cerr << "G4IonDEDXTable::AddPhysicsVector() Error: Pointer to vector"
|
||||
G4cout << "G4IonDEDXTable::AddPhysicsVector() Error: Pointer to vector"
|
||||
<< " is null-pointer."
|
||||
<< G4endl;
|
||||
#endif
|
||||
@@ -230,7 +235,7 @@ G4bool G4ExtDEDXTable::AddPhysicsVector(
|
||||
if(matIdentifier.empty()) {
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
G4cerr << "G4IonDEDXTable::AddPhysicsVector() Error: "
|
||||
G4cout << "G4IonDEDXTable::AddPhysicsVector() Error: "
|
||||
<< "Cannot add physics vector. Invalid name."
|
||||
<< G4endl;
|
||||
#endif
|
||||
@@ -241,7 +246,7 @@ G4bool G4ExtDEDXTable::AddPhysicsVector(
|
||||
if(atomicNumberIon <= 2) {
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
G4cerr << "G4IonDEDXTable::AddPhysicsVector() Error: "
|
||||
G4cout << "G4IonDEDXTable::AddPhysicsVector() Error: "
|
||||
<< "Cannot add physics vector. Illegal atomic number."
|
||||
<< G4endl;
|
||||
#endif
|
||||
@@ -256,7 +261,7 @@ G4bool G4ExtDEDXTable::AddPhysicsVector(
|
||||
if(dedxMapElements.count(key) == 1) {
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
G4cerr << "G4IonDEDXTable::AddPhysicsVector() Error: "
|
||||
G4cout << "G4IonDEDXTable::AddPhysicsVector() Error: "
|
||||
<< "Vector already exists. Remove first before replacing."
|
||||
<< G4endl;
|
||||
#endif
|
||||
@@ -271,7 +276,7 @@ G4bool G4ExtDEDXTable::AddPhysicsVector(
|
||||
if(dedxMapMaterials.count(mkey) == 1) {
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
G4cerr << "G4IonDEDXTable::AddPhysicsVector() Error: "
|
||||
G4cout << "G4IonDEDXTable::AddPhysicsVector() Error: "
|
||||
<< "Vector already exists. Remove first before replacing."
|
||||
<< G4endl;
|
||||
#endif
|
||||
@@ -301,26 +306,25 @@ G4bool G4ExtDEDXTable::RemovePhysicsVector(
|
||||
if(iter == dedxMapMaterials.end()) {
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
G4cerr << "G4IonDEDXTable::RemovePhysicsVector() Warning: "
|
||||
<< "Cannot remove physics vector. Vector not found."
|
||||
<< G4endl;
|
||||
G4cout << "G4IonDEDXTable::RemovePhysicsVector() Warning: "
|
||||
<< "Cannot remove physics vector. Vector not found."
|
||||
<< G4endl;
|
||||
#endif
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
physicsVector = (*iter).second;
|
||||
dedxMapMaterials.erase(key);
|
||||
|
||||
// Deleting key of physics vector from elemental material map (if it exists)
|
||||
G4IonDEDXMapElem::iterator iter_beg = dedxMapElements.begin();
|
||||
G4IonDEDXMapElem::iterator iter_end = dedxMapElements.end();
|
||||
G4IonDEDXMapElem::iterator it;
|
||||
|
||||
for(;iter_beg != iter_end; iter_beg++) {
|
||||
for(it=dedxMapElements.begin(); it!=dedxMapElements.end(); ++it) {
|
||||
|
||||
if( (*iter_beg).second == physicsVector ) {
|
||||
|
||||
dedxMapElements.erase(iter_beg);
|
||||
if( (*it).second == physicsVector ) {
|
||||
dedxMapElements.erase(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,7 +348,7 @@ G4bool G4ExtDEDXTable::StorePhysicsTable(
|
||||
if( !ofilestream ) {
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
G4cerr << "G4ExtDEDXTable::StorePhysicsVector() "
|
||||
G4cout << "G4ExtDEDXTable::StorePhysicsVector() "
|
||||
<< " Cannot open file "<< fileName
|
||||
<< G4endl;
|
||||
#endif
|
||||
@@ -387,7 +391,7 @@ G4bool G4ExtDEDXTable::StorePhysicsTable(
|
||||
else {
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
G4cerr << "G4ExtDEDXTable::StorePhysicsVector() "
|
||||
G4cout << "G4ExtDEDXTable::StorePhysicsVector() "
|
||||
<< " Cannot store physics vector."
|
||||
<< G4endl;
|
||||
#endif
|
||||
@@ -408,111 +412,113 @@ G4bool G4ExtDEDXTable::RetrievePhysicsTable(
|
||||
) {
|
||||
|
||||
std::ifstream ifilestream;
|
||||
|
||||
ifilestream.open( fileName, std::ios::in );
|
||||
|
||||
if( !ifilestream ) {
|
||||
|
||||
if( ! ifilestream ) {
|
||||
#ifdef G4VERBOSE
|
||||
G4cerr << "G4ExtDEDXTable::RetrievePhysicsVector() "
|
||||
<< " Cannot open file "<< fileName
|
||||
<< G4endl;
|
||||
G4cout << "G4ExtDEDXTable::RetrievePhysicsVector() "
|
||||
<< " Cannot open file "<< fileName
|
||||
<< G4endl;
|
||||
#endif
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
G4int nmbVectors;
|
||||
|
||||
std::string::size_type nmbVectors = 0;
|
||||
ifilestream >> nmbVectors;
|
||||
|
||||
for(G4int i = 0; i < nmbVectors; i++) {
|
||||
|
||||
G4String line = "";
|
||||
if(nmbVectors == std::string::npos || nmbVectors == 0) {
|
||||
#ifdef G4VERBOSE
|
||||
G4cout << "G4ExtDEDXTable::RetrievePhysicsVector() "
|
||||
<< " The file is empty "<< nmbVectors
|
||||
<< G4endl;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
for(size_t i = 0; i<nmbVectors; ++i) {
|
||||
|
||||
while( line.empty() ) {
|
||||
|
||||
getline( ifilestream, line );
|
||||
|
||||
if( ifilestream.fail() ) {
|
||||
G4String line = "";
|
||||
while( line.empty() ) {
|
||||
|
||||
getline( ifilestream, line );
|
||||
if( ifilestream.fail() ) {
|
||||
#ifdef G4VERBOSE
|
||||
G4cerr << "G4ExtDEDXTable::RetrievePhysicsTable() "
|
||||
<< " File content of " << fileName << " ill-formated."
|
||||
<< G4endl;
|
||||
G4cout << "G4ExtDEDXTable::RetrievePhysicsTable() "
|
||||
<< " File content of " << fileName << " ill-formated."
|
||||
<< G4endl;
|
||||
#endif
|
||||
ifilestream.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t pos = line.find_first_of("#");
|
||||
line = line.substr(0, pos);
|
||||
ifilestream.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
std::istringstream headerstream( line );
|
||||
std::string::size_type pos = line.find_first_of("#");
|
||||
if(pos != std::string::npos && pos > 0) {
|
||||
line = line.substr(0, pos);
|
||||
}
|
||||
}
|
||||
|
||||
G4int atomicNumberIon;
|
||||
headerstream >> atomicNumberIon;
|
||||
std::istringstream headerstream( line );
|
||||
|
||||
G4String materialName;
|
||||
headerstream >> materialName;
|
||||
std::string::size_type atomicNumberIon;
|
||||
headerstream >> atomicNumberIon;
|
||||
|
||||
if( headerstream.fail() ) {
|
||||
G4String materialName;
|
||||
headerstream >> materialName;
|
||||
|
||||
if( headerstream.fail() || std::string::npos == atomicNumberIon) {
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
G4cerr << "G4ExtDEDXTable::RetrievePhysicsTable() "
|
||||
<< " File content of " << fileName << " ill-formated "
|
||||
<< " (vector header)."
|
||||
<< G4endl;
|
||||
G4cout << "G4ExtDEDXTable::RetrievePhysicsTable() "
|
||||
<< " File content of " << fileName << " ill-formated "
|
||||
<< " (vector header)."
|
||||
<< G4endl;
|
||||
#endif
|
||||
ifilestream.close();
|
||||
return false;
|
||||
}
|
||||
ifilestream.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
G4int atomicNumberMat;
|
||||
headerstream >> atomicNumberMat;
|
||||
std::string::size_type atomicNumberMat;
|
||||
headerstream >> atomicNumberMat;
|
||||
|
||||
if( headerstream.eof() ) atomicNumberMat = 0;
|
||||
if( headerstream.eof() || std::string::npos == atomicNumberMat) {
|
||||
atomicNumberMat = 0;
|
||||
}
|
||||
|
||||
G4int vectorType;
|
||||
|
||||
ifilestream >> vectorType;
|
||||
G4int vectorType;
|
||||
ifilestream >> vectorType;
|
||||
|
||||
G4PhysicsVector* physicsVector = CreatePhysicsVector(vectorType);
|
||||
|
||||
if(physicsVector == 0) {
|
||||
G4PhysicsVector* physicsVector = CreatePhysicsVector(vectorType);
|
||||
|
||||
if(physicsVector == 0) {
|
||||
#ifdef G4VERBOSE
|
||||
G4cerr << "G4ExtDEDXTable::RetrievePhysicsTable "
|
||||
<< " illegal physics Vector type " << vectorType
|
||||
<< " in " << fileName
|
||||
<< G4endl;
|
||||
G4cout << "G4ExtDEDXTable::RetrievePhysicsTable "
|
||||
<< " illegal physics Vector type " << vectorType
|
||||
<< " in " << fileName
|
||||
<< G4endl;
|
||||
#endif
|
||||
ifilestream.close();
|
||||
return false;
|
||||
}
|
||||
ifilestream.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !physicsVector -> Retrieve(ifilestream, true) ) {
|
||||
|
||||
if( !physicsVector -> Retrieve(ifilestream, true) ) {
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
G4cerr << "G4ExtDEDXTable::RetrievePhysicsTable() "
|
||||
<< " File content of " << fileName << " ill-formated."
|
||||
<< G4endl;
|
||||
G4cout << "G4ExtDEDXTable::RetrievePhysicsTable() "
|
||||
<< " File content of " << fileName << " ill-formated."
|
||||
<< G4endl;
|
||||
#endif
|
||||
ifilestream.close();
|
||||
return false;
|
||||
}
|
||||
ifilestream.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
physicsVector -> SetSpline(true);
|
||||
physicsVector -> SetSpline(true);
|
||||
|
||||
// Retrieved vector is added to material store
|
||||
if( !AddPhysicsVector(physicsVector, atomicNumberIon,
|
||||
materialName, atomicNumberMat) ) {
|
||||
// Retrieved vector is added to material store
|
||||
if( !AddPhysicsVector(physicsVector, (G4int)atomicNumberIon,
|
||||
materialName, (G4int)atomicNumberMat) ) {
|
||||
|
||||
delete physicsVector;
|
||||
ifilestream.close();
|
||||
return false;
|
||||
}
|
||||
delete physicsVector;
|
||||
ifilestream.close();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ifilestream.close();
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4IonStoppingData.cc,v 1.3 2010/10/25 08:41:39 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// ===========================================================================
|
||||
// GEANT4 class source file
|
||||
@@ -36,6 +38,7 @@
|
||||
// First implementation: 03. 11. 2009
|
||||
//
|
||||
// Modifications:
|
||||
// 25.10.2010 V.Ivanchenko fixed warnings reported by the Coverity tool
|
||||
//
|
||||
//
|
||||
// Class description: Class which can read ion stopping power data from
|
||||
@@ -377,7 +380,10 @@ G4bool G4IonStoppingData::BuildPhysicsVector(
|
||||
if( IsApplicable(atomicNumberIon, matIdentifier) ) return true;
|
||||
|
||||
char* path = getenv("G4LEDATA");
|
||||
if ( !path ) G4Exception("G4LEDATA environment variable not set");
|
||||
if ( !path ) {
|
||||
G4Exception("G4IonStoppingData::BuildPhysicsVector: G4LEDATA environment variable not set");
|
||||
return false;
|
||||
}
|
||||
|
||||
std::ostringstream file;
|
||||
|
||||
@@ -424,8 +430,10 @@ G4bool G4IonStoppingData::BuildPhysicsVector(
|
||||
if( IsApplicable(atomicNumberIon, atomicNumberElem) ) return true;
|
||||
|
||||
char* path = getenv("G4LEDATA");
|
||||
if ( !path ) G4Exception("G4LEDATA environment variable not set");
|
||||
|
||||
if ( !path ) {
|
||||
G4Exception("G4IonStoppingData::BuildPhysicsVector: G4LEDATA environment variable not set");
|
||||
return false;
|
||||
}
|
||||
std::ostringstream file;
|
||||
|
||||
file << path << "/" << subDir << "/z"
|
||||
|
||||
@@ -24,58 +24,45 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IonisParamElm.cc,v 1.15 2008/06/03 14:30:10 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4IonisParamElm.cc,v 1.18 2010/11/01 18:18:57 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
//
|
||||
// 06-09-04, Update calculated values after any change of ionisation
|
||||
// potential change. V.Ivanchenko
|
||||
// 17-10-02, Fix excitation energy interpolation. V.Ivanchenko
|
||||
// 08-03-01, correct handling of fShellCorrectionVector. M.Maire
|
||||
// 09-07-98, data moved from G4Element. M.Maire
|
||||
// 22-11-00, tabulation of ionisation potential from
|
||||
// the ICRU Report N#37. V.Ivanchenko
|
||||
// 09-07-98, data moved from G4Element. M.Maire
|
||||
// 08-03-01, correct handling of fShellCorrectionVector. M.Maire
|
||||
// 17-10-02, Fix excitation energy interpolation. V.Ivanchenko
|
||||
// 06-09-04, Update calculated values after any change of ionisation
|
||||
// potential change. V.Ivanchenko
|
||||
// 29-04-10, Using G4Pow and mean ionisation energy from NIST V.Ivanchenko
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
#include "G4IonisParamElm.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4Pow.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4IonisParamElm::G4IonisParamElm(G4double Z)
|
||||
G4IonisParamElm::G4IonisParamElm(G4double AtomNumber)
|
||||
{
|
||||
if (Z < 1.)
|
||||
G4Exception (" ERROR! It is not allowed to create an Element with Z < 1" );
|
||||
|
||||
G4int Z = G4int(AtomNumber + 0.5);
|
||||
if (Z < 1) {
|
||||
G4Exception("G4IonisParamElm: ERROR! It is not allowed to create an Element with Z<1");
|
||||
}
|
||||
G4Pow* g4pow = G4Pow::GetInstance();
|
||||
|
||||
// some basic functions of the atomic number
|
||||
fZ = Z;
|
||||
fZ3 = std::pow(fZ, 1./3.);
|
||||
fZZ3 = std::pow(fZ*(fZ+1.), 1./3.);
|
||||
flogZ3 = std::log(fZ)/3.;
|
||||
fZ = Z;
|
||||
fZ3 = g4pow->Z13(Z);
|
||||
fZZ3 = fZ3*g4pow->Z13(Z+1);
|
||||
flogZ3 = g4pow->logZ(Z)/3.;
|
||||
|
||||
// Parameters for energy loss by ionisation
|
||||
|
||||
// Mean excitation energy
|
||||
// from "Stopping Powers for Electrons and Positrons"
|
||||
// ICRU Report N#37, 1984 (energy in eV)
|
||||
static double exc[100] = {
|
||||
21.8, 20.9, 13.3, 15.9, 15.2, 13.0, 11.7, 11.9, 11.5, 13.7,
|
||||
13.6, 13.0, 12.8, 12.4, 11.5, 11.3, 10.2, 10.4, 10.0, 9.6,
|
||||
10.3, 10.6, 10.7, 10.7, 10.9, 11.0, 11.0, 11.1, 11.1, 11.0,
|
||||
10.8, 10.4, 10.5, 10.2, 9.8, 9.8, 9.8, 9.6, 9.7, 9.8,
|
||||
10.2, 10.1, 10.0, 10.0, 10.0, 10.2, 10.0, 9.8, 10.0, 9.8,
|
||||
9.5, 9.3, 9.3, 8.9, 8.9, 8.8, 8.8, 8.8, 9.1, 9.1,
|
||||
9.2, 9.3, 9.2, 9.2, 9.4, 9.5, 9.7, 9.7, 9.8, 9.8,
|
||||
9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 10.1, 10.0, 10.0,
|
||||
10.0, 10.0, 9.9, 9.9, 9.7, 9.2, 9.5, 9.4, 9.4, 9.4,
|
||||
9.6, 9.7, 9.7, 9.8, 9.8, 9.8, 9.8, 9.9, 9.9, 9.9 };
|
||||
|
||||
G4int iz = (G4int)Z - 1 ;
|
||||
if(0 > iz) iz = 0;
|
||||
else if(99 < iz) iz = 99 ;
|
||||
fMeanExcitationEnergy = fZ * exc[iz] * eV ;
|
||||
fMeanExcitationEnergy =
|
||||
G4NistManager::Instance()->GetMeanIonisationEnergy(Z);
|
||||
|
||||
// compute parameters for ion transport
|
||||
// The aproximation from:
|
||||
@@ -84,7 +71,8 @@ G4IonisParamElm::G4IonisParamElm(G4double Z)
|
||||
// Vol.1, Pergamon Press, 1985
|
||||
// Fast ions or hadrons
|
||||
|
||||
if(91 < iz) iz = 91;
|
||||
G4int iz = Z - 1;
|
||||
if(91 < iz) { iz = 91; }
|
||||
|
||||
static G4double vFermi[92] = {
|
||||
1.0309, 0.15976, 0.59782, 1.0781, 1.0486, 1.0, 1.058, 0.93942, 0.74562, 0.3424,
|
||||
@@ -150,19 +138,22 @@ G4IonisParamElm::G4IonisParamElm(G4double Z)
|
||||
G4IonisParamElm::G4IonisParamElm(__void__&)
|
||||
: fShellCorrectionVector(0)
|
||||
{
|
||||
fZ=fZ3=fZZ3=flogZ3=fTau0=fTaul=fBetheBlochLow=fAlow=fBlow=fClow
|
||||
=fMeanExcitationEnergy=fVFermi=fLFactor=0.0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4IonisParamElm::~G4IonisParamElm()
|
||||
{
|
||||
if (fShellCorrectionVector) delete [] fShellCorrectionVector;
|
||||
if (fShellCorrectionVector) { delete [] fShellCorrectionVector; }
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4IonisParamElm::G4IonisParamElm(G4IonisParamElm& right)
|
||||
{
|
||||
fShellCorrectionVector = 0;
|
||||
*this = right;
|
||||
}
|
||||
|
||||
@@ -183,12 +174,14 @@ const G4IonisParamElm& G4IonisParamElm::operator=(const G4IonisParamElm& right)
|
||||
fBlow = right.fBlow;
|
||||
fClow = right.fClow;
|
||||
fMeanExcitationEnergy = right.fMeanExcitationEnergy;
|
||||
if (fShellCorrectionVector) delete [] fShellCorrectionVector;
|
||||
fVFermi = right.fVFermi;
|
||||
fLFactor = right.fLFactor;
|
||||
if (fShellCorrectionVector) { delete [] fShellCorrectionVector; }
|
||||
fShellCorrectionVector = new G4double[3];
|
||||
fShellCorrectionVector[0] = right.fShellCorrectionVector[0];
|
||||
fShellCorrectionVector[1] = right.fShellCorrectionVector[1];
|
||||
fShellCorrectionVector[2] = right.fShellCorrectionVector[2];
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IonisParamMat.cc,v 1.34 2009/11/30 15:48:04 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4IonisParamMat.cc,v 1.40 2010/11/01 18:18:57 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
@@ -61,7 +61,7 @@ G4IonisParamMat::G4IonisParamMat(G4Material* material)
|
||||
fCdensity = 0.0;
|
||||
fD0density = 0.0;
|
||||
fAdjustmentFactor = 1.0;
|
||||
if(!fDensityData) fDensityData = new G4DensityEffectData();
|
||||
if(!fDensityData) { fDensityData = new G4DensityEffectData(); }
|
||||
|
||||
// compute parameters
|
||||
ComputeMeanParameters();
|
||||
@@ -78,6 +78,31 @@ G4IonisParamMat::G4IonisParamMat(G4Material* material)
|
||||
G4IonisParamMat::G4IonisParamMat(__void__&)
|
||||
: fMaterial(0), fShellCorrectionVector(0)
|
||||
{
|
||||
fMeanExcitationEnergy = 0.0;
|
||||
fLogMeanExcEnergy = 0.0;
|
||||
fTaul = 0.0;
|
||||
fCdensity = 0.0;
|
||||
fMdensity = 0.0;
|
||||
fAdensity = 0.0;
|
||||
fX0density = 0.0;
|
||||
fX1density = 0.0;
|
||||
fD0density = 0.0;
|
||||
fPlasmaEnergy = 0.0;
|
||||
fAdjustmentFactor = 0.0;
|
||||
fF1fluct = 0.0;
|
||||
fF2fluct = 0.0;
|
||||
fEnergy1fluct = 0.0;
|
||||
fLogEnergy1fluct = 0.0;
|
||||
fEnergy2fluct = 0.0;
|
||||
fLogEnergy2fluct = 0.0;
|
||||
fEnergy0fluct = 0.0;
|
||||
fRateionexcfluct = 0.0;
|
||||
fZeff = 0.0;
|
||||
fFermiEnergy = 0.0;
|
||||
fLfactor = 0.0;
|
||||
fInvA23 = 0.0;
|
||||
fBirks = 0.0;
|
||||
fMeanEnergyPerIon = 0.0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
@@ -97,7 +122,7 @@ void G4IonisParamMat::ComputeMeanParameters()
|
||||
|
||||
const G4String ch = fMaterial->GetChemicalFormula();
|
||||
|
||||
if(ch != "") fMeanExcitationEnergy = FindMeanExcitationEnergy(ch);
|
||||
if(ch != "") { fMeanExcitationEnergy = FindMeanExcitationEnergy(ch); }
|
||||
|
||||
// Chemical formula defines mean excitation energy
|
||||
if(fMeanExcitationEnergy > 0.0) {
|
||||
@@ -114,7 +139,7 @@ void G4IonisParamMat::ComputeMeanParameters()
|
||||
fMeanExcitationEnergy = std::exp(fLogMeanExcEnergy);
|
||||
}
|
||||
|
||||
fShellCorrectionVector = new G4double[3]; //[3]
|
||||
fShellCorrectionVector = new G4double[3];
|
||||
|
||||
for (G4int j=0; j<=2; j++)
|
||||
{
|
||||
@@ -145,11 +170,12 @@ void G4IonisParamMat::ComputeDensityEffect()
|
||||
// Check if density effect data exist in the table
|
||||
// R.M. Sternheimer, Atomic Data and Nuclear Data Tables, 30: 261 (1984)
|
||||
G4int idx = fDensityData->GetIndex(fMaterial->GetName());
|
||||
// if(idx < 0 && fMaterial->GetNumberOfElements() == 1) {
|
||||
// idx = fDensityData->GetIndex(G4int(fMaterial->GetZ()));
|
||||
// }
|
||||
if(idx < 0 && fMaterial->GetNumberOfElements() == 1) {
|
||||
idx = fDensityData->GetElementIndex(G4int(fMaterial->GetZ()),
|
||||
fMaterial->GetState());
|
||||
}
|
||||
|
||||
//G4cout << "DensityEffect for " << fMaterial->GetName() << " " << idx << G4endl;
|
||||
//G4cout<<"DensityEffect for "<<fMaterial->GetName()<<" "<< idx << G4endl;
|
||||
|
||||
if(idx >= 0) {
|
||||
|
||||
@@ -276,8 +302,7 @@ void G4IonisParamMat::ComputeDensityEffect()
|
||||
void G4IonisParamMat::ComputeFluctModel()
|
||||
{
|
||||
// compute parameters for the energy loss fluctuation model
|
||||
|
||||
// need an 'effective Z' ?????
|
||||
// needs an 'effective Z'
|
||||
G4double Zeff = 0.;
|
||||
for (size_t i=0;i<fMaterial->GetNumberOfElements();i++) {
|
||||
Zeff += (fMaterial->GetFractionVector())[i]
|
||||
@@ -308,13 +333,14 @@ void G4IonisParamMat::ComputeIonParameters()
|
||||
|
||||
// loop for the elements in the material
|
||||
// to find out average values Z, vF, lF
|
||||
G4double z = 0.0, vF = 0.0, lF = 0.0, norm = 0.0 ;
|
||||
G4double z(0.0), vF(0.0), lF(0.0), norm(0.0), a23(0.0);
|
||||
|
||||
if( 1 == NumberOfElements ) {
|
||||
const G4Element* element = (*theElementVector)[0];
|
||||
z = element->GetZ();
|
||||
vF= element->GetIonisation()->GetFermiVelocity();
|
||||
lF= element->GetIonisation()->GetLFactor();
|
||||
a23 = std::pow(element->GetN(),-2./3.);
|
||||
|
||||
} else {
|
||||
for (G4int iel=0; iel<NumberOfElements; iel++)
|
||||
@@ -325,21 +351,24 @@ void G4IonisParamMat::ComputeIonParameters()
|
||||
z += element->GetZ() * weight ;
|
||||
vF += element->GetIonisation()->GetFermiVelocity() * weight ;
|
||||
lF += element->GetIonisation()->GetLFactor() * weight ;
|
||||
a23 += std::pow(element->GetN(),-2./3.) * weight ;
|
||||
}
|
||||
z /= norm ;
|
||||
vF /= norm ;
|
||||
lF /= norm ;
|
||||
z /= norm;
|
||||
vF /= norm;
|
||||
lF /= norm;
|
||||
a23 /= norm;
|
||||
}
|
||||
fZeff = z;
|
||||
fLfactor = lF;
|
||||
fFermiEnergy = 25.*keV*vF*vF;
|
||||
fInvA23 = a23;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
void G4IonisParamMat::SetMeanExcitationEnergy(G4double value)
|
||||
{
|
||||
if(value == fMeanExcitationEnergy || value <= 0.0) return;
|
||||
if(value == fMeanExcitationEnergy || value <= 0.0) { return; }
|
||||
|
||||
/*
|
||||
if (G4NistManager::Instance()->GetVerbose() > 0)
|
||||
@@ -427,12 +456,15 @@ G4IonisParamMat::~G4IonisParamMat()
|
||||
if (fShellCorrectionVector) { delete [] fShellCorrectionVector; }
|
||||
if (fDensityData) { delete fDensityData; }
|
||||
fDensityData = 0;
|
||||
fShellCorrectionVector = 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
|
||||
|
||||
G4IonisParamMat::G4IonisParamMat(const G4IonisParamMat& right)
|
||||
{
|
||||
fShellCorrectionVector = 0;
|
||||
fMaterial = 0;
|
||||
*this = right;
|
||||
}
|
||||
|
||||
@@ -445,7 +477,7 @@ const G4IonisParamMat& G4IonisParamMat::operator=(const G4IonisParamMat& right)
|
||||
fMaterial = right.fMaterial;
|
||||
fMeanExcitationEnergy = right.fMeanExcitationEnergy;
|
||||
fLogMeanExcEnergy = right.fLogMeanExcEnergy;
|
||||
if (fShellCorrectionVector) delete [] fShellCorrectionVector;
|
||||
if(fShellCorrectionVector){ delete [] fShellCorrectionVector; }
|
||||
fShellCorrectionVector = new G4double[3];
|
||||
fShellCorrectionVector[0] = right.fShellCorrectionVector[0];
|
||||
fShellCorrectionVector[1] = right.fShellCorrectionVector[1];
|
||||
@@ -470,6 +502,7 @@ const G4IonisParamMat& G4IonisParamMat::operator=(const G4IonisParamMat& right)
|
||||
fZeff = right.fZeff;
|
||||
fFermiEnergy = right.fFermiEnergy;
|
||||
fLfactor = right.fLfactor;
|
||||
fInvA23 = right.fInvA23;
|
||||
fBirks = right.fBirks;
|
||||
fMeanEnergyPerIon = right.fMeanEnergyPerIon;
|
||||
fDensityData = right.fDensityData;
|
||||
|
||||
@@ -1,351 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IronStoppingICRU73.cc,v 1.9 2009/11/09 16:51:07 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
//
|
||||
// Description: Data on stopping power
|
||||
//
|
||||
// Author: A.Ivanchenko 10.08.2008
|
||||
//
|
||||
// in the framework of the ESA Technology Research Programme
|
||||
// (ESA contract 21435/08/NL/AT)
|
||||
//
|
||||
// Modifications:
|
||||
// 29.04.2009 A.Ivantchenko added data for G4WATER
|
||||
// provided by Prof.P.Sigmund Univ. Southern Denmark
|
||||
// 03.11.2009 A. Lechner: Added new methods BuildPhysicsVector according
|
||||
// to interface changes in base class G4VIonDEDXTable.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4IronStoppingICRU73.hh"
|
||||
#include "G4LPhysicsFreeVector.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
G4IronStoppingICRU73::G4IronStoppingICRU73(G4bool splineFlag)
|
||||
{
|
||||
spline = splineFlag;
|
||||
|
||||
G4int matZ[17] = {1,2,4,6,7,8,10,13,14,18,22,26,28,29,32,36,1000};
|
||||
|
||||
G4String matName[17] = {"G4_H", "G4_He", "G4_Be", "G4_C", "G4_N", "G4_O", "G4_Ne", "G4_Al", "G4_Si", "G4_Ar", "G4_Ti", "G4_Fe", "G4_Ni", "G4_Cu", "G4_Ge", "G4_Kr","G4_WATER"};
|
||||
|
||||
for( size_t i = 0; i < 17; i++ ) {
|
||||
atomicNumbersMat.push_back( matZ[i] );
|
||||
namesMat.push_back( matName[i] );
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4IronStoppingICRU73::~G4IronStoppingICRU73()
|
||||
{
|
||||
size_t nmb = dedx.size();
|
||||
|
||||
for(size_t i = 0; i < nmb; i++) delete dedx[i];
|
||||
|
||||
dedx.clear();
|
||||
dedxKeys.clear();
|
||||
atomicNumbersMat.clear();
|
||||
namesMat.clear();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4bool G4IronStoppingICRU73::BuildPhysicsVector(G4int ionZ,
|
||||
G4int matZ)
|
||||
{
|
||||
return IsApplicable( ionZ, matZ );
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4bool G4IronStoppingICRU73::BuildPhysicsVector(G4int ionZ,
|
||||
const G4String& matName)
|
||||
{
|
||||
return IsApplicable( ionZ, matName );
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4bool
|
||||
G4IronStoppingICRU73::IsApplicable(G4int ionZ, G4int matZ)
|
||||
{
|
||||
G4bool isApplicable = false;
|
||||
|
||||
if( ionZ == 26 ) {
|
||||
|
||||
size_t nmbMat = atomicNumbersMat.size();
|
||||
|
||||
for( size_t i = 0; i < nmbMat; i++ ) {
|
||||
|
||||
if( atomicNumbersMat[i] == matZ ) { isApplicable = true; break; }
|
||||
}
|
||||
}
|
||||
|
||||
return isApplicable;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4bool
|
||||
G4IronStoppingICRU73::IsApplicable(G4int ionZ, const G4String& matName)
|
||||
{
|
||||
G4bool isApplicable = false;
|
||||
|
||||
if( ionZ == 26 ) {
|
||||
|
||||
size_t nmbMat = namesMat.size();
|
||||
|
||||
for( size_t i = 0; i < nmbMat; i++ ) {
|
||||
|
||||
if( namesMat[i] == matName ) { isApplicable = true; break; }
|
||||
}
|
||||
}
|
||||
|
||||
return isApplicable;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double G4IronStoppingICRU73::GetDEDX(G4double kinEnergyPerNucleon,
|
||||
G4int ionZ,
|
||||
G4int matZ) {
|
||||
|
||||
G4double dedxValue = -1.0;
|
||||
|
||||
size_t nmbMat = atomicNumbersMat.size();
|
||||
|
||||
for( size_t i = 0; i < nmbMat; i++ ) {
|
||||
|
||||
if( atomicNumbersMat[i] == matZ ) {
|
||||
dedxValue = GetDEDX(kinEnergyPerNucleon, ionZ, namesMat[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return dedxValue;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double G4IronStoppingICRU73::GetDEDX(G4double kinEnergyPerNucleon,
|
||||
G4int ionZ,
|
||||
const G4String& matName)
|
||||
{
|
||||
G4double dedxValue = -1.0;
|
||||
|
||||
if(ionZ != 26) return dedxValue;
|
||||
|
||||
G4PhysicsVector* physicsVector = GetPhysicsVector(ionZ, matName);
|
||||
|
||||
if(physicsVector != 0) {
|
||||
|
||||
size_t nmbBins = physicsVector -> GetVectorLength();
|
||||
G4double lowerEnergyEdge = physicsVector -> GetLowEdgeEnergy(0);
|
||||
G4double upperEnergyEdge = physicsVector -> GetLowEdgeEnergy(nmbBins-1);
|
||||
|
||||
if(kinEnergyPerNucleon <= upperEnergyEdge) {
|
||||
G4bool b;
|
||||
|
||||
if(kinEnergyPerNucleon < lowerEnergyEdge) {
|
||||
dedxValue = physicsVector -> GetValue(lowerEnergyEdge, b) *
|
||||
std::sqrt(kinEnergyPerNucleon / lowerEnergyEdge);
|
||||
}
|
||||
else {
|
||||
dedxValue = physicsVector -> GetValue(kinEnergyPerNucleon, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return dedxValue;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4PhysicsVector* G4IronStoppingICRU73::CreatePhysicsVector(
|
||||
G4double* energy,
|
||||
G4double* stoppower,
|
||||
G4double factor)
|
||||
{
|
||||
G4LPhysicsFreeVector* pv = new G4LPhysicsFreeVector(53,energy[0],energy[52]);
|
||||
pv->SetSpline(spline);
|
||||
|
||||
for( G4int i = 0; i < 53; i++ ) {
|
||||
pv->PutValues(i,energy[i],stoppower[i]*factor);
|
||||
}
|
||||
|
||||
return pv;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4PhysicsVector* G4IronStoppingICRU73::GetPhysicsVector(
|
||||
G4int ionZ,
|
||||
const G4String& matName)
|
||||
{
|
||||
G4PhysicsVector* physicsVector = 0;
|
||||
|
||||
if(ionZ != 26) return physicsVector;
|
||||
|
||||
// Checking if dE/dx vector was already created
|
||||
size_t nmbKeys = dedxKeys.size();
|
||||
for( size_t i = 0; i < nmbKeys; i++ ) {
|
||||
|
||||
if( dedxKeys[i] == matName ) { physicsVector = dedx[i]; break; }
|
||||
}
|
||||
if(physicsVector != 0) { return physicsVector; }
|
||||
|
||||
// Creating dE/dx vector if ion-material pair covered
|
||||
G4double factor = MeV * cm2 / (0.001 * g);
|
||||
|
||||
G4double E[53] = {.025,.03,.04,.05,.06,.07,0.08,0.09,0.1,0.15,0.2,0.25,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.5,2,2.5,3,4,5,6,7,8,9,10,15,20,25,30,40,50,60,70,80,90,100,150,200,250,300,400,500,600,700,800,900,1000};
|
||||
|
||||
for( G4int i = 0; i < 53; i++ ) E[i] *= MeV;
|
||||
|
||||
|
||||
if(matName == namesMat[0]) {
|
||||
|
||||
G4double H_Fe[53] ={2.760E+01, 3.046E+01, 3.563E+01, 4.023E+01, 4.441E+01, 4.828E+01, 5.191E+01, 5.535E+01, 5.862E+01, 7.281E+01, 8.345E+01, 9.110E+01, 9.654E+01, 1.032E+02, 1.068E+02, 1.085E+02, 1.093E+02, 1.095E+02, 1.092E+02, 1.086E+02, 1.041E+02, 9.890E+01, 9.387E+01, 8.923E+01, 8.115E+01, 7.443E+01, 6.878E+01, 6.397E+01, 5.981E+01, 5.619E+01, 5.300E+01, 4.143E+01, 3.416E+01, 2.915E+01, 2.550E+01, 2.053E+01, 1.731E+01, 1.505E+01, 1.338E+01, 1.209E+01, 1.107E+01, 1.024E+01, 7.662E+00, 6.326E+00, 5.510E+00, 4.960E+00, 4.272E+00, 3.864E+00, 3.597E+00, 3.412E+00, 3.279E+00, 3.180E+00, 3.104E+00};
|
||||
physicsVector = CreatePhysicsVector(E,H_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[1]) {
|
||||
|
||||
G4double He_Fe[53] ={9.071E+00, 9.992E+00, 1.168E+01, 1.322E+01, 1.465E+01, 1.601E+01, 1.731E+01, 1.856E+01, 1.977E+01, 2.534E+01, 3.009E+01, 3.392E+01, 3.691E+01, 4.096E+01, 4.337E+01, 4.482E+01, 4.569E+01, 4.620E+01, 4.645E+01, 4.653E+01, 4.569E+01, 4.406E+01, 4.229E+01, 4.053E+01, 3.730E+01, 3.447E+01, 3.202E+01, 2.988E+01, 2.801E+01, 2.635E+01, 2.489E+01, 1.948E+01, 1.603E+01, 1.365E+01, 1.192E+01, 9.560E+00, 8.040E+00, 6.981E+00, 6.200E+00, 5.601E+00, 5.126E+00, 4.741E+00, 3.553E+00, 2.939E+00, 2.563E+00, 2.310E+00, 1.994E+00, 1.806E+00, 1.684E+00, 1.599E+00, 1.538E+00, 1.493E+00, 1.458E+00};
|
||||
physicsVector = CreatePhysicsVector(E,He_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[2]) {
|
||||
|
||||
G4double Be_Fe[53] ={7.231E+00, 8.001E+00, 9.429E+00, 1.074E+01, 1.198E+01, 1.315E+01, 1.426E+01, 1.532E+01, 1.632E+01, 2.070E+01, 2.417E+01, 2.687E+01, 2.894E+01, 3.186E+01, 3.377E+01, 3.507E+01, 3.597E+01, 3.657E+01, 3.697E+01, 3.722E+01, 3.722E+01, 3.633E+01, 3.519E+01, 3.398E+01, 3.163E+01, 2.948E+01, 2.756E+01, 2.585E+01, 2.431E+01, 2.294E+01, 2.171E+01, 1.705E+01, 1.402E+01, 1.190E+01, 1.035E+01, 8.254E+00, 6.906E+00, 5.972E+00, 5.289E+00, 4.768E+00, 4.357E+00, 4.025E+00, 3.010E+00, 2.489E+00, 2.172E+00, 1.960E+00, 1.693E+00, 1.535E+00, 1.432E+00, 1.361E+00, 1.310E+00, 1.272E+00, 1.243E+00};
|
||||
physicsVector = CreatePhysicsVector(E,Be_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[3]) {
|
||||
|
||||
G4double C_Fe[53] ={6.513E+00, 7.256E+00, 8.631E+00, 9.900E+00, 1.109E+01, 1.222E+01, 1.329E+01, 1.431E+01, 1.528E+01, 1.972E+01, 2.371E+01, 2.695E+01, 2.943E+01, 3.276E+01, 3.481E+01, 3.617E+01, 3.708E+01, 3.770E+01, 3.813E+01, 3.842E+01, 3.865E+01, 3.799E+01, 3.701E+01, 3.592E+01, 3.370E+01, 3.160E+01, 2.969E+01, 2.795E+01, 2.638E+01, 2.496E+01, 2.368E+01, 1.874E+01, 1.545E+01, 1.313E+01, 1.142E+01, 9.087E+00, 7.588E+00, 6.550E+00, 5.792E+00, 5.215E+00, 4.761E+00, 4.396E+00, 3.282E+00, 2.714E+00, 2.369E+00, 2.137E+00, 1.848E+00, 1.677E+00, 1.565E+00, 1.488E+00, 1.433E+00, 1.392E+00, 1.361E+00};
|
||||
physicsVector = CreatePhysicsVector(E,C_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[4]) {
|
||||
|
||||
G4double N_Fe[53] ={7.196E+00, 7.991E+00, 9.457E+00, 1.080E+01, 1.207E+01, 1.328E+01, 1.443E+01, 1.552E+01, 1.657E+01, 2.116E+01, 2.497E+01, 2.817E+01, 3.072E+01, 3.422E+01, 3.634E+01, 3.768E+01, 3.855E+01, 3.912E+01, 3.948E+01, 3.969E+01, 3.965E+01, 3.883E+01, 3.774E+01, 3.657E+01, 3.426E+01, 3.212E+01, 3.017E+01, 2.840E+01, 2.682E+01, 2.538E+01, 2.407E+01, 1.907E+01, 1.573E+01, 1.337E+01, 1.163E+01, 9.250E+00, 7.718E+00, 6.657E+00, 5.883E+00, 5.293E+00, 4.831E+00, 4.458E+00, 3.323E+00, 2.746E+00, 2.396E+00, 2.161E+00, 1.868E+00, 1.694E+00, 1.581E+00, 1.503E+00, 1.447E+00, 1.405E+00, 1.374E+00};
|
||||
physicsVector = CreatePhysicsVector(E,N_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[5]) {
|
||||
|
||||
G4double O_Fe[53] ={5.927E+00, 6.602E+00, 7.858E+00, 9.021E+00, 1.012E+01, 1.118E+01, 1.220E+01, 1.319E+01, 1.415E+01, 1.850E+01, 2.219E+01, 2.529E+01, 2.784E+01, 3.147E+01, 3.372E+01, 3.515E+01, 3.609E+01, 3.671E+01, 3.712E+01, 3.738E+01, 3.753E+01, 3.687E+01, 3.594E+01, 3.491E+01, 3.283E+01, 3.087E+01, 2.906E+01, 2.742E+01, 2.593E+01, 2.457E+01, 2.333E+01, 1.856E+01, 1.535E+01, 1.306E+01, 1.137E+01, 9.051E+00, 7.553E+00, 6.516E+00, 5.757E+00, 5.180E+00, 4.727E+00, 4.362E+00, 3.253E+00, 2.688E+00, 2.346E+00, 2.117E+00, 1.831E+00, 1.661E+00, 1.551E+00, 1.475E+00, 1.420E+00, 1.380E+00, 1.349E+00};
|
||||
physicsVector = CreatePhysicsVector(E,O_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[6]) {
|
||||
|
||||
G4double Ne_Fe[53] ={4.522E+00, 5.012E+00, 5.923E+00, 6.771E+00, 7.576E+00, 8.354E+00, 9.113E+00, 9.858E+00, 1.059E+01, 1.406E+01, 1.714E+01, 1.983E+01, 2.214E+01, 2.574E+01, 2.821E+01, 2.989E+01, 3.102E+01, 3.180E+01, 3.233E+01, 3.270E+01, 3.324E+01, 3.287E+01, 3.221E+01, 3.141E+01, 2.975E+01, 2.812E+01, 2.659E+01, 2.518E+01, 2.389E+01, 2.270E+01, 2.161E+01, 1.733E+01, 1.440E+01, 1.229E+01, 1.072E+01, 8.553E+00, 7.146E+00, 6.167E+00, 5.451E+00, 4.906E+00, 4.478E+00, 4.133E+00, 3.084E+00, 2.552E+00, 2.229E+00, 2.012E+00, 1.742E+00, 1.582E+00, 1.479E+00, 1.407E+00, 1.356E+00, 1.318E+00, 1.289E+00};
|
||||
physicsVector = CreatePhysicsVector(E,Ne_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[7]) {
|
||||
|
||||
G4double Al_Fe[53] ={5.170E+00, 5.727E+00, 6.746E+00, 7.678E+00, 8.549E+00, 9.369E+00, 1.015E+01, 1.089E+01, 1.160E+01, 1.473E+01, 1.729E+01, 1.934E+01, 2.100E+01, 2.358E+01, 2.550E+01, 2.697E+01, 2.809E+01, 2.892E+01, 2.953E+01, 2.997E+01, 3.072E+01, 3.045E+01, 2.984E+01, 2.912E+01, 2.760E+01, 2.611E+01, 2.472E+01, 2.344E+01, 2.227E+01, 2.120E+01, 2.020E+01, 1.629E+01, 1.359E+01, 1.163E+01, 1.017E+01, 8.131E+00, 6.803E+00, 5.876E+00, 5.196E+00, 4.677E+00, 4.270E+00, 3.941E+00, 2.942E+00, 2.434E+00, 2.127E+00, 1.921E+00, 1.664E+00, 1.512E+00, 1.413E+00, 1.345E+00, 1.296E+00, 1.260E+00, 1.233E+00};
|
||||
physicsVector = CreatePhysicsVector(E,Al_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[8]) {
|
||||
|
||||
G4double Si_Fe[53] ={5.179E+00, 5.792E+00, 6.906E+00, 7.894E+00, 8.779E+00, 9.583E+00, 1.033E+01, 1.105E+01, 1.176E+01, 1.509E+01, 1.774E+01, 1.979E+01, 2.143E+01, 2.390E+01, 2.572E+01, 2.711E+01, 2.818E+01, 2.901E+01, 2.964E+01, 3.011E+01, 3.100E+01, 3.079E+01, 3.022E+01, 2.950E+01, 2.798E+01, 2.650E+01, 2.511E+01, 2.382E+01, 2.264E+01, 2.155E+01, 2.056E+01, 1.661E+01, 1.387E+01, 1.189E+01, 1.039E+01, 8.322E+00, 6.967E+00, 6.020E+00, 5.324E+00, 4.794E+00, 4.377E+00, 4.040E+00, 3.017E+00, 2.497E+00, 2.182E+00, 1.971E+00, 1.708E+00, 1.552E+00, 1.451E+00, 1.381E+00, 1.331E+00, 1.295E+00, 1.266E+00};
|
||||
physicsVector = CreatePhysicsVector(E,Si_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[9]) {
|
||||
|
||||
G4double Ar_Fe[53] ={4.640E+00, 5.184E+00, 6.169E+00, 7.042E+00, 7.836E+00, 8.580E+00, 9.290E+00, 9.972E+00, 1.063E+01, 1.362E+01, 1.604E+01, 1.796E+01, 1.949E+01, 2.168E+01, 2.315E+01, 2.417E+01, 2.491E+01, 2.545E+01, 2.586E+01, 2.617E+01, 2.681E+01, 2.669E+01, 2.625E+01, 2.567E+01, 2.438E+01, 2.311E+01, 2.191E+01, 2.081E+01, 1.979E+01, 1.886E+01, 1.801E+01, 1.461E+01, 1.225E+01, 1.052E+01, 9.221E+00, 7.405E+00, 6.211E+00, 5.374E+00, 4.757E+00, 4.286E+00, 3.914E+00, 3.615E+00, 2.701E+00, 2.236E+00, 1.955E+00, 1.766E+00, 1.530E+00, 1.391E+00, 1.301E+00, 1.239E+00, 1.194E+00, 1.161E+00, 1.136E+00};
|
||||
physicsVector = CreatePhysicsVector(E,Ar_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[10]) {
|
||||
|
||||
G4double Ti_Fe[53] ={3.463E+00, 3.857E+00, 4.576E+00, 5.231E+00, 5.840E+00, 6.417E+00, 6.971E+00, 7.510E+00, 8.037E+00, 1.056E+01, 1.286E+01, 1.484E+01, 1.650E+01, 1.899E+01, 2.064E+01, 2.176E+01, 2.255E+01, 2.312E+01, 2.353E+01, 2.385E+01, 2.452E+01, 2.450E+01, 2.420E+01, 2.377E+01, 2.273E+01, 2.165E+01, 2.060E+01, 1.962E+01, 1.870E+01, 1.786E+01, 1.708E+01, 1.396E+01, 1.175E+01, 1.014E+01, 8.910E+00, 7.185E+00, 6.043E+00, 5.239E+00, 4.644E+00, 4.189E+00, 3.829E+00, 3.538E+00, 2.651E+00, 2.198E+00, 1.923E+00, 1.738E+00, 1.508E+00, 1.372E+00, 1.284E+00, 1.223E+00, 1.180E+00, 1.148E+00, 1.123E+00};
|
||||
physicsVector = CreatePhysicsVector(E,Ti_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[11]) {
|
||||
|
||||
G4double Fe_Fe[53] ={2.849E+00, 3.182E+00, 3.799E+00, 4.367E+00, 4.900E+00, 5.406E+00, 5.896E+00, 6.375E+00, 6.847E+00, 9.117E+00, 1.120E+01, 1.305E+01, 1.461E+01, 1.702E+01, 1.875E+01, 2.000E+01, 2.088E+01, 2.151E+01, 2.197E+01, 2.230E+01, 2.301E+01, 2.302E+01, 2.277E+01, 2.239E+01, 2.148E+01, 2.052E+01, 1.959E+01, 1.870E+01, 1.786E+01, 1.709E+01, 1.637E+01, 1.345E+01, 1.138E+01, 9.844E+00, 8.673E+00, 7.018E+00, 5.918E+00, 5.139E+00, 4.562E+00, 4.119E+00, 3.768E+00, 3.484E+00, 2.615E+00, 2.171E+00, 1.901E+00, 1.720E+00, 1.493E+00, 1.360E+00, 1.273E+00, 1.213E+00, 1.171E+00, 1.139E+00, 1.115E+00};
|
||||
physicsVector = CreatePhysicsVector(E,Fe_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[12]) {
|
||||
|
||||
G4double Ni_Fe[53] ={2.634E+00, 2.937E+00, 3.504E+00, 4.033E+00, 4.536E+00, 5.017E+00, 5.480E+00, 5.930E+00, 6.372E+00, 8.530E+00, 1.058E+01, 1.247E+01, 1.412E+01, 1.669E+01, 1.851E+01, 1.983E+01, 2.078E+01, 2.147E+01, 2.197E+01, 2.234E+01, 2.310E+01, 2.311E+01, 2.285E+01, 2.247E+01, 2.156E+01, 2.061E+01, 1.969E+01, 1.881E+01, 1.798E+01, 1.721E+01, 1.650E+01, 1.359E+01, 1.151E+01, 9.971E+00, 8.793E+00, 7.127E+00, 6.015E+00, 5.227E+00, 4.643E+00, 4.193E+00, 3.838E+00, 3.550E+00, 2.666E+00, 2.214E+00, 1.939E+00, 1.754E+00, 1.524E+00, 1.387E+00, 1.299E+00, 1.238E+00, 1.195E+00, 1.163E+00, 1.138E+00};
|
||||
physicsVector = CreatePhysicsVector(E,Ni_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[13]) {
|
||||
|
||||
G4double Cu_Fe[53] ={2.375E+00, 2.651E+00, 3.165E+00, 3.642E+00, 4.090E+00, 4.517E+00, 4.929E+00, 5.331E+00, 5.729E+00, 7.707E+00, 9.605E+00, 1.135E+01, 1.289E+01, 1.528E+01, 1.699E+01, 1.823E+01, 1.915E+01, 1.982E+01, 2.031E+01, 2.066E+01, 2.143E+01, 2.148E+01, 2.125E+01, 2.092E+01, 2.010E+01, 1.924E+01, 1.839E+01, 1.759E+01, 1.683E+01, 1.612E+01, 1.545E+01, 1.276E+01, 1.082E+01, 9.381E+00, 8.279E+00, 6.716E+00, 5.673E+00, 4.933E+00, 4.383E+00, 3.963E+00, 3.625E+00, 3.354E+00, 2.521E+00, 2.094E+00, 1.835E+00, 1.660E+00, 1.443E+00, 1.314E+00, 1.231E+00, 1.173E+00, 1.132E+00, 1.102E+00, 1.079E+00};
|
||||
physicsVector = CreatePhysicsVector(E,Cu_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[14]) {
|
||||
|
||||
G4double Ge_Fe[53] ={2.136E+00, 2.387E+00, 2.854E+00, 3.284E+00, 3.678E+00, 4.043E+00, 4.391E+00, 4.730E+00, 5.064E+00, 6.677E+00, 8.224E+00, 9.597E+00, 1.079E+01, 1.278E+01, 1.434E+01, 1.557E+01, 1.651E+01, 1.723E+01, 1.777E+01, 1.819E+01, 1.913E+01, 1.925E+01, 1.910E+01, 1.883E+01, 1.814E+01, 1.740E+01, 1.667E+01, 1.597E+01, 1.531E+01, 1.469E+01, 1.410E+01, 1.171E+01, 9.967E+00, 8.666E+00, 7.664E+00, 6.237E+00, 5.279E+00, 4.597E+00, 4.090E+00, 3.699E+00, 3.389E+00, 3.137E+00, 2.363E+00, 1.966E+00, 1.723E+00, 1.561E+00, 1.358E+00, 1.237E+00, 1.160E+00, 1.106E+00, 1.068E+00, 1.040E+00, 1.018E+00};
|
||||
physicsVector = CreatePhysicsVector(E,Ge_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[15]) {
|
||||
|
||||
G4double Kr_Fe[53] ={2.888E+00, 3.222E+00, 3.838E+00, 4.386E+00, 4.875E+00, 5.326E+00, 5.754E+00, 6.164E+00, 6.563E+00, 8.427E+00, 9.958E+00, 1.119E+01, 1.221E+01, 1.383E+01, 1.508E+01, 1.608E+01, 1.689E+01, 1.753E+01, 1.802E+01, 1.840E+01, 1.922E+01, 1.926E+01, 1.903E+01, 1.870E+01, 1.792E+01, 1.712E+01, 1.635E+01, 1.563E+01, 1.496E+01, 1.433E+01, 1.375E+01, 1.139E+01, 9.689E+00, 8.425E+00, 7.454E+00, 6.071E+00, 5.143E+00, 4.482E+00, 3.990E+00, 3.610E+00, 3.309E+00, 3.064E+00, 2.309E+00, 1.921E+00, 1.685E+00, 1.526E+00, 1.327E+00, 1.209E+00, 1.133E+00, 1.081E+00, 1.044E+00, 1.016E+00, 9.949E-01};
|
||||
physicsVector = CreatePhysicsVector(E,Kr_Fe,factor);
|
||||
}
|
||||
else if(matName == namesMat[16]) {
|
||||
|
||||
G4double WATER_Fe[53] ={6.5394, 7.3060, 8.7367, 10.0690, 11.3310, 12.5470, 13.7280, 14.8780, 15.9980, 21.1160, 25.4850, 29.1260, 32.0640, 36.1770, 38.6920, 40.2760, 41.2950, 41.9530, 42.3710, 42.6210, 42.5910, 41.6900, 40.5190, 39.2690, 36.8000, 34.5040, 32.4190, 30.5410, 28.8480, 27.3170, 25.9310, 20.6170, 17.0680, 14.5540, 12.6930, 10.1410, 8.4892, 7.3402, 6.4976, 5.8545, 5.3479, 4.9387, 3.6892, 3.0503, 2.6620, 2.4014, 2.0756, 1.8825, 1.7569, 1.6702, 1.6079, 1.5619, 1.5267};
|
||||
physicsVector = CreatePhysicsVector(E,WATER_Fe,factor);
|
||||
}
|
||||
|
||||
if(physicsVector != 0) {
|
||||
dedxKeys.push_back( matName );
|
||||
dedx.push_back( physicsVector );
|
||||
}
|
||||
|
||||
return physicsVector;
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4PhysicsVector* G4IronStoppingICRU73::GetPhysicsVector(G4int ionZ, G4int matZ)
|
||||
{
|
||||
G4PhysicsVector* physicsVector = 0;
|
||||
|
||||
size_t nmbMat = atomicNumbersMat.size();
|
||||
|
||||
for( size_t i = 0; i < nmbMat; i++ ) {
|
||||
|
||||
if( atomicNumbersMat[i] == matZ ) {
|
||||
physicsVector = GetPhysicsVector(ionZ, namesMat[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return physicsVector;
|
||||
}
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Isotope.cc,v 1.22 2008/08/11 11:53:11 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Isotope.cc,v 1.23 2010/10/25 09:20:40 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -56,12 +56,12 @@ G4IsotopeTable G4Isotope::theIsotopeTable;
|
||||
G4Isotope::G4Isotope(const G4String& Name, G4int Z, G4int N, G4double A)
|
||||
: fName(Name), fZ(Z), fN(N), fA(A), fCountUse(0)
|
||||
{
|
||||
if (Z<1) G4Exception
|
||||
(" ERROR! It is not allowed to create an Isotope with Z < 1" );
|
||||
|
||||
if (N<Z) G4Exception
|
||||
(" ERROR! Attempt to create an Isotope with N < Z !!!" );
|
||||
|
||||
if (Z<1) { G4Exception
|
||||
("G4Isotope: ERROR! It is not allowed to create an Isotope with Z < 1" );
|
||||
}
|
||||
if (N<Z) { G4Exception
|
||||
("G4Isotope: ERROR! Attempt to create an Isotope with N < Z !!!" );
|
||||
}
|
||||
if (A<=DBL_MIN) {
|
||||
fA = (G4NistManager::Instance()->GetAtomicMass(Z,N))*g/(mole*amu_c2);
|
||||
}
|
||||
@@ -75,7 +75,7 @@ G4Isotope::G4Isotope(const G4String& Name, G4int Z, G4int N, G4double A)
|
||||
// for usage restricted to object persistency
|
||||
|
||||
G4Isotope::G4Isotope(__void__&)
|
||||
: fZ(0), fN(0), fA(0), fCountUse(0)
|
||||
: fZ(0), fN(0), fA(0), fCountUse(0), fIndexInTable(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -114,6 +114,7 @@ G4Isotope & G4Isotope::operator=(const G4Isotope& right)
|
||||
fZ = right.fZ;
|
||||
fN = right.fN;
|
||||
fA = right.fA;
|
||||
fCountUse = right.fCountUse;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -154,7 +155,7 @@ std::ostream& operator<<(std::ostream& flux, G4Isotope* isotope)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
std::ostream& operator<<(std::ostream& flux, G4Isotope& isotope)
|
||||
std::ostream& operator<<(std::ostream& flux, G4Isotope& isotope)
|
||||
{
|
||||
flux << &isotope;
|
||||
return flux;
|
||||
|
||||
+141
-125
@@ -23,9 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Material.cc,v 1.42 2008/08/13 16:06:42 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Material.cc,v 1.44 2010/10/25 10:35:11 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//
|
||||
@@ -73,9 +72,9 @@
|
||||
|
||||
#include "G4Material.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4Pow.hh"
|
||||
#include <iomanip>
|
||||
|
||||
|
||||
G4MaterialTable G4Material::theMaterialTable;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -90,13 +89,14 @@ G4Material::G4Material(const G4String& name, G4double z,
|
||||
InitializePointers();
|
||||
|
||||
if (density < universe_mean_density)
|
||||
{ G4cerr << "--- Warning from G4Material::G4Material()"
|
||||
<< " define a material with density=0 is not allowed. \n"
|
||||
<< " The material " << name << " will be constructed with the"
|
||||
<< " default minimal density: " << universe_mean_density/(g/cm3)
|
||||
<< "g/cm3" << G4endl;
|
||||
density = universe_mean_density;
|
||||
}
|
||||
{
|
||||
G4cerr << "--- Warning from G4Material::G4Material()"
|
||||
<< " define a material with density=0 is not allowed. \n"
|
||||
<< " The material " << name << " will be constructed with the"
|
||||
<< " default minimal density: " << universe_mean_density/(g/cm3)
|
||||
<< "g/cm3" << G4endl;
|
||||
density = universe_mean_density;
|
||||
}
|
||||
|
||||
fDensity = density;
|
||||
fState = state;
|
||||
@@ -118,8 +118,8 @@ G4Material::G4Material(const G4String& name, G4double z,
|
||||
|
||||
if (fState == kStateUndefined)
|
||||
{
|
||||
if (fDensity > kGasThreshold) fState = kStateSolid;
|
||||
else fState = kStateGas;
|
||||
if (fDensity > kGasThreshold) { fState = kStateSolid; }
|
||||
else { fState = kStateGas; }
|
||||
}
|
||||
|
||||
ComputeDerivedQuantities();
|
||||
@@ -138,12 +138,13 @@ G4Material::G4Material(const G4String& name, G4double density,
|
||||
InitializePointers();
|
||||
|
||||
if (density < universe_mean_density)
|
||||
{G4cerr << "--- Warning from G4Material::G4Material()"
|
||||
<< " define a material with density=0 is not allowed. \n"
|
||||
<< " The material " << name << " will be constructed with the"
|
||||
<< " default minimal density: " << universe_mean_density/(g/cm3)
|
||||
<< "g/cm3" << G4endl;
|
||||
density = universe_mean_density;
|
||||
{
|
||||
G4cerr << "--- Warning from G4Material::G4Material()"
|
||||
<< " define a material with density=0 is not allowed. \n"
|
||||
<< " The material " << name << " will be constructed with the"
|
||||
<< " default minimal density: " << universe_mean_density/(g/cm3)
|
||||
<< "g/cm3" << G4endl;
|
||||
density = universe_mean_density;
|
||||
}
|
||||
|
||||
fDensity = density;
|
||||
@@ -161,8 +162,8 @@ G4Material::G4Material(const G4String& name, G4double density,
|
||||
|
||||
if (fState == kStateUndefined)
|
||||
{
|
||||
if (fDensity > kGasThreshold) fState = kStateSolid;
|
||||
else fState = kStateGas;
|
||||
if (fDensity > kGasThreshold) { fState = kStateSolid; }
|
||||
else { fState = kStateGas; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,6 +178,7 @@ G4Material::G4Material(__void__&)
|
||||
fMaterialPropertiesTable(0), fIndexInTable(0),
|
||||
VecNbOfAtomsPerVolume(0), fIonisation(0), fSandiaTable(0)
|
||||
{
|
||||
InitializePointers();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -194,7 +196,7 @@ void G4Material::AddElement(G4Element* element, G4int nAtoms)
|
||||
// filling ...
|
||||
if ( G4int(fNumberOfElements) < maxNbComponents ) {
|
||||
theElementVector->push_back(element);
|
||||
fAtomsVector [fNumberOfElements] = nAtoms;
|
||||
fAtomsVector[fNumberOfElements] = nAtoms;
|
||||
fNumberOfComponents = ++fNumberOfElements;
|
||||
element->increaseCountUse();
|
||||
} else {
|
||||
@@ -205,19 +207,19 @@ void G4Material::AddElement(G4Element* element, G4int nAtoms)
|
||||
}
|
||||
// filled.
|
||||
if ( G4int(fNumberOfElements) == maxNbComponents ) {
|
||||
// compute proportion by mass
|
||||
size_t i=0;
|
||||
G4double Zmol(0.), Amol(0.);
|
||||
for (i=0;i<fNumberOfElements;i++) {
|
||||
Zmol += fAtomsVector[i]*(*theElementVector)[i]->GetZ();
|
||||
Amol += fAtomsVector[i]*(*theElementVector)[i]->GetA();
|
||||
}
|
||||
for (i=0;i<fNumberOfElements;i++) {
|
||||
fMassFractionVector[i] = fAtomsVector[i]
|
||||
*(*theElementVector)[i]->GetA()/Amol;
|
||||
}
|
||||
// compute proportion by mass
|
||||
size_t i=0;
|
||||
G4double Zmol(0.), Amol(0.);
|
||||
for (i=0; i<fNumberOfElements; ++i) {
|
||||
Zmol += fAtomsVector[i]*(*theElementVector)[i]->GetZ();
|
||||
Amol += fAtomsVector[i]*(*theElementVector)[i]->GetA();
|
||||
}
|
||||
for (i=0; i<fNumberOfElements; ++i) {
|
||||
fMassFractionVector[i] = fAtomsVector[i]
|
||||
*(*theElementVector)[i]->GetA()/Amol;
|
||||
}
|
||||
|
||||
ComputeDerivedQuantities();
|
||||
ComputeDerivedQuantities();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,16 +237,16 @@ void G4Material::AddElement(G4Element* element, G4double fraction)
|
||||
|
||||
// filling ...
|
||||
if (G4int(fNumberOfComponents) < maxNbComponents) {
|
||||
size_t el = 0;
|
||||
while ((el<fNumberOfElements)&&(element!=(*theElementVector)[el])) el++;
|
||||
if (el<fNumberOfElements) fMassFractionVector[el] += fraction;
|
||||
else {
|
||||
theElementVector->push_back(element);
|
||||
fMassFractionVector[el] = fraction;
|
||||
fNumberOfElements++;
|
||||
element->increaseCountUse();
|
||||
}
|
||||
fNumberOfComponents++;
|
||||
size_t el = 0;
|
||||
while ((el<fNumberOfElements)&&(element!=(*theElementVector)[el])) { ++el; }
|
||||
if (el<fNumberOfElements) fMassFractionVector[el] += fraction;
|
||||
else {
|
||||
theElementVector->push_back(element);
|
||||
fMassFractionVector[el] = fraction;
|
||||
++fNumberOfElements;
|
||||
element->increaseCountUse();
|
||||
}
|
||||
++fNumberOfComponents;
|
||||
} else {
|
||||
G4cerr << "G4Material::AddElement ERROR for " << fName << " nElement= "
|
||||
<< fNumberOfElements << G4endl;
|
||||
@@ -255,26 +257,26 @@ void G4Material::AddElement(G4Element* element, G4double fraction)
|
||||
// filled.
|
||||
if (G4int(fNumberOfComponents) == maxNbComponents) {
|
||||
|
||||
size_t i=0;
|
||||
G4double Zmol(0.), Amol(0.);
|
||||
// check sum of weights -- OK?
|
||||
G4double wtSum(0.0);
|
||||
for (i=0;i<fNumberOfElements;i++) {
|
||||
wtSum += fMassFractionVector[i];
|
||||
Zmol += fMassFractionVector[i]*(*theElementVector)[i]->GetZ();
|
||||
Amol += fMassFractionVector[i]*(*theElementVector)[i]->GetA();
|
||||
}
|
||||
if (std::abs(1.-wtSum) > perThousand) {
|
||||
G4cerr << "WARNING !! for " << fName << " sum of fractional masses "
|
||||
<< wtSum << " is not 1 - results may be wrong"
|
||||
<< G4endl;
|
||||
}
|
||||
for (i=0;i<fNumberOfElements;i++) {
|
||||
fAtomsVector[i] =
|
||||
G4int(fMassFractionVector[i]*Amol/(*theElementVector)[i]->GetA()+0.5);
|
||||
}
|
||||
size_t i=0;
|
||||
G4double Zmol(0.), Amol(0.);
|
||||
// check sum of weights -- OK?
|
||||
G4double wtSum(0.0);
|
||||
for (i=0; i<fNumberOfElements; ++i) {
|
||||
wtSum += fMassFractionVector[i];
|
||||
Zmol += fMassFractionVector[i]*(*theElementVector)[i]->GetZ();
|
||||
Amol += fMassFractionVector[i]*(*theElementVector)[i]->GetA();
|
||||
}
|
||||
if (std::fabs(1.-wtSum) > perThousand) {
|
||||
G4cerr << "WARNING !! for " << fName << " sum of fractional masses "
|
||||
<< wtSum << " is not 1 - results may be wrong"
|
||||
<< G4endl;
|
||||
}
|
||||
for (i=0; i<fNumberOfElements; ++i) {
|
||||
fAtomsVector[i] =
|
||||
G4int(fMassFractionVector[i]*Amol/(*theElementVector)[i]->GetA()+0.5);
|
||||
}
|
||||
|
||||
ComputeDerivedQuantities();
|
||||
ComputeDerivedQuantities();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,7 +300,7 @@ void G4Material::AddMaterial(G4Material* material, G4double fraction)
|
||||
fArrayLength += nelm - 1;
|
||||
G4double* v1 = new G4double[fArrayLength];
|
||||
G4int* i1 = new G4int[fArrayLength];
|
||||
for(G4int i=0; i<nold; i++) {
|
||||
for(G4int i=0; i<nold; ++i) {
|
||||
v1[i] = fMassFractionVector[i];
|
||||
i1[i] = fAtomsVector[i];
|
||||
}
|
||||
@@ -310,8 +312,8 @@ void G4Material::AddMaterial(G4Material* material, G4double fraction)
|
||||
|
||||
// filling ...
|
||||
if (G4int(fNumberOfComponents) < maxNbComponents) {
|
||||
for (size_t elm=0; elm<nelm; elm++)
|
||||
{
|
||||
for (size_t elm=0; elm<nelm; ++elm)
|
||||
{
|
||||
G4Element* element = (*(material->GetElementVector()))[elm];
|
||||
size_t el = 0;
|
||||
while ((el<fNumberOfElements)&&(element!=(*theElementVector)[el])) el++;
|
||||
@@ -321,11 +323,11 @@ void G4Material::AddMaterial(G4Material* material, G4double fraction)
|
||||
theElementVector->push_back(element);
|
||||
fMassFractionVector[el] = fraction
|
||||
*(material->GetFractionVector())[elm];
|
||||
fNumberOfElements++;
|
||||
++fNumberOfElements;
|
||||
element->increaseCountUse();
|
||||
}
|
||||
}
|
||||
fNumberOfComponents++;
|
||||
}
|
||||
++fNumberOfComponents;
|
||||
} else {
|
||||
G4cerr << "G4Material::AddElement ERROR for " << fName << " nElement= "
|
||||
<< fNumberOfElements << G4endl;
|
||||
@@ -335,26 +337,26 @@ void G4Material::AddMaterial(G4Material* material, G4double fraction)
|
||||
|
||||
// filled.
|
||||
if (G4int(fNumberOfComponents) == maxNbComponents) {
|
||||
size_t i=0;
|
||||
G4double Zmol(0.), Amol(0.);
|
||||
// check sum of weights -- OK?
|
||||
G4double wtSum(0.0);
|
||||
for (i=0;i<fNumberOfElements;i++) {
|
||||
wtSum += fMassFractionVector[i];
|
||||
Zmol += fMassFractionVector[i]*(*theElementVector)[i]->GetZ();
|
||||
Amol += fMassFractionVector[i]*(*theElementVector)[i]->GetA();
|
||||
}
|
||||
if (std::abs(1.-wtSum) > perThousand) {
|
||||
G4cerr << "WARNING !! for " << fName << " sum of fractional masses "
|
||||
<< wtSum << " is not 1 - results may be wrong"
|
||||
<< G4endl;
|
||||
}
|
||||
for (i=0;i<fNumberOfElements;i++) {
|
||||
fAtomsVector[i] =
|
||||
G4int(fMassFractionVector[i]*Amol/(*theElementVector)[i]->GetA()+0.5);
|
||||
}
|
||||
size_t i=0;
|
||||
G4double Zmol(0.), Amol(0.);
|
||||
// check sum of weights -- OK?
|
||||
G4double wtSum(0.0);
|
||||
for (i=0; i<fNumberOfElements; ++i) {
|
||||
wtSum += fMassFractionVector[i];
|
||||
Zmol += fMassFractionVector[i]*(*theElementVector)[i]->GetZ();
|
||||
Amol += fMassFractionVector[i]*(*theElementVector)[i]->GetA();
|
||||
}
|
||||
if (std::fabs(1.-wtSum) > perThousand) {
|
||||
G4cerr << "WARNING !! for " << fName << " sum of fractional masses "
|
||||
<< wtSum << " is not 1 - results may be wrong"
|
||||
<< G4endl;
|
||||
}
|
||||
for (i=0;i<fNumberOfElements;i++) {
|
||||
fAtomsVector[i] =
|
||||
G4int(fMassFractionVector[i]*Amol/(*theElementVector)[i]->GetA()+0.5);
|
||||
}
|
||||
|
||||
ComputeDerivedQuantities();
|
||||
ComputeDerivedQuantities();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,10 +370,10 @@ void G4Material::ComputeDerivedQuantities()
|
||||
// Number of atoms per volume (per element), total nb of electrons per volume
|
||||
G4double Zi, Ai;
|
||||
TotNbOfAtomsPerVolume = 0.;
|
||||
if (VecNbOfAtomsPerVolume) delete [] VecNbOfAtomsPerVolume;
|
||||
if (VecNbOfAtomsPerVolume) { delete [] VecNbOfAtomsPerVolume; }
|
||||
VecNbOfAtomsPerVolume = new G4double[fNumberOfElements];
|
||||
TotNbOfElectPerVolume = 0.;
|
||||
for (size_t i=0;i<fNumberOfElements;i++) {
|
||||
for (size_t i=0; i<fNumberOfElements; ++i) {
|
||||
Zi = (*theElementVector)[i]->GetZ();
|
||||
Ai = (*theElementVector)[i]->GetA();
|
||||
VecNbOfAtomsPerVolume[i] = Avogadro*fDensity*fMassFractionVector[i]/Ai;
|
||||
@@ -382,9 +384,9 @@ void G4Material::ComputeDerivedQuantities()
|
||||
ComputeRadiationLength();
|
||||
ComputeNuclearInterLength();
|
||||
|
||||
if (fIonisation) delete fIonisation;
|
||||
if (fIonisation) { delete fIonisation; }
|
||||
fIonisation = new G4IonisParamMat(this);
|
||||
if (fSandiaTable) delete fSandiaTable;
|
||||
if (fSandiaTable) { delete fSandiaTable; }
|
||||
fSandiaTable = new G4SandiaTable(this);
|
||||
}
|
||||
|
||||
@@ -393,9 +395,9 @@ void G4Material::ComputeDerivedQuantities()
|
||||
void G4Material::ComputeRadiationLength()
|
||||
{
|
||||
G4double radinv = 0.0 ;
|
||||
for (size_t i=0;i<fNumberOfElements;i++) {
|
||||
for (size_t i=0;i<fNumberOfElements;++i) {
|
||||
radinv += VecNbOfAtomsPerVolume[i]*((*theElementVector)[i]->GetfRadTsai());
|
||||
}
|
||||
}
|
||||
fRadlen = (radinv <= 0.0 ? DBL_MAX : 1./radinv);
|
||||
}
|
||||
|
||||
@@ -405,10 +407,11 @@ void G4Material::ComputeNuclearInterLength()
|
||||
{
|
||||
const G4double lambda0 = 35*g/cm2;
|
||||
G4double NILinv = 0.0;
|
||||
for (size_t i=0;i<fNumberOfElements;i++) {
|
||||
NILinv +=
|
||||
VecNbOfAtomsPerVolume[i]*std::pow(((*theElementVector)[i]->GetN()),0.6666667);
|
||||
}
|
||||
G4Pow* g4pow = G4Pow::GetInstance();
|
||||
for (size_t i=0; i<fNumberOfElements; ++i) {
|
||||
NILinv +=
|
||||
VecNbOfAtomsPerVolume[i]*g4pow->Z23(G4int((*theElementVector)[i]->GetN()+0.5));
|
||||
}
|
||||
NILinv *= amu/lambda0;
|
||||
fNuclInterLen = (NILinv <= 0.0 ? DBL_MAX : 1./NILinv);
|
||||
}
|
||||
@@ -426,6 +429,18 @@ void G4Material::InitializePointers()
|
||||
fIonisation = 0;
|
||||
fSandiaTable = 0;
|
||||
|
||||
// initilized data members
|
||||
fDensity = 0.0;
|
||||
fState = kStateUndefined;
|
||||
fTemp = 0.0;
|
||||
fPressure = 0.0;
|
||||
maxNbComponents = 0;
|
||||
fArrayLength = 0;
|
||||
TotNbOfAtomsPerVolume = 0;
|
||||
TotNbOfElectPerVolume = 0;
|
||||
fRadlen = 0.0;
|
||||
fNuclInterLen = 0.0;
|
||||
|
||||
// Store in the static Table of Materials
|
||||
theMaterialTable.push_back(this);
|
||||
fIndexInTable = theMaterialTable.size() - 1;
|
||||
@@ -452,15 +467,15 @@ G4Material* G4Material::GetMaterial(G4String materialName, G4bool warning)
|
||||
// search the material by its name
|
||||
for (size_t J=0 ; J<theMaterialTable.size() ; J++)
|
||||
{
|
||||
if (theMaterialTable[J]->GetName() == materialName)
|
||||
return theMaterialTable[J];
|
||||
if (theMaterialTable[J]->GetName() == materialName)
|
||||
{ return theMaterialTable[J]; }
|
||||
}
|
||||
|
||||
// the material does not exist in the table
|
||||
if (warning) {
|
||||
G4cout << "\n---> warning from G4Material::GetMaterial(). The material: "
|
||||
<< materialName << " does not exist in the table. Return NULL pointer."
|
||||
<< G4endl;
|
||||
G4cout << "\n---> warning from G4Material::GetMaterial(). The material: "
|
||||
<< materialName << " does not exist in the table. Return NULL pointer."
|
||||
<< G4endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -478,12 +493,12 @@ G4Material::G4Material(const G4Material& right)
|
||||
G4Material::~G4Material()
|
||||
{
|
||||
// G4cout << "### Destruction of material " << fName << " started" <<G4endl;
|
||||
if (theElementVector) delete theElementVector;
|
||||
if (fMassFractionVector) delete [] fMassFractionVector;
|
||||
if (fAtomsVector) delete [] fAtomsVector;
|
||||
if (VecNbOfAtomsPerVolume) delete [] VecNbOfAtomsPerVolume;
|
||||
if (fIonisation) delete fIonisation;
|
||||
if (fSandiaTable) delete fSandiaTable;
|
||||
if (theElementVector) { delete theElementVector; }
|
||||
if (fMassFractionVector) { delete [] fMassFractionVector; }
|
||||
if (fAtomsVector) { delete [] fAtomsVector; }
|
||||
if (VecNbOfAtomsPerVolume) { delete [] VecNbOfAtomsPerVolume; }
|
||||
if (fIonisation) { delete fIonisation; }
|
||||
if (fSandiaTable) { delete fSandiaTable; }
|
||||
|
||||
// Remove this material from theMaterialTable.
|
||||
//
|
||||
@@ -503,10 +518,10 @@ const G4Material& G4Material::operator=(const G4Material& right)
|
||||
fTemp = right.fTemp;
|
||||
fPressure = right.fPressure;
|
||||
|
||||
if (fImplicitElement) delete ((*theElementVector)[0]);
|
||||
if (theElementVector) delete theElementVector;
|
||||
if (fMassFractionVector) delete [] fMassFractionVector;
|
||||
if (fAtomsVector) delete [] fAtomsVector;
|
||||
if (fImplicitElement) { delete ((*theElementVector)[0]); }
|
||||
if (theElementVector) { delete theElementVector; }
|
||||
if (fMassFractionVector) { delete [] fMassFractionVector; }
|
||||
if (fAtomsVector) { delete [] fAtomsVector; }
|
||||
|
||||
maxNbComponents = right.maxNbComponents;
|
||||
fNumberOfComponents = right.fNumberOfComponents;
|
||||
@@ -523,7 +538,7 @@ const G4Material& G4Material::operator=(const G4Material& right)
|
||||
} else {
|
||||
theElementVector = new G4ElementVector(fNumberOfElements,0);
|
||||
fMassFractionVector = new G4double[fNumberOfElements];
|
||||
for (size_t i=0; i<fNumberOfElements; i++) {
|
||||
for (size_t i=0; i<fNumberOfElements; ++i) {
|
||||
(*theElementVector)[i]= (*right.theElementVector)[i];
|
||||
fMassFractionVector[i]= right.fMassFractionVector[i];
|
||||
}
|
||||
@@ -577,14 +592,14 @@ std::ostream& operator<<(std::ostream& flux, G4Material* material)
|
||||
<< " Imean: " << std::setw(7) << std::setprecision(3)
|
||||
<< G4BestUnit(material->GetIonisation()->GetMeanExcitationEnergy(),"Energy");
|
||||
|
||||
if(material->fState == kStateGas)
|
||||
if(material->fState == kStateGas) {
|
||||
flux
|
||||
<< " temperature: " << std::setw(6) << std::setprecision(2)
|
||||
<< (material->fTemp)/kelvin << " K"
|
||||
<< " pressure: " << std::setw(6) << std::setprecision(2)
|
||||
<< (material->fPressure)/atmosphere << " atm";
|
||||
|
||||
for (size_t i=0; i<material->fNumberOfElements; i++)
|
||||
}
|
||||
for (size_t i=0; i<material->fNumberOfElements; i++) {
|
||||
flux
|
||||
<< "\n ---> " << (*(material->theElementVector))[i]
|
||||
<< " ElmMassFraction: " << std::setw(6)<< std::setprecision(2)
|
||||
@@ -592,7 +607,7 @@ std::ostream& operator<<(std::ostream& flux, G4Material* material)
|
||||
<< " ElmAbundance " << std::setw(6)<< std::setprecision(2)
|
||||
<< 100*(material->VecNbOfAtomsPerVolume[i])/(material->TotNbOfAtomsPerVolume)
|
||||
<< " %";
|
||||
|
||||
}
|
||||
flux.precision(prec);
|
||||
flux.setf(mode,std::ios::floatfield);
|
||||
|
||||
@@ -601,7 +616,7 @@ std::ostream& operator<<(std::ostream& flux, G4Material* material)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
std::ostream& operator<<(std::ostream& flux, G4Material& material)
|
||||
std::ostream& operator<<(std::ostream& flux, G4Material& material)
|
||||
{
|
||||
flux << &material;
|
||||
return flux;
|
||||
@@ -611,14 +626,15 @@ std::ostream& operator<<(std::ostream& flux, G4Material* material)
|
||||
|
||||
std::ostream& operator<<(std::ostream& flux, G4MaterialTable MaterialTable)
|
||||
{
|
||||
//Dump info for all known materials
|
||||
flux << "\n***** Table : Nb of materials = " << MaterialTable.size()
|
||||
<< " *****\n" << G4endl;
|
||||
//Dump info for all known materials
|
||||
flux << "\n***** Table : Nb of materials = " << MaterialTable.size()
|
||||
<< " *****\n" << G4endl;
|
||||
|
||||
for (size_t i=0; i<MaterialTable.size(); i++) flux << MaterialTable[i]
|
||||
<< G4endl << G4endl;
|
||||
for (size_t i=0; i<MaterialTable.size(); ++i) {
|
||||
flux << MaterialTable[i] << G4endl << G4endl;
|
||||
}
|
||||
|
||||
return flux;
|
||||
return flux;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MaterialPropertyVector.cc,v 1.17 2009/04/21 15:35:45 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4MaterialPropertyVector.cc,v 1.20 2010/10/29 23:44:43 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -125,35 +125,30 @@ G4MaterialPropertyVector::~G4MaterialPropertyVector()
|
||||
|
||||
void G4MaterialPropertyVector::RemoveElement(G4double aPhotonEnergy)
|
||||
{
|
||||
G4MPVEntry *newElement;
|
||||
G4MPVEntry *success=0;
|
||||
|
||||
newElement = new G4MPVEntry(aPhotonEnergy, DBL_MAX);
|
||||
|
||||
std::vector<G4MPVEntry*>::iterator i;
|
||||
for (i = MPV.begin(); i != MPV.end(); i++)
|
||||
{
|
||||
if (**i == *newElement) { success = *i; break; }
|
||||
}
|
||||
// success = MPV.remove(newElement);
|
||||
for (i = MPV.begin(); i != MPV.end(); ++i)
|
||||
{
|
||||
if((*i)->GetPhotonEnergy() == aPhotonEnergy) { success = *i; break; }
|
||||
}
|
||||
|
||||
if(success == 0)
|
||||
{
|
||||
G4Exception("G4MaterialPropertyVector::RemoveElement()", "NotFound",
|
||||
FatalException, "Element not found !");
|
||||
return;
|
||||
}
|
||||
{
|
||||
G4Exception("G4MaterialPropertyVector::RemoveElement()", "NotFound",
|
||||
FatalException, "Element not found !");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
MPV.erase(i); // remove done here.
|
||||
}
|
||||
{
|
||||
MPV.erase(i); // remove done here.
|
||||
}
|
||||
|
||||
NumEntries--;
|
||||
}
|
||||
|
||||
G4double G4MaterialPropertyVector::GetProperty(G4double aPhotonEnergy) const
|
||||
{
|
||||
G4MPVEntry *target, *temp;
|
||||
G4int left, right;
|
||||
G4double ratio1, ratio2, pmright, pmleft, InterpolatedValue;
|
||||
|
||||
@@ -174,6 +169,8 @@ G4double G4MaterialPropertyVector::GetProperty(G4double aPhotonEnergy) const
|
||||
{
|
||||
G4Exception("G4MaterialPropertyVector::GetProperty()", "OutOfRange",
|
||||
JustWarning, "Attempt to retrieve property below range !");
|
||||
G4cout << " aPhotonEnergy = " << aPhotonEnergy/MeV
|
||||
<< " [MeV] PMmin = " << PMmin << " [MeV]" << G4endl;
|
||||
return minProp;
|
||||
}
|
||||
|
||||
@@ -181,45 +178,23 @@ G4double G4MaterialPropertyVector::GetProperty(G4double aPhotonEnergy) const
|
||||
{
|
||||
G4Exception("G4MaterialPropertyVector::GetProperty()", "OutOfRange",
|
||||
JustWarning, "Attempt to retrieve property above range !");
|
||||
G4cout << " aPhotonEnergy = " << aPhotonEnergy/MeV
|
||||
<< " [MeV] PMmax = " << PMmax << " [MeV]" << G4endl;
|
||||
return maxProp;
|
||||
}
|
||||
|
||||
target = new G4MPVEntry(aPhotonEnergy, 0.0);
|
||||
|
||||
temp = 0;
|
||||
//temp = MPV.find(target);
|
||||
std::vector<G4MPVEntry*>::const_iterator i;
|
||||
for (i = MPV.begin(); i != MPV.end(); i++)
|
||||
{
|
||||
if (**i == *target) { temp = *i; break; }
|
||||
}
|
||||
if (temp != 0)
|
||||
{
|
||||
////////////////////////
|
||||
// Return actual value
|
||||
////////////////////////
|
||||
//////////////////////////////
|
||||
// Return interpolated value
|
||||
//////////////////////////////
|
||||
|
||||
G4double retval = temp->GetProperty();
|
||||
delete target;
|
||||
return retval;
|
||||
}
|
||||
else
|
||||
{
|
||||
//////////////////////////////
|
||||
// Return interpolated value
|
||||
//////////////////////////////
|
||||
|
||||
GetAdjacentBins(aPhotonEnergy, &left, &right);
|
||||
|
||||
pmleft = MPV[left]->GetPhotonEnergy();
|
||||
pmright = MPV[right]->GetPhotonEnergy();
|
||||
ratio1 = (aPhotonEnergy-pmleft)/(pmright-pmleft);
|
||||
ratio2 = 1 - ratio1;
|
||||
InterpolatedValue = MPV[left]->GetProperty()*ratio2 +
|
||||
MPV[right]->GetProperty()*ratio1;
|
||||
delete target;
|
||||
return InterpolatedValue;
|
||||
}
|
||||
GetAdjacentBins(aPhotonEnergy, &left, &right);
|
||||
pmleft = MPV[left]->GetPhotonEnergy();
|
||||
pmright = MPV[right]->GetPhotonEnergy();
|
||||
ratio1 = (aPhotonEnergy-pmleft)/(pmright-pmleft);
|
||||
ratio2 = 1 - ratio1;
|
||||
InterpolatedValue = MPV[left]->GetProperty()*ratio2 +
|
||||
MPV[right]->GetProperty()*ratio1;
|
||||
return InterpolatedValue;
|
||||
}
|
||||
|
||||
G4double G4MaterialPropertyVector::GetPhotonEnergy(G4double aProperty) const
|
||||
@@ -339,7 +314,7 @@ void G4MaterialPropertyVector::GetAdjacentBins(G4double aPhotonEnergy,
|
||||
do
|
||||
{
|
||||
mid = (*left + *right)/2;
|
||||
if (MPV[mid]->GetPhotonEnergy() < aPhotonEnergy)
|
||||
if (MPV[mid]->GetPhotonEnergy() <= aPhotonEnergy)
|
||||
{
|
||||
*left = mid;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NistManager.cc,v 1.19 2008/07/23 14:49:31 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4NistManager.cc,v 1.20 2010/11/01 18:43:47 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -86,21 +86,15 @@ G4NistManager::G4NistManager()
|
||||
matBuilder = new G4NistMaterialBuilder(elmBuilder,verbose);
|
||||
|
||||
messenger = new G4NistMessenger(this);
|
||||
g4pow = G4Pow::GetInstance();
|
||||
|
||||
// compute frequently used values
|
||||
for(G4int i=1; i<256; i++) {
|
||||
G4double x = G4double(i);
|
||||
POWERZ13[i] = std::pow(x,1.0/3.0);
|
||||
LOGA[i] = std::log(x);
|
||||
}
|
||||
for(G4int j=1; j<101; j++) {
|
||||
// compute frequently used values for mean atomic numbers
|
||||
for(G4int j=1; j<101; ++j) {
|
||||
G4double A = elmBuilder->GetA(j);
|
||||
POWERA27[j] = std::pow(A,0.27);
|
||||
LOGAZ[j] = std::log(A);
|
||||
}
|
||||
POWERZ13[0] = 1.0;
|
||||
POWERA27[0] = 1.0;
|
||||
LOGA[0] = 0.0;
|
||||
LOGAZ[0] = 0.0;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NistMaterialBuilder.cc,v 1.23 2009/11/24 17:19:10 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4NistMaterialBuilder.cc,v 1.36 2010/11/03 18:08:12 antoni Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
@@ -61,6 +61,7 @@
|
||||
|
||||
#include "G4NistMaterialBuilder.hh"
|
||||
#include "G4NistElementBuilder.hh"
|
||||
#include "G4Element.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -94,8 +95,8 @@ G4Material* G4NistMaterialBuilder::FindOrBuildMaterial(const G4String& matname,
|
||||
}
|
||||
|
||||
G4String name = matname;
|
||||
if("G4_NYLON-6/6" == matname) name = "G4_NYLON-6-6";
|
||||
if("G4_NYLON-6/10" == matname) name = "G4_NYLON-6-10";
|
||||
if("G4_NYLON-6/6" == matname) { name = "G4_NYLON-6-6"; }
|
||||
if("G4_NYLON-6/10" == matname) { name = "G4_NYLON-6-10";}
|
||||
|
||||
if (verbose > 1) {
|
||||
G4cout << "G4NistMaterialBuilder::FindOrBuildMaterial " << name << G4endl;
|
||||
@@ -106,15 +107,15 @@ G4Material* G4NistMaterialBuilder::FindOrBuildMaterial(const G4String& matname,
|
||||
// Check if name inside NIST DB?
|
||||
G4Material* mat = 0;
|
||||
|
||||
for (G4int i=0; i<nMaterials; i++) {
|
||||
for (G4int i=0; i<nMaterials; ++i) {
|
||||
|
||||
// Is inside NIST DB?
|
||||
if (name == names[i]) {
|
||||
|
||||
// Build new Nist material
|
||||
if(matIndex[i] == -1) mat = BuildMaterial(i, isotopes);
|
||||
if(matIndex[i] == -1) { mat = BuildMaterial(i, isotopes); }
|
||||
// Nist material was already built
|
||||
else mat = (*theMaterialTable)[matIndex[i]];
|
||||
else { mat = (*theMaterialTable)[matIndex[i]]; }
|
||||
|
||||
return mat;
|
||||
|
||||
@@ -123,7 +124,7 @@ G4Material* G4NistMaterialBuilder::FindOrBuildMaterial(const G4String& matname,
|
||||
|
||||
// Check the list of all materials
|
||||
if (nmat > 0) {
|
||||
for (G4int i=0; i<nmat; i++) {
|
||||
for (G4int i=0; i<nmat; ++i) {
|
||||
if(name == ((*theMaterialTable)[i])->GetName()) {
|
||||
mat = (*theMaterialTable)[i];
|
||||
return mat;
|
||||
@@ -145,13 +146,14 @@ G4Material* G4NistMaterialBuilder::BuildMaterial(const G4String& name,
|
||||
G4bool isotopes)
|
||||
|
||||
{
|
||||
if (verbose > 1) G4cout << "G4NistMaterialBuilder: BuildMaterial " << name
|
||||
<< G4endl;
|
||||
|
||||
if (verbose > 1) {
|
||||
G4cout << "G4NistMaterialBuilder: BuildMaterial " << name
|
||||
<< G4endl;
|
||||
}
|
||||
G4Material* mat = 0;
|
||||
if (nMaterials == 0) return mat;
|
||||
if (nMaterials == 0) { return mat; }
|
||||
|
||||
for (G4int i=0; i<nMaterials; i++) {
|
||||
for (G4int i=0; i<nMaterials; ++i) {
|
||||
if (name == names[i]) {
|
||||
mat = BuildMaterial(i, isotopes);
|
||||
break;
|
||||
@@ -162,27 +164,33 @@ G4Material* G4NistMaterialBuilder::BuildMaterial(const G4String& name,
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4Material* G4NistMaterialBuilder::BuildMaterial(G4int i,
|
||||
G4bool isotopes)
|
||||
|
||||
G4Material* G4NistMaterialBuilder::BuildMaterial(G4int i, G4bool isotopes)
|
||||
{
|
||||
if (verbose > 1) G4cout << "G4NistMaterialBuilder: BuildMaterial #" << i
|
||||
<< G4endl;
|
||||
|
||||
if (verbose > 1) {
|
||||
G4cout << "G4NistMaterialBuilder: BuildMaterial #" << i
|
||||
<< G4endl;
|
||||
}
|
||||
G4Material* mat = 0;
|
||||
if (nMaterials == 0) return mat;
|
||||
if (nMaterials == 0) { return mat; }
|
||||
|
||||
G4int nc = components[i];
|
||||
mat = new G4Material(names[i],densities[i],nc,
|
||||
states[i],temperatures[i], presures[i]);
|
||||
|
||||
if (verbose>1) G4cout << "New material nComponents= " << nc << G4endl;
|
||||
if (verbose>1) { G4cout << "New material nComponents= " << nc << G4endl; }
|
||||
if (nc > 0) {
|
||||
G4int idx = indexes[i];
|
||||
for (G4int j=0; j<nc; j++) {
|
||||
G4int Z = elements[idx+j];
|
||||
G4Element* elm = elmBuilder->FindOrBuildElement(Z, isotopes);
|
||||
mat->AddElement(elm,fractions[idx+j]);
|
||||
G4Element* el = elmBuilder->FindOrBuildElement(Z, isotopes);
|
||||
if(!el) {
|
||||
G4cout << "G4NistMaterialBuilder::BuildMaterial:"
|
||||
<< " ERROR: elements Z= " << Z << " is not found"
|
||||
<< G4endl;
|
||||
G4Exception("G4NistMaterialBuilder::BuildMaterial: Fail to construct material");
|
||||
return 0;
|
||||
}
|
||||
mat->AddElement(el,fractions[idx+j]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,9 +201,9 @@ G4Material* G4NistMaterialBuilder::BuildMaterial(G4int i,
|
||||
mat->GetIonisation()->SetMeanExcitationEnergy(exc);
|
||||
}
|
||||
|
||||
if (ionPotentials[i] != 0.0)
|
||||
if (ionPotentials[i] != 0.0) {
|
||||
mat->GetIonisation()->SetMeanExcitationEnergy(ionPotentials[i]);
|
||||
|
||||
}
|
||||
matIndex[i] = mat->GetIndex();
|
||||
|
||||
return mat;
|
||||
@@ -218,6 +226,7 @@ G4Material* G4NistMaterialBuilder::ConstructNewMaterial(
|
||||
G4cout << "G4NistMaterialBuilder::ConstructNewMaterial:"
|
||||
<< " WARNING: empty list of elements for " << name
|
||||
<< G4endl;
|
||||
G4cout << " Material is not constructed" << G4endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -225,9 +234,16 @@ G4Material* G4NistMaterialBuilder::ConstructNewMaterial(
|
||||
// density in g/cm3, mean ionisation potential is not defined
|
||||
AddMaterial(name,dens*cm3/g,0,0.,nm,state,temp,pressure);
|
||||
|
||||
for (G4int i=0; i<nm; i++) {
|
||||
G4int Z = G4int((elmBuilder->FindOrBuildElement(elm[i]))->GetZ());
|
||||
AddElementByAtomCount(Z, nbAtoms[i]);
|
||||
for (G4int i=0; i<nm; ++i) {
|
||||
G4Element* el = elmBuilder->FindOrBuildElement(elm[i]);
|
||||
if(!el) {
|
||||
G4cout << "G4NistMaterialBuilder::ConstructNewMaterial:"
|
||||
<< " ERROR: elements " << elm[i] << " is not found"
|
||||
<< G4endl;
|
||||
G4Exception("G4NistMaterialBuilder::ConstructNewMaterial: Fail to construct material");
|
||||
return 0;
|
||||
}
|
||||
AddElementByAtomCount(G4int(el->GetZ()), nbAtoms[i]);
|
||||
}
|
||||
|
||||
return BuildMaterial(name, isotopes);
|
||||
@@ -257,9 +273,16 @@ G4Material* G4NistMaterialBuilder::ConstructNewMaterial(
|
||||
// density in g/cm3, mean ionisation potential is not defined
|
||||
AddMaterial(name,dens*cm3/g,0,0.,nm,state,temp,pressure);
|
||||
|
||||
for (G4int i=0; i<nm; i++) {
|
||||
G4int Z = G4int((elmBuilder->FindOrBuildElement(elm[i]))->GetZ());
|
||||
AddElementByWeightFraction(Z, w[i]);
|
||||
for (G4int i=0; i<nm; ++i) {
|
||||
G4Element* el = elmBuilder->FindOrBuildElement(elm[i]);
|
||||
if(!el) {
|
||||
G4cout << "G4NistMaterialBuilder::ConstructNewMaterial:"
|
||||
<< " ERROR: elements " << elm[i] << " is not found"
|
||||
<< G4endl;
|
||||
G4Exception("G4NistMaterialBuilder::ConstructNewMaterial: Fail to construct material");
|
||||
return 0;
|
||||
}
|
||||
AddElementByWeightFraction(G4int(el->GetZ()), w[i]);
|
||||
}
|
||||
|
||||
return BuildMaterial(name, isotopes);
|
||||
@@ -275,7 +298,7 @@ G4Material* G4NistMaterialBuilder::ConstructNewGasMaterial(
|
||||
G4bool isotopes)
|
||||
{
|
||||
G4int idx = -1;
|
||||
for (G4int i=0; i<nMaterials; i++) {
|
||||
for (G4int i=0; i<nMaterials; ++i) {
|
||||
if (name == names[i]) {
|
||||
G4cout << "G4NistMaterialBuilder::ConstructNewMaterial:"
|
||||
<< " WARNING: the Name <" << name
|
||||
@@ -317,10 +340,17 @@ G4Material* G4NistMaterialBuilder::ConstructNewGasMaterial(
|
||||
|
||||
if (nc > 0) {
|
||||
G4int k = indexes[idx];
|
||||
for (G4int j=0; j<nc; j++) {
|
||||
for (G4int j=0; j<nc; ++j) {
|
||||
G4int Z = elements[k+j];
|
||||
G4Element* elm = elmBuilder->FindOrBuildElement(Z, isotopes);
|
||||
mat->AddElement(elm,fractions[k+j]);
|
||||
G4Element* el = elmBuilder->FindOrBuildElement(Z, isotopes);
|
||||
if(!el) {
|
||||
G4cout << "G4NistMaterialBuilder::ConstructNewGasMaterial:"
|
||||
<< " ERROR: element Z= " << Z << " is not found"
|
||||
<< G4endl;
|
||||
G4Exception("G4NistMaterialBuilder::ConstructNewGasMaterial: Fail to construct material");
|
||||
return 0;
|
||||
}
|
||||
mat->AddElement(el,fractions[k+j]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,16 +379,24 @@ void G4NistMaterialBuilder::SetVerbose(G4int val)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4NistMaterialBuilder::ListMaterials(const G4String& list)
|
||||
void G4NistMaterialBuilder::ListMaterials(const G4String& mnam)
|
||||
{
|
||||
if (list == "simple") ListNistSimpleMaterials();
|
||||
if (list == "compound") ListNistCompoundMaterials();
|
||||
if (list == "hep") ListHepMaterials();
|
||||
if (mnam == "simple") { ListNistSimpleMaterials(); }
|
||||
else if (mnam == "compound") { ListNistCompoundMaterials(); }
|
||||
else if (mnam == "hep") { ListHepMaterials(); }
|
||||
else if (mnam == "space") { ListSpaceMaterials(); }
|
||||
else if (mnam == "biochemical") { ListBioChemicalMaterials(); }
|
||||
|
||||
if (list == "all") {
|
||||
else if (mnam == "all") {
|
||||
ListNistSimpleMaterials();
|
||||
ListNistCompoundMaterials();
|
||||
ListHepMaterials();
|
||||
ListSpaceMaterials();
|
||||
ListBioChemicalMaterials();
|
||||
|
||||
} else {
|
||||
G4cout << "### G4NistMaterialBuilder::ListMaterials: Warning "
|
||||
<< mnam << " list is not known" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,7 +409,7 @@ void G4NistMaterialBuilder::ListNistSimpleMaterials()
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
G4cout << " Z Name ChFormula density(g/cm^3) I(eV) " << G4endl;
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
for (G4int i=0; i<nElementary; i++) {DumpElm(i);}
|
||||
for (G4int i=0; i<nElementary; ++i) {DumpElm(i);}
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
}
|
||||
|
||||
@@ -383,7 +421,7 @@ void G4NistMaterialBuilder::ListNistCompoundMaterials()
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
G4cout << " Ncomp Name ChFormula density(g/cm^3) I(eV) " << G4endl;
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
for (G4int i=nElementary; i<nNIST; i++) {DumpMix(i);}
|
||||
for (G4int i=nElementary; i<nNIST; ++i) {DumpMix(i);}
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
}
|
||||
|
||||
@@ -396,7 +434,33 @@ void G4NistMaterialBuilder::ListHepMaterials()
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
G4cout << " Ncomp Name ChFormula density(g/cm^3) I(eV) " << G4endl;
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
for (G4int i=nNIST; i<nMaterials; i++) {DumpMix(i);}
|
||||
for (G4int i=nNIST; i<nHEP; ++i) {DumpMix(i);}
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4NistMaterialBuilder::ListSpaceMaterials()
|
||||
{
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
G4cout << "### Space ISS Materials ##" << G4endl;
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
G4cout << " Ncomp Name ChFormula density(g/cm^3) I(eV) " << G4endl;
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
for (G4int i=nHEP; i<nSpace; ++i) {DumpMix(i);}
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4NistMaterialBuilder::ListBioChemicalMaterials()
|
||||
{
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
G4cout << "### Bio-Chemical Materials ##" << G4endl;
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
G4cout << " Ncomp Name ChFormula density(g/cm^3) I(eV) " << G4endl;
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
for (G4int i=nSpace; i<nMaterials; ++i) {DumpMix(i);}
|
||||
G4cout << "=======================================================" << G4endl;
|
||||
}
|
||||
|
||||
@@ -420,7 +484,7 @@ void G4NistMaterialBuilder::DumpMix(G4int i)
|
||||
if (nc > 1) {
|
||||
G4int imin = indexes[i];
|
||||
G4int imax = imin + nc;
|
||||
for (G4int j=imin; j<imax; j++) {
|
||||
for (G4int j=imin; j<imax; ++j) {
|
||||
G4cout << " " << elements[j] << " " << fractions[j]
|
||||
<< G4endl;
|
||||
}
|
||||
@@ -469,7 +533,7 @@ void G4NistMaterialBuilder::AddMaterial(const G4String& nameMat, G4double dens,
|
||||
nCurrent = ncomp;
|
||||
}
|
||||
|
||||
nMaterials++;
|
||||
++nMaterials;
|
||||
|
||||
if(verbose > 1) {
|
||||
G4cout << "New material " << nameMat << " is prepeared; "
|
||||
@@ -487,16 +551,16 @@ void G4NistMaterialBuilder::AddChemicalFormula(const G4String& nameMat,
|
||||
{
|
||||
if (nCurrent != 0) {
|
||||
G4cout
|
||||
<< "WARNING: G4NistMaterialBuilder::AddChemicalFormula : previous mixture "
|
||||
<< nMaterials << " " << names[nMaterials] << " is not yet complete!"
|
||||
<< G4endl;
|
||||
<< "WARNING: G4NistMaterialBuilder::AddChemicalFormula : previous mixture "
|
||||
<< nMaterials << " " << names[nMaterials] << " is not yet complete!"
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
if(nameMat == names[nMaterials-1]) {
|
||||
chFormulas[nMaterials-1] = ch;
|
||||
return;
|
||||
} else {
|
||||
for(G4int i=0; i<nMaterials; i++) {
|
||||
for(G4int i=0; i<nMaterials; ++i) {
|
||||
if(nameMat == names[i]) {
|
||||
chFormulas[i] = ch;
|
||||
return;
|
||||
@@ -504,8 +568,8 @@ void G4NistMaterialBuilder::AddChemicalFormula(const G4String& nameMat,
|
||||
}
|
||||
}
|
||||
G4cout << "WARNING: G4NistMaterialBuilder::AddChemicalFormula : there is no "
|
||||
<< nameMat << " in the list of materials; ch=" << ch
|
||||
<< G4endl;
|
||||
<< nameMat << " in the list of materials; ch=" << ch
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -525,7 +589,7 @@ void G4NistMaterialBuilder::AddGas(const G4String& nameMat, G4double t,
|
||||
presures[nMaterials-1] = p;
|
||||
return;
|
||||
} else {
|
||||
for(G4int i=0; i<nMaterials; i++) {
|
||||
for(G4int i=0; i<nMaterials; ++i) {
|
||||
if(nameMat == names[i]) {
|
||||
temperatures[i] = t;
|
||||
presures[i] = p;
|
||||
@@ -544,16 +608,16 @@ void G4NistMaterialBuilder::AddElementByWeightFraction(G4int Z, G4double w)
|
||||
{
|
||||
elements.push_back(Z);
|
||||
fractions.push_back(w);
|
||||
nCurrent--;
|
||||
nComponents++;
|
||||
--nCurrent;
|
||||
++nComponents;
|
||||
if (nCurrent == 0) {
|
||||
G4int n = nMaterials - 1;
|
||||
G4double sum = 0.0;
|
||||
G4int imin = indexes[n];
|
||||
G4int imax = imin + components[n];
|
||||
|
||||
for(G4int i=imin; i<imax; i++) {sum += fractions[i];}
|
||||
if (sum > 0.0) for (G4int i=imin; i<imax; i++) {fractions[i] /= sum;}
|
||||
for(G4int i=imin; i<imax; ++i) {sum += fractions[i];}
|
||||
if (sum > 0.0) for (G4int i=imin; i<imax; ++i) {fractions[i] /= sum;}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -589,14 +653,16 @@ void G4NistMaterialBuilder::AddElementByAtomCount(const G4String& name,
|
||||
|
||||
void G4NistMaterialBuilder::Initialise()
|
||||
{
|
||||
if (verbose > 0)
|
||||
if (verbose > 0) {
|
||||
G4cout << "### G4NistMaterialBuilder::Initialise()" << G4endl;
|
||||
|
||||
}
|
||||
NistSimpleMaterials();
|
||||
NistCompoundMaterials();
|
||||
HepAndNuclearMaterials();
|
||||
SpaceMaterials();
|
||||
BioChemicalMaterials();
|
||||
|
||||
if (verbose > 1) ListMaterials("all");
|
||||
if (verbose > 1) { ListMaterials("all"); }
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -1318,7 +1384,7 @@ void G4NistMaterialBuilder::NistCompoundMaterials()
|
||||
AddElementByWeightFraction( 6, 0.156214);
|
||||
AddElementByWeightFraction( 7, 0.035451);
|
||||
AddElementByWeightFraction( 8, 0.7101 );
|
||||
|
||||
|
||||
AddMaterial("G4_MUSCLE_WITHOUT_SUCROSE", 1.07, 0, 74.2, 4);
|
||||
AddElementByWeightFraction( 1, 0.101969);
|
||||
AddElementByWeightFraction( 6, 0.120058);
|
||||
@@ -1442,6 +1508,7 @@ void G4NistMaterialBuilder::NistCompoundMaterials()
|
||||
AddElementByWeightFraction( 9, 0.759817);
|
||||
|
||||
AddMaterial("G4_POLYTRIFLUOROCHLOROETHYLENE", 2.1, 0, 120.7, 3);
|
||||
// correct chemical name Polychlorotrifluoroethylene [CF2CClF]n, IvantchenkoA.
|
||||
AddElementByWeightFraction( 6, 0.20625 );
|
||||
AddElementByWeightFraction( 9, 0.489354);
|
||||
AddElementByWeightFraction(17, 0.304395);
|
||||
@@ -1712,8 +1779,27 @@ void G4NistMaterialBuilder::NistCompoundMaterials()
|
||||
AddElementByWeightFraction( 6, 0.905065);
|
||||
|
||||
AddMaterial("G4_GRAPHITE", 2.21, 6, 78.);
|
||||
nNIST = nMaterials;
|
||||
AddChemicalFormula("G4_GRAPHITE","Graphite");
|
||||
|
||||
AddMaterial("G4_CYTOSINE", 1.55, 0, 72., 4);
|
||||
AddElementByAtomCount("H", 5);
|
||||
AddElementByAtomCount("C", 4);
|
||||
AddElementByAtomCount("N", 3);
|
||||
AddElementByAtomCount("O", 1);
|
||||
|
||||
AddMaterial("G4_THYMINE", 1.23, 0, 72., 4);
|
||||
AddElementByAtomCount("H", 6);
|
||||
AddElementByAtomCount("C", 5);
|
||||
AddElementByAtomCount("N", 2);
|
||||
AddElementByAtomCount("O", 2);
|
||||
|
||||
AddMaterial("G4_URACIL", 1.32, 0, 72., 4);
|
||||
AddElementByAtomCount("H", 4);
|
||||
AddElementByAtomCount("C", 4);
|
||||
AddElementByAtomCount("N", 2);
|
||||
AddElementByAtomCount("O", 2);
|
||||
|
||||
nNIST = nMaterials;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -1737,9 +1823,163 @@ void G4NistMaterialBuilder::HepAndNuclearMaterials()
|
||||
AddGas("G4_Galactic",2.73*kelvin, 3.e-18*pascal);
|
||||
|
||||
AddMaterial("G4_GRAPHITE_POROUS", 1.7, 6, 78.);
|
||||
AddChemicalFormula("G4_GRAPHITE","Graphite");
|
||||
AddChemicalFormula("G4_GRAPHITE_POROUS","Graphite");
|
||||
|
||||
// LUCITE is equal to plustiglass
|
||||
AddMaterial("G4_LUCITE", 1.19, 0, 74., 3);
|
||||
AddElementByWeightFraction( 1, 0.080538);
|
||||
AddElementByWeightFraction( 6, 0.599848);
|
||||
AddElementByWeightFraction( 8, 0.319614);
|
||||
|
||||
// SRIM-2008 materials
|
||||
AddMaterial("G4_BRASS", 8.52, 0, 0.0, 3);
|
||||
AddElementByAtomCount("Cu", 62);
|
||||
AddElementByAtomCount("Zn", 35);
|
||||
AddElementByAtomCount("Pb" , 3);
|
||||
|
||||
AddMaterial("G4_BRONZE", 8.82, 0, 0.0, 3);
|
||||
AddElementByAtomCount("Cu", 89);
|
||||
AddElementByAtomCount("Zn", 9);
|
||||
AddElementByAtomCount("Pb" , 2);
|
||||
|
||||
AddMaterial("G4_STAINLESS-STEEL", 8.00, 0, 0.0, 3);
|
||||
AddElementByAtomCount("Fe", 74);
|
||||
AddElementByAtomCount("Cr", 8);
|
||||
AddElementByAtomCount("Ni" ,18);
|
||||
|
||||
nHEP = nMaterials;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4NistMaterialBuilder::SpaceMaterials()
|
||||
{
|
||||
// density in g/cm3
|
||||
AddMaterial("G4_KEVLAR" , 1.44, 0, 0.0, 4);
|
||||
AddElementByAtomCount("C", 14);
|
||||
AddElementByAtomCount("H", 10);
|
||||
AddElementByAtomCount("O", 2);
|
||||
AddElementByAtomCount("N", 2);
|
||||
|
||||
AddMaterial("G4_DACRON" , 1.40, 0, 0.0, 3); // G4_POLYETHYLENE_TEREPHTALATE
|
||||
AddElementByAtomCount("C", 10);
|
||||
AddElementByAtomCount("H", 8);
|
||||
AddElementByAtomCount("O", 4);
|
||||
|
||||
AddMaterial("G4_NEOPRENE" , 1.23, 0, 0.0, 3); // POLYCLOROPRENE
|
||||
AddElementByAtomCount("C", 4);
|
||||
AddElementByAtomCount("H", 5);
|
||||
AddElementByAtomCount("Cl", 1);
|
||||
|
||||
nSpace = nMaterials;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4NistMaterialBuilder::BioChemicalMaterials()
|
||||
{
|
||||
// DNA_Nucleobase (Nucleobase-1H)
|
||||
AddMaterial("G4_DNA_ADENINE", 1, 0, 72., 3);
|
||||
AddElementByAtomCount("H",4 );
|
||||
AddElementByAtomCount("C",5 );
|
||||
AddElementByAtomCount("N",5 );
|
||||
|
||||
AddMaterial("G4_DNA_GUANINE", 1, 0, 72. ,4);
|
||||
AddElementByAtomCount("H",4 );
|
||||
AddElementByAtomCount("C",5 );
|
||||
AddElementByAtomCount("N",5 );
|
||||
AddElementByAtomCount("O",1 );
|
||||
|
||||
AddMaterial("G4_DNA_CYTOSINE", 1, 0, 72., 4);
|
||||
AddElementByAtomCount("H", 4);
|
||||
AddElementByAtomCount("C", 4);
|
||||
AddElementByAtomCount("N", 3);
|
||||
AddElementByAtomCount("O", 1);
|
||||
|
||||
AddMaterial("G4_DNA_THYMINE", 1, 0, 72., 4);
|
||||
AddElementByAtomCount("H", 5);
|
||||
AddElementByAtomCount("C", 5);
|
||||
AddElementByAtomCount("N", 2);
|
||||
AddElementByAtomCount("O", 2);
|
||||
|
||||
AddMaterial("G4_DNA_URACIL", 1, 0, 72., 4);
|
||||
AddElementByAtomCount("H", 4);
|
||||
AddElementByAtomCount("C", 4);
|
||||
AddElementByAtomCount("N", 2);
|
||||
AddElementByAtomCount("O", 2);
|
||||
|
||||
// DNA_Nucleoside (Nucleoside-3H)
|
||||
AddMaterial("G4_DNA_ADENOSINE", 1, 0, 72., 4);
|
||||
AddElementByAtomCount("H", 10);
|
||||
AddElementByAtomCount("C", 10);
|
||||
AddElementByAtomCount("N", 5);
|
||||
AddElementByAtomCount("O", 4);
|
||||
|
||||
AddMaterial("G4_DNA_GUANOSINE", 1, 0, 72. ,4);
|
||||
AddElementByAtomCount("H", 10);
|
||||
AddElementByAtomCount("C", 10);
|
||||
AddElementByAtomCount("N", 5);
|
||||
AddElementByAtomCount("O", 5);
|
||||
|
||||
AddMaterial("G4_DNA_CYTIDINE", 1, 0, 72., 4);
|
||||
AddElementByAtomCount("H", 10);
|
||||
AddElementByAtomCount("C", 9);
|
||||
AddElementByAtomCount("N", 3);
|
||||
AddElementByAtomCount("O", 5);
|
||||
|
||||
AddMaterial("G4_DNA_URIDINE", 1, 0, 72., 4);
|
||||
AddElementByAtomCount("H", 9);
|
||||
AddElementByAtomCount("C", 9);
|
||||
AddElementByAtomCount("N", 2);
|
||||
AddElementByAtomCount("O", 6);
|
||||
|
||||
AddMaterial("G4_DNA_METHYLURIDINE", 1, 0, 72., 4);
|
||||
AddElementByAtomCount("H", 11);
|
||||
AddElementByAtomCount("C", 10);
|
||||
AddElementByAtomCount("N", 2);
|
||||
AddElementByAtomCount("O", 6);
|
||||
|
||||
AddMaterial("G4_DNA_MONOPHOSPHATE", 1, 0, 72., 2);
|
||||
AddElementByAtomCount("P", 1);
|
||||
AddElementByAtomCount("O", 3);
|
||||
|
||||
AddMaterial("G4_DNA_A", 1, 0, 72., 5); //Adenine base
|
||||
AddElementByAtomCount("H", 10);
|
||||
AddElementByAtomCount("C", 10);
|
||||
AddElementByAtomCount("N", 5);
|
||||
AddElementByAtomCount("O", 7);
|
||||
AddElementByAtomCount("P", 1);
|
||||
|
||||
AddMaterial("G4_DNA_G", 1, 0, 72. ,5); //Guanine base
|
||||
AddElementByAtomCount("H", 10);
|
||||
AddElementByAtomCount("C", 10);
|
||||
AddElementByAtomCount("N", 5);
|
||||
AddElementByAtomCount("O", 8);
|
||||
AddElementByAtomCount("P", 1);
|
||||
|
||||
AddMaterial("G4_DNA_C", 1, 0, 72., 5); // Cytosine base
|
||||
AddElementByAtomCount("H", 10);
|
||||
AddElementByAtomCount("C", 9);
|
||||
AddElementByAtomCount("N", 3);
|
||||
AddElementByAtomCount("O", 8);
|
||||
AddElementByAtomCount("P", 1);
|
||||
|
||||
AddMaterial("G4_DNA_U", 1, 0, 72., 5); // Uracil base
|
||||
AddElementByAtomCount("H", 9);
|
||||
AddElementByAtomCount("C", 9);
|
||||
AddElementByAtomCount("N", 2);
|
||||
AddElementByAtomCount("O", 9);
|
||||
AddElementByAtomCount("P", 1);
|
||||
|
||||
AddMaterial("G4_DNA_MU", 1, 0, 72., 5); // MethaUracil base
|
||||
AddElementByAtomCount("H", 11);
|
||||
AddElementByAtomCount("C", 10);
|
||||
AddElementByAtomCount("N", 2);
|
||||
AddElementByAtomCount("O", 9);
|
||||
AddElementByAtomCount("P", 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,9 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NistMessenger.cc,v 1.9 2009/12/03 11:09:47 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4NistMessenger.cc,v 1.10 2010/10/25 13:22:51 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
// File name: G4NistMessenger
|
||||
@@ -152,9 +151,6 @@ void G4NistMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{ manager->PrintG4Material(newValue);}
|
||||
|
||||
if (command == g4DensCmd)
|
||||
{ if (G4Material::GetNumberOfMaterials > 0) {
|
||||
G4IonisParamMat::GetDensityEffectData()->PrintData(newValue);
|
||||
}
|
||||
}
|
||||
{ G4IonisParamMat::GetDensityEffectData()->PrintData(newValue); }
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -23,9 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpticalSurface.cc,v 1.16 2009/12/01 08:24:51 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4OpticalSurface.cc,v 1.17 2010/10/25 15:16:02 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -255,6 +254,7 @@ void G4OpticalSurface::ReadFile()
|
||||
G4String excep =
|
||||
"G4OpBoundaryProcess - G4REALSURFACEDATA environment variable not set";
|
||||
G4Exception(excep);
|
||||
return;
|
||||
}
|
||||
G4String pathString(path);
|
||||
|
||||
@@ -265,15 +265,17 @@ void G4OpticalSurface::ReadFile()
|
||||
|
||||
readFileHandle = fopen(readFileName,"r");
|
||||
|
||||
if (readFileHandle!=NULL) {
|
||||
for (int i=0;i<incidentIndexMax*thetaIndexMax*phiIndexMax;i++) {
|
||||
fscanf(readFileHandle,"%6f", &AngularDistribution[i]);
|
||||
if (readFileHandle) {
|
||||
G4int idxmax = incidentIndexMax*thetaIndexMax*phiIndexMax;
|
||||
for (G4int i=0;i<idxmax;i++) {
|
||||
fscanf(readFileHandle,"%6f", &AngularDistribution[i]);
|
||||
}
|
||||
G4cout << "LUT - data file: " << readFileName << " read in! " << G4endl;
|
||||
}
|
||||
else {
|
||||
G4String excep = "LUT - data file: " + readFileName + " not found";
|
||||
G4Exception(excep);
|
||||
return;
|
||||
}
|
||||
fclose(readFileHandle);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user