67 vInterplanarDistance ,
81 vX += ((int( - vX / vInterplanarPeriod) + 1.0 )
82 * vInterplanarPeriod);
84 else if( vX > vInterplanarPeriod ){
85 vX -= ( int( vX / 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);
232 vTempX *= vConversion;
238 G4cout <<
"XVCrystalPlanarAnalytical::ReadFromECHARM() - " <<
239 vConversion <<
" " << imax <<
" " << xmax <<
" " <<
254 vInterplanarPeriod*(imax-1)/imax,
257 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 *)
G4GLOB_DLL std::ostream G4cout
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 *)
const G4double x[NPOINTSGL]
~XVCrystalPlanarAnalytical()
G4PhysicsVector * fVectorEC
virtual void ReadFromECHARM(const G4String &, G4double=1)
XVCrystalPlanarAnalytical()
G4int GetNumberOfPlanes()
G4double ComputeInterplanarPeriod()
G4VPhysicalVolume * GetVolume()
static const double angstrom