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.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]
1 -------------------------------------------------------------------
2
3 =========================================================
4 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
5 =========================================================
6
7 transforms
8 ----------
9
10 This example illustrates various ways to place a volume.
11 There are two G4PVPlacement constructors. One uses a direct rotation matrix,
12 via G4Transform3D class. The other uses an inverse rotation matrix.
13 The rotation matrices themselves, direct or inverse, can be explicitely computed
14 by users, or built with various G4 build-in transformations methods,
15 like axial rotations.
16
17 1- Geometry construction
18 ---------------------
19 Two G4Trd volumes (daughters) are placed within a G4Tubs (mother), in such a way
20 that their z_axis are in the mother xy plane.
21 To see the picture, run the example in interactive mode.
22
23 The various ways of placement are implemented in the DetectorConstruction class
24 in the following private functions:
25
26 - PlaceWithDirectMatrix()
27 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.
28 The rotation matrix is defined via the daughter frame axes with respect to the mother frame.
29
30 - PlaceWithInverseMatrix()
31 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.
32 - 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.
33 The rotation matrix is defined again via the daughter frame axes with respect to the mother frame.
34
35 - PlaceWithAxialRotations()
36 This method is using G4PVPlacement with G4Transform3D again, but in difference from
37 PlaceWithDirectMatrix(), the rotation matrix is defined via rotate[X,Y,Z]() member functions of G4RotationMatrix.
38
39 - PlaceWithEulerAngles()
40 This method is using G4PVPlacement with G4Transform3D again, but with the rotation matrix is defined via Euler angles.
41
42 - PlaceWithReflections()
43 In this method, in addition to two positions defined via "PlaceWithAxialRotations" method, two more positions including reflection symmetry are defined.
44 When reflections are present in geometry, the placements have to be applied
45 via G4ReflectionFactory::Place() method, where a G4Transform3D with reflection
46 can be used.
47
48 These functions are then called from the Construct() function.
49 All methods define exactly same geometry except for the placement
50 with reflection where trapezoids are placed with their symmetry axis
51 in parallel with z-axis in order to make easier to check reflection
52 visually.
53
54 The method of placement can be selected interactively via the command
55 (see DetectorMessenger):
56 /placement/setMethod method (see transfoms.in)
57
58
59 2- Physics list
60 ------------
61 PhysicsList.cc defines only geantino and transportation process.
62
63 3- Primary generator
64 -----------------
65 Default kinematic is a geantino at coordinate origin.
66 Can be changed with particleGun commands.
67
68 4- Physics
69 -------
70 No physics; only transportation.
71
72 5- Visualisation
73 -------------
74 In interactive mode, visualization manager is set in the main().
75 Initialisation of the drawing is done via the commands
76 /vis/.. in the macro vis.mac : /control/execute vis.mac
77
78 6- How to start ?
79 --------------
80 - execute transforms in 'interactive mode' with visualization
81 % transforms
82 ....
83 Idle> ---> type your commands. For example:
84 Idle> /placement/setMethod WithInverseMatrix
85 Idle> /control/execute vis.mac
86 Idle> /tracking/verbose 1
87 Idle> /run/beamOn 1
88 Idle> exit
89 or, simply
90 Idle> /control/execute rotations.mac
91 Idle> /control/execute reflections.mac
92
93 - execute transforms in 'batch' mode from macro files
94 % transforms transforms.in