67 vInterplanarDistance ,
79 if((vPosition.x() >= 0.) &&
80 (vPosition.x() < vInterplanarPeriod)){
84 G4double vPositionX = vPosition.x() -
85 std::fmod(vPosition.x(),vInterplanarPeriod) * vInterplanarPeriod;
100 G4double vPositionX = vPosition.x();
102 if((vPositionX >= 0.) &&
103 (vPositionX < vInterplanarPeriod)){
106 else if(vPositionX == vInterplanarPeriod){
110 vPositionX -= std::fmod(vPosition.x(),vInterplanarPeriod)
111 * vInterplanarPeriod;
119 unsigned int vPrecision = 1024;
127 for(
unsigned int i=0;i<vPrecision;i++){
129 > vMaximum) {vMaximum = vValue;}
137 unsigned int vPrecision = 1024;
145 for(
unsigned int i=0;i<vPrecision;i++){
147 < vMinimum) {vMinimum = vValue;}
157 std::ofstream vFileOut;
158 vFileOut.open(filename);
159 vFileOut <<
"pos val" << std::endl;
166 vXposition = double(i) / double(imax) * vInterplanarPeriod;
169 vFileOut << std::endl;
179 std::ifstream vFileIn;
180 vFileIn.open(filename);
181 std::string vTempString;
182 vFileIn >> vTempString >> vTempString;
186 std::vector<double> vTempXvector;
187 std::vector<double> vTempValvector;
189 while(!vFileIn.eof()){
192 vTempXvector.push_back(vTempX);
193 vTempValvector.push_back(vTempVal);
199 G4double vInterplanarPeriod = vTempXvector.at(imax-1);
202 vInterplanarPeriod*(imax-1)/imax,
213 std::ifstream vFileIn;
214 vFileIn.open(filename);
225 std::cout << imax <<
" " << xmax << std::endl;
251 vInterplanarPeriod*(imax-1)/imax,
254 vXposition = double(i) / double(imax) * vInterplanarPeriod;
virtual G4double ComputeECForSinglePlane(G4double, XPhysicalLattice *)=0
CLHEP::Hep3Vector G4ThreeVector
virtual void ReadFromFile(const G4String &, XPhysicalLattice *, G4double=1)
XPhysicalLattice * GetXPhysicalLattice(G4VPhysicalVolume *)
void SetNumberOfPlanes(G4int)
virtual G4double ComputeMaximum(XPhysicalLattice *)
static const double meter
XPhysicalLattice * fPhysicalLattice
G4ThreeVector ComputeECFromVector(G4ThreeVector)
void PutValue(size_t index, G4double theValue)
G4double Value(G4double theEnergy, size_t &lastidx) const
G4ThreeVector ComputePositionInUnitCell(G4ThreeVector, XPhysicalLattice *)
virtual void PrintOnFile(const G4String &, XPhysicalLattice *, G4double)
G4ThreeVector ComputeEC(G4ThreeVector, XPhysicalLattice *)
G4ThreeVector GetEC(G4ThreeVector, XPhysicalLattice *)
virtual G4double ComputeMinimum(XPhysicalLattice *)
~XVCrystalPlanarAnalytical()
G4PhysicsVector * fVectorEC
virtual void ReadFromECHARM(const G4String &, G4double=1)
XVCrystalPlanarAnalytical()
G4int GetNumberOfPlanes()
G4double ComputeInterplanarPeriod()
G4VPhysicalVolume * GetVolume()
static const double angstrom