68 G4cout <<
"XUnitCell::GetBase(G4int) Base "
69 << i <<
" does not exist" << std::endl;
93 G4cout <<
"XUnitCell::SetBase Base(G4int,G4XLogicalBase) "
94 << i <<
" does not exist" << std::endl;
103 fBase[fNumberOfBases-1] =
base;
110 return ( fSize.
x()*fSize.
y()*fSize.
z() );
113 return (fSize.
x()*fSize.
y()*fSize.
z()*std::cos(fAngle.
x())*std::sin(fAngle.
z()));
121 for(
G4int i=0;i< fNumberOfBases;i++){
126 return vAtomVolumeDensity;
132 return std::pow(h/fSize.
x(),2.) + std::pow(k/fSize.
y(),2.) + std::pow(l/fSize.
z(),2.);
138 return std::pow(h*fSize.
x(),2.) + std::pow(k*fSize.
y(),2.) + std::pow(l*fSize.
z(),2.);
144 G4double vReciprocalVectorSquared = 0.0;
153 vTemp[0] = fSize.
y() * fSize.
z() * std::sin(fAngle.
y());
154 vTemp[0] = std::pow(vTemp[0] * h,2.) / vVolume;
156 vTemp[1] = fSize.
x() * fSize.
z() * std::sin(fAngle.
x());
157 vTemp[1] = std::pow(vTemp[1] * k,2.) / vVolume;
159 vTemp[2] = fSize.
x() * fSize.
y() * std::sin(fAngle.
z());
160 vTemp[2] = std::pow(vTemp[2] * l,2.) / vVolume;
162 vTemp[3] = fSize.
x() * fSize.
y() * std::pow(fSize.
z(),2.) *
163 (std::cos(fAngle.
x()) * std::cos(fAngle.
y()) - std::cos(fAngle.
z()));
164 vTemp[3] *= (2. * h * k);
166 vTemp[4] = fSize.
x() * std::pow(fSize.
y(),2.) * fSize.
z() *
167 (std::cos(fAngle.
z()) * std::cos(fAngle.
x()) - std::cos(fAngle.
y()));
168 vTemp[4] *= (2. * l * h);
170 vTemp[5] = std::pow(fSize.
x(),2.) * fSize.
y() * fSize.
z() *
171 (std::cos(fAngle.
y()) * std::cos(fAngle.
z()) - std::cos(fAngle.
x()));
172 vTemp[5] *= (2. * k * l);
174 vReciprocalVectorSquared = (vTemp[0]+vTemp[1]+vTemp[2]) / vVolume;
175 vReciprocalVectorSquared += (vTemp[3]+vTemp[4]+vTemp[5]);
176 vReciprocalVectorSquared /= vVolume;
180 return vReciprocalVectorSquared;
196 double vDirectVectorSquared = 0.0;
198 vDirectVectorSquared += 2. * h * k * fSize.
y() *
199 fSize.
z() * std::cos(fAngle.
y()) ;
200 vDirectVectorSquared += 2. * l * h * fSize.
x() *
201 fSize.
z() * std::cos(fAngle.
x()) ;
202 vDirectVectorSquared += 2. * l * l * fSize.
x() *
203 fSize.
y() * std::cos(fAngle.
z()) ;
204 return vDirectVectorSquared;
241 if(fSize.
x() == fSize.
y())
242 if(fSize.
y() == fSize.
z())
G4int GetLatticeNumberOfAtoms()
G4double ComputeDirectVectorSquared(G4int, G4int, G4int)
CLHEP::Hep3Vector G4ThreeVector
void SetSize(G4ThreeVector)
G4double ComputeMillerPerSizeSquared(G4int, G4int, G4int)
const XML_Char int const XML_Char int const XML_Char * base
G4double ComputeReciprocalVectorSquared(G4int, G4int, G4int)
G4double ComputeMillerOverSizeSquared(G4int, G4int, G4int)
XLogicalAtomicLattice * GetLattice()
G4GLOB_DLL std::ostream G4cout
void AddBase(XLogicalBase *)
G4double ComputeAtomVolumeDensity()
static constexpr double radian
G4double ComputeDirectPeriod(G4int, G4int, G4int)
XLogicalBase * GetBase(G4int)
void SetBase(G4int, XLogicalBase *)
G4double ComputeDirectPeriodSquared(G4int, G4int, G4int)
Definition of the XUnitCell class.
void SetAngle(G4ThreeVector)
static constexpr double pi
G4double ComputeReciprocalVector(G4int, G4int, G4int)
G4double ComputeDirectVector(G4int, G4int, G4int)
static constexpr double angstrom