12.07.2015 Views

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Detector Definition and ResponseG4VPhysicalVolume * cont_phys =new G4PVPlacement(rotm,// rotationpos,// translationcont_logic,// logical volume"PhantomContainer", // nameworld_logic,// mother volumefalse,// No op. bool.1); // Copy numberThe physical volume should be assigned as the container volume of the parameterisation:param->BuildContainerSolid(cont_phys);// Assure that the voxels are completely filling the container volume//param->CheckVoxelsFillContainer( cont_solid->GetXHalfLength(),cont_solid->GetyHalfLength(),cont_solid->GetzHalfLength() );// The parameterised volume which uses this parameterisation is placed// in the container logical volume//G4PVParameterised * patient_phys =new G4PVParameterised("Patient",// namepatient_logic,// logical volumecont_logic,// mother volumekXAxis,// optimisation hintnVoxelX*nVoxelY*nVoxelZ, // number of voxelsparam);// parameterisation// Indicate that this physical volume is having a regular structure//patient_phys->SetRegularStructureId(1);An example showing the application of the optimised navigation algorithm <strong>for</strong> phantoms geometries is availablein examples/extended/medical/DICOM. It implements a real application <strong>for</strong> reading DICOM imagesand convert them to <strong>Geant4</strong> geometries with defined materials and densities, allowing <strong>for</strong> different implementationsolutions to be chosen (non optimised, classical 3D optimisation, nested parameterisations and use ofG4PhantomParameterisation).4.1.8.5. Run-time commandsWhen running in verbose mode (i.e. the default, G4VERBOSE set while installing the <strong>Geant4</strong> kernel libraries),the navigator provides a few commands to control its behavior. It is possible to select different verbosity levels(up to 5), with the command:geometry/navigator/verbose [verbose_level]or to <strong>for</strong>ce the navigator to run in check mode:geometry/navigator/check_mode [true/false]The latter will <strong>for</strong>ce more strict and less tolerant checks in step/safety computation to verify the correctness ofthe solids' response in the geometry.By combining check_mode with verbosity level-1, additional verbosity checks on the response from the solidscan be activated.4.1.8.6. Setting Geometry Tolerance to be relativeThe tolerance value defining the accuracy of tracking on the surfaces is by default set to a reasonably small value of10E-9 mm. Such accuracy may be however redundant <strong>for</strong> use on simulation of detectors of big size or macroscopicdimensions. Since release 9.0, it is possible to specify the surface tolerance to be relative to the extent of the worldvolume defined <strong>for</strong> containing the geometry setup.The class G4GeometryManager can be used to activate the computation of the surface tolerance to be relativeto the geometry setup which has been defined. It can be done this way:104

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!