Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -153,14 +153,18 @@ public: // with description
|
||||
// Add an element, giving number of atoms
|
||||
//
|
||||
void AddElement(G4Element* element, //the element
|
||||
G4int nAtoms); //nb of atoms in
|
||||
// a molecule
|
||||
G4int nAtoms); //nb of atoms in a molecule
|
||||
inline
|
||||
void AddElementByNumberOfAtoms(G4Element* elm, G4int nAtoms) {AddElement(elm, nAtoms);}
|
||||
|
||||
//
|
||||
// Add an element or material, giving fraction of mass
|
||||
//
|
||||
void AddElement (G4Element* element , //the element
|
||||
G4double fraction); //fractionOfMass
|
||||
|
||||
inline
|
||||
void AddElementByMassFraction(G4Element* elm, G4double frac) {AddElement(elm, frac);}
|
||||
|
||||
void AddMaterial(G4Material* material, //the material
|
||||
G4double fraction); //fractionOfMass
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
// 1999-10-29 add method and class descriptors
|
||||
// 1997-03-25 by Peter Gumplinger
|
||||
// > cosmetics (only)
|
||||
// mail: gum@triumf.ca
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -76,10 +75,16 @@ class G4MaterialPropertiesTable
|
||||
|
||||
public: // With description
|
||||
|
||||
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 G4String& key,
|
||||
const std::vector<G4double>& photonEnergies,
|
||||
const std::vector<G4double>& propertyValues);
|
||||
|
||||
G4MaterialPropertyVector* AddProperty(const char *key,
|
||||
G4double *PhotonEnergies,
|
||||
G4double *PropertyValues,
|
||||
@@ -87,22 +92,27 @@ class G4MaterialPropertiesTable
|
||||
// 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, 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.
|
||||
|
||||
inline void RemoveConstProperty(const G4String& key);
|
||||
inline void RemoveConstProperty(const char *key);
|
||||
// Remove a constant 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 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.
|
||||
|
||||
@@ -111,12 +121,16 @@ class G4MaterialPropertiesTable
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
@@ -34,38 +34,57 @@
|
||||
// Created: 1996-02-08
|
||||
// Author: Juliet Armstrong
|
||||
// Updated: moved to inline
|
||||
// mail: gum@triumf.ca
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
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
|
||||
G4String k(key);
|
||||
if (std::find(G4MaterialConstPropertyName.begin(),
|
||||
G4MaterialConstPropertyName.end(), k) ==
|
||||
G4MaterialConstPropertyName.end()) {
|
||||
G4MaterialConstPropertyName.push_back(k);
|
||||
}
|
||||
G4int index = GetConstPropertyIndex(k);
|
||||
|
||||
MCP[index] = PropertyValue;
|
||||
AddConstProperty(G4String(key), PropertyValue);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4MaterialPropertiesTable::RemoveConstProperty(const char *key)
|
||||
void G4MaterialPropertiesTable::RemoveConstProperty(const G4String& key)
|
||||
{
|
||||
G4int index = GetConstPropertyIndex(G4String(key));
|
||||
G4int index = GetConstPropertyIndex(key);
|
||||
|
||||
MCP.erase(index);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4MaterialPropertiesTable::RemoveProperty(const char *key)
|
||||
void G4MaterialPropertiesTable::RemoveConstProperty(const char *key)
|
||||
{
|
||||
G4int index = GetPropertyIndex(G4String(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));
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
// Author: Juliet Armstrong
|
||||
// Updated: 2011-10-13 by Peter Gumplinger
|
||||
// remove the class: simply typedef to G4PhysicsOrderedFreeVector
|
||||
// mail: gum@triumf.ca
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// G4MicroElecMaterialStructure.hh, 2011/08/29 A.Valentin, M. Raine are with CEA [a]
|
||||
// 2020/05/20 P. Caron, C. Inguimbert are with ONERA [b]
|
||||
// Q. Gibaru is with CEA [a], ONERA [b] and CNES [c]
|
||||
// M. Raine and D. Lambert are with CEA [a]
|
||||
//
|
||||
// A part of this work has been funded by the French space agency(CNES[c])
|
||||
// [a] CEA, DAM, DIF - 91297 ARPAJON, France
|
||||
// [b] ONERA - DPHY, 2 avenue E.Belin, 31055 Toulouse, France
|
||||
// [c] CNES, 18 av.E.Belin, 31401 Toulouse CEDEX, France
|
||||
//
|
||||
// Based on the following publications
|
||||
// - A.Valentin, M. Raine,
|
||||
// Inelastic cross-sections of low energy electrons in silicon
|
||||
// for the simulation of heavy ion tracks with the Geant4-DNA toolkit,
|
||||
// NSS Conf. Record 2010, pp. 80-85
|
||||
// https://doi.org/10.1109/NSSMIC.2010.5873720
|
||||
//
|
||||
// - A.Valentin, M. Raine, M.Gaillardin, P.Paillet
|
||||
// Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for electrons in Silicon,
|
||||
// https://doi.org/10.1016/j.nimb.2012.06.007
|
||||
// NIM B, vol. 288, pp. 66-73, 2012, part A
|
||||
// heavy ions in Si, NIM B, vol. 287, pp. 124-129, 2012, part B
|
||||
// https://doi.org/10.1016/j.nimb.2012.07.028
|
||||
//
|
||||
// - M. Raine, M. Gaillardin, P. Paillet
|
||||
// Geant4 physics processes for silicon microdosimetry simulation:
|
||||
// Improvements and extension of the energy-range validity up to 10 GeV/nucleon
|
||||
// NIM B, vol. 325, pp. 97-100, 2014
|
||||
// https://doi.org/10.1016/j.nimb.2014.01.014
|
||||
//
|
||||
// - J. Pierron, C. Inguimbert, M. Belhaj, T. Gineste, J. Puech, M. Raine
|
||||
// Electron emission yield for low energy electrons:
|
||||
// Monte Carlo simulation and experimental comparison for Al, Ag, and Si
|
||||
// Journal of Applied Physics 121 (2017) 215107.
|
||||
// https://doi.org/10.1063/1.4984761
|
||||
//
|
||||
// - P. Caron,
|
||||
// Study of Electron-Induced Single-Event Upset in Integrated Memory Devices
|
||||
// PHD, 16th October 2019
|
||||
//
|
||||
// - Q.Gibaru, C.Inguimbert, P.Caron, M.Raine, D.Lambert, J.Puech,
|
||||
// Geant4 physics processes for microdosimetry and secondary electron emission simulation :
|
||||
// Extension of MicroElec to very low energies and new materials
|
||||
// NIM B, 2020, in review.
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4MICROELECMATERIALSTRUCTURE_HH
|
||||
#define G4MICROELECMATERIALSTRUCTURE_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Material.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4MicroElecMaterialStructure
|
||||
{
|
||||
public:
|
||||
G4MicroElecMaterialStructure(const G4String& matName = "");
|
||||
virtual ~G4MicroElecMaterialStructure();
|
||||
|
||||
void ReadMaterialFile();
|
||||
G4double Energy(G4int level);
|
||||
G4int NumberOfLevels() { return nLevels; }
|
||||
G4double GetZ(G4int Shell);
|
||||
G4double ConvertUnit(const G4String& unitName);
|
||||
G4double GetEnergyGap() { return energyGap; }
|
||||
G4double GetInitialEnergy() { return initialEnergy; }
|
||||
G4int GetEADL_Enumerator(G4int shell) { return EADL_Enumerator[shell]; };
|
||||
G4double GetWorkFunction() { return workFunction; };
|
||||
G4String GetMaterialName() { return materialName; };
|
||||
G4double GetLimitEnergy(G4int level);
|
||||
G4double GetElasticModelLowLimit() {return limitElastic[0];}
|
||||
G4double GetElasticModelHighLimit() { return limitElastic[1]; }
|
||||
G4double GetInelasticModelLowLimit(G4int pdg);
|
||||
G4double GetInelasticModelHighLimit(G4int pdg);
|
||||
G4bool IsShellWeaklyBound(G4int level);
|
||||
|
||||
private:
|
||||
// private elements
|
||||
G4int nLevels = 3; // Number of levels of material
|
||||
G4bool isCompound = false;
|
||||
G4String materialName = "";
|
||||
std::vector<G4bool> isShellWeaklyBoundVector;
|
||||
std::vector<G4double> energyConstant;
|
||||
std::vector<G4double> LimitEnergy;
|
||||
std::vector<G4int> EADL_Enumerator;
|
||||
G4double workFunction = 0.0;
|
||||
G4double initialEnergy = 0.0;
|
||||
std::vector<G4double> compoundShellZ;
|
||||
G4double Z = 0.0;
|
||||
G4double energyGap = 0.0;
|
||||
G4double limitElastic[2] = { 0,0 };
|
||||
G4double limitInelastic[4] = { 0,0,0,0 };
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// G4MicroElecSiStructure.hh, 2011/08/29 A.Valentin, M. Raine
|
||||
//
|
||||
// Based on the following publications
|
||||
//
|
||||
// - Inelastic cross-sections of low energy electrons in silicon
|
||||
// for the simulation of heavy ion tracks with theGeant4-DNA toolkit,
|
||||
// NSS Conf. Record 2010, pp. 80-85
|
||||
// - Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for electrons in Si,
|
||||
// NIM B, vol. 288, pp. 66-73, 2012.
|
||||
// - Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for protons and
|
||||
// heavy ions in Si, NIM B, vol. 287, pp. 124-129, 2012.
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
#ifndef G4MICROELECSISTRUCTURE_HH
|
||||
#define G4MICROELECSISTRUCTURE_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include <vector>
|
||||
|
||||
|
||||
class G4MicroElecSiStructure
|
||||
{
|
||||
public:
|
||||
|
||||
G4MicroElecSiStructure();
|
||||
|
||||
virtual ~G4MicroElecSiStructure();
|
||||
|
||||
G4double Energy(G4int level);
|
||||
|
||||
G4int NumberOfLevels() { return nLevels; }
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Number of levels of silicon
|
||||
G4int nLevels;
|
||||
|
||||
std::vector<G4double> energyConstant;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// G4OpticalSurface Definition
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -36,18 +36,13 @@
|
||||
// Created: 1997-06-26
|
||||
// Author: Peter Gumplinger
|
||||
// Updated: 1999-10-29 add method and class descriptors
|
||||
// 2017-02-24 Mariele Stockhoff add DAVIS model
|
||||
// mail: gum@triumf.ca
|
||||
// 2017-02-24 Mariele Stockhoff add DAVIS model
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef G4OpticalSurface_h
|
||||
#define G4OpticalSurface_h 1
|
||||
|
||||
/////////////
|
||||
// Includes
|
||||
/////////////
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4Physics2DVector.hh"
|
||||
#include "G4SurfaceProperty.hh"
|
||||
@@ -60,238 +55,240 @@
|
||||
|
||||
enum G4OpticalSurfaceFinish
|
||||
{
|
||||
polished, // smooth perfectly polished surface
|
||||
polishedfrontpainted, // smooth top-layer (front) paint
|
||||
polishedbackpainted, // same is 'polished' but with a back-paint
|
||||
polished, // smooth perfectly polished surface
|
||||
polishedfrontpainted, // smooth top-layer (front) paint
|
||||
polishedbackpainted, // same is 'polished' but with a back-paint
|
||||
|
||||
ground, // rough surface
|
||||
groundfrontpainted, // rough top-layer (front) paint
|
||||
groundbackpainted, // same as 'ground' but with a back-paint
|
||||
ground, // rough surface
|
||||
groundfrontpainted, // rough top-layer (front) paint
|
||||
groundbackpainted, // same as 'ground' but with a back-paint
|
||||
|
||||
polishedlumirrorair, // mechanically polished surface, with lumirror
|
||||
polishedlumirrorglue, // mechanically polished surface, with lumirror & meltmount
|
||||
polishedair, // mechanically polished surface
|
||||
polishedteflonair, // mechanically polished surface, with teflon
|
||||
polishedtioair, // mechanically polished surface, with tio paint
|
||||
polishedtyvekair, // mechanically polished surface, with tyvek
|
||||
polishedvm2000air, // mechanically polished surface, with esr film
|
||||
polishedvm2000glue, // mechanically polished surface, with esr film & meltmount
|
||||
// for LBNL LUT model
|
||||
polishedlumirrorair, // mechanically polished surface, with lumirror
|
||||
polishedlumirrorglue, // mechanically polished surface, with lumirror &
|
||||
// meltmount
|
||||
polishedair, // mechanically polished surface
|
||||
polishedteflonair, // mechanically polished surface, with teflon
|
||||
polishedtioair, // mechanically polished surface, with tio paint
|
||||
polishedtyvekair, // mechanically polished surface, with tyvek
|
||||
polishedvm2000air, // mechanically polished surface, with esr film
|
||||
polishedvm2000glue, // mechanically polished surface, with esr film &
|
||||
// meltmount
|
||||
|
||||
etchedlumirrorair, // chemically etched surface, with lumirror
|
||||
etchedlumirrorglue, // chemically etched surface, with lumirror & meltmount
|
||||
etchedair, // chemically etched surface
|
||||
etchedteflonair, // chemically etched surface, with teflon
|
||||
etchedtioair, // chemically etched surface, with tio paint
|
||||
etchedtyvekair, // chemically etched surface, with tyvek
|
||||
etchedvm2000air, // chemically etched surface, with esr film
|
||||
etchedvm2000glue, // chemically etched surface, with esr film & meltmount
|
||||
etchedlumirrorair, // chemically etched surface, with lumirror
|
||||
etchedlumirrorglue, // chemically etched surface, with lumirror & meltmount
|
||||
etchedair, // chemically etched surface
|
||||
etchedteflonair, // chemically etched surface, with teflon
|
||||
etchedtioair, // chemically etched surface, with tio paint
|
||||
etchedtyvekair, // chemically etched surface, with tyvek
|
||||
etchedvm2000air, // chemically etched surface, with esr film
|
||||
etchedvm2000glue, // chemically etched surface, with esr film & meltmount
|
||||
|
||||
groundlumirrorair, // rough-cut surface, with lumirror
|
||||
groundlumirrorglue, // rough-cut surface, with lumirror & meltmount
|
||||
groundair, // rough-cut surface
|
||||
groundteflonair, // rough-cut surface, with teflon
|
||||
groundtioair, // rough-cut surface, with tio paint
|
||||
groundtyvekair, // rough-cut surface, with tyvek
|
||||
groundvm2000air, // rough-cut surface, with esr film
|
||||
groundvm2000glue, // rough-cut surface, with esr film & meltmount
|
||||
|
||||
// for DAVIS model
|
||||
Rough_LUT, //rough surface
|
||||
RoughTeflon_LUT, //rough surface wrapped in Teflon tape
|
||||
RoughESR_LUT, //rough surface wrapped with ESR
|
||||
RoughESRGrease_LUT, //rough surface wrapped with ESR
|
||||
//and coupled with opical grease
|
||||
Polished_LUT, //polished surface
|
||||
PolishedTeflon_LUT, //polished surface wrapped in Teflon tape
|
||||
PolishedESR_LUT, //polished surface wrapped with ESR
|
||||
PolishedESRGrease_LUT, //polished surface wrapped with ESR
|
||||
//and coupled with opical grease
|
||||
Detector_LUT //polished surface with optical grease
|
||||
groundlumirrorair, // rough-cut surface, with lumirror
|
||||
groundlumirrorglue, // rough-cut surface, with lumirror & meltmount
|
||||
groundair, // rough-cut surface
|
||||
groundteflonair, // rough-cut surface, with teflon
|
||||
groundtioair, // rough-cut surface, with tio paint
|
||||
groundtyvekair, // rough-cut surface, with tyvek
|
||||
groundvm2000air, // rough-cut surface, with esr film
|
||||
groundvm2000glue, // rough-cut surface, with esr film & meltmount
|
||||
|
||||
// for DAVIS model
|
||||
Rough_LUT, // rough surface
|
||||
RoughTeflon_LUT, // rough surface wrapped in Teflon tape
|
||||
RoughESR_LUT, // rough surface wrapped with ESR
|
||||
RoughESRGrease_LUT, // rough surface wrapped with ESR
|
||||
// and coupled with optical grease
|
||||
Polished_LUT, // polished surface
|
||||
PolishedTeflon_LUT, // polished surface wrapped in Teflon tape
|
||||
PolishedESR_LUT, // polished surface wrapped with ESR
|
||||
PolishedESRGrease_LUT, // polished surface wrapped with ESR
|
||||
// and coupled with optical grease
|
||||
Detector_LUT // polished surface with optical grease
|
||||
};
|
||||
|
||||
enum G4OpticalSurfaceModel
|
||||
{
|
||||
glisur, // original GEANT3 model
|
||||
unified, // UNIFIED model
|
||||
LUT, // Look-Up-Table model
|
||||
DAVIS, // DAVIS model
|
||||
dichroic // dichroic filter
|
||||
glisur, // original GEANT3 model
|
||||
unified, // UNIFIED model
|
||||
LUT, // Look-Up-Table model (LBNL model)
|
||||
DAVIS, // DAVIS model
|
||||
dichroic // dichroic filter
|
||||
};
|
||||
|
||||
class G4MaterialPropertiesTable;
|
||||
|
||||
/////////////////////
|
||||
// Class Definition
|
||||
/////////////////////
|
||||
|
||||
class G4OpticalSurface : public G4SurfaceProperty
|
||||
{
|
||||
public:
|
||||
G4OpticalSurface(const G4OpticalSurface& right);
|
||||
G4OpticalSurface& operator=(const G4OpticalSurface& right);
|
||||
|
||||
public: // Without description
|
||||
|
||||
//////////////
|
||||
// Operators
|
||||
//////////////
|
||||
|
||||
G4OpticalSurface(const G4OpticalSurface &right);
|
||||
G4OpticalSurface & operator=(const G4OpticalSurface &right);
|
||||
|
||||
G4bool operator==(const G4OpticalSurface &right) const;
|
||||
G4bool operator!=(const G4OpticalSurface &right) const;
|
||||
G4bool operator==(const G4OpticalSurface& right) const;
|
||||
G4bool operator!=(const G4OpticalSurface& right) const;
|
||||
|
||||
public: // With description
|
||||
G4OpticalSurface(const G4String& name, G4OpticalSurfaceModel model = glisur,
|
||||
G4OpticalSurfaceFinish finish = polished,
|
||||
G4SurfaceType type = dielectric_dielectric,
|
||||
G4double value = 1.0);
|
||||
// Constructor of an optical surface object.
|
||||
|
||||
////////////////////////////////
|
||||
// Constructors and Destructor
|
||||
////////////////////////////////
|
||||
virtual ~G4OpticalSurface();
|
||||
|
||||
G4OpticalSurface(const G4String& name,
|
||||
G4OpticalSurfaceModel model = glisur,
|
||||
G4OpticalSurfaceFinish finish = polished,
|
||||
G4SurfaceType type = dielectric_dielectric,
|
||||
G4double value = 1.0);
|
||||
// Constructor of an optical surface object.
|
||||
void SetType(const G4SurfaceType& type) override;
|
||||
|
||||
public: // Without description
|
||||
inline G4OpticalSurfaceFinish GetFinish() const { return theFinish; }
|
||||
// Returns the optical surface finish.
|
||||
void SetFinish(const G4OpticalSurfaceFinish);
|
||||
// Sets the optical surface finish.
|
||||
|
||||
virtual ~G4OpticalSurface();
|
||||
inline G4OpticalSurfaceModel GetModel() const { return theModel; }
|
||||
// Returns the optical surface model used.
|
||||
inline void SetModel(const G4OpticalSurfaceModel model) { theModel = model; }
|
||||
// Sets the optical surface model to be followed.
|
||||
|
||||
////////////
|
||||
// Methods
|
||||
////////////
|
||||
inline G4double GetSigmaAlpha() const { return sigma_alpha; }
|
||||
// Returns an unified model surface parameter.
|
||||
inline void SetSigmaAlpha(const G4double s_a) { sigma_alpha = s_a; }
|
||||
// Sets an unified model surface parameter.
|
||||
|
||||
// public methods
|
||||
G4double GetPolish() const { return polish; }
|
||||
// Returns the optical surface polish type.
|
||||
inline void SetPolish(const G4double plsh) { polish = plsh; }
|
||||
// Sets the optical surface polish type.
|
||||
|
||||
public: // With description
|
||||
inline G4MaterialPropertiesTable* GetMaterialPropertiesTable() const
|
||||
{
|
||||
return theMaterialPropertiesTable;
|
||||
}
|
||||
// Retrieves the pointer of the G4MaterialPropertiesTable
|
||||
// attached to optical surface.
|
||||
|
||||
void SetType(const G4SurfaceType& type);
|
||||
inline void SetMaterialPropertiesTable(G4MaterialPropertiesTable* anMPT)
|
||||
{
|
||||
theMaterialPropertiesTable = anMPT;
|
||||
}
|
||||
// Attaches a G4MaterialPropertiesTable to the optical surface.
|
||||
|
||||
inline G4OpticalSurfaceFinish GetFinish() const { return theFinish; }
|
||||
// Returns the optical surface finish.
|
||||
void SetFinish(const G4OpticalSurfaceFinish );
|
||||
// Sets the optical surface finish.
|
||||
void DumpInfo() const;
|
||||
// Prints information about the optical surface.
|
||||
|
||||
inline G4OpticalSurfaceModel GetModel() const { return theModel; }
|
||||
// Returns the optical surface model used.
|
||||
inline void SetModel(const G4OpticalSurfaceModel model)
|
||||
{ theModel = model; }
|
||||
// Sets the optical surface model to be followed.
|
||||
void ReadDataFile(void);
|
||||
// call the correct ReadXXXFile
|
||||
|
||||
inline G4double GetSigmaAlpha() const { return sigma_alpha; }
|
||||
// Returns an unified model surface parameter.
|
||||
inline void SetSigmaAlpha(const G4double s_a) { sigma_alpha = s_a; }
|
||||
// Sets an unified model surface parameter.
|
||||
void ReadCompressedFile(G4String, std::istringstream&);
|
||||
// read a zlib-compressed file
|
||||
|
||||
G4double GetPolish() const { return polish; }
|
||||
// Returns the optical surface polish type.
|
||||
inline void SetPolish(const G4double plsh) { polish=plsh; }
|
||||
// Sets the optical surface polish type.
|
||||
void ReadLUTFile(void);
|
||||
// Method to read the Look-Up-Table into array AngularDistribution
|
||||
|
||||
inline G4MaterialPropertiesTable* GetMaterialPropertiesTable() const
|
||||
{ return theMaterialPropertiesTable; }
|
||||
// Retrieves the pointer of the G4MaterialPropertiesTable
|
||||
// attached to optical surface.
|
||||
inline G4double GetAngularDistributionValue(G4int, G4int, G4int);
|
||||
|
||||
inline void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
|
||||
{ theMaterialPropertiesTable = anMPT; }
|
||||
// Attaches a G4MaterialPropertiesTable to the optical surface.
|
||||
// for DAVIS model
|
||||
|
||||
void DumpInfo() const;
|
||||
// Prints information about the optical surface.
|
||||
inline G4double GetAngularDistributionValueLUT(G4int);
|
||||
// Returns the AngularDistributionValue
|
||||
|
||||
void ReadLUTFile(void);
|
||||
// Method to read the Look-Up-Table into array AngularDistribution
|
||||
void ReadLUTDAVISFile(void);
|
||||
// Method to read the Davis Look-Up-Table into array AngularDistribution
|
||||
|
||||
inline G4double GetAngularDistributionValue(G4int, G4int, G4int);
|
||||
|
||||
// for DAVIS model
|
||||
void ReadReflectivityLUTFile(void);
|
||||
// Method to read the Look-Up-Table for reflectivity
|
||||
|
||||
inline G4double GetAngularDistributionValueLUT(G4int);
|
||||
// Returns the AngularDistributionValue
|
||||
inline G4double GetReflectivityLUTValue(G4int);
|
||||
// Returns the reflectivity value from the Davis Look-Up-Table
|
||||
|
||||
void ReadLUTDAVISFile(void);
|
||||
// Method to read the Davis Look-Up-Table into array AngularDistribution
|
||||
|
||||
void ReadReflectivityLUTFile(void);
|
||||
// Method to read the Look-Up-Table for reflectivity
|
||||
|
||||
inline G4double GetReflectivityLUTValue(G4int);
|
||||
// Returns the reflectivity value from the Davis Look-Up-Table
|
||||
|
||||
G4int GetInmax(void) const;
|
||||
// Returns the number of lines in the Davis Look-Up-Table
|
||||
G4int GetInmax(void) const;
|
||||
// Returns the number of lines in the Davis Look-Up-Table
|
||||
|
||||
G4int GetLUTbins(void) const;
|
||||
// Returns the number of probability values per incidentangle
|
||||
G4int GetLUTbins(void) const;
|
||||
// Returns the number of probability values per incidentangle
|
||||
|
||||
G4int GetRefMax(void) const;
|
||||
// Returns the number of reflectivity values per angle
|
||||
|
||||
G4int GetThetaIndexMax(void) const;
|
||||
G4int GetPhiIndexMax(void) const;
|
||||
G4int GetRefMax(void) const;
|
||||
// Returns the number of reflectivity values per angle
|
||||
|
||||
void ReadDichroicFile(void);
|
||||
// Method to read the dichroic surface data file into Dichroic
|
||||
G4int GetThetaIndexMax(void) const;
|
||||
G4int GetPhiIndexMax(void) const;
|
||||
|
||||
inline G4Physics2DVector* GetDichroicVector();
|
||||
void ReadDichroicFile(void);
|
||||
// Method to read the dichroic surface data file into Dichroic
|
||||
|
||||
private:
|
||||
inline G4Physics2DVector* GetDichroicVector();
|
||||
|
||||
// ------------------
|
||||
// Basic data members ( To define an optical surface)
|
||||
// ------------------
|
||||
private:
|
||||
G4OpticalSurfaceModel theModel; // Surface model
|
||||
G4OpticalSurfaceFinish theFinish; // Surface finish
|
||||
|
||||
G4OpticalSurfaceModel theModel; // Surface model
|
||||
G4OpticalSurfaceFinish theFinish; // Surface finish
|
||||
G4double sigma_alpha; // The sigma of micro-facet polar angle
|
||||
G4double polish; // Polish parameter in glisur model
|
||||
|
||||
G4double sigma_alpha; // The sigma of micro-facet polar angle
|
||||
G4double polish; // Polish parameter in glisur model
|
||||
G4MaterialPropertiesTable* theMaterialPropertiesTable;
|
||||
|
||||
G4MaterialPropertiesTable* theMaterialPropertiesTable;
|
||||
static const G4int incidentIndexMax = 91;
|
||||
static const G4int thetaIndexMax = 45;
|
||||
static const G4int phiIndexMax = 37;
|
||||
|
||||
static const G4int incidentIndexMax = 91;
|
||||
static const G4int thetaIndexMax = 45;
|
||||
static const G4int phiIndexMax = 37;
|
||||
G4float* AngularDistribution;
|
||||
G4Physics2DVector* DichroicVector;
|
||||
|
||||
G4float* AngularDistribution;
|
||||
G4Physics2DVector* DichroicVector;
|
||||
|
||||
// for DAVIS model
|
||||
static const G4int indexmax = 7280001; // 3640001;
|
||||
static const G4int RefMax = 90;
|
||||
static const G4int LUTbins =20000;
|
||||
G4float* AngularDistributionLUT;
|
||||
G4float* Reflectivity;
|
||||
// for DAVIS model
|
||||
static const G4int indexmax = 7280001; // 3640001;
|
||||
static const G4int RefMax = 90;
|
||||
static const G4int LUTbins = 20000;
|
||||
G4float* AngularDistributionLUT;
|
||||
G4float* Reflectivity;
|
||||
};
|
||||
|
||||
////////////////////
|
||||
// Inline methods
|
||||
////////////////////
|
||||
|
||||
inline
|
||||
G4double G4OpticalSurface::GetAngularDistributionValue(G4int angleIncident,
|
||||
G4int thetaIndex,
|
||||
G4int phiIndex)
|
||||
inline G4double G4OpticalSurface::GetAngularDistributionValue(
|
||||
G4int angleIncident, G4int thetaIndex, G4int phiIndex)
|
||||
{
|
||||
return AngularDistribution[angleIncident+
|
||||
thetaIndex*incidentIndexMax+
|
||||
phiIndex*thetaIndexMax*incidentIndexMax];
|
||||
G4int product = angleIncident * thetaIndex * phiIndex;
|
||||
if(product < 0 || product >= incidentIndexMax * thetaIndexMax * phiIndexMax)
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Index angleIncident: " << angleIncident
|
||||
<< " thetaIndex: " << thetaIndex << " phiIndex: " << phiIndex
|
||||
<< " out of range!";
|
||||
G4Exception("G4OpticalSurface::GetAngularDistributionValue", "mat317",
|
||||
FatalException, ed);
|
||||
return 0.;
|
||||
}
|
||||
return (G4double)
|
||||
AngularDistribution[angleIncident + thetaIndex * incidentIndexMax +
|
||||
phiIndex * thetaIndexMax * incidentIndexMax];
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4OpticalSurface::GetAngularDistributionValueLUT(G4int i)
|
||||
inline G4double G4OpticalSurface::GetAngularDistributionValueLUT(G4int i)
|
||||
{
|
||||
return AngularDistributionLUT[i];
|
||||
if(i < 0 || i >= indexmax)
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Index " << i << " out of range!";
|
||||
G4Exception("G4OpticalSurface::GetAngularDistributionValueLUT", "mat318",
|
||||
FatalException, ed);
|
||||
return 0.;
|
||||
}
|
||||
return (G4double) AngularDistributionLUT[i];
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4OpticalSurface::GetReflectivityLUTValue(G4int i)
|
||||
inline G4double G4OpticalSurface::GetReflectivityLUTValue(G4int i)
|
||||
{
|
||||
return Reflectivity[i];
|
||||
if(i < 0 || i >= RefMax)
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Index " << i << " out of range!";
|
||||
G4Exception("G4OpticalSurface::GetReflectivityLUTValue", "mat319",
|
||||
FatalException, ed);
|
||||
return 0.;
|
||||
}
|
||||
return (G4double) Reflectivity[i];
|
||||
}
|
||||
|
||||
inline
|
||||
G4Physics2DVector* G4OpticalSurface::GetDichroicVector()
|
||||
inline G4Physics2DVector* G4OpticalSurface::GetDichroicVector()
|
||||
{
|
||||
return DichroicVector;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// G4SurfaceProperty Definition
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -33,7 +33,7 @@
|
||||
// Class Description:
|
||||
//
|
||||
// A base class describing a surface property.
|
||||
// Derived classes are G4Opticalsurface, G4Firovsurface, etc.
|
||||
// Derived classes are G4Opticalsurface, G4Firovsurface, etc.
|
||||
// Contains the enumeration G4SurfaceType.
|
||||
|
||||
// File: G4SurfaceProperty.hh
|
||||
@@ -42,16 +42,12 @@
|
||||
// Version: 1.0
|
||||
// Created: 13-10-2003
|
||||
// Author: Fan Lei
|
||||
// Updated: Mariele Stockhoff 2017-02-24 add DAVIS model
|
||||
// Updated: Mariele Stockhoff 2017-02-24 add DAVIS model
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef G4SurfaceProperty_h
|
||||
#define G4SurfaceProperty_h 1
|
||||
|
||||
/////////////
|
||||
// Includes
|
||||
/////////////
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "G4Types.hh"
|
||||
@@ -63,81 +59,47 @@ typedef std::vector<G4SurfaceProperty*> G4SurfacePropertyTable;
|
||||
|
||||
enum G4SurfaceType
|
||||
{
|
||||
dielectric_metal, // dielectric-metal interface
|
||||
dielectric_dielectric, // dielectric-dielectric interface
|
||||
dielectric_LUT, // dielectric-Look-Up-Table interface
|
||||
dielectric_LUTDAVIS, // dielectric-Look-Up-Table DAVIS interface
|
||||
dielectric_dichroic, // dichroic filter interface
|
||||
firsov, // for Firsov Process
|
||||
x_ray // for x-ray mirror process
|
||||
dielectric_metal, // dielectric-metal interface
|
||||
dielectric_dielectric, // dielectric-dielectric interface
|
||||
dielectric_LUT, // dielectric-Look-Up-Table interface
|
||||
dielectric_LUTDAVIS, // dielectric-Look-Up-Table DAVIS interface
|
||||
dielectric_dichroic, // dichroic filter interface
|
||||
firsov, // for Firsov Process
|
||||
x_ray // for x-ray mirror process
|
||||
};
|
||||
|
||||
/////////////////////
|
||||
// Class Definition
|
||||
/////////////////////
|
||||
|
||||
class G4SurfaceProperty
|
||||
{
|
||||
public: // Without description
|
||||
public:
|
||||
G4SurfaceProperty(const G4String& name, G4SurfaceType type = x_ray);
|
||||
// Constructor of a X-ray optical surface object.
|
||||
|
||||
//////////////
|
||||
// Operators
|
||||
//////////////
|
||||
G4SurfaceProperty();
|
||||
virtual ~G4SurfaceProperty();
|
||||
|
||||
// G4SurfaceProperty(const G4SurfaceProperty &right);
|
||||
// const G4SurfaceProperty & operator=(const G4SurfaceProperty &right);
|
||||
const G4String& GetName() const { return theName; }
|
||||
// Returns the surface name.
|
||||
void SetName(const G4String& name) { theName = name; }
|
||||
// Sets the surface name.
|
||||
|
||||
// G4bool operator==(const G4SurfaceProperty &right) const;
|
||||
// G4bool operator!=(const G4SurfaceProperty &right) const;
|
||||
const G4SurfaceType& GetType() const { return theType; }
|
||||
// Returns the surface type.
|
||||
virtual void SetType(const G4SurfaceType& type) { theType = type; }
|
||||
// Sets the surface type.
|
||||
|
||||
public: // With description
|
||||
static void CleanSurfacePropertyTable();
|
||||
static const G4SurfacePropertyTable* GetSurfacePropertyTable();
|
||||
static size_t GetNumberOfSurfaceProperties();
|
||||
static void DumpTableInfo();
|
||||
// To handle the table of surface properties.
|
||||
|
||||
////////////////////////////////
|
||||
// Constructors and Destructor
|
||||
////////////////////////////////
|
||||
protected:
|
||||
G4String theName; // Surface name
|
||||
|
||||
G4SurfaceProperty(const G4String& name, G4SurfaceType type = x_ray);
|
||||
// Constructor of a X-ray optical surface object.
|
||||
G4SurfaceType theType; // Surface type
|
||||
|
||||
public: // Without description
|
||||
|
||||
G4SurfaceProperty();
|
||||
virtual ~G4SurfaceProperty();
|
||||
|
||||
////////////
|
||||
// Methods
|
||||
////////////
|
||||
|
||||
public: // With description
|
||||
|
||||
const G4String& GetName() const { return theName; }
|
||||
// Returns the surface name.
|
||||
void SetName(const G4String& name) { theName = name; }
|
||||
// Sets the surface name.
|
||||
|
||||
const G4SurfaceType& GetType() const { return theType; }
|
||||
// Returns the surface type.
|
||||
void SetType(const G4SurfaceType& type) { theType = type; }
|
||||
// Sets the surface type.
|
||||
|
||||
static void CleanSurfacePropertyTable();
|
||||
static const G4SurfacePropertyTable* GetSurfacePropertyTable();
|
||||
static size_t GetNumberOfSurfaceProperties();
|
||||
static void DumpTableInfo();
|
||||
// To handle the table of surface properties.
|
||||
|
||||
protected:
|
||||
|
||||
// ------------------
|
||||
// Basic data members ( To define surface property)
|
||||
// ------------------
|
||||
|
||||
G4String theName; // Surface name
|
||||
|
||||
G4SurfaceType theType; // Surface type
|
||||
|
||||
static G4SurfacePropertyTable theSurfacePropertyTable;
|
||||
// The static Table of SurfaceProperties.
|
||||
static G4SurfacePropertyTable theSurfacePropertyTable;
|
||||
// The static Table of SurfaceProperties.
|
||||
};
|
||||
|
||||
#endif /* G4SurfaceProperty_h */
|
||||
|
||||
Executable → Regular
Executable → Regular
Reference in New Issue
Block a user