From solidwiki
Revision as of 20:55, 3 December 2020 by Saw (Talk | contribs) (Created 01/20/11(Zwzhao), Last modified 05/21/13(Zwzhao))

Jump to: navigation, search


All scripts are at svn "solid_gemc/database_io/geometry/"

as an example, run command "./go_table solid_BaBar_solenoid user_geometry", this will update the table "solid_BaBar_solenoid" in database "user_geometry"

The script deletes the table first and create a new one with the content from "solid_BaBar_solenoid.txt" which is created by "". The database command is recorded in "solid_BaBar_solenoid.log"

SoLID geometry

  • For SoLID parts which are not detectors, they are not sensitive as defined in the perl scripts, for example, "", "SoLID_*" etc.
  • Many SolID parts are defined with material "Kryptonite" to kill any particles hitting on it. their file name is like "Solid_*"
  • SoLID detectors have been defined with sensitivity by FLUX bank which record every single hits. they are below
refer to Solid hitprocess#FLUX_bank_and_SoLID_detector_ID for the detector ID definition in FLUX bank.
  • More sophisticated hit processing bank should be defined by each detector group with more realistic detector ID and geometry script needs to be written with the special banks. Which files or banks to use at runtime should depend on the purpose of study.
for example



  1. For any part of detector as a table, just write its perl script and run the same go_table script with it.
  2. Each database table represents a detector component named as solid_xx_xx. for exmpale, includes SIDIS target with BaBar magnet.
  3. The mother volume of all is called "root" which is a big box built in GEMC code.
  4. The coordinate system used: center of solenoid coil is at origin. Beam along Z, Up is Y, X is horizon, XYZ right hand system.


  • volume overlap will cause gemc to crash after beam on. You can check it with
   GEMC Option CHECK_OVERLAPS: Checks Overlapping Volumes:
     1.  Check Overlaps at Construction Time
     2.  Check Overlaps based on standard lines grid setup
     3.  Check Overlaps by shooting lines according to a cylindrical pattern

please note the option to check overlap only work in batch mode, NOT in graphic mode. This means it need to run with option "USE_QT=0"

if you want a "envelope volume" to enclose some geometry (eg. a EC volume with vacuum to enclose all parts of calorimeter), you can do that. then you can set those envelope volumes' mother volume as "root". One catch here is that those envelope volume overlap won't cause crash if they are not sensitive. However gemc tracking will totally messed up if they overlap. Basically, gemc can't take any volume overlap and this is also true for geant4. So please try to avoid overlap in design.

  • geant4 volume boolean operation in gemc
1. On the "type" you can put: "operation:  volumeA - VolumeB"
2. Define the volume A and B's material as "Component", so that these volumes won't be built
3. See examples in the clas12/geo/htcc 
  • geant4 volume copy in gemc
1. On the "type" you can put: "CopyOf volumeA", then both "dimension" and "material" as ""
2. See examples in the clas12/geo/sector and solid/geometry/
  • color code


it's NOT sensitive

 $detector{"sensitivity"} = "no";
 $detector{"hit_type"}    = "";
 $detector{"identifiers"} = "";

it's sensitive

 $detector{"sensitivity"} = "EC";   //this has to match name in output banks
 $detector{"hit_type"}    = "EC";   //this has to match name in output banks
 $detector{"identifiers"} = "sector ncopy 0 stack manual $stack view manual $view strip manual 36"; 
 //the format defined in hit bank, refer to Solid hitprocess. "manual" mean a number explicit here, "ncopy 0" means number will be filled at run time.


  • All Geant4 material name can be used directly
  • empty materiel "" field can be filled with run time option
 > Option DEFAULT_MATERIAL: Default material for missing material field
  • the hall "root" material can be set as run time
 > Option HALL_MATERIAL: Composition of the Experimental Hall. 
           Air normal simulation
           Air_Opt Simulation with Optical Physics (default)
  • total absorber, "Kryptonite". Anything passing through will be killed.

(It ends the track in stepaction, but because the physics comes in before stepaction. so it could still in principal have secondary which are very close the primary particles. use mother pid "mpid" in FLUX or raw banks to veto them. Kryptonite is realized in code as a very very low density material, so now the secondary is almost impossible. Another thing to note is the hit in a detector made of "Kryptonite" can be at the detector front or back on track path)


  1. Geant4 Detector Definition and Response
  2. Geant4 Material Database
  3. Doxygen doc of GEMC source code, especially class and