Import Geant4 10.4.0.beta source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 102806 2017-02-22 16:36:36Z gcosmo $
|
||||
$Id: History 104459 2017-05-31 15:54:52Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,7 +17,21 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
22-02-17 G.Cosmo (materials-V10-02-21)
|
||||
29-05-17 P.Gumplinger (materials-V10-03-04)
|
||||
- This version of Mariele Stockhoff's DAVIS model includes not only
|
||||
reflection but also the capability of transmitting photons based on LUTs
|
||||
|
||||
22-03-17 P.Gumplinger (materials-V10-03-03)
|
||||
- fix compilation waring in previous tag
|
||||
|
||||
21-03-17 P.Gumplinger (materials-V10-03-02)
|
||||
- Mariele Stockhoff's DAVIS model
|
||||
|
||||
24-02-17 V.Ivanchenko (materials-V10-03-01)
|
||||
- G4Material - improved printout - always print temperature and presure
|
||||
independently on the state of the material (CMS requirement)
|
||||
|
||||
22-02-17 G.Cosmo (materials-V10-03-00)
|
||||
- Removed debug printout from G4MaterialPropertiesTable destructor.
|
||||
Addressing problem report #1944.
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpticalSurface.hh 80747 2014-05-09 12:53:43Z gcosmo $
|
||||
// $Id: G4OpticalSurface.hh 104459 2017-05-31 15:54:52Z gcosmo $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -37,6 +37,7 @@
|
||||
// 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
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -93,7 +94,20 @@ enum G4OpticalSurfaceFinish
|
||||
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
|
||||
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
|
||||
};
|
||||
|
||||
enum G4OpticalSurfaceModel
|
||||
@@ -101,6 +115,7 @@ enum G4OpticalSurfaceModel
|
||||
glisur, // original GEANT3 model
|
||||
unified, // UNIFIED model
|
||||
LUT, // Look-Up-Table model
|
||||
DAVIS, // DAVIS model
|
||||
dichroic // dichroic filter
|
||||
};
|
||||
|
||||
@@ -132,10 +147,10 @@ public: // With description
|
||||
////////////////////////////////
|
||||
|
||||
G4OpticalSurface(const G4String& name,
|
||||
G4OpticalSurfaceModel model = glisur,
|
||||
G4OpticalSurfaceFinish finish = polished,
|
||||
G4SurfaceType type = dielectric_dielectric,
|
||||
G4double value = 1.0);
|
||||
G4OpticalSurfaceModel model = glisur,
|
||||
G4OpticalSurfaceFinish finish = polished,
|
||||
G4SurfaceType type = dielectric_dielectric,
|
||||
G4double value = 1.0);
|
||||
// Constructor of an optical surface object.
|
||||
|
||||
public: // Without description
|
||||
@@ -174,12 +189,12 @@ public: // With description
|
||||
// Sets the optical surface polish type.
|
||||
|
||||
inline G4MaterialPropertiesTable* GetMaterialPropertiesTable() const
|
||||
{ return theMaterialPropertiesTable; }
|
||||
{ return theMaterialPropertiesTable; }
|
||||
// Retrieves the pointer of the G4MaterialPropertiesTable
|
||||
// attached to optical surface.
|
||||
|
||||
inline void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
|
||||
{ theMaterialPropertiesTable = anMPT; }
|
||||
{ theMaterialPropertiesTable = anMPT; }
|
||||
// Attaches a G4MaterialPropertiesTable to the optical surface.
|
||||
|
||||
void DumpInfo() const;
|
||||
@@ -189,7 +204,30 @@ public: // With description
|
||||
// Method to read the Look-Up-Table into array AngularDistribution
|
||||
|
||||
inline G4double GetAngularDistributionValue(G4int, G4int, G4int);
|
||||
|
||||
// for DAVIS model
|
||||
|
||||
inline G4double GetAngularDistributionValueLUT(G4int);
|
||||
// Returns the AngularDistributionValue
|
||||
|
||||
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
|
||||
|
||||
inline G4int GetInmax(void) const { return indexmax; }
|
||||
// Returns the number of lines in the Davis Look-Up-Table
|
||||
|
||||
inline G4int GetLUTbins(void) const { return LUTbins; }
|
||||
// Returns the number of probability values per incidentangle
|
||||
|
||||
inline G4int GetRefMax(void) const { return RefMax; }
|
||||
// Returns the number of reflectivity values per angle
|
||||
|
||||
inline G4int GetThetaIndexMax(void) const { return thetaIndexMax; }
|
||||
inline G4int GetPhiIndexMax(void) const { return phiIndexMax; }
|
||||
|
||||
@@ -217,9 +255,14 @@ private:
|
||||
static const G4int phiIndexMax = 37;
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
////////////////////
|
||||
@@ -236,6 +279,18 @@ inline
|
||||
phiIndex*thetaIndexMax*incidentIndexMax];
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4OpticalSurface::GetAngularDistributionValueLUT(G4int i)
|
||||
{
|
||||
return AngularDistributionLUT[i];
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4OpticalSurface::GetReflectivityLUTValue(G4int i)
|
||||
{
|
||||
return Reflectivity[i];
|
||||
}
|
||||
|
||||
inline
|
||||
G4Physics2DVector* G4OpticalSurface::GetDichroicVector()
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SurfaceProperty.hh 70822 2013-06-06 08:25:05Z gcosmo $
|
||||
// $Id: G4SurfaceProperty.hh 103256 2017-03-23 08:53:38Z gcosmo $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -43,7 +43,7 @@
|
||||
// Version: 1.0
|
||||
// Created: 13-10-2003
|
||||
// Author: Fan Lei
|
||||
//
|
||||
// Updated: Mariele Stockhoff 2017-02-24 add DAVIS model
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef G4SurfaceProperty_h
|
||||
@@ -67,6 +67,7 @@ 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
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Material.cc 100662 2016-10-31 10:21:14Z gcosmo $
|
||||
// $Id: G4Material.cc 102843 2017-02-27 13:02:28Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//
|
||||
@@ -665,16 +665,11 @@ std::ostream& operator<<(std::ostream& flux, const G4Material* material)
|
||||
<< "\n" << std::setw(30)
|
||||
<< " Imean: " << std::setw(7) << std::setprecision(3)
|
||||
<< G4BestUnit(material->GetIonisation()->GetMeanExcitationEnergy(),
|
||||
"Energy");
|
||||
|
||||
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";
|
||||
}
|
||||
flux << "\n";
|
||||
"Energy")
|
||||
<< " temperature: " << std::setw(6) << std::setprecision(2)
|
||||
<< (material->fTemp)/kelvin << " K"
|
||||
<< " pressure: " << std::setw(6) << std::setprecision(2)
|
||||
<< (material->fPressure)/atmosphere << " atm" << "\n";
|
||||
|
||||
for (G4int i=0; i<material->fNumberOfElements; i++) {
|
||||
flux
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MaterialPropertiesTable.cc 102806 2017-02-22 16:36:36Z gcosmo $
|
||||
// $Id: G4MaterialPropertiesTable.cc 102805 2017-02-22 16:34:13Z gcosmo $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4OpticalSurface.cc 80747 2014-05-09 12:53:43Z gcosmo $
|
||||
// $Id: G4OpticalSurface.cc 104459 2017-05-31 15:54:52Z gcosmo $
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -35,8 +35,8 @@
|
||||
// Version: 2.0
|
||||
// Created: 1997-06-26
|
||||
// Author: Peter Gumplinger
|
||||
// updated: 2017-02-24 Mariele Stockhoff add DAVIS model
|
||||
// mail: gum@triumf.ca
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <iostream>
|
||||
@@ -65,13 +65,23 @@ G4OpticalSurface& G4OpticalSurface::operator=(const G4OpticalSurface& right)
|
||||
sigma_alpha = right.sigma_alpha;
|
||||
polish = right.polish;
|
||||
theMaterialPropertiesTable = right.theMaterialPropertiesTable;
|
||||
|
||||
if (AngularDistribution) delete [] AngularDistribution;
|
||||
AngularDistribution =
|
||||
new G4float[incidentIndexMax*thetaIndexMax*phiIndexMax];
|
||||
*(AngularDistribution) = *(right.AngularDistribution);
|
||||
*(AngularDistribution) = *(right.AngularDistribution);
|
||||
|
||||
if (AngularDistributionLUT) delete [] AngularDistributionLUT;
|
||||
AngularDistributionLUT = new G4float[indexmax];
|
||||
*(AngularDistributionLUT) = *(right.AngularDistributionLUT);
|
||||
|
||||
if (Reflectivity) delete [] Reflectivity;
|
||||
Reflectivity = new G4float[RefMax];
|
||||
*(Reflectivity) = *(right.Reflectivity);
|
||||
|
||||
if (DichroicVector) delete DichroicVector;
|
||||
DichroicVector = new G4Physics2DVector();
|
||||
*DichroicVector = *(right.DichroicVector);
|
||||
*DichroicVector = *(right.DichroicVector);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -81,22 +91,22 @@ G4OpticalSurface& G4OpticalSurface::operator=(const G4OpticalSurface& right)
|
||||
/////////////////
|
||||
|
||||
G4OpticalSurface::G4OpticalSurface(const G4String& name,
|
||||
G4OpticalSurfaceModel model,
|
||||
G4OpticalSurfaceFinish finish,
|
||||
G4SurfaceType type,
|
||||
G4double value)
|
||||
G4OpticalSurfaceModel model,
|
||||
G4OpticalSurfaceFinish finish,
|
||||
G4SurfaceType type,
|
||||
G4double value)
|
||||
: G4SurfaceProperty(name,type),
|
||||
theModel(model),
|
||||
theFinish(finish),
|
||||
theMaterialPropertiesTable(0)
|
||||
theModel(model),
|
||||
theFinish(finish),
|
||||
theMaterialPropertiesTable(0)
|
||||
{
|
||||
if (model == glisur ){
|
||||
polish = value;
|
||||
sigma_alpha = 0.0;
|
||||
}
|
||||
else if ( model == unified ) {
|
||||
sigma_alpha = value;
|
||||
polish = 0.0;
|
||||
if ( model == glisur ){
|
||||
polish = value;
|
||||
sigma_alpha = 0.0;
|
||||
}
|
||||
else if ( model == unified ) {
|
||||
sigma_alpha = value;
|
||||
polish = 0.0;
|
||||
}
|
||||
else if ( model == LUT ) {
|
||||
sigma_alpha = value;
|
||||
@@ -106,20 +116,36 @@ G4OpticalSurface::G4OpticalSurface(const G4String& name,
|
||||
sigma_alpha = value;
|
||||
polish = 0.0;
|
||||
}
|
||||
else {
|
||||
else if ( model == DAVIS ) {
|
||||
sigma_alpha = value;
|
||||
polish = 0.0;
|
||||
}
|
||||
else {
|
||||
G4Exception("G4OpticalSurface::G4OpticalSurface()", "mat309",
|
||||
FatalException,
|
||||
"Constructor called with INVALID model.");
|
||||
"Constructor called with INVALID model.");
|
||||
}
|
||||
|
||||
AngularDistribution = NULL;
|
||||
DichroicVector = NULL;
|
||||
AngularDistribution = NULL;
|
||||
|
||||
AngularDistributionLUT = NULL;
|
||||
Reflectivity = NULL;
|
||||
|
||||
DichroicVector = NULL;
|
||||
|
||||
if (type == dielectric_LUT) {
|
||||
AngularDistribution =
|
||||
new G4float[incidentIndexMax*thetaIndexMax*phiIndexMax];
|
||||
ReadLUTFile();
|
||||
}
|
||||
|
||||
if (type == dielectric_LUTDAVIS) {
|
||||
AngularDistributionLUT = new G4float[indexmax];
|
||||
ReadLUTDAVISFile();
|
||||
|
||||
Reflectivity = new G4float[RefMax];
|
||||
ReadReflectivityLUTFile();
|
||||
}
|
||||
|
||||
if (type == dielectric_dichroic) {
|
||||
DichroicVector = new G4Physics2DVector();
|
||||
@@ -130,6 +156,10 @@ G4OpticalSurface::G4OpticalSurface(const G4String& name,
|
||||
G4OpticalSurface::~G4OpticalSurface()
|
||||
{
|
||||
if (AngularDistribution) delete [] AngularDistribution;
|
||||
|
||||
if (AngularDistributionLUT) delete [] AngularDistributionLUT;
|
||||
if (Reflectivity) delete [] Reflectivity;
|
||||
|
||||
if (DichroicVector) delete DichroicVector;
|
||||
}
|
||||
|
||||
@@ -144,10 +174,19 @@ G4OpticalSurface::G4OpticalSurface(const G4OpticalSurface &right)
|
||||
this->sigma_alpha = right.sigma_alpha;
|
||||
this->polish = right.polish;
|
||||
this->theMaterialPropertiesTable = right.theMaterialPropertiesTable;
|
||||
|
||||
if (this->AngularDistribution) delete [] AngularDistribution;
|
||||
this->AngularDistribution =
|
||||
new G4float[incidentIndexMax*thetaIndexMax*phiIndexMax];
|
||||
new G4float[incidentIndexMax*thetaIndexMax*phiIndexMax];
|
||||
*(this->AngularDistribution) = *(right.AngularDistribution);
|
||||
|
||||
if (this->AngularDistributionLUT) delete [] AngularDistributionLUT;
|
||||
this->AngularDistributionLUT = new G4float[indexmax];
|
||||
*(this->AngularDistributionLUT) = *(right.AngularDistributionLUT);
|
||||
if (this->Reflectivity) delete [] Reflectivity;
|
||||
this->Reflectivity = new G4float[RefMax];
|
||||
*(this->Reflectivity) = *(right.Reflectivity);
|
||||
|
||||
if (this->DichroicVector) delete DichroicVector;
|
||||
this->DichroicVector = new G4Physics2DVector();
|
||||
*(this->DichroicVector) = *(right.DichroicVector);
|
||||
@@ -155,12 +194,12 @@ G4OpticalSurface::G4OpticalSurface(const G4OpticalSurface &right)
|
||||
|
||||
G4int G4OpticalSurface::operator==(const G4OpticalSurface &right) const
|
||||
{
|
||||
return (this == (G4OpticalSurface *) &right);
|
||||
return (this == (G4OpticalSurface *) &right);
|
||||
}
|
||||
|
||||
G4int G4OpticalSurface::operator!=(const G4OpticalSurface &right) const
|
||||
{
|
||||
return (this != (G4OpticalSurface *) &right);
|
||||
return (this != (G4OpticalSurface *) &right);
|
||||
}
|
||||
////////////
|
||||
// Methods
|
||||
@@ -168,36 +207,43 @@ G4int G4OpticalSurface::operator!=(const G4OpticalSurface &right) const
|
||||
|
||||
void G4OpticalSurface::DumpInfo() const
|
||||
{
|
||||
// Dump info for surface
|
||||
|
||||
// Dump info for surface
|
||||
|
||||
G4cout <<
|
||||
G4cout <<
|
||||
" Surface type = " << G4int(theType) << G4endl <<
|
||||
" Surface finish = " << G4int(theFinish) << G4endl <<
|
||||
" Surface model = " << G4int(theModel) << G4endl;
|
||||
" Surface finish = " << G4int(theFinish) << G4endl <<
|
||||
" Surface model = " << G4int(theModel) << G4endl;
|
||||
|
||||
G4cout << G4endl;
|
||||
G4cout << G4endl;
|
||||
|
||||
G4cout << " Surface parameter " << G4endl;
|
||||
G4cout << " ----------------- " << G4endl;
|
||||
if (theModel == glisur ){
|
||||
G4cout << polish << G4endl;
|
||||
}
|
||||
G4cout << " Surface parameter " << G4endl;
|
||||
G4cout << " ----------------- " << G4endl;
|
||||
if (theModel == glisur ){
|
||||
G4cout << polish << G4endl;
|
||||
}
|
||||
else if (theModel == LUT ){
|
||||
G4cout << sigma_alpha << G4endl;
|
||||
G4cout << sigma_alpha << G4endl;
|
||||
}
|
||||
else {
|
||||
G4cout << sigma_alpha << G4endl;
|
||||
}
|
||||
G4cout << G4endl;
|
||||
G4cout << sigma_alpha << G4endl;
|
||||
}
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
void G4OpticalSurface::SetType(const G4SurfaceType& type)
|
||||
{
|
||||
theType = type;
|
||||
|
||||
if (type == dielectric_LUTDAVIS) {
|
||||
if (!AngularDistributionLUT) AngularDistributionLUT =
|
||||
new G4float[indexmax];
|
||||
ReadLUTDAVISFile();
|
||||
}
|
||||
|
||||
if (type == dielectric_LUT) {
|
||||
if (!AngularDistribution) AngularDistribution =
|
||||
new G4float[incidentIndexMax*thetaIndexMax*phiIndexMax];
|
||||
|
||||
ReadLUTFile();
|
||||
}
|
||||
if (type == dielectric_dichroic) {
|
||||
@@ -214,6 +260,16 @@ void G4OpticalSurface::SetFinish(const G4OpticalSurfaceFinish finish)
|
||||
new G4float[incidentIndexMax*thetaIndexMax*phiIndexMax];
|
||||
ReadLUTFile();
|
||||
}
|
||||
|
||||
if (theType == dielectric_LUTDAVIS) {
|
||||
if (!AngularDistributionLUT) AngularDistributionLUT =
|
||||
new G4float[indexmax];
|
||||
ReadLUTDAVISFile();
|
||||
|
||||
if (!Reflectivity) Reflectivity = new G4float[RefMax];
|
||||
ReadReflectivityLUTFile();
|
||||
}
|
||||
|
||||
if (theType == dielectric_dichroic) {
|
||||
if (!DichroicVector) DichroicVector = new G4Physics2DVector();
|
||||
ReadDichroicFile();
|
||||
@@ -329,6 +385,146 @@ void G4OpticalSurface::ReadLUTFile()
|
||||
readLUTFileHandle.close();
|
||||
}
|
||||
|
||||
void G4OpticalSurface::ReadLUTDAVISFile()
|
||||
{
|
||||
G4String readLUTDAVISFileName = " ";
|
||||
|
||||
if (theFinish == Rough_LUT) {
|
||||
readLUTDAVISFileName = "Rough_LUT.dat";
|
||||
}else if (theFinish == RoughTeflon_LUT) {
|
||||
readLUTDAVISFileName = "RoughTeflon_LUT.dat";
|
||||
}else if (theFinish == RoughESR_LUT) {
|
||||
readLUTDAVISFileName = "RoughESR_LUT.dat";
|
||||
}else if (theFinish == RoughESRGrease_LUT) {
|
||||
readLUTDAVISFileName = "RoughESRGrease_LUT.dat";
|
||||
}else if (theFinish == Polished_LUT) {
|
||||
readLUTDAVISFileName = "Polished_LUT.dat";
|
||||
}else if (theFinish == PolishedTeflon_LUT) {
|
||||
readLUTDAVISFileName = "PolishedTeflon_LUT.dat";
|
||||
}else if (theFinish == PolishedESR_LUT) {
|
||||
readLUTDAVISFileName = "PolishedESR_LUT.dat";
|
||||
}else if (theFinish == PolishedESRGrease_LUT) {
|
||||
readLUTDAVISFileName = "PolishedESRGrease_LUT.dat";
|
||||
}else if (theFinish == Detector_LUT) {
|
||||
readLUTDAVISFileName = "Detector_LUT.dat";
|
||||
}
|
||||
|
||||
if (readLUTDAVISFileName == " ") return;
|
||||
|
||||
char* path = getenv("G4REALSURFACEDATA");
|
||||
if (!path) {
|
||||
G4String excep =
|
||||
"G4OpBoundaryProcess - G4REALSURFACEDATA environment variable not set";
|
||||
G4Exception("G4OpticalSurface::ReadLUTDAVISFile()", "mat310",
|
||||
FatalException, excep);
|
||||
return;
|
||||
}
|
||||
G4String pathString(path);
|
||||
|
||||
readLUTDAVISFileName = pathString + "/" + readLUTDAVISFileName;
|
||||
|
||||
std::ifstream readLUTDAVISFileHandle(readLUTDAVISFileName, std::ios::in);
|
||||
|
||||
if (readLUTDAVISFileHandle) {
|
||||
|
||||
for (G4int i = 0; i<indexmax; i++) {
|
||||
if (readLUTDAVISFileHandle.eof()) break;
|
||||
readLUTDAVISFileHandle >> AngularDistributionLUT[i];
|
||||
}
|
||||
if (!readLUTDAVISFileHandle.bad()) {
|
||||
G4cout <<"LUT DAVIS - data file: " <<
|
||||
readLUTDAVISFileName << " read in! " << G4endl;
|
||||
}
|
||||
else {
|
||||
G4String excep="LUT DAVIS- data file: "+readLUTDAVISFileName+" not read propery";
|
||||
G4Exception("G4OpticalSurface::ReadLUTFile()", "mat312",
|
||||
FatalException, excep);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
G4String excep ="LUT DAVIS- data file: "+readLUTDAVISFileName+" not found";
|
||||
G4Exception("G4OpticalSurface::ReadLUTFile()", "mat311",
|
||||
FatalException, excep);
|
||||
return;
|
||||
}
|
||||
readLUTDAVISFileHandle.close();
|
||||
}
|
||||
|
||||
void G4OpticalSurface::ReadReflectivityLUTFile()
|
||||
{
|
||||
G4String readReflectivityLUTFileName = " ";
|
||||
|
||||
if (theFinish == Rough_LUT) {
|
||||
readReflectivityLUTFileName = "Rough_LUTR.dat";
|
||||
}
|
||||
if (theFinish == RoughTeflon_LUT) {
|
||||
readReflectivityLUTFileName = "RoughTeflon_LUTR.dat";
|
||||
}
|
||||
if (theFinish== RoughESR_LUT) {
|
||||
readReflectivityLUTFileName = "RoughESR_LUTR.dat";
|
||||
}
|
||||
if (theFinish == RoughESRGrease_LUT) {
|
||||
readReflectivityLUTFileName = "RoughESRGrease_LUTR.dat";
|
||||
}
|
||||
if (theFinish== Polished_LUT) {
|
||||
readReflectivityLUTFileName = "Polished_LUTR.dat";
|
||||
}
|
||||
if (theFinish == PolishedTeflon_LUT) {
|
||||
readReflectivityLUTFileName = "PolishedTeflon_LUTR.dat";
|
||||
}
|
||||
if (theFinish== PolishedESR_LUT) {
|
||||
readReflectivityLUTFileName = "PolishedESR_LUTR.dat";
|
||||
}
|
||||
if (theFinish== PolishedESRGrease_LUT) {
|
||||
readReflectivityLUTFileName = "PolishedESRGrease_LUTR.dat";
|
||||
}
|
||||
if (theFinish== Detector_LUT) {
|
||||
readReflectivityLUTFileName = "Detector_LUTR.dat";
|
||||
}
|
||||
|
||||
if (readReflectivityLUTFileName == " ") return;
|
||||
|
||||
char* path = getenv("G4REALSURFACEDATA");
|
||||
if (!path) {
|
||||
G4String excep =
|
||||
"G4OpBoundaryProcess - G4REALSURFACEDATA environment variable not set";
|
||||
G4Exception("G4OpticalSurface::ReadReflectivityLUTFile()", "mat310",
|
||||
FatalException, excep);
|
||||
return;
|
||||
}
|
||||
G4String pathString(path);
|
||||
|
||||
readReflectivityLUTFileName = pathString + "/" + readReflectivityLUTFileName;
|
||||
|
||||
std::ifstream readReflectivityLUTFileHandle(readReflectivityLUTFileName,
|
||||
std::ios::in);
|
||||
|
||||
if (readReflectivityLUTFileHandle) {
|
||||
for (G4int i = 0; i<RefMax; i++) {
|
||||
if (readReflectivityLUTFileHandle.eof()) break;
|
||||
readReflectivityLUTFileHandle >> Reflectivity[i];
|
||||
}
|
||||
if (!readReflectivityLUTFileHandle.bad()) {
|
||||
G4cout << "Reflectivity LUT DAVIS - data file: " <<
|
||||
readReflectivityLUTFileName << " read in! " << G4endl;
|
||||
}
|
||||
else {
|
||||
G4String excep="Reflectivity LUT DAVIS- data file: "+readReflectivityLUTFileName+" not read propery";
|
||||
G4Exception("G4OpticalSurface::ReadReflectivityLUTFile()", "mat312",
|
||||
FatalException, excep);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
G4String excep ="Reflectivity LUT DAVIS - data file: "+readReflectivityLUTFileName+" not found";
|
||||
G4Exception("G4OpticalSurface::ReadReflectivityLUTFile()", "mat311",
|
||||
FatalException, excep);
|
||||
return;
|
||||
}
|
||||
readReflectivityLUTFileHandle.close();
|
||||
}
|
||||
|
||||
void G4OpticalSurface::ReadDichroicFile()
|
||||
{
|
||||
const char* datadir = getenv("G4DICHROICDATA");
|
||||
|
||||
Reference in New Issue
Block a user