00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00029
00030
00031
00032
00033
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 #ifndef G4AdjointCrossSurfChecker_h
00054 #define G4AdjointCrossSurfChecker_h 1
00055
00056 #include "globals.hh"
00057 #include "G4ThreeVector.hh"
00058 #include <vector>
00059
00060 class G4Step;
00061
00062
00063 class G4AdjointCrossSurfChecker
00064 {
00065 public:
00066
00067 static G4AdjointCrossSurfChecker* GetInstance();
00068
00069 public:
00070
00071 G4bool CrossingASphere(const G4Step* aStep,G4double sphere_radius, G4ThreeVector sphere_center,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
00072 G4bool GoingInOrOutOfaVolume(const G4Step* aStep,const G4String& volume_name, G4double& cos_to_surface, G4bool& GoingIn);
00073 G4bool GoingInOrOutOfaVolumeByExtSurface(const G4Step* aStep,const G4String& volume_name,const G4String& mother_log_vol_name, G4double& cos_to_surface, G4bool& GoingIn);
00074
00075 G4bool CrossingAGivenRegisteredSurface(const G4Step* aStep,const G4String& surface_name,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
00076 G4bool CrossingAGivenRegisteredSurface(const G4Step* aStep, int ind,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
00077 G4bool CrossingOneOfTheRegisteredSurface(const G4Step* aStep,G4String& surface_name,G4ThreeVector& crossing_pos,G4double& cos_to_surface, G4bool& GoingIn);
00078 G4bool CrossingAnInterfaceBetweenTwoVolumes(const G4Step* aStep,const G4String& vol1_name,const G4String& vol2_name,G4ThreeVector& crossing_pos, G4double& cos_to_surface, G4bool& GoingIn);
00079
00080 G4bool AddaSphericalSurface(const G4String& SurfaceName, G4double radius, G4ThreeVector pos,G4double& area);
00081 G4bool AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume(const G4String& SurfaceName, G4double radius, const G4String& volume_name, G4ThreeVector& center, G4double& area);
00082 G4bool AddanExtSurfaceOfAvolume(const G4String& SurfaceName,const G4String& volume_name,G4double& area);
00083 G4bool AddanInterfaceBetweenTwoVolumes(const G4String& SurfaceName, const G4String& volume_name1, const G4String& volume_name2,G4double& area);
00084 void ClearListOfSelectedSurface();
00085
00086 private:
00087
00088 G4AdjointCrossSurfChecker();
00089 ~G4AdjointCrossSurfChecker();
00090
00091 G4int FindRegisteredSurface(const G4String& name);
00092
00093 private:
00094 static G4AdjointCrossSurfChecker* instance;
00095
00096 std::vector<G4String> ListOfSurfaceName;
00097 std::vector<G4String> ListOfSurfaceType;
00098 std::vector<G4double> ListOfSphereRadius;
00099 std::vector<G4ThreeVector> ListOfSphereCenter;
00100 std::vector<G4String> ListOfVol1Name;
00101 std::vector<G4String> ListOfVol2Name;
00102 std::vector<G4double> AreaOfSurface;
00103
00104 };
00105
00106 #endif
00107