51 lines
1.6 KiB
Plaintext
51 lines
1.6 KiB
Plaintext
$Id$
|
|
-------------------------------------------------------------------
|
|
|
|
=========================================================
|
|
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
|
=========================================================
|
|
|
|
Example Transforms
|
|
-------------------
|
|
|
|
This extended example demonstrates various ways of definition of
|
|
3D transformations for placing volumes.
|
|
|
|
The geometry setup consists of two trapezoid volumes which are placed
|
|
in a world so that their axial symmetry axis is in given theta and phi
|
|
polar angles. The various ways of placement are implemented in the
|
|
TrDetectorConstruction class in the following private functions:
|
|
- PlaceWithDirectMatrix()
|
|
- PlaceWithInverseMatrix()
|
|
- PlaceWithAxialRotations()
|
|
- PlaceWithEulerAngles()
|
|
- PlaceWithReflections()
|
|
which are then called from the Construct() function.
|
|
All methods define exactly same geometry except for the placement
|
|
with reflection where trapezoids are placed with their symmetry axis
|
|
in parallel with z-axis in order to make easier to check reflection
|
|
visually.
|
|
|
|
The method of placement can be selected interactively via the command
|
|
(see TrDetectorConstructionMessenger):
|
|
/transform/setMethod method
|
|
|
|
The example is defined with use of classes from the common examples.
|
|
These classes from common start with the ExG4 prefix while the
|
|
classes relevant to transfomation start with the Tr prefix.
|
|
|
|
To run example:
|
|
% transforms
|
|
PreInit> /transform/setMethod WithDirectMatrix
|
|
PreInit> /run/initialize
|
|
Init> /run/beamOn 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|