45 theSpaceGroup(spacegroup),
59 cosa=std::cos(alpha),
cosb=std::cos(beta),
cosg=std::cos(gamma);
60 sina=std::sin(alpha),
sinb=std::sin(beta),
sing=std::sin(gamma);
151 if( aGroup >= 1 && aGroup <= 2 ) {
return Triclinic;}
152 else if(aGroup >= 3 && aGroup <= 15 ) {
return Monoclinic;}
153 else if(aGroup >= 16 && aGroup <= 74 ) {
return Orthorhombic;}
154 else if(aGroup >= 75 && aGroup <= 142) {
return Tetragonal;}
155 else if(aGroup == 146 || aGroup == 148 ||
156 aGroup == 155 || aGroup == 160 ||
157 aGroup == 161 || aGroup == 166 ||
159 else if(aGroup >= 143 && aGroup <= 167) {
return Hexagonal;}
160 else if(aGroup >= 168 && aGroup <= 194) {
return Hexagonal;}
161 else if(aGroup >= 195 && aGroup <= 230) {
return Cubic;}
210 vecout.push_back(aaa);
219 for(
auto &vec:vecout){
265 Cij[3][3] = 0.5*(Cij[0][0]-Cij[0][1]);
272 G4double C11=Cij[0][0], C12=Cij[0][1], C44=Cij[3][3];
274 for (
size_t i=0; i<6; i++) {
275 for (
size_t j=i; j<6; j++) {
276 if (i<3 && j<3) Cij[i][j] = (i==j) ? C11 : C12;
277 else if (i==j && i>=3) Cij[i][i] = C44;
284 return (C11!=0. && C12!=0. && C44!=0.);
290 G4double C11=Cij[0][0], C12=Cij[0][1], C13=Cij[0][2], C16=Cij[0][5];
291 G4double C33=Cij[2][2], C44=Cij[3][3], C66=Cij[5][5];
301 return (C11!=0. && C12!=0. && C13!=0. && C33!=0. && C44!=0. && C66!=0.);
311 for (
size_t i=0; i<6; i++) {
312 for (
size_t j=i+1; j<3; j++)
313 good &= (Cij[i][j] != 0);
322 G4double C11=Cij[0][0], C12=Cij[0][1], C13=Cij[0][2], C14=Cij[0][3];
323 G4double C15=Cij[0][4], C33=Cij[2][2], C44=Cij[3][3], C66=0.5*(C11-C12);
334 return (C11!=0 && C12!=0 && C13!=0 && C14!=0. &&
335 C33!=0. && C44!=0. && C66!=0.);
345 Cij[2][5] != 0. && Cij[3][4]!=0.);
356 for (
size_t i=0; i<6; i++) {
357 for (
size_t j=i; j<6; j++) good &= (Cij[i][j] != 0);
368 Cij[4][5] = 0.5*(Cij[0][0] - Cij[0][1]);
376 for (
size_t i=1; i<6; i++) {
377 for (
size_t j=i+1; j<6; j++) {
378 Cij[j][i] = Cij[i][j];
413 return std::sqrt(3.0)/2.*a*a*c;
458 return a2 / ( h2+k2+l2 );
461 return 1.0 / ( (h2 + k2)/a2 + l2/c2 );
464 return 1.0 / ( h2/a2 + k2/b2 + l2/
c2 );
468 T = h2+k2+l2+2.*(h*k+k*l+h*l) * ((cos2a-cosa)/sin2a);
469 R = sin2a / (1. - 3*cos2a + 2.*cos2a*
cosa);
474 return 1./(1./sin2b * (h2/a2+l2/c2-2*h*l*
cosb/(a*c)) + k2/b2);
480 return 1. / ( (4.*(h2+k2+h*k) / (3.*a2)) + l2/c2 );
521 return a2 * (h2+k2+l2);
524 return (h2+k2)*a2 + l2*
c2 ;
527 return h2*a2 + k2+b2 + h2*
c2;
530 return (h2+k2+l2+2.*(h*k+k*l+h*l) *
cosar)*a2;
533 return h2*a2+k2*b2+l2*c2+2.*h*l*a*c*
cosbr;
536 return h2*a2+k2*b2+l2*c2+2.*k*l*b*c*
cosar+2.*l*h*c*a*cosbr+2.*h*k*a*b*
cosgr;
539 return (h2+k2+h*k)*a2 + l2*
c2;
581 return (h1*h2 + k1*k2 + l1+l2) / (std::sqrt(h1*h1 + k1*k1 + l1*l1) * std::sqrt(h2*h2 + k2*k2 + l2*l2));
589 return dsp1dsp2 * (h1*h2*a2 + k1*k2*a2 + l1*l2*
c2);
593 return dsp1dsp2 * (h1*h2*a2 + k1*k2*b2 + l1*l2*c2+
594 (k1*l2+k2*l1)*b*c*
cosar+
595 (h1*l2+h2*l1)*a*c*
cosbr+
596 (h1*k2+h2*k1)*a*b*
cosgr);
600 return dsp1dsp2 * (h1*h2*a2 + k1*k2*b2 + l1*l2*c2+
601 (k1*l2+k2*l1)*b*c*
cosar+
602 (h1*l2+h2*l1)*a*c*
cosbr+
603 (h1*k2+h2*k1)*a*b*cosgr);
607 return dsp1dsp2 * (h1*h2*a2 + k1*k2*b2 + l1*l2*c2+
608 (k1*l2+k2*l1)*b*c*
cosar+
609 (h1*l2+h2*l1)*a*c*
cosbr+
610 (h1*k2+h2*k1)*a*b*cosgr);
614 return dsp1dsp2 *( (h1*h2 + k1*k2 + 0.5*(h1*k2+k1*
h2))*a2 + l1*l2*
c2);
G4ThreeVector theBasis[3]
G4bool ReflectElReduced(G4double Cij[6][6]) const
CLHEP::Hep3Vector G4ThreeVector
G4double GetIntSp2(G4int h, G4int k, G4int l)
std::vector< ExP01TrackerHit * > a
static const G4double pos
G4ThreeVector theUnitBasis[3]
G4bool FillAtomicPos(G4ThreeVector &pos, std::vector< G4ThreeVector > &vecout)
G4bool FillRhombohedral(G4double Cij[6][6]) const
G4double GetIntCosAng(G4int h1, G4int k1, G4int l1, G4int h2, G4int k2, G4int l2)
Hep3Vector & rotateX(double)
theLatticeSystemType GetLatticeSystem()
virtual ~G4CrystalUnitCell()
G4ThreeVector theRecBasis[3]
G4bool FillHexagonal(G4double Cij[6][6]) const
G4bool FillMonoclinic(G4double Cij[6][6]) const
G4ThreeVector theRecUnitBasis[3]
const G4ThreeVector & GetUnitBasis(G4int idx) const
static const G4double alpha
const G4ThreeVector & GetRecUnitBasis(G4int idx) const
G4bool FillCubic(G4double Cij[6][6]) const
const G4ThreeVector & GetRecBasis(G4int idx) const
G4bool FillTriclinic(G4double Cij[6][6]) const
Hep3Vector & rotateZ(double)
G4CrystalUnitCell(G4double sizeA, G4double sizeB, G4double sizeC, G4double alpha, G4double beta, G4double gamma, G4int spacegroup)
G4ThreeVector theRecAngle
G4bool FillElReduced(G4double Cij[6][6])
DLL_API const Hep3Vector HepXHat
const G4ThreeVector & GetBasis(G4int idx) const
DLL_API const Hep3Vector HepYHat
DLL_API const Hep3Vector HepZHat
static constexpr double deg
G4bool FillOrthorhombic(G4double Cij[6][6]) const
G4double GetRecIntSp2(G4int h, G4int k, G4int l)
G4bool FillTetragonal(G4double Cij[6][6]) const
static constexpr double halfpi
G4bool FillAmorphous(G4double Cij[6][6]) const
G4double ComputeCellVolume()
G4ThreeVector GetUnitBasisTrigonal()
G4bool FillAtomicUnitPos(G4ThreeVector &pos, std::vector< G4ThreeVector > &vecout)