Back to home page

EIC code displayed by LXR

 
 

    


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

0001 -------------------------------------------------------------------
0002 
0003      =========================================================
0004      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
0005      =========================================================
0006 
0007                             transforms
0008                             ----------
0009 
0010  This example illustrates various ways to place a volume.
0011  There are two G4PVPlacement constructors. One uses a direct rotation matrix,
0012  via G4Transform3D class. The other uses an inverse rotation matrix.
0013  The rotation matrices themselves, direct or inverse, can be explicitely computed
0014  by users, or built with various G4 build-in transformations methods,
0015  like axial rotations.
0016 
0017  1- Geometry construction
0018     ---------------------
0019  Two G4Trd volumes (daughters) are placed within a G4Tubs (mother), in such a way
0020  that their z_axis are in the mother xy plane.
0021  To see the picture, run the example in interactive mode.
0022 
0023  The various ways of placement are implemented in the DetectorConstruction class
0024  in the following private functions:
0025 
0026  - PlaceWithDirectMatrix()
0027    This method is using G4PVPlacement with G4Transform3D, which is constructed from a rotation matrix (G4RotationMatrix) and a translation vector (G4ThreeVector). The rotation and translation in this case represent the active transformation: the solid itself is moved by rotating and translating it to bring it into the system of coordinates of the mother volume.
0028    The rotation matrix is defined via the daughter frame axes with respect to the mother frame.
0029 
0030  - PlaceWithInverseMatrix()
0031    This method is using G4PVPlacement with a rotation matrix (G4RotationMatrix) and a translation vector (G4ThreeVector). The rotation Matrix represents the rotation of the reference frame of the considered volume relatively to its mother volume’s reference frame. The translation Vector represents the translation of the current volume in the reference frame of its mother volume.
0032    - If compared to the previous construct, the transformation in this case is generated by specifying the same translation with respect to its mother volume and the inverse of the rotation matrix.
0033    The rotation matrix is defined again via the daughter frame axes with respect to the mother frame.
0034 
0035  - PlaceWithAxialRotations()
0036    This method is using G4PVPlacement with G4Transform3D again, but in difference from
0037    PlaceWithDirectMatrix(), the rotation matrix is defined via rotate[X,Y,Z]() member functions of G4RotationMatrix.
0038 
0039  - PlaceWithEulerAngles()
0040    This method is using G4PVPlacement with G4Transform3D again, but with the rotation matrix is defined via Euler angles.
0041 
0042  - PlaceWithReflections()
0043    In this method, in addition to two positions defined via "PlaceWithAxialRotations" method, two more positions including reflection symmetry are defined.
0044    When reflections are present in geometry, the placements have to be applied
0045    via G4ReflectionFactory::Place() method, where a G4Transform3D with reflection
0046    can be used.
0047 
0048  These functions are then called from the Construct() function.
0049  All methods define exactly same geometry except for the placement
0050  with reflection where trapezoids are placed with their symmetry axis
0051  in parallel with z-axis in order to make easier to check reflection
0052  visually.
0053 
0054  The method of placement can be selected interactively via the command
0055  (see DetectorMessenger):
0056  /placement/setMethod method (see transfoms.in)
0057 
0058 
0059  2- Physics list
0060     ------------
0061  PhysicsList.cc defines only geantino and transportation process.
0062 
0063  3- Primary generator
0064     -----------------
0065  Default kinematic is a geantino at coordinate origin.
0066  Can be changed with particleGun commands.
0067 
0068  4- Physics
0069     -------
0070  No physics; only transportation.
0071 
0072  5- Visualisation
0073     -------------
0074  In interactive mode, visualization manager is set in the main().
0075  Initialisation of the drawing is done via the commands
0076  /vis/.. in the macro vis.mac : /control/execute vis.mac
0077 
0078  6- How to start ?
0079     --------------
0080   - execute transforms in 'interactive mode' with visualization
0081         % transforms
0082         ....
0083         Idle>   ---> type your commands. For example:
0084         Idle> /placement/setMethod WithInverseMatrix
0085         Idle> /control/execute vis.mac
0086         Idle> /tracking/verbose 1
0087         Idle> /run/beamOn 1
0088         Idle> exit
0089       or, simply
0090         Idle> /control/execute rotations.mac
0091         Idle> /control/execute reflections.mac
0092 
0093   - execute transforms in 'batch' mode from macro files
0094         % transforms   transforms.in