77   if (r1<=sphere_radius && r2>sphere_radius){
 
   81   else if (r2<=sphere_radius && r1>sphere_radius){
 
   94         c = r12-sphere_radius*sphere_radius;
 
   95         d=std::sqrt(b*b-4.*a*c);
 
   97         if (l > 1.) l=(-b-d)/2./a;
 
   98         crossing_pos=pos1+l*dr;
 
   99         cos_th = std::abs(dr.cosTheta(crossing_pos));
 
  111   if (step_at_boundary){
 
  114         if (preStepTouchable && postStepTouchable && postStepTouchable->
GetVolume() && preStepTouchable->
GetVolume()){
 
  118                 if (post_vol_name == volume_name ){
 
  122                 else if (pre_vol_name == volume_name){
 
  139   if (step_at_boundary){
 
  142         if (preStepTouchable && postStepTouchable && postStepTouchable->
GetVolume() && preStepTouchable->
GetVolume()){
 
  147                 if (post_vol_name == volume_name && pre_log_vol_name ==  mother_logical_vol_name){
 
  151                 else if (pre_vol_name == volume_name && post_log_vol_name ==  mother_logical_vol_name ){
 
  184    if (surf_type == 
"Sphere"){
 
  185         did_cross = 
CrossingASphere(aStep, radius, center,crossing_pos, cos_to_surface, GoingIn);
 
  187    else if (surf_type == 
"ExternalSurfaceOfAVolume"){
 
  193    else if (surf_type == 
"BoundaryBetweenTwoVolumes"){
 
  219   if (step_at_boundary){
 
  222         if (preStepTouchable && postStepTouchable){
 
  230                 if ( pre_vol_name == vol1_name && post_vol_name == vol2_name){
 
  234                 else if (pre_vol_name == vol2_name && post_vol_name == vol1_name){
 
  250   Area= 4.*
pi*radius*radius;
 
  277   for ( 
unsigned int i=0; i< thePhysVolStore->size();i++){
 
  278         if ((*thePhysVolStore)[i]->GetName() == volume_name){
 
  279                 thePhysicalVolume = (*thePhysVolStore)[i];
 
  283   if (thePhysicalVolume){
 
  288                 theTransformationFromPhysVolToWorld *=
 
  294                 for ( 
unsigned int i=0; i< thePhysVolStore->size();i++){
 
  295                         if ((*thePhysVolStore)[i]->GetLogicalVolume() == mother){
 
  296                                 daughter = (*thePhysVolStore)[i];
 
  304         G4cout<<
"Center of the spherical surface is at the position: "<<center/
cm<<
" cm"<<std::endl;
 
  308         G4cout<<
"The physical volume with name "<<volume_name<<
" does not exist!!"<<std::endl;
 
  322   for ( 
unsigned int i=0; i< thePhysVolStore->size();i++){
 
  323         if ((*thePhysVolStore)[i]->GetName() == volume_name){
 
  324                 thePhysicalVolume = (*thePhysVolStore)[i];
 
  328   if (!thePhysicalVolume){
 
  329         G4cout<<
"The physical volume with name "<<volume_name<<
" does not exist!!"<<std::endl;
 
  336   if (theMother) mother_vol_name= theMother->
GetName();
 
G4bool AddaSphericalSurface(const G4String &SurfaceName, G4double radius, G4ThreeVector pos, G4double &area)
 
std::vector< G4String > ListOfSurfaceName
 
G4bool GoingInOrOutOfaVolumeByExtSurface(const G4Step *aStep, const G4String &volume_name, const G4String &mother_log_vol_name, G4double &cos_to_surface, G4bool &GoingIn)
 
CLHEP::Hep3Vector G4ThreeVector
 
std::vector< G4double > ListOfSphereRadius
 
G4StepStatus GetStepStatus() const 
 
const G4VTouchable * GetTouchable() const 
 
std::vector< G4String > ListOfSurfaceType
 
std::vector< G4String > ListOfVol2Name
 
static G4PhysicalVolumeStore * GetInstance()
 
G4bool AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume(const G4String &SurfaceName, G4double radius, const G4String &volume_name, G4ThreeVector ¢er, G4double &area)
 
G4StepPoint * GetPreStepPoint() const 
 
const G4RotationMatrix * GetFrameRotation() const 
 
std::vector< G4ThreeVector > ListOfSphereCenter
 
G4GLOB_DLL std::ostream G4cout
 
const G4String & GetName() const 
 
const G4ThreeVector & GetPosition() const 
 
G4bool CrossingASphere(const G4Step *aStep, G4double sphere_radius, G4ThreeVector sphere_center, G4ThreeVector &crossing_pos, G4double &cos_to_surface, G4bool &GoingIn)
 
std::vector< G4String > ListOfVol1Name
 
G4bool GoingInOrOutOfaVolume(const G4Step *aStep, const G4String &volume_name, G4double &cos_to_surface, G4bool &GoingIn)
 
G4LogicalVolume * GetMotherLogical() const 
 
G4int FindRegisteredSurface(const G4String &name)
 
~G4AdjointCrossSurfChecker()
 
G4bool CrossingAnInterfaceBetweenTwoVolumes(const G4Step *aStep, const G4String &vol1_name, const G4String &vol2_name, G4ThreeVector &crossing_pos, G4double &cos_to_surface, G4bool &GoingIn)
 
static G4AdjointCrossSurfChecker * GetInstance()
 
G4bool AddanExtSurfaceOfAvolume(const G4String &SurfaceName, const G4String &volume_name, G4double &area)
 
G4LogicalVolume * GetLogicalVolume() const 
 
G4bool CrossingOneOfTheRegisteredSurface(const G4Step *aStep, G4String &surface_name, G4ThreeVector &crossing_pos, G4double &cos_to_surface, G4bool &GoingIn)
 
G4AdjointCrossSurfChecker()
 
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const 
 
G4StepPoint * GetPostStepPoint() const 
 
static G4ThreadLocal G4AdjointCrossSurfChecker * instance
 
void ClearListOfSelectedSurface()
 
G4ThreeVector GetObjectTranslation() const 
 
G4bool CrossingAGivenRegisteredSurface(const G4Step *aStep, const G4String &surface_name, G4ThreeVector &crossing_pos, G4double &cos_to_surface, G4bool &GoingIn)
 
std::vector< G4double > AreaOfSurface
 
virtual G4double GetSurfaceArea()
 
static const G4double pos
 
G4VSolid * GetSolid() const 
 
G4bool AddanInterfaceBetweenTwoVolumes(const G4String &SurfaceName, const G4String &volume_name1, const G4String &volume_name2, G4double &area)