Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/persistency/P03/README is written in an unsupported language. File is not indexed.

0001 
0002      =========================================================
0003      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
0004      =========================================================
0005 
0006                             Example TextGeom
0007                             ----------------
0008 
0009 This example illustrates the use of the text geometry. 
0010 
0011 1.- GEOMETRY EXAMPLES
0012 
0013 Several examples of text geometries are provided:
0014 
0015 g4geom_simple.txt :
0016 - Simple construction of materials and single placements 
0017 
0018 g4geom_matemixt.txt :
0019 - Isotopes, elements and materials
0020 
0021 g4geom_boolean.txt :
0022 - Boolean solids
0023  
0024 g4geom_reflections.txt :
0025 - Reflections
0026 
0027 g4geom_replicas.txt :
0028 - Replicas
0029 
0030 g4geom_divisions.txt :
0031 - Divisions
0032 
0033 g4geom_paramLinear.txt :
0034 - Linear parameterisations
0035 
0036 g4geom_paramSquare.txt :
0037 - Square parameterisations
0038 
0039 g4geom_assembly.txt : 
0040 - Assembly placements
0041 
0042         
0043 2.- HOW TO START ?
0044  
0045     - execute textGeom in 'batch' mode from macro file 
0046        % textGeom run.mac
0047                 
0048 It will read the geometry from a file named 'g4geom.txt', and it will create a
0049 VRML2 file to visualise the geometry.
0050 Therefore if you want to try any of the above-mentioned files, copy it to a
0051 file with this name,
0052 
0053         
0054 3.- DEFINING A SENSITIVE DETECTOR
0055 
0056 The detector construction class ExTGDetectorConstructionWithSD shows how to
0057 access a volume of the text geometry and assign to it a sensitive detector.
0058 To use it, replace at exampleTextGeom.cc the line
0059 
0060   runManager->SetUserInitialization(new ExTGDetectorConstruction);
0061 
0062 by
0063 
0064   runManager->SetUserInitialization(new ExTGDetectorConstructionWithSD);
0065 
0066 and recompile.
0067 
0068 It will use the geometry from the file 'g4geom_SD.txt'
0069 
0070 
0071 4.- MIXING TEXT AND C++ GEOMETRIES   
0072 
0073 The detector construction class ExTGDetectorConstructionWithCpp shows how to
0074 create a volume with C++ and place it in the world or inside a volume defined
0075 in the text geometry.
0076 To use it, replace at exampleTextGeom.cc the line
0077 
0078   runManager->SetUserInitialization(new ExTGDetectorConstruction);
0079 
0080 by
0081 
0082   runManager->SetUserInitialization(new ExTGDetectorConstructionWithCpp);
0083 
0084 and recompile.
0085 
0086 It will use the geometry from the file 'g4geom_simple.txt'
0087 
0088 
0089 5.- CREATING NEW TAGS IN THE TEXT GEOMETRY: DEFINING CUTS PER REGION 
0090 
0091 The detector construction class ExTGDetectorConstructionWithCuts, together with
0092 ExTGRCLineProcessor, ExTGRCDetectorBuilder, ExTGRCRegionCutsMgr and
0093 ExTGRCRegionData show how to add a couple of tags, ':REGION' and ':CUT', that
0094 allow to define cuts per region in your input geometry text file. 
0095 To use it, replace at exampleTextGeom.cc the line
0096 
0097   runManager->SetUserInitialization(new ExTGDetectorConstruction);
0098 
0099 by
0100 
0101   runManager->SetUserInitialization(new ExTGDetectorConstructionWithCuts);
0102 
0103 and recompile.
0104 
0105 It will use the geometry from the file 'g4geom_cutsPerRegion.txt'
0106 
0107 
0108 6.- DUMP THE IN-MEMORY GEOMETRY TO TEXT FILE
0109 
0110 The run action 'ExTGRunAction' triggers the writing of the in-memory Geant4
0111 geometry to a text file. 
0112 To use it you just have to uncomment in exampleTextGeom.cc the line
0113 
0114  runManager->SetUserAction(new ExTGRunAction);
0115 
0116 and it will read the geometry from the file 'g4geom.txt' and will write the
0117 geometry in a file named 'geom.txt'