Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4AtomicBond
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4AtomicBond_H
|
||||
#define G4AtomicBond_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Element.hh"
|
||||
|
||||
class G4AtomicBond
|
||||
{
|
||||
public:
|
||||
enum theBondType {Ionic=0, Covalent=1, Metallic=2, NA=-1 };
|
||||
|
||||
G4AtomicBond(theBondType aType,
|
||||
G4Element* firstAtomKind,
|
||||
G4int firstAtomNumber,
|
||||
G4Element* secondAtomKind,
|
||||
G4int secondAtomNumber);
|
||||
|
||||
virtual ~G4AtomicBond();
|
||||
|
||||
//
|
||||
// The indexes of the two atoms connected by the bond are stored
|
||||
// theFirstAtomKind is the index in the vector of G4Elements in the array
|
||||
// and theFirstAtomNumber is the index in the vector of G4ThreeVector in
|
||||
// the G4CrystalLattice. For the second atom theSecondAtomKind and
|
||||
// theSecondAtomNumber are used.
|
||||
//
|
||||
private:
|
||||
G4Element* theFirstAtomKind;
|
||||
G4int theFirstAtomNumber;
|
||||
|
||||
G4Element* theSecondAtomKind;
|
||||
G4int theSecondAtomNumber;
|
||||
|
||||
public:
|
||||
inline G4Element* GetFirstAtomKind() const {return theFirstAtomKind;};
|
||||
void SetFirstAtomKind(G4Element* aElement) {theFirstAtomKind=aElement;};
|
||||
|
||||
inline G4int GetFirstAtomNumber() const {return theFirstAtomNumber;};
|
||||
void SetFirstAtomNumber(G4int aInt) {theFirstAtomNumber=aInt;};
|
||||
|
||||
inline G4Element* GetSecondAtomKind() const {return theSecondAtomKind;};
|
||||
void SetSecondAtomKind(G4Element* aElement) {theSecondAtomKind=aElement;};
|
||||
|
||||
inline G4int GetSecondAtomNumber() const {return theSecondAtomNumber;};
|
||||
void SetSecondAtomNumber(G4int aInt) {theSecondAtomNumber=aInt;};
|
||||
|
||||
//
|
||||
// theType stores which kind of bond is the G4AtomicBond object
|
||||
// there are three types: Ionic, Covalent and Metallic
|
||||
// and they are enumerate in the theBondType enum.
|
||||
private:
|
||||
theBondType theType;
|
||||
|
||||
public:
|
||||
inline theBondType GetType() const {return theType;};
|
||||
void SetType(theBondType aType) {theType=aType;};
|
||||
|
||||
//
|
||||
// theAromaticity stores if the bond is aromatic.
|
||||
//
|
||||
private:
|
||||
G4bool theAromaticity;
|
||||
|
||||
public:
|
||||
inline G4bool GetAromaticity() const {return theAromaticity;};
|
||||
void SetAromaticity(G4bool aBool) {theAromaticity=aBool;};
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,351 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CrystalLattice.hh 94016 2015-11-05 10:14:49Z gcosmo $
|
||||
//
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4AtomicFormFactor
|
||||
//
|
||||
// Description: Contains the function for the evaluation of the atomic form
|
||||
// factor. The tabulated data are available on IUCr website
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// XXX
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
// 21-04-16, created by E.Bagli
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4ATOMICFORMFACTOR_HH
|
||||
#define G4ATOMICFORMFACTOR_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include "G4Exp.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class G4AtomicFormFactor
|
||||
{
|
||||
private:
|
||||
static G4AtomicFormFactor* s_G4AtomicFormFactorManager;
|
||||
|
||||
public:
|
||||
static G4AtomicFormFactor* GetManager() {
|
||||
if(!s_G4AtomicFormFactorManager){
|
||||
s_G4AtomicFormFactorManager = new G4AtomicFormFactor();
|
||||
}
|
||||
return s_G4AtomicFormFactorManager;
|
||||
}
|
||||
|
||||
//
|
||||
// theCoefficientsMap stores the coefficients for the form factor
|
||||
// calculations. It can be loaded only by LoadCoefficiencts()
|
||||
// and accessed by theCoefficients[].
|
||||
//
|
||||
private:
|
||||
std::map<G4int,std::vector<G4double> > theCoefficientsMap;
|
||||
G4double theCoefficients[9];
|
||||
G4int loadedIndex;
|
||||
|
||||
//
|
||||
// LoadCoefficiencts() method allows the evaluation of the atomic form
|
||||
// factor coefficients and the storage in theCoefficients.
|
||||
// If theCoefficients are already correct, no need to get new ones
|
||||
// Reference: International Tables for Crystallography (2006).
|
||||
// Vol. C, ch. 6.1, pp. 554-595
|
||||
// doi: 10.1107/97809553602060000600
|
||||
// Chapter 6.1. Intensity of diffracted intensities
|
||||
// IUCr Eq. 6.1.1.15, Coefficients Table 6.1.1.4
|
||||
//
|
||||
private:
|
||||
void InsertCoefficients(G4int index,std::vector<G4double> aDoubleVec){
|
||||
theCoefficientsMap.insert(std::pair<G4int,std::vector<G4double>>(index,aDoubleVec));
|
||||
}
|
||||
|
||||
void LoadCoefficiencts(G4int index){
|
||||
loadedIndex = index;
|
||||
for(unsigned int i0=0;i0<9;i0++){
|
||||
theCoefficients[i0] = theCoefficientsMap[index][i0];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
inline
|
||||
G4int GetIndex(G4int Z, G4int charge = 0) {return Z*100 + charge;}
|
||||
|
||||
|
||||
//
|
||||
// Get() function gives back the Atomic Form Factor of the Z material
|
||||
//
|
||||
public:
|
||||
G4double Get(G4double kScatteringVector, G4int Z, G4int charge = 0){
|
||||
if(loadedIndex != GetIndex(Z,charge)){
|
||||
LoadCoefficiencts(GetIndex(Z,charge));
|
||||
}
|
||||
G4double result = 0.;
|
||||
G4double kVecOn4PiSquared = (kScatteringVector / 1.e-7 / 3.1415926536) * 0.125; // (k/(4pi))/ angstrom
|
||||
kVecOn4PiSquared= kVecOn4PiSquared * kVecOn4PiSquared; // (k/(4pi))^2
|
||||
|
||||
for(unsigned int i0=0;i0<4;i0++){
|
||||
result += theCoefficients[i0*2] * G4Exp(- theCoefficients[i0*2+1] * kVecOn4PiSquared);
|
||||
}
|
||||
result += theCoefficients[8];
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Singleton constructor to create the atomic form factor calculator
|
||||
// Atomic form factor are evaluated using IUCr tables
|
||||
// http://it.iucr.org/Cb/ch6o1v0001/
|
||||
//
|
||||
protected:
|
||||
G4AtomicFormFactor() {
|
||||
InsertCoefficients(100,{0.489918,20.6593,0.262003,7.74039,0.196767,49.5519,0.049879,2.20159,0.001305});
|
||||
InsertCoefficients(99,{0.897661,53.1368,0.565616,15.187,0.415815,186.576,0.116973,3.56709,0.002389});
|
||||
InsertCoefficients(200,{0.8734,9.1037,0.6309,3.3568,0.3112,22.9276,0.178,0.9821,0.0064});
|
||||
InsertCoefficients(300,{1.1282,3.9546,0.7508,1.0524,0.6175,85.3905,0.4653,168.261,0.0377});
|
||||
InsertCoefficients(301,{0.6968,4.6237,0.7888,1.9557,0.3414,0.6316,0.1563,10.0953,0.0167});
|
||||
InsertCoefficients(400,{1.5919,43.6427,1.1278,1.8623,0.5391,103.483,0.7029,0.542,0.0385});
|
||||
InsertCoefficients(402,{6.2603,0.0027,0.8849,0.8313,0.7993,2.2758,0.1647,5.1146,-6.1092});
|
||||
InsertCoefficients(500,{2.0545,23.2185,1.3326,1.021,1.0979,60.3498,0.7068,0.1403,-0.19320});
|
||||
InsertCoefficients(600,{2.31,20.8439,1.02,10.2075,1.5886,0.5687,0.865,51.6512,0.2156});
|
||||
InsertCoefficients(610,{2.26069,22.6907,1.56165,0.656665,1.05075,9.75618,0.839259,55.5949,0.286977});
|
||||
InsertCoefficients(700,{12.2126,0.0057,3.1322,9.8933,2.0125,28.9975,1.1663,0.5826,-11.529});
|
||||
InsertCoefficients(800,{3.0485,13.2771,2.2868,5.7011,1.5463,0.3239,0.867,32.9089,0.2508});
|
||||
InsertCoefficients(799,{4.1916,12.8573,1.63969,4.17236,1.52673,47.0179,-20.307,-0.01404,21.9412});
|
||||
InsertCoefficients(900,{3.5392,10.2825,2.6412,4.2944,1.517,0.2615,1.0243,26.1476,0.2776});
|
||||
InsertCoefficients(899,{3.6322,5.27756,3.51057,14.7353,1.26064,0.442258,0.940706,47.3437,0.653396});
|
||||
InsertCoefficients(1000,{3.9553,8.4042,3.1125,3.4262,1.4546,0.2306,1.1251,21.7184,0.3515});
|
||||
InsertCoefficients(1100,{4.7626,3.285,3.1736,8.8422,1.2674,0.3136,1.1128,129.424,0.676});
|
||||
InsertCoefficients(1101,{3.2565,2.6671,3.9362,6.1153,1.3998,0.2001,1.0032,14.039,0.404});
|
||||
InsertCoefficients(1200,{5.4204,2.8275,2.1735,79.2611,1.2269,0.3808,2.3073,7.1937,0.8584});
|
||||
InsertCoefficients(1202,{3.4988,2.1676,3.8378,4.7542,1.3284,0.185,0.8497,10.1411,0.4853});
|
||||
InsertCoefficients(1300,{6.4202,3.0387,1.9002,0.7426,1.5936,31.5472,1.9646,85.0886,1.1151});
|
||||
InsertCoefficients(1303,{4.17448,1.93816,3.3876,4.14553,1.20296,0.228753,0.528137,8.28524,0.706786});
|
||||
InsertCoefficients(1400,{6.2915,2.4386,3.0353,32.3337,1.9891,0.6785,1.541,81.6937,1.1407});
|
||||
InsertCoefficients(1410,{5.66269,2.6652,3.07164,38.6634,2.62446,0.916946,1.3932,93.5458,1.24707});
|
||||
InsertCoefficients(1404,{4.43918,1.64167,3.20345,3.43757,1.19453,0.2149,0.41653,6.65365,0.746297});
|
||||
InsertCoefficients(1500,{6.4345,1.9067,4.1791,27.157,1.78,0.526,1.4908,68.1645,1.1149});
|
||||
InsertCoefficients(1600,{6.9053,1.4679,5.2034,22.2151,1.4379,0.2536,1.5863,56.172,0.8669});
|
||||
InsertCoefficients(1700,{11.4604,0.0104,7.1964,1.1662,6.2556,18.5194,1.6455,47.7784,-9.5574});
|
||||
InsertCoefficients(1699,{18.2915,0.0066,7.2084,1.1717,6.5337,19.5424,2.3386,60.4486,-16.378});
|
||||
InsertCoefficients(1800,{7.4845,0.9072,6.7723,14.8407,0.6539,43.8983,1.6442,33.3929,1.4445});
|
||||
InsertCoefficients(1900,{8.2186,12.7949,7.4398,0.7748,1.0519,213.187,0.8659,41.6841,1.4228});
|
||||
InsertCoefficients(1901,{7.9578,12.6331,7.4917,0.7674,6.359,-0.00200,1.1915,31.9128,-4.9978});
|
||||
InsertCoefficients(2000,{8.6266,10.4421,7.3873,0.6599,1.5899,85.7484,1.0211,178.437,1.3751});
|
||||
InsertCoefficients(2002,{15.6348,-0.00740,7.9518,0.6089,8.4372,10.3116,0.8537,25.9905,-14.875});
|
||||
InsertCoefficients(2100,{9.189,9.0213,7.3679,0.5729,1.6409,136.108,1.468,51.3531,1.3329});
|
||||
InsertCoefficients(2103,{13.4008,0.29854,8.0273,7.9629,1.65943,-0.28604,1.57936,16.0662,-6.6667});
|
||||
InsertCoefficients(2200,{9.7595,7.8508,7.3558,0.5,1.6991,35.6338,1.9021,116.105,1.2807});
|
||||
InsertCoefficients(2202,{9.11423,7.5243,7.62174,0.457585,2.2793,19.5361,0.087899,61.6558,0.897155});
|
||||
InsertCoefficients(2203,{17.7344,0.22061,8.73816,7.04716,5.25691,-0.15762,1.92134,15.9768,-14.652});
|
||||
InsertCoefficients(2204,{19.5114,0.178847,8.23473,6.67018,2.01341,-0.29263,1.5208,12.9464,-13.280});
|
||||
InsertCoefficients(2300,{10.2971,6.8657,7.3511,0.4385,2.0703,26.8938,2.0571,102.478,1.2199});
|
||||
InsertCoefficients(2302,{10.106,6.8818,7.3541,0.4409,2.2884,20.3004,0.0223,115.122,1.2298});
|
||||
InsertCoefficients(2303,{9.43141,6.39535,7.7419,0.383349,2.15343,15.1908,0.016865,63.969,0.656565});
|
||||
InsertCoefficients(2305,{15.6887,0.679003,8.14208,5.40135,2.03081,9.97278,-9.5760,0.940464,1.7143});
|
||||
InsertCoefficients(2400,{10.6406,6.1038,7.3537,0.392,3.324,20.2626,1.4922,98.7399,1.1832});
|
||||
InsertCoefficients(2402,{9.54034,5.66078,7.7509,0.344261,3.58274,13.3075,0.509107,32.4224,0.616898});
|
||||
InsertCoefficients(2433,{9.6809,5.59463,7.81136,0.334393,2.87603,12.8288,0.113575,32.8761,0.518275});
|
||||
InsertCoefficients(2500,{11.2819,5.3409,7.3573,0.3432,3.0193,17.8674,2.2441,83.7543,1.0896});
|
||||
InsertCoefficients(2502,{10.8061,5.2796,7.362,0.3435,3.5268,14.343,0.2184,41.3235,1.0874});
|
||||
InsertCoefficients(2503,{9.84521,4.91797,7.87194,0.294393,3.56531,10.8171,0.323613,24.1281,0.393974});
|
||||
InsertCoefficients(2504,{9.96253,4.8485,7.97057,0.283303,2.76067,10.4852,0.054447,27.573,0.251877});
|
||||
InsertCoefficients(2600,{11.7695,4.7611,7.3573,0.3072,3.5222,15.3535,2.3045,76.8805,1.0369});
|
||||
InsertCoefficients(2602,{11.0424,4.6538,7.374,0.3053,4.1346,12.0546,0.4399,31.2809,1.0097});
|
||||
InsertCoefficients(2603,{11.1764,4.6147,7.3863,0.3005,3.3948,11.6729,0.0724,38.5566,0.9707});
|
||||
InsertCoefficients(2700,{12.2841,4.2791,7.3409,0.2784,4.0034,13.5359,2.3488,71.1692,1.0118});
|
||||
InsertCoefficients(2702,{11.2296,4.1231,7.3883,0.2726,4.7393,10.2443,0.7108,25.6466,0.9324});
|
||||
InsertCoefficients(2703,{10.338,3.90969,7.88173,0.238668,4.76795,8.35583,0.725591,18.3491,0.286667});
|
||||
InsertCoefficients(2800,{12.8376,3.8785,7.292,0.2565,4.4438,12.1763,2.38,66.3421,1.0341});
|
||||
InsertCoefficients(2802,{11.4166,3.6766,7.4005,0.2449,5.3442,8.873,0.9773,22.1626,0.8614});
|
||||
InsertCoefficients(2803,{10.7806,3.5477,7.75868,0.22314,5.22746,7.64468,0.847114,16.9673,0.386044});
|
||||
InsertCoefficients(2900,{13.338,3.5828,7.1676,0.247,5.6158,11.3966,1.6735,64.8126,1.191});
|
||||
InsertCoefficients(2901,{11.9475,3.3669,7.3573,0.2274,6.2455,8.6625,1.5578,25.8487,0.89});
|
||||
InsertCoefficients(2902,{11.8168,3.37484,7.11181,0.244078,5.78135,7.9876,1.14523,19.897,1.14431});
|
||||
InsertCoefficients(3000,{14.0743,3.2655,7.0318,0.2333,5.1652,10.3163,2.41,58.7097,1.3041});
|
||||
InsertCoefficients(3002,{11.9719,2.9946,7.3862,0.2031,6.4668,7.0826,1.394,18.0995,0.7807});
|
||||
InsertCoefficients(3100,{15.2354,3.0669,6.7006,0.2412,4.3591,10.7805,2.9623,61.4135,1.7189});
|
||||
InsertCoefficients(3103,{12.692,2.81262,6.69883,0.22789,6.06692,6.36441,1.0066,14.4122,1.53545});
|
||||
InsertCoefficients(3200,{16.0816,2.8509,6.3747,0.2516,3.7068,11.4468,3.683,54.7625,2.1313});
|
||||
InsertCoefficients(3204,{12.9172,2.53718,6.70003,0.205855,6.06791,5.47913,0.859041,11.603,1.45572});
|
||||
InsertCoefficients(3300,{16.6723,2.6345,6.0701,0.2647,3.4313,12.9479,4.2779,47.7972,2.531});
|
||||
InsertCoefficients(3400,{17.0006,2.4098,5.8196,0.2726,3.9731,15.2372,4.3543,43.8163,2.8409});
|
||||
InsertCoefficients(3500,{17.1789,2.1723,5.2358,16.5796,5.6377,0.2609,3.9851,41.4328,2.9557});
|
||||
InsertCoefficients(3499,{17.1718,2.2059,6.3338,19.3345,5.5754,0.2871,3.7272,58.1535,3.1776});
|
||||
InsertCoefficients(3600,{17.3555,1.9384,6.7286,16.5623,5.5493,0.2261,3.5375,39.3972,2.825});
|
||||
InsertCoefficients(3700,{17.1784,1.7888,9.6435,17.3151,5.1399,0.2748,1.5292,164.934,3.4873});
|
||||
InsertCoefficients(3701,{17.5816,1.7139,7.6598,14.7957,5.8981,0.1603,2.7817,31.2087,2.0782});
|
||||
InsertCoefficients(3800,{17.5663,1.5564,9.8184,14.0988,5.422,0.1664,2.6694,132.376,2.5064});
|
||||
InsertCoefficients(3802,{18.0874,1.4907,8.1373,12.6963,2.5654,24.5651,-34.193,-0.01380,41.4025});
|
||||
InsertCoefficients(3900,{17.776,1.4029,10.2946,12.8006,5.72629,0.125599,3.26588,104.354,1.91213});
|
||||
InsertCoefficients(3903,{17.9268,1.35417,9.1531,11.2145,1.76795,22.6599,-33.108,-0.01319,40.2602});
|
||||
InsertCoefficients(4000,{17.8765,1.27618,10.948,11.916,5.41732,0.117622,3.65721,87.6627,2.06929});
|
||||
InsertCoefficients(4004,{18.1668,1.2148,10.0562,10.1483,1.01118,21.6054,-2.6479,-0.10276,9.41454});
|
||||
InsertCoefficients(4100,{17.6142,1.18865,12.0144,11.766,4.04183,0.204785,3.53346,69.7957,3.75591});
|
||||
InsertCoefficients(4103,{19.8812,0.019175,18.0653,1.13305,11.0177,10.1621,1.94715,28.3389,-12.912});
|
||||
InsertCoefficients(4105,{17.9163,1.12446,13.3417,0.028781,10.799,9.28206,0.337905,25.7228,-6.3934});
|
||||
InsertCoefficients(4200,{3.7025,0.2772,17.2356,1.0958,12.8876,11.004,3.7429,61.6584,4.3875});
|
||||
InsertCoefficients(4203,{21.1664,0.014734,18.2017,1.03031,11.7423,9.53659,2.30951,26.6307,-14.421});
|
||||
InsertCoefficients(4205,{21.0149,0.014345,18.0992,1.02238,11.4632,8.78809,0.740625,23.3452,-14.316});
|
||||
InsertCoefficients(4206,{17.8871,1.03649,11.175,8.48061,6.57891,0.058881,0,0,0.344941});
|
||||
InsertCoefficients(4300,{19.1301,0.864132,11.0948,8.14487,4.64901,21.5707,2.71263,86.8472,5.40428});
|
||||
InsertCoefficients(4400,{19.2674,0.80852,12.9182,8.43467,4.86337,24.7997,1.56756,94.2928,5.37874});
|
||||
InsertCoefficients(4403,{18.5638,0.847329,13.2885,8.37164,9.32602,0.017662,3.00964,22.887,-3.1892});
|
||||
InsertCoefficients(4404,{18.5003,0.844582,13.1787,8.12534,4.71304,0.36495,2.18535,20.8504,1.42357});
|
||||
InsertCoefficients(4500,{19.2957,0.751536,14.3501,8.21758,4.73425,25.8749,1.28918,98.6062,5.328});
|
||||
InsertCoefficients(4503,{18.8785,0.764252,14.1259,7.84438,3.32515,21.2487,-6.1989,-0.01036,11.8678});
|
||||
InsertCoefficients(4504,{18.8545,0.760825,13.9806,7.62436,2.53464,19.3317,-5.6526,-0.01020,11.2835});
|
||||
InsertCoefficients(4600,{19.3319,0.698655,15.5017,7.98929,5.29537,25.2052,0.605844,76.8986,5.26593});
|
||||
InsertCoefficients(4602,{19.1701,0.696219,15.2096,7.55573,4.32234,22.5057,0,0,5.2916});
|
||||
InsertCoefficients(4604,{19.2493,0.683839,14.79,7.14833,2.89289,17.9144,-7.9492,0.005127,13.0174});
|
||||
InsertCoefficients(4700,{19.2808,0.6446,16.6885,7.4726,4.8045,24.6605,1.0463,99.8156,5.179});
|
||||
InsertCoefficients(4701,{19.1812,0.646179,15.9719,7.19123,5.27475,21.7326,0.357534,66.1147,5.21572});
|
||||
InsertCoefficients(4702,{19.1643,0.645643,16.2456,7.18544,4.3709,21.4072,0,0,5.21404});
|
||||
InsertCoefficients(4800,{19.2214,0.5946,17.6444,6.9089,4.461,24.7008,1.6029,87.4825,5.0694});
|
||||
InsertCoefficients(4802,{19.1514,0.597922,17.2535,6.80639,4.47128,20.2521,0,0,5.11937});
|
||||
InsertCoefficients(4900,{19.1624,0.5476,18.5596,6.3776,4.2948,25.8499,2.0396,92.8029,4.9391});
|
||||
InsertCoefficients(4903,{19.1045,0.551522,18.1108,6.3247,3.78897,17.3595,0,0,4.99635});
|
||||
InsertCoefficients(5000,{19.1889,5.8303,19.1005,0.5031,4.4585,26.8909,2.4663,83.9571,4.7821});
|
||||
InsertCoefficients(5002,{19.1094,0.5036,19.0548,5.8378,4.5648,23.3752,0.487,62.2061,4.7861});
|
||||
InsertCoefficients(5004,{18.9333,5.764,19.7131,0.4655,3.4182,14.0049,0.0193,-0.75830,3.9182});
|
||||
InsertCoefficients(5100,{19.6418,5.3034,19.0455,0.4607,5.0371,27.9074,2.6827,75.2825,4.5909});
|
||||
InsertCoefficients(5103,{18.9755,0.467196,18.933,5.22126,5.10789,19.5902,0.288753,55.5113,4.69626});
|
||||
InsertCoefficients(5105,{19.8685,5.44853,19.0302,0.467973,2.41253,14.1259,0,0,4.69263});
|
||||
InsertCoefficients(5200,{19.9644,4.81742,19.0138,0.420885,6.14487,28.5284,2.5239,70.8403,4.352});
|
||||
InsertCoefficients(5300,{20.1472,4.347,18.9949,0.3814,7.5138,27.766,2.2735,66.8776,4.0712});
|
||||
InsertCoefficients(5301,{20.2332,4.3579,18.997,0.3815,7.8069,29.5259,2.8868,84.9304,4.0714});
|
||||
InsertCoefficients(5400,{20.2933,3.9282,19.0298,0.344,8.9767,26.4659,1.99,64.2658,3.7118});
|
||||
InsertCoefficients(5500,{20.3892,3.569,19.1062,0.3107,10.662,24.3879,1.4953,213.904,3.3352});
|
||||
InsertCoefficients(5501,{20.3524,3.552,19.1278,0.3086,10.2821,23.7128,0.9615,59.4565,3.2791});
|
||||
InsertCoefficients(5600,{20.3361,3.216,19.297,0.2756,10.888,20.2073,2.6959,167.202,2.7731});
|
||||
InsertCoefficients(5602,{20.1807,3.21367,19.1136,0.28331,10.9054,20.0558,0.77634,51.746,3.02902});
|
||||
InsertCoefficients(5700,{20.578,2.94817,19.599,0.244475,11.3727,18.7726,3.28719,133.124,2.14678});
|
||||
InsertCoefficients(5703,{20.2489,2.9207,19.3763,0.250698,11.6323,17.8211,0.336048,54.9453,2.4086});
|
||||
InsertCoefficients(5800,{21.1671,2.81219,19.7695,0.226836,11.8513,17.6083,3.33049,127.113,1.86264});
|
||||
InsertCoefficients(5803,{20.8036,2.77691,19.559,0.23154,11.9369,16.5408,0.612376,43.1692,2.09013});
|
||||
InsertCoefficients(5804,{20.3235,2.65941,19.8186,0.21885,12.1233,15.7992,0.144583,62.2355,1.5918});
|
||||
InsertCoefficients(5900,{22.044,2.77393,19.6697,0.222087,12.3856,16.7669,2.82428,143.644,2.0583});
|
||||
InsertCoefficients(5903,{21.3727,2.6452,19.7491,0.214299,12.1329,15.323,0.97518,36.4065,1.77132});
|
||||
InsertCoefficients(5904,{20.9413,2.54467,20.0539,0.202481,12.4668,14.8137,0.296689,45.4643,1.24285});
|
||||
InsertCoefficients(6000,{22.6845,2.66248,19.6847,0.210628,12.774,15.885,2.85137,137.903,1.98486});
|
||||
InsertCoefficients(6003,{21.961,2.52722,19.9339,0.199237,12.12,14.1783,1.51031,30.8717,1.47588});
|
||||
InsertCoefficients(6100,{23.3405,2.5627,19.6095,0.202088,13.1235,15.1009,2.87516,132.721,2.02876});
|
||||
InsertCoefficients(6103,{22.5527,2.4174,20.1108,0.185769,12.0671,13.1275,2.07492,27.4491,1.19499});
|
||||
InsertCoefficients(6200,{24.0042,2.47274,19.4258,0.196451,13.4396,14.3996,2.89604,128.007,2.20963});
|
||||
InsertCoefficients(6203,{23.1504,2.31641,20.2599,0.174081,11.9202,12.1571,2.71488,24.8242,0.954586});
|
||||
InsertCoefficients(6300,{24.6274,2.3879,19.0886,0.1942,13.7603,13.7546,2.9227,123.174,2.5745});
|
||||
InsertCoefficients(6302,{24.0063,2.27783,19.9504,0.17353,11.8034,11.6096,3.87243,26.5156,1.36389});
|
||||
InsertCoefficients(6303,{23.7497,2.22258,20.3745,0.16394,11.8509,11.311,3.26503,22.9966,0.759344});
|
||||
InsertCoefficients(6400,{25.0709,2.25341,19.0798,0.181951,13.8518,12.9331,3.54545,101.398,2.4196});
|
||||
InsertCoefficients(6403,{24.3466,2.13553,20.4208,0.155525,11.8708,10.5782,3.7149,21.7029,0.645089});
|
||||
InsertCoefficients(6500,{25.8976,2.24256,18.2185,0.196143,14.3167,12.6648,2.95354,115.362,3.58324});
|
||||
InsertCoefficients(6503,{24.9559,2.05601,20.3271,0.149525,12.2471,10.0499,3.773,21.2773,0.691967});
|
||||
InsertCoefficients(6600,{26.507,2.1802,17.6383,0.202172,14.5596,12.1899,2.96577,111.874,4.29728});
|
||||
InsertCoefficients(6603,{25.5395,1.9804,20.2861,0.143384,11.9812,9.34972,4.50073,19.581,0.68969});
|
||||
InsertCoefficients(6700,{26.9049,2.07051,17.294,0.19794,14.5583,11.4407,3.63837,92.6566,4.56796});
|
||||
InsertCoefficients(6703,{26.1296,1.91072,20.0994,0.139358,11.9788,8.80018,4.93676,18.5908,0.852795});
|
||||
InsertCoefficients(6800,{27.6563,2.07356,16.4285,0.223545,14.9779,11.3604,2.98233,105.703,5.92046});
|
||||
InsertCoefficients(6803,{26.722,1.84659,19.7748,0.13729,12.1506,8.36225,5.17379,17.8974,1.17613});
|
||||
InsertCoefficients(6900,{28.1819,2.02859,15.8851,0.238849,15.1542,10.9975,2.98706,102.961,6.75621});
|
||||
InsertCoefficients(6903,{27.3083,1.78711,19.332,0.136974,12.3339,7.96778,5.38348,17.2922,1.63929});
|
||||
InsertCoefficients(7000,{28.6641,1.9889,15.4345,0.257119,15.3087,10.6647,2.98963,100.417,7.56672});
|
||||
InsertCoefficients(7002,{28.1209,1.78503,17.6817,0.15997,13.3335,8.18304,5.14657,20.39,3.70983});
|
||||
InsertCoefficients(7003,{27.8917,1.73272,18.7614,0.13879,12.6072,7.64412,5.47647,16.8153,2.26001});
|
||||
InsertCoefficients(7100,{28.9476,1.90182,15.2208,9.98519,15.1,0.261033,3.71601,84.3298,7.97628});
|
||||
InsertCoefficients(7103,{28.4628,1.68216,18.121,0.142292,12.8429,7.33727,5.59415,16.3535,2.97573});
|
||||
InsertCoefficients(7200,{29.144,1.83262,15.1726,9.5999,14.7586,0.275116,4.30013,72.029,8.58154});
|
||||
InsertCoefficients(7204,{28.8131,1.59136,18.4601,0.128903,12.7285,6.76232,5.59927,14.0366,2.39699});
|
||||
InsertCoefficients(7300,{29.2024,1.77333,15.2293,9.37046,14.5135,0.295977,4.76492,63.3644,9.24354});
|
||||
InsertCoefficients(7305,{29.1587,1.50711,18.8407,0.116741,12.8268,6.31524,5.38695,12.4244,1.78555});
|
||||
InsertCoefficients(7400,{29.0818,1.72029,15.43,9.2259,14.4327,0.321703,5.11982,57.056,9.8875});
|
||||
InsertCoefficients(7406,{29.4936,1.42755,19.3763,0.104621,13.0544,5.93667,5.06412,11.1972,1.01074});
|
||||
InsertCoefficients(7500,{28.7621,1.67191,15.7189,9.09227,14.5564,0.3505,5.44174,52.0861,10.472});
|
||||
InsertCoefficients(7600,{28.1894,1.62903,16.155,8.97948,14.9305,0.382661,5.67589,48.1647,11.0005});
|
||||
InsertCoefficients(7604,{30.419,1.37113,15.2637,6.84706,14.7458,0.165191,5.06795,18.003,6.49804});
|
||||
InsertCoefficients(7700,{27.3049,1.59279,16.7296,8.86553,15.6115,0.417916,5.83377,45.0011,11.4722});
|
||||
InsertCoefficients(7703,{30.4156,1.34323,15.862,7.10909,13.6145,0.204633,5.82008,20.3254,8.27903});
|
||||
InsertCoefficients(7704,{30.7058,1.30923,15.5512,6.71983,14.2326,0.167252,5.53672,17.4911,6.96824});
|
||||
InsertCoefficients(7800,{27.0059,1.51293,17.7639,8.81174,15.7131,0.424593,5.7837,38.6103,11.6883});
|
||||
InsertCoefficients(7802,{29.8429,1.32927,16.7224,7.38979,13.2153,0.263297,6.35234,22.9426,9.85329});
|
||||
InsertCoefficients(7804,{30.9612,1.24813,15.9829,6.60834,13.7348,0.16864,5.92034,16.9392,7.39534});
|
||||
InsertCoefficients(7900,{16.8819,0.4611,18.5913,8.6216,25.5582,1.4826,5.86,36.3956,12.0658});
|
||||
InsertCoefficients(7901,{28.0109,1.35321,17.8204,7.7395,14.3359,0.356752,6.58077,26.4043,11.2299});
|
||||
InsertCoefficients(7903,{30.6886,1.2199,16.9029,6.82872,12.7801,0.212867,6.52354,18.659,9.0968});
|
||||
InsertCoefficients(8000,{20.6809,0.545,19.0417,8.4484,21.6575,1.5729,5.9676,38.3246,12.6089});
|
||||
InsertCoefficients(8001,{25.0853,1.39507,18.4973,7.65105,16.8883,0.443378,6.48216,28.2262,12.0205});
|
||||
InsertCoefficients(8002,{29.5641,1.21152,18.06,7.05639,12.8374,0.284738,6.89912,20.7482,10.6268});
|
||||
InsertCoefficients(8100,{27.5446,0.65515,19.1584,8.70751,15.538,1.96347,5.52593,45.8149,13.1746});
|
||||
InsertCoefficients(8101,{21.3985,1.4711,20.4723,0.517394,18.7478,7.43463,6.82847,28.8482,12.5258});
|
||||
InsertCoefficients(8103,{30.8695,1.1008,18.3481,6.53852,11.9328,0.219074,7.00574,17.2114,9.8027});
|
||||
InsertCoefficients(8200,{31.0617,0.6902,13.0637,2.3576,18.442,8.618,5.9696,47.2579,13.4118});
|
||||
InsertCoefficients(8202,{21.7886,1.3366,19.5682,0.488383,19.1406,6.7727,7.01107,23.8132,12.4734});
|
||||
InsertCoefficients(8204,{32.1244,1.00566,18.8003,6.10926,12.0175,0.147041,6.96886,14.714,8.08428});
|
||||
InsertCoefficients(8300,{33.3689,0.704,12.951,2.9238,16.5877,8.7937,6.4692,48.0093,13.5782});
|
||||
InsertCoefficients(8303,{21.8053,1.2356,19.5026,6.24149,19.1053,0.469999,7.10295,20.3185,12.4711});
|
||||
InsertCoefficients(8305,{33.5364,0.91654,25.0946,0.39042,19.2497,5.71414,6.91555,12.8285,-6.7994});
|
||||
InsertCoefficients(8400,{34.6726,0.700999,15.4733,3.55078,13.1138,9.55642,7.02588,47.0045,13.677});
|
||||
InsertCoefficients(8500,{35.3163,0.68587,19.0211,3.97458,9.49887,11.3824,7.42518,45.4715,13.7108});
|
||||
InsertCoefficients(8600,{35.5631,0.6631,21.2816,4.0691,8.0037,14.0422,7.4433,44.2473,13.6905});
|
||||
InsertCoefficients(8700,{35.9299,0.646453,23.0547,4.17619,12.1439,23.1052,2.11253,150.645,13.7247});
|
||||
InsertCoefficients(8800,{35.763,0.616341,22.9064,3.87135,12.4739,19.9887,3.21097,142.325,13.6211});
|
||||
InsertCoefficients(8802,{35.215,0.604909,21.67,3.5767,7.91342,12.601,7.65078,29.8436,13.5431});
|
||||
InsertCoefficients(8900,{35.6597,0.589092,23.1032,3.65155,12.5977,18.599,4.08655,117.02,13.5266});
|
||||
InsertCoefficients(8903,{35.1736,0.579689,22.1112,3.41437,8.19216,12.9187,7.05545,25.9443,13.4637});
|
||||
InsertCoefficients(9000,{35.5645,0.563359,23.4219,3.46204,12.7473,17.8309,4.80703,99.1722,13.4314});
|
||||
InsertCoefficients(9004,{35.1007,0.555054,22.4418,3.24498,9.78554,13.4661,5.29444,23.9533,13.376});
|
||||
InsertCoefficients(9100,{35.8847,0.547751,23.2948,3.41519,14.1891,16.9235,4.17287,105.251,13.4287});
|
||||
InsertCoefficients(9200,{36.0228,0.5293,23.4128,3.3253,14.9491,16.0927,4.188,100.613,13.3966});
|
||||
InsertCoefficients(9203,{35.5747,0.52048,22.5259,3.12293,12.2165,12.7148,5.37073,26.3394,13.3092});
|
||||
InsertCoefficients(9204,{35.3715,0.516598,22.5326,3.05053,12.0291,12.5723,4.7984,23.4582,13.2671});
|
||||
InsertCoefficients(9206,{34.8509,0.507079,22.7584,2.8903,14.0099,13.1767,1.21457,25.2017,13.1665});
|
||||
InsertCoefficients(9300,{36.1874,0.511929,23.5964,3.25396,15.6402,15.3622,4.1855,97.4908,13.3573});
|
||||
InsertCoefficients(9303,{35.7074,0.502322,22.613,3.03807,12.9898,12.1449,5.43227,25.4928,13.2544});
|
||||
InsertCoefficients(9304,{35.5103,0.498626,22.5787,2.96627,12.7766,11.9484,4.92159,22.7502,13.2116});
|
||||
InsertCoefficients(9306,{35.0136,0.48981,22.7286,2.81099,14.3884,12.33,1.75669,22.6581,13.113});
|
||||
InsertCoefficients(9400,{36.5254,0.499384,23.8083,3.26371,16.7707,14.9455,3.47947,105.98,13.3812});
|
||||
InsertCoefficients(9403,{35.84,0.484938,22.7169,2.96118,13.5807,11.5331,5.66016,24.3992,13.1991});
|
||||
InsertCoefficients(9404,{35.6493,0.481422,22.646,2.8902,13.3595,11.316,5.18831,21.8301,13.1555});
|
||||
InsertCoefficients(9406,{35.1736,0.473204,22.7181,2.73848,14.7635,11.553,2.28678,20.9303,13.0582});
|
||||
InsertCoefficients(9500,{36.6706,0.483629,24.0992,3.20647,17.3415,14.3136,3.49331,102.273,13.3592});
|
||||
InsertCoefficients(9600,{36.6488,0.465154,24.4096,3.08997,17.399,13.4346,4.21665,88.4834,13.2887});
|
||||
InsertCoefficients(9700,{36.7881,0.451018,24.7736,3.04619,17.8919,12.8946,4.23284,86.003,13.2754});
|
||||
InsertCoefficients(9800,{36.9185,0.437533,25.1995,3.00775,18.3317,12.4044,4.24391,83.7881,13.2674});
|
||||
|
||||
loadedIndex = -1;
|
||||
}
|
||||
|
||||
~G4AtomicFormFactor() {};
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,90 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CrystalAtomBase.hh 94016 2015-11-05 10:14:49Z gcosmo $
|
||||
//
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4CrystalAtomBase
|
||||
//
|
||||
// Description: Contains crystal properties
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// XXX
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
// 21-04-16, created by E.Bagli
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4CrystalAtomBase_HH
|
||||
#define G4CrystalAtomBase_HH 1
|
||||
|
||||
#include <vector>
|
||||
#include <G4ThreeVector.hh>
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class G4CrystalAtomBase
|
||||
{
|
||||
public: // with description
|
||||
//
|
||||
// Constructor to create a lattice
|
||||
//
|
||||
G4CrystalAtomBase() {;};
|
||||
G4CrystalAtomBase(G4ThreeVector apos) {AddPos(apos);};
|
||||
~G4CrystalAtomBase() {;};
|
||||
|
||||
//
|
||||
// Atom positions in the lattice are stored in fractional coordinates
|
||||
// i.e. the position in the unit cell described as a fractional
|
||||
// position along each cell edge.
|
||||
// Atoms may be removed or added
|
||||
//
|
||||
private:
|
||||
std::vector<G4ThreeVector> thePos;
|
||||
|
||||
public:
|
||||
inline
|
||||
std::vector<G4ThreeVector> GetPos() {return thePos;}
|
||||
|
||||
inline
|
||||
G4ThreeVector GetPos(G4int idx) {return thePos[idx];}
|
||||
inline
|
||||
void AddPos(G4ThreeVector a3vec) {thePos.push_back(a3vec);}
|
||||
inline
|
||||
void SetPos(std::vector<G4ThreeVector> a3vecvec) {thePos = a3vecvec;}
|
||||
inline
|
||||
void DelPos(G4int idx) {thePos.erase(thePos.begin()+idx);}
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4CrystalBravaisLattices
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4CrystalBravaisLattices_H
|
||||
#define G4CrystalBravaisLattices_H 1
|
||||
|
||||
// Bravais Lattices
|
||||
enum theBravaisLatticeType {
|
||||
Primitive = 0,
|
||||
BodyCentered = 1,
|
||||
FaceCentered = 2,
|
||||
aBaseCentered = 3, //bc faces
|
||||
bBaseCentered = 4, //ca faces
|
||||
cBaseCentered = 5, //ab faces
|
||||
Rombohedral = 6
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CrystalExtension.hh 94016 2015-11-05 10:14:49Z gcosmo $
|
||||
//
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4CrystalExtension
|
||||
//
|
||||
// Description: Contains crystal properties
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Extension of G4Material for the management of a crystal
|
||||
// structure. It has to be attached to a G4ExtendedMaterial
|
||||
// in order to instantiate a G4LogicalCrystalVolume.
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
// 21-04-16, created by E.Bagli
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4CrystalExtension_HH
|
||||
#define G4CrystalExtension_HH 1
|
||||
|
||||
#include "G4VMaterialExtension.hh"
|
||||
#include "G4CrystalAtomBase.hh"
|
||||
#include "G4AtomicBond.hh"
|
||||
#include "G4CrystalUnitCell.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include <vector>
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class G4CrystalExtension : public G4VMaterialExtension
|
||||
{
|
||||
public: // with description
|
||||
//
|
||||
// Constructor to create a material
|
||||
//
|
||||
G4CrystalExtension(G4Material* ,const G4String& name = "crystal");
|
||||
|
||||
~G4CrystalExtension();
|
||||
|
||||
void Print() const {;};
|
||||
private:
|
||||
G4Material* fMaterial;
|
||||
|
||||
public:
|
||||
G4Material* GetMaterial() {return fMaterial;};
|
||||
void SetMaterial(G4Material* aMat) {fMaterial = aMat;};
|
||||
|
||||
|
||||
//
|
||||
// Crystal cell description, i.e. space group
|
||||
// and cell parameters
|
||||
//
|
||||
|
||||
private:
|
||||
G4CrystalUnitCell* theUnitCell;
|
||||
public:
|
||||
inline void SetUnitCell(G4CrystalUnitCell* aUC) {theUnitCell=aUC;}
|
||||
inline G4CrystalUnitCell* GetUnitCell()
|
||||
const {return theUnitCell;}
|
||||
|
||||
//
|
||||
// Elasticity and reduced elasticity tensors
|
||||
//
|
||||
|
||||
public:
|
||||
typedef G4double Elasticity[3][3][3][3];
|
||||
typedef G4double ReducedElasticity[6][6];
|
||||
|
||||
protected:
|
||||
Elasticity fElasticity; // Full 4D elasticity tensor
|
||||
ReducedElasticity fElReduced; // Reduced 2D elasticity tensor
|
||||
|
||||
public:
|
||||
const Elasticity& GetElasticity() const { return fElasticity; }
|
||||
const ReducedElasticity& GetElReduced() const { return fElReduced; }
|
||||
|
||||
public:
|
||||
G4double GetCijkl(G4int i, G4int j, G4int k, G4int l) const {
|
||||
return fElasticity[i][j][k][l];
|
||||
}
|
||||
|
||||
// Reduced elasticity tensor: C11-C66 interface for clarity
|
||||
void SetElReduced(const ReducedElasticity& mat);
|
||||
|
||||
void SetCpq(G4int p, G4int q, G4double value);
|
||||
G4double GetCpq(G4int p, G4int q) const { return fElReduced[p-1][q-1]; }
|
||||
|
||||
//
|
||||
// Map of atom positions for each element
|
||||
// The coordinate system is the unit cell
|
||||
//
|
||||
private:
|
||||
std::map<const G4Element*,G4CrystalAtomBase*> theCrystalAtomBaseMap;
|
||||
|
||||
public:
|
||||
G4CrystalAtomBase* GetAtomBase(const G4Element* anElement);
|
||||
|
||||
void AddAtomBase(const G4Element* anElement,G4CrystalAtomBase* aBase){
|
||||
theCrystalAtomBaseMap.insert(std::pair<const G4Element*,G4CrystalAtomBase*>(anElement,aBase));
|
||||
}
|
||||
|
||||
|
||||
G4CrystalAtomBase* GetAtomBase(G4int anElIdx){
|
||||
return GetAtomBase(fMaterial->GetElement(anElIdx));
|
||||
}
|
||||
|
||||
void AddAtomBase(G4int anElIdx,G4CrystalAtomBase* aLattice){
|
||||
AddAtomBase(fMaterial->GetElement(anElIdx),aLattice);
|
||||
}
|
||||
|
||||
//
|
||||
// Get the position of all the atoms in the unit cell
|
||||
// for a single element or all the elements
|
||||
//
|
||||
G4bool GetAtomPos(const G4Element* anEl, std::vector<G4ThreeVector>& vecout);
|
||||
G4bool GetAtomPos(std::vector<G4ThreeVector>& vecout);
|
||||
|
||||
G4bool GetAtomPos(G4int anElIdx, std::vector<G4ThreeVector>& vecout){
|
||||
GetAtomPos(fMaterial->GetElement(anElIdx),vecout);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Structure factor calculations
|
||||
// Eq. 46, Chapter 2 , Introduction to solid state physics, C. Kittel
|
||||
//
|
||||
G4complex ComputeStructureFactor(G4double kScatteringVector,
|
||||
G4int h,
|
||||
G4int k,
|
||||
G4int l);
|
||||
G4complex ComputeStructureFactorGeometrical(G4int h,
|
||||
G4int k,
|
||||
G4int l);
|
||||
|
||||
//
|
||||
// Bond between atoms. Each bond is mapped with two Elements
|
||||
// and the number of the atoms in the corresponding G4CrystalBaseAtomPos
|
||||
//
|
||||
|
||||
private:
|
||||
std::vector<G4AtomicBond*> theAtomicBondVector;
|
||||
|
||||
public:
|
||||
void AddAtomicBond(G4AtomicBond* aBond) {theAtomicBondVector.push_back(aBond);};
|
||||
G4AtomicBond* GetAtomicBond(G4int idx) {return theAtomicBondVector[idx];};
|
||||
std::vector<G4AtomicBond*> GetAtomicBondVector() {return theAtomicBondVector;};
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4LatticeSystems
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4LatticeSystems_H
|
||||
#define G4LatticeSystems_H 1
|
||||
|
||||
// Lattice Systems
|
||||
enum theLatticeSystemType {
|
||||
Amorphous = -1,
|
||||
Triclinic = 1,
|
||||
Monoclinic = 2,
|
||||
Orthorhombic = 3,
|
||||
Tetragonal = 4,
|
||||
Rhombohedral = 5,
|
||||
Hexagonal = 6,
|
||||
Cubic = 7,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4CrystalUnitCell
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4CrystalUnitCell_H
|
||||
#define G4CrystalUnitCell_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include <vector>
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4CrystalBravaisLattices.h"
|
||||
#include "G4CrystalLatticeSystems.h"
|
||||
//#include "sginfo.h"
|
||||
|
||||
class G4CrystalUnitCell
|
||||
{
|
||||
public:
|
||||
G4CrystalUnitCell(G4double sizeA,
|
||||
G4double sizeB,
|
||||
G4double sizeC,
|
||||
G4double alpha,
|
||||
G4double beta,
|
||||
G4double gamma,
|
||||
G4int spacegroup);
|
||||
|
||||
virtual ~G4CrystalUnitCell();
|
||||
|
||||
private:
|
||||
G4int theSpaceGroup; //
|
||||
public:
|
||||
inline G4int GetSpaceGroup() const {return theSpaceGroup;};
|
||||
inline void SetSpaceGroup(G4int aInt) {theSpaceGroup=aInt;};
|
||||
|
||||
private:
|
||||
theLatticeSystemType GetLatticeSystem(G4int aGroup);
|
||||
theBravaisLatticeType GetBravaisLattice(G4int aGroup);
|
||||
|
||||
public:
|
||||
theLatticeSystemType GetLatticeSystem(){
|
||||
return GetLatticeSystem(theSpaceGroup);
|
||||
}
|
||||
theBravaisLatticeType GetBravaisLattice(){
|
||||
return GetBravaisLattice(theSpaceGroup);
|
||||
}
|
||||
|
||||
private:
|
||||
//T_SgInfo SgInfo;
|
||||
/*!< struct from SgInfo library needed for further calculations
|
||||
see SgInfo documentation on http://cci.lbl.gov/sginfo/ */
|
||||
private:
|
||||
G4double cosa,cosb,cosg;
|
||||
G4double sina,sinb,sing;
|
||||
G4double cosar,cosbr,cosgr;
|
||||
|
||||
//
|
||||
// Size and angles of the crystalline unit cell
|
||||
//
|
||||
protected:
|
||||
G4ThreeVector nullVec;
|
||||
|
||||
G4ThreeVector theSize; // cell sizes
|
||||
G4ThreeVector theAngle; // cell angles
|
||||
G4ThreeVector theUnitBasis[3]; // Basis unit vectors in direct orientation
|
||||
G4ThreeVector theBasis[3]; // Basis vectors in direct orientation
|
||||
|
||||
public:
|
||||
const G4ThreeVector& GetBasis(G4int idx) const;
|
||||
const G4ThreeVector& GetUnitBasis(G4int idx) const;
|
||||
inline G4ThreeVector GetSize() const {return theSize;}
|
||||
inline G4ThreeVector GetAngle() const {return theAngle;}
|
||||
|
||||
G4ThreeVector GetUnitBasisTrigonal(); // return theUnitBase[2] vector
|
||||
//
|
||||
// Reciprocal size and angles of the crystalline unit cell
|
||||
//
|
||||
protected:
|
||||
G4ThreeVector theRecSize; // reciprocal cell sizes
|
||||
G4ThreeVector theRecAngle; // reciprocal cell angles
|
||||
G4ThreeVector theRecUnitBasis[3]; // Basis unit vectors in reciprocal orientation
|
||||
G4ThreeVector theRecBasis[3]; // Basis vectors in reciprocal orientation
|
||||
|
||||
public:
|
||||
const G4ThreeVector& GetRecBasis(G4int idx) const;
|
||||
const G4ThreeVector& GetRecUnitBasis(G4int idx) const;
|
||||
inline G4ThreeVector GetRecSize() const {return theRecSize;}
|
||||
inline G4ThreeVector GetRecAngle() const {return theRecAngle;}
|
||||
|
||||
//
|
||||
// Methods to populate atom position in the lattice from the basis
|
||||
// and the unit basis
|
||||
//
|
||||
public:
|
||||
G4bool FillAtomicUnitPos(G4ThreeVector& pos, std::vector<G4ThreeVector>& vecout);
|
||||
G4bool FillAtomicPos(G4ThreeVector& pos, std::vector<G4ThreeVector>& vecout);
|
||||
|
||||
//
|
||||
// Methods to populate elasticity and reduced elasticity tensors
|
||||
//
|
||||
public:
|
||||
G4bool FillElReduced(G4double Cij[6][6]);
|
||||
private:
|
||||
G4bool FillAmorphous(G4double Cij[6][6]) const;
|
||||
G4bool FillCubic(G4double Cij[6][6]) const;
|
||||
G4bool FillTetragonal(G4double Cij[6][6]) const;
|
||||
G4bool FillOrthorhombic(G4double Cij[6][6]) const;
|
||||
G4bool FillRhombohedral(G4double Cij[6][6]) const;
|
||||
G4bool FillMonoclinic(G4double Cij[6][6]) const;
|
||||
G4bool FillTriclinic(G4double Cij[6][6]) const;
|
||||
G4bool FillHexagonal(G4double Cij[6][6]) const;
|
||||
|
||||
G4bool ReflectElReduced(G4double Cij[6][6]) const;
|
||||
|
||||
//
|
||||
// The volumes of the cell
|
||||
//
|
||||
public:
|
||||
G4double ComputeCellVolume(); //compute and store the volume
|
||||
|
||||
inline G4double GetVolume() const {return theVolume;} //get the stored volume
|
||||
inline G4double GetRecVolume() const {return theRecVolume;} //get the stored volume
|
||||
|
||||
private:
|
||||
G4double theVolume; // the cell volume
|
||||
G4double theRecVolume; // the cell volume
|
||||
|
||||
//
|
||||
// Squared Reciprocal and direct interplanar spacing
|
||||
//
|
||||
public:
|
||||
G4double GetIntSp2(G4int h,
|
||||
G4int k,
|
||||
G4int l); // squared interplanar spacing
|
||||
|
||||
G4double GetRecIntSp2(G4int h,
|
||||
G4int k,
|
||||
G4int l); // squared reciprocal interplanar spacing
|
||||
|
||||
G4double GetIntCosAng(G4int h1,
|
||||
G4int k1,
|
||||
G4int l1,
|
||||
G4int h2,
|
||||
G4int k2,
|
||||
G4int l2); // cosine of the angle between two planes
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ExtendedMaterial.hh 96776 2016-05-06 14:11:00Z vnivanch $
|
||||
//
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4ExtendedMaterial
|
||||
//
|
||||
// Description: Contains extended material properties
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Is used to define the additional material information. This class
|
||||
// contains a map of G4VMaterialExtension associated with an integer
|
||||
// key of G4PhysicsModelCatalog index.
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4EXTENDEDMATERIAL_HH
|
||||
#define G4EXTENDEDMATERIAL_HH 1
|
||||
|
||||
#include "G4Material.hh"
|
||||
#include <unordered_map>
|
||||
#include <memory>
|
||||
#include "G4VMaterialExtension.hh"//Needed for hash defintion
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
// A map for material extensions based on the hash of the name.
|
||||
// Extensions are owned by the map
|
||||
using G4MaterialExtensionMap=std::unordered_map<G4String, //KEY
|
||||
std::unique_ptr<G4VMaterialExtension>,//VALUE
|
||||
G4MaterialExtensionHash>;//HASHING FUNCTOR
|
||||
|
||||
class G4ExtendedMaterial : public G4Material
|
||||
{
|
||||
public: // with description
|
||||
//
|
||||
// Constructor to create an extended material from the base-class G4Material
|
||||
//
|
||||
G4ExtendedMaterial(const G4String& name, //its name
|
||||
const G4Material* baseMaterial); //base material
|
||||
|
||||
//
|
||||
// Constructor to create an extended material from single element
|
||||
//
|
||||
G4ExtendedMaterial(const G4String& name, //its name
|
||||
G4double z, //atomic number
|
||||
G4double a, //mass of mole
|
||||
G4double density, //density
|
||||
G4State state = kStateUndefined, //solid,gas
|
||||
G4double temp = NTP_Temperature, //temperature
|
||||
G4double pressure = CLHEP::STP_Pressure); //pressure
|
||||
|
||||
//
|
||||
// Constructor to create an extended material from a combination of elements
|
||||
// and/or materials subsequently added via AddElement and/or AddMaterial
|
||||
//
|
||||
G4ExtendedMaterial(const G4String& name, //its name
|
||||
G4double density, //density
|
||||
G4int nComponents, //nbOfComponents
|
||||
G4State state = kStateUndefined, //solid,gas
|
||||
G4double temp = NTP_Temperature, //temperature
|
||||
G4double pressure = CLHEP::STP_Pressure); //pressure
|
||||
|
||||
//
|
||||
// Constructor to create an extended material from the base extended material
|
||||
//
|
||||
G4ExtendedMaterial(const G4String& name, //its name
|
||||
G4double density, //density
|
||||
const G4ExtendedMaterial* baseMaterial, //base material
|
||||
G4State state = kStateUndefined, //solid,gas
|
||||
G4double temp = NTP_Temperature, //temperature
|
||||
G4double pressure = CLHEP::STP_Pressure); //pressure
|
||||
|
||||
public:
|
||||
virtual ~G4ExtendedMaterial() {};
|
||||
|
||||
private:
|
||||
G4MaterialExtensionMap fExtensionMap;
|
||||
public: // with description
|
||||
//
|
||||
// register G4VMaterialExtension
|
||||
// This class owns extensions. Register with:
|
||||
// RegisterExtension(std::unique_ptr<MyExtension>(new MyExtension("name")));
|
||||
// or:
|
||||
// RegisteerExtension(std::make_unique<MyExtension>("name"));
|
||||
void RegisterExtension(std::unique_ptr<G4VMaterialExtension> extension);
|
||||
//
|
||||
// retrieve G4VMaterialExtension, null pointer is returned if model is not available
|
||||
G4VMaterialExtension* RetrieveExtension(const G4String& name);
|
||||
|
||||
inline G4int GetNumberOfExtensions() const
|
||||
{ return fExtensionMap.size(); }
|
||||
|
||||
// Retrieve iterators, proxyes to c++ methods. These are const for read-only
|
||||
// access. Use Register/RetreiveExtension to modify map
|
||||
G4MaterialExtensionMap::const_iterator begin() const { return fExtensionMap.begin(); }
|
||||
G4MaterialExtensionMap::const_iterator cbegin() const { return fExtensionMap.cbegin(); }
|
||||
G4MaterialExtensionMap::const_iterator end() const { return fExtensionMap.end(); }
|
||||
G4MaterialExtensionMap::const_iterator cend() const { return fExtensionMap.cend(); }
|
||||
|
||||
public:
|
||||
virtual G4bool IsExtended() const;
|
||||
void Print(std::ostream& flux) const;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Material.hh 96794 2016-05-09 10:09:30Z gcosmo $
|
||||
// $Id: G4Material.hh 100406 2016-10-21 08:18:05Z gcosmo $
|
||||
//
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -278,6 +278,9 @@ public: // with description
|
||||
|
||||
inline void SetName (const G4String& name) {fName=name;}
|
||||
|
||||
public:
|
||||
virtual G4bool IsExtended() const;
|
||||
|
||||
private:
|
||||
|
||||
// operators
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MaterialPropertiesTable.hh 96794 2016-05-09 10:09:30Z gcosmo $
|
||||
// $Id: G4MaterialPropertiesTable.hh 99765 2016-10-05 08:49:47Z gcosmo $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -97,10 +97,10 @@ class G4MaterialPropertiesTable
|
||||
inline void RemoveProperty(const char *key);
|
||||
// Remove a property from the table.
|
||||
|
||||
G4double GetConstProperty(const char *key);
|
||||
G4double GetConstProperty(const char *key) const;
|
||||
// Get the constant property from the table corresponding to the key-name
|
||||
|
||||
G4bool ConstPropertyExists(const char *key);
|
||||
G4bool ConstPropertyExists(const char *key) const;
|
||||
// Return true if a const property 'key' exists.
|
||||
|
||||
G4MaterialPropertyVector* GetProperty(const char *key);
|
||||
@@ -128,11 +128,11 @@ class G4MaterialPropertiesTable
|
||||
|
||||
std::map<G4String, G4MaterialPropertyVector*, std::less<G4String> > MPT;
|
||||
typedef std::map< G4String, G4MaterialPropertyVector*,
|
||||
std::less<G4String> >::iterator MPTiterator;
|
||||
std::less<G4String> >::const_iterator MPTiterator;
|
||||
|
||||
std::map< G4String, G4double, std::less<G4String> > MPTC;
|
||||
typedef std::map< G4String, G4double,
|
||||
std::less<G4String> >::iterator MPTCiterator;
|
||||
std::less<G4String> >::const_iterator MPTCiterator;
|
||||
};
|
||||
|
||||
/////////////////////
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MaterialPropertiesTable.icc 96794 2016-05-09 10:09:30Z gcosmo $
|
||||
// $Id: G4MaterialPropertiesTable.icc 99765 2016-10-05 08:49:47Z gcosmo $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -87,4 +87,3 @@ void G4MaterialPropertiesTable::RemoveProperty(const char *key)
|
||||
{
|
||||
MPT.erase(G4String(key));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VMaterialExtension.hh 96776 2016-05-06 14:11:00Z vnivanch $
|
||||
//
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4VMaterialExtension
|
||||
//
|
||||
// Description: Contains extended material properties
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Is used to define the additional material information. This class
|
||||
// is an abstract base class to be extended for each extension.
|
||||
// Object(s) of G4VMaterialExtension should be registered to
|
||||
// G4ExtendedMaterial.
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4VMATERIALEXTENSION_HH
|
||||
#define G4VMATERIALEXTENSION_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include "G4String.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//Hash of extension material name
|
||||
using G4MaterialExtensionHash=std::hash<std::string>;
|
||||
|
||||
class G4VMaterialExtension
|
||||
{
|
||||
public: // with description
|
||||
//
|
||||
// Base class constructor
|
||||
//
|
||||
G4VMaterialExtension(const G4String& name) :
|
||||
fName(name),fHash(G4MaterialExtensionHash{}(name)) {}
|
||||
virtual ~G4VMaterialExtension() {;}
|
||||
|
||||
virtual void Print() const = 0;
|
||||
|
||||
// Return the hash value of this extension
|
||||
const std::size_t& GetHash() const { return fHash;}
|
||||
// Return the extension name
|
||||
const G4String& GetName() const { return fName; }
|
||||
protected:
|
||||
// Name of the extension
|
||||
const G4String& fName;
|
||||
// Hash value of the name.
|
||||
// Calculated at initialization time
|
||||
const std::size_t fHash;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user