115 for(
int i = 0, ie =
fMolecules.size(); i < ie; ++i)
124 G4Orb* pMoleculeWaterSolid =
nullptr;
125 G4VSolid* pMoleculeWaterCutSolid =
nullptr;
131 if(waterRadius > tolerence)
133 G4String nameWaterSolid = name +
"_water_solid";
134 pMoleculeWaterSolid =
new G4Orb(nameWaterSolid, waterRadius);
140 G4String nameWaterLogic = name +
"_water_logic";
145 G4String nameWaterPhys = name +
"_water";
157 fGeometryMap.insert(std::make_pair(pPhysicalVolumeWater,
163 exceptionDescription <<nameWaterPhys
164 <<
" could not be exsited";
167 exceptionDescription);
172 G4Orb* pMoleculeSolid =
nullptr;
173 G4VSolid* pMoleculeCutSolid =
nullptr;
178 pMoleculeSolid =
new G4Orb(nameSolid, radius);
185 G4String nameLogic = name +
"_logic";
190 if(waterRadius > tolerence)
193 std::string namePhys =
name;
206 fGeometryMap.insert(std::make_pair(pPhysicalVolumeMolecule,
212 exceptionDescription <<namePhys
213 <<
" could not be exsited";
216 exceptionDescription);
235 fGeometryMap.insert(std::make_pair(pPhysicalVolumeMolecule,
241 exceptionDescription <<namePhys
242 <<
" could not be exsited";
245 exceptionDescription);
263 std::ifstream
file(fileName.c_str());
268 exceptionDescription <<fileName
269 <<
"could not be opened";
272 exceptionDescription);
275 while(std::getline(
file, line) )
277 if( line.empty() )
continue;
278 std::istringstream issLine(line);
279 std::string firstItem;
280 issLine >> firstItem;
282 if(firstItem ==
"_Name")
288 if(firstItem ==
"_Size")
295 if(firstItem ==
"_Radius")
303 issLine >> waterRadius;
308 if(firstItem ==
"_pl")
319 issLine >> copyNumber;
353 name =
"Deoxyribose";
376 fpGun->AddMolecule(name,
384 exceptionDescription <<name
385 <<
" could not be exsited";
388 exceptionDescription);
399 std::vector<Molecule> &molList,
429 G4Box* solidBox =
new G4Box(
"solid_box_for_cut",
575 for(
int i=0, ie=molList.size(); i<ie; ++i)
585 else if(zTar<rTar-20*
nm)
591 if(molList[i].fRadiusWater == 0)
593 radiusTar = molList[i].fRadius;
597 radiusTar = molList[i].fRadiusWater;
602 if(distance==0 && !isOurVol)
607 else if(distance == 0 && isOurVol)
610 exceptionDescription <<
"CreateCutSolid: Two volumes "
611 <<
"are placed at the same position.";
614 exceptionDescription);
616 else if(distance <= radiusRef+radiusTar)
618 G4Box* solidBox =
new G4Box(
"solid_box_for_cut",
624 std::pow(radiusTar,2) +
625 std::pow(distance,2) )/(2*distance) +
647 rotMat->
rotate(-phi, rotAxisForPhi);
650 rotMat->
rotate(theta, rotZAxis);