Import Geant4 11.0.0.beta source tree
This commit is contained in:
@@ -212,6 +212,11 @@ public: // without description
|
||||
|
||||
inline void SetName(const G4String& name) {fName=name;}
|
||||
|
||||
G4Element(G4Element&) = delete;
|
||||
const G4Element & operator=(const G4Element&) = delete;
|
||||
G4bool operator==(const G4Element&) const = delete;
|
||||
G4bool operator!=(const G4Element&) const = delete;
|
||||
|
||||
private:
|
||||
|
||||
void InitializePointers();
|
||||
@@ -220,11 +225,6 @@ private:
|
||||
void ComputeLradTsaiFactor();
|
||||
void AddNaturalIsotopes();
|
||||
|
||||
G4Element(G4Element&) = delete;
|
||||
const G4Element & operator=(const G4Element&) = delete;
|
||||
G4bool operator==(const G4Element&) const = delete;
|
||||
G4bool operator!=(const G4Element&) const = delete;
|
||||
|
||||
//
|
||||
// Basic data members (which define an Element)
|
||||
//
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4LPhysicsFreeVector.hh"
|
||||
#include "G4PhysicsFreeVector.hh"
|
||||
|
||||
class G4ICRU90StoppingData
|
||||
{
|
||||
@@ -81,23 +81,23 @@ public:
|
||||
|
||||
inline G4bool IsApplicable(const G4Material*) const;
|
||||
|
||||
private:
|
||||
|
||||
inline G4double GetDEDX(G4LPhysicsFreeVector*, G4double e) const;
|
||||
|
||||
void FillData();
|
||||
|
||||
G4LPhysicsFreeVector* AddData(G4int n, const G4double* e, const G4float* dedx);
|
||||
|
||||
// hide assignment operator
|
||||
G4ICRU90StoppingData & operator=
|
||||
(const G4ICRU90StoppingData &right) = delete;
|
||||
G4ICRU90StoppingData(const G4ICRU90StoppingData&) = delete;
|
||||
|
||||
private:
|
||||
|
||||
inline G4double GetDEDX(G4PhysicsFreeVector*, G4double e) const;
|
||||
|
||||
void FillData();
|
||||
|
||||
G4PhysicsFreeVector* AddData(G4int n, const G4double* e, const G4float* dedx);
|
||||
|
||||
static constexpr G4int nvectors = 3;
|
||||
const G4Material* materials[nvectors];
|
||||
G4LPhysicsFreeVector* sdata_proton[nvectors];
|
||||
G4LPhysicsFreeVector* sdata_alpha[nvectors];
|
||||
G4PhysicsFreeVector* sdata_proton[nvectors];
|
||||
G4PhysicsFreeVector* sdata_alpha[nvectors];
|
||||
G4bool isInitialized;
|
||||
};
|
||||
|
||||
@@ -131,7 +131,7 @@ inline G4int G4ICRU90StoppingData::GetIndex(const G4String& nam) const
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4double
|
||||
G4ICRU90StoppingData::GetDEDX(G4LPhysicsFreeVector* data, G4double e) const
|
||||
G4ICRU90StoppingData::GetDEDX(G4PhysicsFreeVector* data, G4double e) const
|
||||
{
|
||||
G4double emin = data->Energy(0);
|
||||
return (e <= emin) ? (*data)[0]*std::sqrt(e/emin) : data->Value(e);
|
||||
|
||||
@@ -85,13 +85,14 @@ public: // with description
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
private:
|
||||
|
||||
// operators
|
||||
G4IonisParamElm& operator=(const G4IonisParamElm&) = delete;
|
||||
G4bool operator==(const G4IonisParamElm&) const = delete;
|
||||
G4bool operator!=(const G4IonisParamElm&) const = delete;
|
||||
G4IonisParamElm(G4IonisParamElm&) = delete;
|
||||
|
||||
private:
|
||||
|
||||
//
|
||||
// data members
|
||||
//
|
||||
|
||||
@@ -162,6 +162,12 @@ public:
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
// operators
|
||||
G4IonisParamMat& operator=(const G4IonisParamMat&) = delete;
|
||||
G4bool operator==(const G4IonisParamMat&) const = delete;
|
||||
G4bool operator!=(const G4IonisParamMat&) const = delete;
|
||||
G4IonisParamMat(const G4IonisParamMat&) = delete;
|
||||
|
||||
private:
|
||||
|
||||
// Compute mean parameters : ExcitationEnergy,Shell corretion vector ...
|
||||
@@ -176,12 +182,6 @@ private:
|
||||
// Compute parameters for ion parameterizations
|
||||
void ComputeIonParameters();
|
||||
|
||||
// operators
|
||||
G4IonisParamMat& operator=(const G4IonisParamMat&);
|
||||
G4bool operator==(const G4IonisParamMat&) const;
|
||||
G4bool operator!=(const G4IonisParamMat&) const;
|
||||
G4IonisParamMat(const G4IonisParamMat&);
|
||||
|
||||
//
|
||||
// data members
|
||||
//
|
||||
|
||||
@@ -78,9 +78,9 @@ class G4Isotope
|
||||
G4int z, //atomic number
|
||||
G4int n, //number of nucleons
|
||||
G4double a = 0., //mass of mole
|
||||
G4int mlevel = 0); //isomer level
|
||||
G4int mlevel = 0); //isomer level
|
||||
|
||||
virtual ~G4Isotope();
|
||||
~G4Isotope();
|
||||
|
||||
// Retrieval methods
|
||||
//
|
||||
|
||||
@@ -288,13 +288,13 @@ public: // with description
|
||||
|
||||
virtual G4bool IsExtended() const;
|
||||
|
||||
private:
|
||||
// operators
|
||||
G4bool operator==(const G4Material&) const = delete;
|
||||
G4bool operator!=(const G4Material&) const = delete;
|
||||
G4Material(const G4Material&) = delete;
|
||||
const G4Material& operator=(const G4Material&) = delete;
|
||||
|
||||
// operators
|
||||
G4bool operator==(const G4Material&) const;
|
||||
G4bool operator!=(const G4Material&) const;
|
||||
G4Material(const G4Material&);
|
||||
const G4Material& operator=(const G4Material&);
|
||||
private:
|
||||
|
||||
void InitializePointers();
|
||||
|
||||
|
||||
@@ -55,8 +55,6 @@ enum G4MaterialPropertyIndex {
|
||||
kWLSCOMPONENT2, // the relative emission spectrum of the material as a function of the photon's momentum
|
||||
kWLSABSLENGTH2, // the absorption length of the material as a function of the photon's momentum
|
||||
kABSLENGTH, // the absorption length
|
||||
kFASTCOMPONENT, // fast component of scintillation
|
||||
kSLOWCOMPONENT, // slow component of scintillation
|
||||
kPROTONSCINTILLATIONYIELD, // scintillation light yield by protons
|
||||
kDEUTERONSCINTILLATIONYIELD, // scintillation light yield by deuterons
|
||||
kTRITONSCINTILLATIONYIELD, // scintillation light yield by tritons
|
||||
@@ -84,11 +82,6 @@ enum G4MaterialConstPropertyIndex
|
||||
kMIEHG_FORWARD_RATIO, // ratio of the MIEHG forward scattering
|
||||
kSCINTILLATIONYIELD, // scintillation light yield
|
||||
kRESOLUTIONSCALE, // resolution scale
|
||||
kFASTTIMECONSTANT, // fast scintillation time constant
|
||||
kFASTSCINTILLATIONRISETIME, // rise time of fast scintillation
|
||||
kSLOWTIMECONSTANT, // slow scintillation time constant
|
||||
kSLOWSCINTILLATIONRISETIME, // rise time of slow scintillation
|
||||
kYIELDRATIO, // yield ratio
|
||||
kFERMIPOT, // the Fermi potential (in neV)
|
||||
kDIFFUSION, // diffusion
|
||||
kSPINFLIP, // spin flip
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// A Material properties table is a hash table, with
|
||||
// A Material properties table is a hash table, with
|
||||
// key = property name, and value either G4double or
|
||||
// G4MaterialPropertyVector
|
||||
|
||||
@@ -52,153 +52,127 @@
|
||||
#ifndef G4MaterialPropertiesTable_h
|
||||
#define G4MaterialPropertiesTable_h 1
|
||||
|
||||
/////////////
|
||||
// Includes
|
||||
/////////////
|
||||
|
||||
#include <cmath>
|
||||
#include <map>
|
||||
#include "globals.hh"
|
||||
#include "G4MaterialPropertiesIndex.hh"
|
||||
#include "G4MaterialPropertyVector.hh"
|
||||
|
||||
/////////////////////
|
||||
// Class Definition
|
||||
/////////////////////
|
||||
#include <map>
|
||||
|
||||
class G4MaterialPropertiesTable
|
||||
{
|
||||
public: // Without description
|
||||
public:
|
||||
G4MaterialPropertiesTable();
|
||||
virtual ~G4MaterialPropertiesTable();
|
||||
|
||||
G4MaterialPropertiesTable();
|
||||
virtual ~G4MaterialPropertiesTable();
|
||||
void AddConstProperty(const G4String& key, G4double PropertyValue,
|
||||
G4bool createNewKey = false);
|
||||
void AddConstProperty(const char* key, G4double PropertyValue,
|
||||
G4bool createNewKey = false);
|
||||
// Add a new property to the table by giving a key-name and value
|
||||
|
||||
public: // With description
|
||||
G4MaterialPropertyVector* AddProperty(
|
||||
const G4String& key, const std::vector<G4double>& photonEnergies,
|
||||
const std::vector<G4double>& propertyValues, G4bool createNewKey = false);
|
||||
// Add a new property to the table by giving a key-name and
|
||||
// vectors of values
|
||||
|
||||
inline void AddConstProperty(const G4String& key,
|
||||
G4double PropertyValue);
|
||||
inline void AddConstProperty(const char *key,
|
||||
G4double PropertyValue);
|
||||
// Add a new property to the table by giving a key-name and value
|
||||
G4MaterialPropertyVector* AddProperty(const char* key,
|
||||
G4double* PhotonEnergies,
|
||||
G4double* PropertyValues,
|
||||
G4int NumEntries,
|
||||
G4bool createNewKey = false);
|
||||
// Add a new property to the table by giving a key-name and the
|
||||
// arrays x and y of size NumEntries.
|
||||
|
||||
G4MaterialPropertyVector* AddProperty(const G4String& key,
|
||||
const std::vector<G4double>& photonEnergies,
|
||||
const std::vector<G4double>& propertyValues);
|
||||
void AddProperty(const G4String& key, G4MaterialPropertyVector* opv,
|
||||
G4bool createNewKey = false);
|
||||
void AddProperty(const char* key, G4MaterialPropertyVector* opv,
|
||||
G4bool createNewKey = false);
|
||||
// Add a new property to the table by giving a key-name and an
|
||||
// already constructed G4MaterialPropertyVector.
|
||||
|
||||
G4MaterialPropertyVector* AddProperty(const char *key,
|
||||
G4double *PhotonEnergies,
|
||||
G4double *PropertyValues,
|
||||
G4int NumEntries);
|
||||
// Add a new property to the table by giving a key-name and the
|
||||
// arrays x and y of size NumEntries.
|
||||
void AddProperty(const G4String& key, const G4String& mat);
|
||||
// Add a new property to the table by giving a key name and a material
|
||||
// name. Properties are in namespace G4OpticalMaterialProperties
|
||||
// Not possible to create a new key with this method.
|
||||
|
||||
void AddProperty(const G4String& key, G4MaterialPropertyVector* opv);
|
||||
void AddProperty(const char *key, G4MaterialPropertyVector *opv);
|
||||
// Add a new property to the table by giving a key-name and an
|
||||
// already constructed G4MaterialPropertyVector.
|
||||
void RemoveConstProperty(const G4String& key);
|
||||
void RemoveConstProperty(const char* key);
|
||||
// Remove a constant property from the table.
|
||||
|
||||
inline void RemoveConstProperty(const G4String& key);
|
||||
inline void RemoveConstProperty(const char *key);
|
||||
// Remove a constant property from the table.
|
||||
void RemoveProperty(const G4String& key);
|
||||
void RemoveProperty(const char* key);
|
||||
// Remove a property from the table.
|
||||
|
||||
inline void RemoveProperty(const G4String& key);
|
||||
inline void RemoveProperty(const char *key);
|
||||
// Remove a property from the table.
|
||||
G4double GetConstProperty(const G4String& key) const;
|
||||
G4double GetConstProperty(const char* key) const;
|
||||
// Get the constant property from the table corresponding to the key-name
|
||||
|
||||
G4double GetConstProperty(const G4String& key) const;
|
||||
G4double GetConstProperty(const char *key) const;
|
||||
// Get the constant property from the table corresponding to the key-name
|
||||
G4double GetConstProperty(const G4int index) const;
|
||||
// Get the constant property from the table corresponding to the key-index
|
||||
|
||||
G4double GetConstProperty(const G4int index) const;
|
||||
// Get the constant property from the table corresponding to the key-index
|
||||
G4bool ConstPropertyExists(const G4String& key) const;
|
||||
G4bool ConstPropertyExists(const char* key) const;
|
||||
// Return true if a const property 'key' exists.
|
||||
|
||||
G4bool ConstPropertyExists(const G4String& key) const;
|
||||
G4bool ConstPropertyExists(const char *key) const;
|
||||
// Return true if a const property 'key' exists.
|
||||
G4bool ConstPropertyExists(const G4int index) const;
|
||||
// Return true if a const property with key-index 'index' exists.
|
||||
|
||||
G4bool ConstPropertyExists(const G4int index) const;
|
||||
// Return true if a const property with key-index 'index' exists.
|
||||
G4MaterialPropertyVector* GetProperty(const char* key,
|
||||
G4bool warning = false);
|
||||
G4MaterialPropertyVector* GetProperty(const G4String& key,
|
||||
G4bool warning = false);
|
||||
// Get the property from the table corresponding to the key-name.
|
||||
|
||||
G4MaterialPropertyVector* GetProperty(const char *key,
|
||||
G4bool warning=false);
|
||||
G4MaterialPropertyVector* GetProperty(const G4String& key,
|
||||
G4bool warning=false);
|
||||
// Get the property from the table corresponding to the key-name.
|
||||
G4MaterialPropertyVector* GetProperty(const G4int index,
|
||||
G4bool warning = false);
|
||||
// Get the property from the table corresponding to the key-index.
|
||||
|
||||
G4MaterialPropertyVector* GetProperty(const G4int index,
|
||||
G4bool warning=false);
|
||||
// Get the property from the table corresponding to the key-index.
|
||||
void AddEntry(const G4String& key, G4double aPhotonEnergy,
|
||||
G4double aPropertyValue);
|
||||
void AddEntry(const char* key, G4double aPhotonEnergy,
|
||||
G4double aPropertyValue);
|
||||
// Add a new entry (pair of numbers) to the table for a given key.
|
||||
|
||||
void AddEntry(const G4String& key, G4double aPhotonEnergy,
|
||||
G4double aPropertyValue);
|
||||
void AddEntry(const char *key, G4double aPhotonEnergy,
|
||||
G4double aPropertyValue);
|
||||
// Add a new entry (pair of numbers) to the table for a given key.
|
||||
G4int GetConstPropertyIndex(const G4String& key,
|
||||
G4bool warning = false) const;
|
||||
// Get the constant property index from the key-name
|
||||
|
||||
G4int GetConstPropertyIndex(const G4String& key,
|
||||
G4bool warning=false) const;
|
||||
// Get the constant property index from the key-name
|
||||
G4int GetPropertyIndex(const G4String& key, G4bool warning = false) const;
|
||||
// Get the property index by the key-name.
|
||||
|
||||
G4int GetPropertyIndex(const G4String& key, G4bool warning=false) const;
|
||||
// Get the property index by the key-name.
|
||||
std::vector<G4String> GetMaterialPropertyNames() const;
|
||||
std::vector<G4String> GetMaterialConstPropertyNames() const;
|
||||
|
||||
std::vector<G4String> GetMaterialPropertyNames() const;
|
||||
std::vector<G4String> GetMaterialConstPropertyNames() const;
|
||||
void DumpTable();
|
||||
|
||||
void DumpTable();
|
||||
const std::map<G4int, G4MaterialPropertyVector*, std::less<G4int>>*
|
||||
GetPropertyMap() const
|
||||
{
|
||||
return &MP;
|
||||
}
|
||||
const std::map<G4int, G4double, std::less<G4int>>* GetConstPropertyMap() const
|
||||
{
|
||||
return &MCP;
|
||||
}
|
||||
// Accessors required for persistency purposes
|
||||
|
||||
public: // without description
|
||||
private:
|
||||
G4MaterialPropertyVector* CalculateGROUPVEL();
|
||||
// Calculate the group velocity based on RINDEX
|
||||
|
||||
std::map< G4String, G4MaterialPropertyVector*, std::less<G4String> >*
|
||||
GetPropertiesMap();
|
||||
std::map< G4String, G4double, std::less<G4String> >*
|
||||
GetPropertiesCMap();
|
||||
std::map<G4int, G4MaterialPropertyVector*, std::less<G4int>> MP;
|
||||
typedef std::map<G4int, G4MaterialPropertyVector*,
|
||||
std::less<G4int>>::const_iterator MPiterator;
|
||||
|
||||
const std::map<G4int, G4MaterialPropertyVector*, std::less<G4int> >*
|
||||
GetPropertyMap() const { return &MP; }
|
||||
const std::map<G4int, G4double, std::less<G4int> >*
|
||||
GetConstPropertyMap() const { return &MCP; }
|
||||
// Accessors required for persistency purposes
|
||||
|
||||
private:
|
||||
|
||||
G4MaterialPropertyVector* CalculateGROUPVEL();
|
||||
// Calculate the group velocity based on RINDEX
|
||||
|
||||
G4MaterialPropertyVector* SetGROUPVEL();
|
||||
// Dummy method: will be obsolete from the next (version 11) release
|
||||
|
||||
private:
|
||||
|
||||
std::map<G4String, G4MaterialPropertyVector*, std::less<G4String> > MPT;
|
||||
typedef std::map< G4String, G4MaterialPropertyVector*,
|
||||
std::less<G4String> >::const_iterator MPTiterator;
|
||||
|
||||
std::map< G4String, G4double, std::less<G4String> > MPTC;
|
||||
typedef std::map< G4String, G4double,
|
||||
std::less<G4String> >::const_iterator MPTCiterator;
|
||||
// MPT and MPTC will be obsolete when associate public interfaces,
|
||||
// GetPropertiesMap and GetPropertiesCMap are removed from the version 11.
|
||||
|
||||
std::map<G4int, G4MaterialPropertyVector*, std::less<G4int> > MP;
|
||||
typedef std::map< G4int, G4MaterialPropertyVector*,
|
||||
std::less<G4int> >::const_iterator MPiterator;
|
||||
|
||||
std::map< G4int, G4double, std::less<G4int> > MCP;
|
||||
typedef std::map< G4int, G4double,
|
||||
std::less<G4int> >::const_iterator MCPiterator;
|
||||
//material property map and constant property map by index types
|
||||
|
||||
std::vector<G4String> G4MaterialPropertyName;
|
||||
std::vector<G4String> G4MaterialConstPropertyName;
|
||||
// vectors of strings of property names
|
||||
std::map<G4int, G4double, std::less<G4int>> MCP;
|
||||
typedef std::map<G4int, G4double, std::less<G4int>>::const_iterator
|
||||
MCPiterator;
|
||||
// material property map and constant property map by index types
|
||||
|
||||
std::vector<G4String> G4MaterialPropertyName;
|
||||
std::vector<G4String> G4MaterialConstPropertyName;
|
||||
// vectors of strings of property names
|
||||
};
|
||||
|
||||
/////////////////////
|
||||
// Inline definitions
|
||||
/////////////////////
|
||||
|
||||
#include "G4MaterialPropertiesTable.icc"
|
||||
|
||||
#endif /* G4MaterialPropertiesTable_h */
|
||||
|
||||
@@ -1,90 +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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// G4MaterialPropertiesTable inline definitions
|
||||
//
|
||||
// File: G4MaterialPropertiesTable.icc
|
||||
// Version: 1.0
|
||||
// Created: 1996-02-08
|
||||
// Author: Juliet Armstrong
|
||||
// Updated: moved to inline
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline
|
||||
void G4MaterialPropertiesTable::AddConstProperty(const G4String& key,
|
||||
G4double PropertyValue)
|
||||
{
|
||||
// Provides a way of adding a constant property to the Material Properties
|
||||
// Table given a key
|
||||
if (std::find(G4MaterialConstPropertyName.begin(),
|
||||
G4MaterialConstPropertyName.end(), key) ==
|
||||
G4MaterialConstPropertyName.end()) {
|
||||
G4MaterialConstPropertyName.push_back(key);
|
||||
}
|
||||
G4int index = GetConstPropertyIndex(key);
|
||||
|
||||
MCP[index] = PropertyValue;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4MaterialPropertiesTable::AddConstProperty(const char *key,
|
||||
G4double PropertyValue)
|
||||
{
|
||||
// Provides a way of adding a constant property to the Material Properties
|
||||
// Table given a key
|
||||
AddConstProperty(G4String(key), PropertyValue);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4MaterialPropertiesTable::RemoveConstProperty(const G4String& key)
|
||||
{
|
||||
G4int index = GetConstPropertyIndex(key);
|
||||
|
||||
MCP.erase(index);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4MaterialPropertiesTable::RemoveConstProperty(const char *key)
|
||||
{
|
||||
GetConstPropertyIndex(G4String(key));
|
||||
}
|
||||
|
||||
inline
|
||||
void G4MaterialPropertiesTable::RemoveProperty(const G4String& key)
|
||||
{
|
||||
G4int index = GetPropertyIndex(key);
|
||||
MP.erase(index);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4MaterialPropertiesTable::RemoveProperty(const char *key)
|
||||
{
|
||||
RemoveProperty(G4String(key));
|
||||
}
|
||||
@@ -40,7 +40,7 @@
|
||||
// Created: 1996-02-08
|
||||
// Author: Juliet Armstrong
|
||||
// Updated: 2011-10-13 by Peter Gumplinger
|
||||
// remove the class: simply typedef to G4PhysicsOrderedFreeVector
|
||||
// remove the class: simply typedef to G4PhysicsFreeVector
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
// Includes
|
||||
/////////////
|
||||
|
||||
#include "G4PhysicsOrderedFreeVector.hh"
|
||||
#include "G4PhysicsFreeVector.hh"
|
||||
|
||||
/////////////////////
|
||||
// Class Definition
|
||||
/////////////////////
|
||||
|
||||
typedef G4PhysicsOrderedFreeVector G4MaterialPropertyVector;
|
||||
typedef G4PhysicsFreeVector G4MaterialPropertyVector;
|
||||
|
||||
#endif /* G4MaterialPropertyVector_h */
|
||||
|
||||
@@ -489,10 +489,9 @@ G4Material* G4NistManager::FindMaterial(const G4String& name) const
|
||||
|
||||
inline
|
||||
G4Material* G4NistManager::FindOrBuildMaterial(const G4String& name,
|
||||
G4bool isotopes,
|
||||
G4bool warning)
|
||||
G4bool, G4bool warning)
|
||||
{
|
||||
return matBuilder->FindOrBuildMaterial(name, isotopes, warning);
|
||||
return matBuilder->FindOrBuildMaterial(name, warning);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -518,14 +517,14 @@ inline G4Material* G4NistManager::ConstructNewMaterial(
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4int>& nbAtoms,
|
||||
G4double dens,
|
||||
G4bool isotopes,
|
||||
G4bool,
|
||||
G4State state,
|
||||
G4double T,
|
||||
G4double P)
|
||||
|
||||
{
|
||||
return
|
||||
matBuilder->ConstructNewMaterial(name,elm,nbAtoms,dens,isotopes,state,T,P);
|
||||
matBuilder->ConstructNewMaterial(name,elm,nbAtoms,dens,state,T,P);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -535,12 +534,12 @@ inline G4Material* G4NistManager::ConstructNewMaterial(
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4double>& w,
|
||||
G4double dens,
|
||||
G4bool isotopes,
|
||||
G4bool,
|
||||
G4State state,
|
||||
G4double T,
|
||||
G4double P)
|
||||
{
|
||||
return matBuilder->ConstructNewMaterial(name,elm,w,dens,isotopes,state,T,P);
|
||||
return matBuilder->ConstructNewMaterial(name,elm,w,dens,state,T,P);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -549,10 +548,9 @@ inline G4Material* G4NistManager::ConstructNewGasMaterial(
|
||||
const G4String& name,
|
||||
const G4String& nameNist,
|
||||
G4double temp, G4double pres,
|
||||
G4bool isotopes)
|
||||
G4bool)
|
||||
{
|
||||
return matBuilder->ConstructNewGasMaterial(name,nameNist,
|
||||
temp,pres,isotopes);
|
||||
return matBuilder->ConstructNewGasMaterial(name,nameNist,temp,pres);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -561,12 +559,12 @@ inline G4Material* G4NistManager::ConstructNewIdealGasMaterial(
|
||||
const G4String& name,
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4int>& nbAtoms,
|
||||
G4bool isotopes,
|
||||
G4bool,
|
||||
G4double T,
|
||||
G4double P)
|
||||
{
|
||||
return
|
||||
matBuilder->ConstructNewIdealGasMaterial(name,elm,nbAtoms,isotopes,T,P);
|
||||
matBuilder->ConstructNewIdealGasMaterial(name,elm,nbAtoms,T,P);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -602,7 +600,7 @@ inline G4double G4NistManager::GetZ13(G4int Z) const
|
||||
|
||||
inline G4double G4NistManager::GetA27(G4int Z) const
|
||||
{
|
||||
return (0 <= Z && Z < 101) ? POWERA27[Z] : 0.0;
|
||||
return (0 <= Z && Z < 101) ? POWERA27[Z] : g4pow->powZ(Z, 0.27);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -78,10 +78,8 @@ public:
|
||||
//
|
||||
inline G4Material* FindMaterial (const G4String& name) const;
|
||||
G4Material* FindOrBuildMaterial (const G4String& name,
|
||||
G4bool isotopes=true,
|
||||
G4bool warning =true);
|
||||
G4bool warning = true);
|
||||
|
||||
|
||||
// Find or build a simple material via atomic number
|
||||
//
|
||||
inline G4Material* FindSimpleMaterial(G4int Z) const;
|
||||
@@ -93,7 +91,6 @@ public:
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4int>& nbAtoms,
|
||||
G4double dens,
|
||||
G4bool isotopes = true,
|
||||
G4State state = kStateSolid,
|
||||
G4double temp = NTP_Temperature,
|
||||
G4double pressure = CLHEP::STP_Pressure);
|
||||
@@ -104,7 +101,6 @@ public:
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4double>& weight,
|
||||
G4double dens,
|
||||
G4bool isotopes = true,
|
||||
G4State state = kStateSolid,
|
||||
G4double temp = NTP_Temperature,
|
||||
G4double pressure = CLHEP::STP_Pressure);
|
||||
@@ -114,15 +110,13 @@ public:
|
||||
//
|
||||
G4Material* ConstructNewGasMaterial(const G4String& name,
|
||||
const G4String& nameDB,
|
||||
G4double temp, G4double pres,
|
||||
G4bool isotopes = true);
|
||||
G4double temp, G4double pres);
|
||||
|
||||
// Construct an ideal gas G4Material from scratch by atom count
|
||||
//
|
||||
G4Material* ConstructNewIdealGasMaterial(const G4String& name,
|
||||
const std::vector<G4String>& elm,
|
||||
const std::vector<G4int>& nbAtoms,
|
||||
G4bool isotopes = true,
|
||||
G4double temp = NTP_Temperature,
|
||||
G4double pressure = CLHEP::STP_Pressure);
|
||||
|
||||
@@ -156,6 +150,11 @@ public:
|
||||
inline G4double GetMeanIonisationEnergy(G4int index) const;
|
||||
inline G4double GetNominalDensity(G4int index) const;
|
||||
|
||||
G4bool operator==(const G4NistMaterialBuilder&) const = delete;
|
||||
G4bool operator!=(const G4NistMaterialBuilder&) const = delete;
|
||||
G4NistMaterialBuilder(const G4NistMaterialBuilder&) = delete;
|
||||
const G4NistMaterialBuilder& operator=(const G4NistMaterialBuilder&) = delete;
|
||||
|
||||
private:
|
||||
|
||||
void Initialise();
|
||||
@@ -226,7 +225,7 @@ private:
|
||||
};
|
||||
|
||||
inline const std::vector<G4String>&
|
||||
G4NistMaterialBuilder::GetMaterialNames() const
|
||||
G4NistMaterialBuilder::GetMaterialNames() const
|
||||
{
|
||||
return names;
|
||||
}
|
||||
@@ -234,7 +233,7 @@ inline const std::vector<G4String>&
|
||||
inline G4double
|
||||
G4NistMaterialBuilder::GetMeanIonisationEnergy(G4int index) const
|
||||
{
|
||||
return (index >= 0 && index < nMaterials) ? ionPotentials[index] : 10.0*index;
|
||||
return (index >= 0 && index < nMaterials) ? ionPotentials[index] : 10.0*index;
|
||||
}
|
||||
|
||||
inline G4double
|
||||
@@ -247,11 +246,10 @@ inline G4Material*
|
||||
G4NistMaterialBuilder::FindMaterial(const G4String& name) const
|
||||
{
|
||||
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
|
||||
size_t nmat = theMaterialTable->size();
|
||||
G4Material* ptr = nullptr;
|
||||
for(size_t i=0; i<nmat; ++i) {
|
||||
if(name == ((*theMaterialTable)[i])->GetName()) {
|
||||
ptr = (*theMaterialTable)[i];
|
||||
for(auto & mat : *theMaterialTable) {
|
||||
if(name == mat->GetName()) {
|
||||
ptr = mat;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,9 +81,9 @@ class G4NistMessenger: public G4UImessenger
|
||||
public:
|
||||
|
||||
explicit G4NistMessenger(G4NistManager* );
|
||||
virtual ~G4NistMessenger();
|
||||
~G4NistMessenger() override;
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String) final;
|
||||
void SetNewValue(G4UIcommand*, G4String) final;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -0,0 +1,308 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// File name: G4OpticalMaterialProperties.hh
|
||||
//
|
||||
// Author: Daren Sawkey
|
||||
//
|
||||
// Creation date: 05.13.2021
|
||||
//
|
||||
// Description: Contains material properties for optical materials. These
|
||||
// may be used in a user application instead of defining one's own. In user
|
||||
// code, write for example:
|
||||
// G4MaterialPropertiesTable* mpt = new G4MaterialPropertiesTable();
|
||||
// mpt->AddProperty(keyname, materialname);
|
||||
// where keyname is the key (e.g. "RINDEX") and materialname is the
|
||||
// name of the material (e.g. "Air")
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef G4OPTICALMATERIALPROPERTIES
|
||||
#define G4OPTICALMATERIALPROPERTIES
|
||||
|
||||
#include "G4MaterialPropertyVector.hh"
|
||||
|
||||
#include <CLHEP/Units/PhysicalConstants.h>
|
||||
#include <vector>
|
||||
|
||||
namespace G4OpticalMaterialProperties
|
||||
{
|
||||
void ConvertToEnergy(std::vector<G4double>& wavelength)
|
||||
{
|
||||
for(auto& val : wavelength)
|
||||
{
|
||||
val = CLHEP::h_Planck * CLHEP::c_light / (val / 1000.);
|
||||
}
|
||||
}
|
||||
|
||||
G4MaterialPropertyVector* GetRefractiveIndex(const G4String& material)
|
||||
{
|
||||
G4MaterialPropertyVector* v = nullptr;
|
||||
if(material == "Air")
|
||||
{
|
||||
// P. E. Ciddor. Refractive index of air: new equations for the visible
|
||||
// and near infrared, Appl. Optics 35, 1566-1573 (1996) via
|
||||
// refractiveindex.info
|
||||
std::vector<G4double> wl = {
|
||||
1.69, 1.675, 1.661, 1.646, 1.632, 1.617, 1.602, 1.588, 1.573,
|
||||
1.559, 1.544, 1.529, 1.515, 1.5, 1.486, 1.471, 1.456, 1.442,
|
||||
1.427, 1.413, 1.398, 1.383, 1.369, 1.354, 1.34, 1.325, 1.31,
|
||||
1.296, 1.281, 1.267, 1.252, 1.237, 1.223, 1.208, 1.194, 1.179,
|
||||
1.164, 1.15, 1.135, 1.121, 1.106, 1.091, 1.077, 1.062, 1.048,
|
||||
1.033, 1.018, 1.004, 0.9892, 0.9746, 0.96, 0.9454, 0.9308, 0.9162,
|
||||
0.9016, 0.887, 0.8724, 0.8578, 0.8432, 0.8286, 0.814, 0.7994, 0.7848,
|
||||
0.7702, 0.7556, 0.741, 0.7264, 0.7118, 0.6972, 0.6826, 0.668, 0.6534,
|
||||
0.6388, 0.6242, 0.6096, 0.595, 0.5804, 0.5658, 0.5512, 0.5366, 0.522,
|
||||
0.5074, 0.4928, 0.4782, 0.4636, 0.449, 0.4344, 0.4198, 0.4052, 0.3906,
|
||||
0.376, 0.3614, 0.3468, 0.3322, 0.3176, 0.303, 0.2884, 0.2738, 0.2592,
|
||||
0.2446, 0.23
|
||||
};
|
||||
|
||||
std::vector<G4double> ri = {
|
||||
1.0002731583221, 1.0002731680358, 1.0002731773414, 1.0002731875774,
|
||||
1.0002731973879, 1.0002732081845, 1.0002732192871, 1.000273229936,
|
||||
1.000273241664, 1.0002732529184, 1.0002732653197, 1.0002732780896,
|
||||
1.0002732903537, 1.0002733038787, 1.0002733168752, 1.0002733312162,
|
||||
1.000273346005, 1.0002733602287, 1.000273375938, 1.0002733910563,
|
||||
1.0002734077641, 1.0002734250218, 1.0002734416467, 1.000273460038,
|
||||
1.000273477767, 1.0002734973936, 1.0002735177028, 1.0002735373021,
|
||||
1.0002735590237, 1.0002735800022, 1.0002736032705, 1.0002736273968,
|
||||
1.0002736507265, 1.0002736766354, 1.0002737017104, 1.0002737295823,
|
||||
1.0002737585479, 1.0002737866205, 1.0002738178689, 1.0002738481835,
|
||||
1.0002738819616, 1.0002739171561, 1.0002739513533, 1.0002739895199,
|
||||
1.0002740266464, 1.0002740681302, 1.0002741114819, 1.0002741537295,
|
||||
1.0002742003794, 1.0002742485227, 1.0002742989071, 1.0002743516746,
|
||||
1.0002744069782, 1.0002744649838, 1.000274525871, 1.0002745898346,
|
||||
1.0002746570862, 1.0002747278561, 1.0002748023951, 1.0002748809769,
|
||||
1.0002749639005, 1.0002750514935, 1.0002751441149, 1.0002752421591,
|
||||
1.0002753460601, 1.0002754562966, 1.0002755733975, 1.0002756979483,
|
||||
1.0002758305987, 1.0002759720715, 1.0002761231724, 1.0002762848018,
|
||||
1.0002764579689, 1.0002766438078, 1.0002768435966, 1.0002770587802,
|
||||
1.0002772909975, 1.0002775421136, 1.0002778142591, 1.0002781098769,
|
||||
1.0002784317799, 1.0002787832208, 1.000279167979, 1.0002795904676,
|
||||
1.0002800558675, 1.0002805702966, 1.0002811410247, 1.000281776749,
|
||||
1.0002824879531, 1.0002832873764, 1.0002841906396, 1.0002852170881,
|
||||
1.0002863909483, 1.000287742941, 1.000289312581, 1.000291151532,
|
||||
1.0002933286388, 1.000295937727, 1.0002991101754, 1.0003030361805,
|
||||
1.0003080029552
|
||||
};
|
||||
|
||||
ConvertToEnergy(wl);
|
||||
v = new G4MaterialPropertyVector(wl, ri);
|
||||
}
|
||||
else if(material == "Water")
|
||||
{
|
||||
// M. Daimon and A. Masumura. Measurement of the refractive index of
|
||||
// distilled water from the near-infrared region to the ultraviolet
|
||||
// region, Appl. Opt. 46, 3811-3820 (2007) via refractiveindex.info
|
||||
std::vector<G4double> wl = {
|
||||
1.129, 1.12, 1.11, 1.101, 1.091, 1.082, 1.072, 1.063, 1.053,
|
||||
1.044, 1.034, 1.025, 1.015, 1.006, 0.9964, 0.987, 0.9775, 0.968,
|
||||
0.9585, 0.9491, 0.9396, 0.9301, 0.9207, 0.9112, 0.9017, 0.8923, 0.8828,
|
||||
0.8733, 0.8638, 0.8544, 0.8449, 0.8354, 0.826, 0.8165, 0.807, 0.7976,
|
||||
0.7881, 0.7786, 0.7691, 0.7597, 0.7502, 0.7407, 0.7313, 0.7218, 0.7123,
|
||||
0.7029, 0.6934, 0.6839, 0.6744, 0.665, 0.6555, 0.646, 0.6366, 0.6271,
|
||||
0.6176, 0.6082, 0.5987, 0.5892, 0.5797, 0.5703, 0.5608, 0.5513, 0.5419,
|
||||
0.5324, 0.5229, 0.5135, 0.504, 0.4945, 0.485, 0.4756, 0.4661, 0.4566,
|
||||
0.4472, 0.4377, 0.4282, 0.4188, 0.4093, 0.3998, 0.3903, 0.3809, 0.3714,
|
||||
0.3619, 0.3525, 0.343, 0.3335, 0.3241, 0.3146, 0.3051, 0.2956, 0.2862,
|
||||
0.2767, 0.2672, 0.2578, 0.2483, 0.2388, 0.2294, 0.2199, 0.2104, 0.2009,
|
||||
0.1915, 0.182
|
||||
};
|
||||
|
||||
std::vector<G4double> ri = {
|
||||
1.3235601610672, 1.3236962786529, 1.3238469492274, 1.3239820826015,
|
||||
1.3241317601229, 1.3242660923031, 1.3244149850321, 1.3245487081924,
|
||||
1.3246970353146, 1.3248303521764, 1.3249783454392, 1.3251114708334,
|
||||
1.3252593763883, 1.3253925390161, 1.3255346928953, 1.3256740639273,
|
||||
1.3258151661284, 1.3259565897464, 1.326098409446, 1.3262392023332,
|
||||
1.32638204417, 1.3265255240887, 1.3266682080154, 1.3268132228682,
|
||||
1.3269591507928, 1.32710453999, 1.3272525883205, 1.3274018651452,
|
||||
1.3275524865531, 1.3277029655807, 1.3278566311755, 1.3280120256415,
|
||||
1.328167625867, 1.3283268916356, 1.3284883366632, 1.3286503921034,
|
||||
1.3288166823394, 1.3289856845931, 1.3291575989438, 1.3293307783594,
|
||||
1.3295091314406, 1.329691073075, 1.3298748828499, 1.3300647424335,
|
||||
1.330259008797, 1.3304558735667, 1.3306598562207, 1.3308692454666,
|
||||
1.3310844250714, 1.3313034432243, 1.3315313994219, 1.3317664745307,
|
||||
1.3320065870964, 1.3322573970809, 1.3325169923974, 1.3327831408348,
|
||||
1.3330622051201, 1.3333521716563, 1.3336538750639, 1.3339648469612,
|
||||
1.334292688017, 1.3346352438404, 1.3349898436519, 1.3353653263299,
|
||||
1.3357594410975, 1.3361692982684, 1.3366053508081, 1.3370652823778,
|
||||
1.3375512404603, 1.3380600434506, 1.3386051585073, 1.3391843066628,
|
||||
1.3397941348754, 1.34045134693, 1.3411539035636, 1.341898413271,
|
||||
1.3427061376724, 1.3435756703017, 1.3445141685829, 1.3455187528254,
|
||||
1.3466202523109, 1.3478194943997, 1.3491150472655, 1.350549622307,
|
||||
1.3521281492629, 1.3538529543346, 1.3557865447701, 1.3579431129972,
|
||||
1.3603615197762, 1.3630595401556, 1.3661548299831, 1.3696980785677,
|
||||
1.3737440834249, 1.3785121412586, 1.3841454790718, 1.3908241012126,
|
||||
1.399064758142, 1.4093866965284, 1.422764121467, 1.4407913910231,
|
||||
1.4679465862259
|
||||
};
|
||||
|
||||
ConvertToEnergy(wl);
|
||||
v = new G4MaterialPropertyVector(wl, ri);
|
||||
}
|
||||
else if(material == "PMMA")
|
||||
{
|
||||
// G. Beadie, M. Brindza, R. A. Flynn, A. Rosenberg, and J. S. Shirk.
|
||||
// Refractive index measurements of poly(methyl methacrylate) (PMMA) from
|
||||
// 0.4-1.6 μm, Appl. Opt. 54, F139-F143 (2015) via refractiveindex.info
|
||||
std::vector<G4double> wl = {
|
||||
0.420, 0.432, 0.444, 0.456, 0.468, 0.480, 0.492, 0.504, 0.516, 0.528,
|
||||
0.540, 0.552, 0.564, 0.576, 0.588, 0.600, 0.612, 0.624, 0.636, 0.648,
|
||||
0.660, 0.672, 0.684, 0.696, 0.708, 0.720, 0.732, 0.744, 0.756, 0.768,
|
||||
0.780, 0.792, 0.804, 0.816, 0.828, 0.840, 0.852, 0.864, 0.876, 0.888,
|
||||
0.900, 0.912, 0.924, 0.936, 0.948, 0.960, 0.972, 0.984, 0.996, 1.008,
|
||||
1.020, 1.032, 1.044, 1.056, 1.068, 1.080, 1.092, 1.104, 1.116, 1.128,
|
||||
1.140, 1.152, 1.164, 1.176, 1.188, 1.200, 1.212, 1.224, 1.236, 1.248,
|
||||
1.260, 1.272, 1.284, 1.296, 1.308, 1.320, 1.332, 1.344, 1.356, 1.368,
|
||||
1.380, 1.392, 1.404, 1.416, 1.428, 1.440, 1.452, 1.464, 1.476, 1.488,
|
||||
1.500, 1.512, 1.524, 1.536, 1.548, 1.560, 1.572, 1.584, 1.596, 1.608,
|
||||
1.620
|
||||
};
|
||||
|
||||
std::vector<G4double> ri = {
|
||||
1.5049521933717, 1.5035296480805, 1.5022113611478, 1.5009965515508,
|
||||
1.4998800687986, 1.4988546454557, 1.4979122317605, 1.4970447626402,
|
||||
1.4962445758678, 1.4955046181841, 1.494818524906, 1.4941806263051,
|
||||
1.4935859137206, 1.4930299855674, 1.4925089853408, 1.4920195386642,
|
||||
1.4915586932831, 1.491123863976, 1.4907127831856, 1.4903234574922,
|
||||
1.4899541296675, 1.4896032458562, 1.4892694273501, 1.4889514464045,
|
||||
1.4886482055708, 1.4883587200625, 1.4880821027184, 1.4878175511839,
|
||||
1.4875643369775, 1.4873217961577, 1.4870893213462, 1.4868663548994,
|
||||
1.4866523830528, 1.4864469308883, 1.4862495580004, 1.486059854753,
|
||||
1.4858774390395, 1.4857019534694, 1.4855330629191, 1.4853704523922,
|
||||
1.4852138251453, 1.4850629010407, 1.4849174150935, 1.4847771161864,
|
||||
1.4846417659288, 1.484511137641, 1.4843850154458, 1.4842631934547,
|
||||
1.4841454750362, 1.4840316721549, 1.4839216047736, 1.4838151003112,
|
||||
1.483711993148, 1.4836121241751, 1.483515340381, 1.4834214944731,
|
||||
1.4833304445284, 1.4832420536723, 1.483156189781, 1.4830727252059,
|
||||
1.4829915365184, 1.4829125042715, 1.4828355127788, 1.4827604499074,
|
||||
1.482687206885, 1.4826156781186, 1.4825457610252, 1.4824773558724,
|
||||
1.4824103656291, 1.4823446958243, 1.4822802544152, 1.4822169516613,
|
||||
1.4821547000072, 1.4820934139706, 1.4820330100373, 1.4819734065613,
|
||||
1.4819145236704, 1.4818562831765, 1.4817986084914, 1.4817414245457,
|
||||
1.4816846577124, 1.4816282357347, 1.4815720876568, 1.4815161437579,
|
||||
1.4814603354903, 1.4814045954196, 1.4813488571684, 1.4812930553619,
|
||||
1.4812371255769, 1.4811810042925, 1.4811246288434, 1.4810679373753,
|
||||
1.4810108688022, 1.4809533627658, 1.4808953595962, 1.4808368002755,
|
||||
1.4807776264012, 1.4807177801532, 1.4806572042606, 1.4805958419707,
|
||||
1.4805336370194
|
||||
};
|
||||
|
||||
ConvertToEnergy(wl);
|
||||
v = new G4MaterialPropertyVector(wl, ri);
|
||||
}
|
||||
else if(material == "Fused Silica")
|
||||
{
|
||||
// 1) I. H. Malitson. Interspecimen comparison of the refractive index of
|
||||
// fused silica, J. Opt. Soc. Am. 55, 1205-1208 (1965) 2) C. Z. Tan.
|
||||
//Determination of refractive index of silica glass for infrared
|
||||
//wavelengths by IR spectroscopy, J. Non-Cryst. Solids 223, 158-163 (1998)
|
||||
// Sellmeier formula is reported in Ref. 1 for the 0.21-3.71 um wavelength
|
||||
// range. Ref. 2 verifies the validity of the formula up to 6.7 um.
|
||||
// via refractiveindex.info
|
||||
std::vector<G4double> wl = {
|
||||
0.2100, 0.2174, 0.2251, 0.2330, 0.2412, 0.2497, 0.2585, 0.2676, 0.2770,
|
||||
0.2868, 0.2969, 0.3074, 0.3182, 0.3294, 0.3410, 0.3530, 0.3655, 0.3783,
|
||||
0.3917, 0.4055, 0.4197, 0.4345, 0.4498, 0.4657, 0.4821, 0.4991, 0.5167,
|
||||
0.5349, 0.5537, 0.5732, 0.5934, 0.6143, 0.6360, 0.6584, 0.6816, 0.7056,
|
||||
0.7305, 0.7562, 0.7829, 0.8104, 0.8390, 0.8686, 0.8992, 0.9308, 0.9636,
|
||||
0.9976, 1.033, 1.069, 1.107, 1.146, 1.186, 1.228, 1.271, 1.316,
|
||||
1.362, 1.410, 1.460, 1.512, 1.565, 1.620, 1.677, 1.736, 1.797,
|
||||
1.861, 1.926, 1.994, 2.064, 2.137, 2.212, 2.290, 2.371, 2.454,
|
||||
2.541, 2.630, 2.723, 2.819, 2.918, 3.021, 3.128, 3.238, 3.352,
|
||||
3.470, 3.592, 3.719, 3.850, 3.986, 4.126, 4.271, 4.422, 4.578,
|
||||
4.739, 4.906, 5.079, 5.258, 5.443, 5.635, 5.833, 6.039, 6.252,
|
||||
6.472, 6.700
|
||||
};
|
||||
|
||||
std::vector<G4double> ri = {
|
||||
1.5383576204905, 1.530846431063, 1.5240789072975, 1.5180417677275,
|
||||
1.5125721155558, 1.5076095872199, 1.5031009629039, 1.498999218542,
|
||||
1.495262719426, 1.4918215034661, 1.488683281387, 1.4857914366574,
|
||||
1.4831504333467, 1.4807144415912, 1.4784676522483, 1.4763951298847,
|
||||
1.4744682820342, 1.4727046797948, 1.4710525123802, 1.4695286500209,
|
||||
1.4681218218832, 1.4668048202486, 1.465580829975, 1.4644360310913,
|
||||
1.4633719346282, 1.4623764385944, 1.4614449911601, 1.4605730794883,
|
||||
1.4597562854765, 1.4589865613939, 1.4582607881284, 1.4575758068817,
|
||||
1.4569256013294, 1.4563104080175, 1.4557246986958, 1.4551660299221,
|
||||
1.4546298754538, 1.4541161650842, 1.4536188536247, 1.4531396102638,
|
||||
1.4526712743322, 1.4522138205731, 1.4517653834747, 1.4513240787777,
|
||||
1.4508853971281, 1.450447735732, 1.4500069615101, 1.4495710901504,
|
||||
1.4491214616538, 1.448668310738, 1.4482096590065, 1.4477322458328,
|
||||
1.4472455774929, 1.4467363524093, 1.4462138519129, 1.445664578157,
|
||||
1.4450861470109, 1.4444759883488, 1.4438434020915, 1.4431739285381,
|
||||
1.4424645759259, 1.4417121733672, 1.4409133669095, 1.4400509385522,
|
||||
1.43914806608, 1.4381729429417, 1.4371349603433, 1.4360139618555,
|
||||
1.4348196176837, 1.433529881253, 1.4321372109342, 1.4306516985468,
|
||||
1.4290287283802, 1.427296093753, 1.4254044329951, 1.4233613684394,
|
||||
1.4211544161909, 1.4187459519934, 1.416117293379, 1.4132741569442,
|
||||
1.4101696832452, 1.4067782146466, 1.4030708962299, 1.3989819997456,
|
||||
1.3945035722002, 1.3895553417944, 1.3841208059058, 1.3780997735118,
|
||||
1.3713701305288, 1.36388143366, 1.3555262189157, 1.3461171232165,
|
||||
1.3354823573874, 1.3234105439689, 1.3096384003386, 1.2937460280032,
|
||||
1.2753723963511, 1.2537289561387, 1.2280888354422, 1.1973256716307,
|
||||
1.1596494139777
|
||||
};
|
||||
|
||||
ConvertToEnergy(wl);
|
||||
v = new G4MaterialPropertyVector(wl, ri);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Material " << material << " not found.";
|
||||
G4Exception("G4OpticalMaterialProperties::GetRefractiveIndex", "mat400",
|
||||
FatalException, ed);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
G4MaterialPropertyVector* GetProperty(const G4String& key, const G4String& mat)
|
||||
{
|
||||
if (key == "RINDEX")
|
||||
{
|
||||
return GetRefractiveIndex(mat);
|
||||
}
|
||||
else
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Property name " << key
|
||||
<< " doesn't exist in optical properties data table.";
|
||||
G4Exception("G4OpticalMaterialProperties::GetProperty", "mat401",
|
||||
FatalException, ed);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace G4OpticalMaterialProperties
|
||||
|
||||
#endif
|
||||
@@ -150,6 +150,12 @@ public: // without description
|
||||
inline G4bool GetLowerI1() {return fLowerI1;};
|
||||
inline void SetLowerI1(G4bool flag) {fLowerI1=flag;};
|
||||
|
||||
// operators
|
||||
G4bool operator==(const G4SandiaTable&) const = delete;
|
||||
G4bool operator!=(const G4SandiaTable&) const = delete;
|
||||
G4SandiaTable(G4SandiaTable &) = delete;
|
||||
G4SandiaTable & operator=(const G4SandiaTable &right) = delete;
|
||||
|
||||
private:
|
||||
|
||||
void ComputeMatTable();
|
||||
@@ -160,12 +166,6 @@ private:
|
||||
|
||||
G4double** GetPointerToCof();
|
||||
|
||||
// operators
|
||||
G4bool operator==(const G4SandiaTable&) const;
|
||||
G4bool operator!=(const G4SandiaTable&) const;
|
||||
G4SandiaTable(G4SandiaTable &);
|
||||
G4SandiaTable & operator=(const G4SandiaTable &right);
|
||||
|
||||
static const G4double fSandiaTable[981][5];
|
||||
static const G4int fNumberOfElements;
|
||||
static const G4int fIntervalLimit;
|
||||
|
||||
@@ -105,10 +105,8 @@ class G4VIonDEDXTable {
|
||||
const G4String& // Name or chemical formula of material
|
||||
) = 0;
|
||||
|
||||
private:
|
||||
|
||||
G4VIonDEDXTable(G4VIonDEDXTable&) = delete;
|
||||
const G4VIonDEDXTable & operator=(const G4VIonDEDXTable&) = delete;
|
||||
G4VIonDEDXTable(G4VIonDEDXTable&) = delete;
|
||||
const G4VIonDEDXTable & operator=(const G4VIonDEDXTable&) = delete;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user