Download Geant4 User`s Guide for Application Developers
Transcript
Detector Definition and Response construction, i.e., first delete physical volumes and then logical volumes). Deleting a logical volume does NOT delete its daughter volumes. It is not necessary to delete the geometry setup at the end of a job, the system will take care to free the volume and solid stores at the end of the job. The user has to take care of the deletion of any additional transformation or rotation matrices allocated dinamically in his/her own application. 4.1.4.1. Placements: single positioned copy In this case, the Physical Volume is created by associating a Logical Volume with a Rotation Matrix and a Translation vector. 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. Transformations including reflections are not allowed. To create a Placement one must construct it using: G4PVPlacement( G4RotationMatrix* const G4ThreeVector& G4LogicalVolume* const G4String& G4LogicalVolume* G4bool G4int G4bool pRot, tlate, pCurrentLogical, pName, pMotherLogical, pMany, pCopyNo, pSurfChk=false ) where: pRot Rotation with respect to its mother volume tlate Translation with respect to its mother volume pCurrentLogical The associated Logical Volume pName String identifier for this placement pMotherLogical The associated mother volume pMany For future use. Can be set to false pCopyNo Integer which identifies this placement pSurfChk if true activates check for overlaps with existing volumes Care must be taken because the rotation matrix is not copied by a G4PVPlacement. So the user must not modify it after creating a Placement that uses it. However the same rotation matrix can be re-used for many volumes. Currently boolean operations are not implemented at the level of physical volume. So pMany must be false. However, an alternative implementation of boolean operations exists. In this approach a solid can be created from the union, intersection or subtraction of two solids. See Section 4.1.2.2 above for an explanation of this. The mother volume must be specified for all volumes except the world volume. An alternative way to specify a Placement utilizes a different method to place the volume. The solid itself is moved by rotating and translating it to bring it into the system of coordinates of the mother volume. This active method can be utilized using the following constructor: G4PVPlacement( G4Transform3D G4LogicalVolume* const G4String& G4LogicalVolume* G4bool solidTransform, pCurrentLogical, pName, pMotherLogical, pMany, 78