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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Detector Definition and ResponseThese methods are valid only <strong>for</strong> the touchable-history type, as specified also below.An update method, with different arguments is available, so that the in<strong>for</strong>mation in a touchable can be updated:8. UpdateYourself(vol, history) takes a physical volume pointer and can additionally take a NavigationHistorypointer.4.1.5.3. Touchable history holds stack of geometry dataAs shown in Sections Section 4.1.3 and Section 4.1.4, a logical volume represents unpositioned detector elements,and a physical volume can represent multiple detector elements. On the other hand, touchables providea unique identification <strong>for</strong> a detector element. In particular, the <strong>Geant4</strong> transportation process and the trackingsystem exploit touchables as implemented in G4TouchableHistory. The touchable history is the minimalset of in<strong>for</strong>mation required to specify the full genealogy of a given physical volume (up to the root of the geometricaltree). These touchable volumes are made available to the user at every step of the <strong>Geant4</strong> tracking inG4VUserSteppingAction.To create/access a G4TouchableHistory the user must message G4Navigator which provides the methodCreateTouchableHistoryHandle():G4TouchableHistoryHandle CreateTouchableHistoryHandle() const;this will return a handle to the touchable.The methods that differentiate the touchable-history from other touchables (since they have meaning only <strong>for</strong> thistype...), are:G4int GetHistoryDepth() const;G4int MoveUpHistory( G4int num_levels = 1 );The first method is used to find out how many levels deep in the geometry tree the current volume is. The secondmethod asks the touchable to eliminate its deepest level.As mentioned above, MoveUpHistory(num) significantly modifies the state of a touchable.4.1.6. Creating an Assembly of VolumesG4AssemblyVolume is a helper class which allows several logical volumes to be combined together in anarbitrary way in 3D space. The result is a placement of a normal logical volume, but where final physical volumesare many.However, an assembly volume does not act as a real mother volume, being an envelope <strong>for</strong> its daughter volumes.Its role is over at the time the placement of the logical assembly volume is done. The physical volume objectsbecome independent copies of each of the assembled logical volumes.This class is particularly useful when there is a need to create a regular pattern in space of a complex componentwhich consists of different shapes and can't be obtained by using replicated volumes or parametrised volumes(see also Figure 4.2 reful usage of G4AssemblyVolume must be considered though, in order to avoid cases of"proliferation" of physical volumes all placed in the same mother.Figure 4.2. Examples of assembly of volumes.95

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

Saved successfully!

Ooh no, something went wrong!