User Tools

Site Tools


software:geometry

Geometry

The geometry files (which are root files) can be found in primasoft/geant4/geometry. The geometry you want to use in your simulation can be set in the primaf4sim.conf file.

Compiling and creating a root geometry file

In order to create the root geometry files, go to the according directory and do:

cd primasoft/geant4/geometry
cmake .
make

Now your output should be something like this:

[ 45%] Built target PrimaGeom
[ 63%] Built target test_proto16
[ 81%] Built target build_tchamber
[100%] Built target build_proto16

Here, the executables are listed. By executing for example:

./build_tchamber 

the file targetChamber.root is created, which can be used in the simulation.

How to include a new part

  1. Check for the material you want to use in PRIMAMaterials.h and PRIMAMaterials.cc. If the material does not exist, add it
  2. Make a new .h and .cc file according to PRIMAProto16Constructor, where the geometry of your object is defined
  3. Create a new build.cxx, where your new TGeoVolumeAssembly is included
  4. Modify your CmakeLists.txt
  5. Make and execute your new executable → a new .root file is created
    1. Use cmake –build. and ./“your executable here”

Useful links:

Have a look at the geometry

To check, weather your geometry is correct, have look at it. Open the root file and the TBrowser:

primasoft/geant4/geometry$ root -l targetChamber.root 
root [1] TBrowser b

Now open the folders until you can see the different Volume folders.
With a right-click on for example Master Volume you can select Draw and a new window will be opened. Enter “ogl” as option and press “OK”. Now your geometry is displayed by the GL viewer.

Scene interaction with GL viewer:
  • Left mouse button: ROTATE (ORBIT) the scene by holding the mouse button and moving the mouse
  • w: wireframe mode
  • e: switch between dark/light color-set
  • r: filled polygons mode
  • t: outline mode

More interaction modes are explained in the help menu.

software/geometry.txt · Last modified: 2022/01/14 18:44 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki