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 ResponseRegions can also become 'envelopes' <strong>for</strong> fast-simulation; can be assigned user-limits or genericuser-in<strong>for</strong>mation (G4VUserRegionIn<strong>for</strong>mation); can be associated to specific stepping-actions(G4UserSteppingAction) or have assigned a local magnetic-field (local fields specifically associated to logicalvolumes take precedence anyhow).4.1.4. Physical VolumesPhysical volumes represent the spatial positioning of the volumes describing the detector elements. Several techniquescan be used. They range from the simple placement of a single copy to the repeated positioning using eithera simple linear <strong>for</strong>mula or a user specified function.The simple placement involves the definition of a trans<strong>for</strong>mation matrix <strong>for</strong> the volume to be positioned. Repeatedpositioning is defined using the number of times a volume should be replicated at a given distance along a givendirection. Finally it is possible to define a parameterised <strong>for</strong>mula to specify the position of multiple copies of avolume. Details about these methods are given below.Note - For geometries which vary between runs and <strong>for</strong> which components of the old geometry setup are explicitely-deleted-, it is required to consider the proper order of deletion (which is the exact inverse of the actualconstruction, i.e., first delete physical volumes and then logical volumes). Deleting a logical volume does NOTdelete 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 volumeand solid stores at the end of the job. The user has to take care of the deletion of any additional trans<strong>for</strong>mation orrotation matrices allocated dinamically in his/her own application.4.1.4.1. Placements: single positioned copyIn this case, the Physical Volume is created by associating a Logical Volume with a Rotation Matrix and a Translationvector. The Rotation Matrix represents the rotation of the reference frame of the considered volume relativelyto its mother volume's reference frame. The Translation Vector represents the translation of the current volumein the reference frame of its mother volume.Trans<strong>for</strong>mations including reflections are not allowed.To create a Placement one must construct it using:G4PVPlacement(G4RotationMatrix* pRot,const G4ThreeVector& tlate,G4LogicalVolume* pCurrentLogical,const G4String&pName,G4LogicalVolume* pMotherLogical,G4boolpMany,G4intpCopyNo,G4bool pSurfChk=false )where:pRottlatepCurrentLogicalpNamepMotherLogicalpManypCopyNopSurfChkRotation with respect to its mother volumeTranslation with respect to its mother volumeThe associated Logical VolumeString identifier <strong>for</strong> this placementThe associated mother volumeFor future use. Can be set to falseInteger which identifies this placementif true activates check <strong>for</strong> overlaps with existing volumesCare must be taken because the rotation matrix is not copied by a G4PVPlacement. So the user must not modifyit after creating a Placement that uses it. However the same rotation matrix can be re-used <strong>for</strong> many volumes.85

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

Saved successfully!

Ooh no, something went wrong!