Skip to content

Latest commit

 

History

History
32 lines (16 loc) · 1.87 KB

README.md

File metadata and controls

32 lines (16 loc) · 1.87 KB

Geant4-Halfspace-solid

A new solid type for Geant4 which is based on semi-algebraic half-spaces.

  • News: Documentation and update version of McCad are now available: https://github.com/inr-kit/McCad-Salome-Binaries . You are highly recommend to go throught first the GDML tutorial in Section 4.3 of the McCad user guide. If you have problem in decomposing the solids, find help from Section 4.4 and also by sending us email.

Following these guides in installing the file for Geant4.

  1. Choosing the file suitable for your Geant4 version. Please noted that the version of Geant4 should match exactly.

    link for Geant4.10.02: https://distfiles.macports.org/geant4/geant4.10.02.tar.gz

    link for Geant4.10.02.p02: http://cern.ch/geant4-data/releases/patch_geant4.10.02.p02.tar.gz

  2. Place the "Halfspace" folder in your ${Geant4_SrcDir}/source/geometry/solids. Then

   Add "add_subdirectory(HalfSpace)" as a new line in the ${Geant4_SrcDir}/source/geometry/solids/CmakeLists.txt

Add “solids/HalfSpace/sources.cmake”  as a new line below the list of “source.cmake”  in ${Geant4_SrcDir}/source/geometry/CmakeLists.txt, 
  1. Add the following line to the file “${Geant4_SrcDir}/source/geometry/solids/Boolean/G4BooleanSolid.hh”, paste it under any “public:” keyword. (I know this step is weird but I will improve it later)

    inline void SetPolyhedron(G4Polyhedron* aPolyhedron) {fpPolyhedron = aPolyhedron;};

  2. Replace the "gdml" folder in ${Geant4_SrcDir}/source/persistency with the one provided.

  3. Recompile Geant4.

After these steps, you can import the GDML file generated by McCad in the same way as you import other GDML files. Watch this Youtube video for tutorial: https://www.youtube.com/watch?v=X4J4ataBrC8 .

For any questions, please contact Yuefeng Qiu ([email protected]) or Ulrich Fischer ([email protected]) for assistance.