66 : theSolid(0), thePhysicalVolume(0),
67 UseSphere(
true), ModelOfSurfaceSource(
"OnSolid"),
68 AreaOfExtSurfaceOfThePhysicalVolume(0.), CosThDirComparedToNormal(0.)
79 for (
unsigned int i=0; i< thePhysVolStore->size();i++){
80 G4String vol_name =(*thePhysVolStore)[i]->GetName();
82 vol_name = (*thePhysVolStore)[i]->GetLogicalVolume()->GetName();
84 if (vol_name == aName){
95 G4cout<<
"The physical volume with name "<<aName<<
" does not exist!!"<<std::endl;
96 G4cout<<
"Before generating a source on an external surface of a volume you should select another physical volume"<<std::endl;
178 if ( Nstat <= 0 )
return 0.;
189 area=area*double(i)/double(j);
196 if ( Nstat <= 0 )
return 0.;
207 area=area*double(i)/double(j);
221 p+= 0.999999*direction*dist_to_in;
248 G4double r=scale*std::sqrt(dX*dX+dY*dY+dZ*dZ);
254 direction=-direction;
256 theta = std::acos(cos_th);
263 return 4.*3.1415926*r*
r;;
298 G4double area=XY_prob+YZ_prob+ZX_prob;
305 G4double sth = std::sqrt(1.-cos_th2);
311 if (ran_var <=XY_prob){
322 ranX=(ran_var1-0.5)*2.;
325 px=minX+(maxX-minX)*ranX;
326 py=minY+(maxY-
minY)*ranY;
328 else if (ran_var <=(XY_prob+YZ_prob)){
329 G4double ran_var1=(ran_var-XY_prob)/YZ_prob;
339 ranY=(ran_var1-0.5)*2.;
342 py=minY+(maxY-
minY)*ranY;
343 pz=minZ+(maxZ-minZ)*ranZ;
347 G4double ran_var1=(ran_var-XY_prob-YZ_prob)/ZX_prob;
357 ranZ=(ran_var1-0.5)*2.;
360 px=minX+(maxX-minX)*ranX;
361 pz=minZ+(maxZ-minZ)*ranZ;
372 G4cout<<
"Before generating a source on an external surface of volume you should select a physical volume"<<std::endl;
398 for (
unsigned int i=0; i< thePhysVolStore->size();i++){
399 if ((*thePhysVolStore)[i]->GetLogicalVolume() == mother){
400 daughter = (*thePhysVolStore)[i];