|
|
|
|
|
Introduction to Geant4
Lectures by Andrea dell'Acqua (CERN)
From the Ann Arbor Workshop on Geant4 26 February to 2 March, 2001.
|
|
Exercise N05
This exercise is taken from Lecture 12, Geometry III.
Steps ExN05
Definitions
- Create a stepping action and verify that it is actually called step by step.
- Print out the energy lost in the scintillator layers.
- Record the total energy lost in the scintillator event by event (to do this you'll need an event action).
- Connect the stepping action and the event action.
Helpful Links
- The Logical Volume manages the information associated with detector elements which are represented by a given solid and material independently from its physical position in the detector.
- G4LogicalVolume contains (as data members), among others:
- its name
- a pointer to its constituent solid
- a pointer to the material it is made of
- a pointer to a field manager (optional)
- a pointer to a user-defined limits vector (optional)
- a pointer to a sensitive detector (optional)
- a pointer to a G4VisAttributes object (optional)
- a list of daughter volumes
- G4UserLimits is a placeholder for user-defined step limitations. If associated with a Logical Volume, an object of type G4UserLimits can be used effectively to influence the tracking behavior in that particular volume.
- Physical Volumes represent the spatial positioning of the volumes describing the detector elements. Several different techniques can be used:
- placement
- repeated positioning
- parameterised volumes
- G4VPhysicalVolume is the (abstract) base class for representing a positioned volume.
- The rotation matrix represents the rotation of the reference frame of the considered volume relatively to its mother's reference frame.
- The translation vector represents the translation of the current volume in the reference frame of its mother volume.
- Repeated Volumes allow for a single Physical Volume to represent multiple copies of a volume within its mother volume, thus allowing to save memory.
- Replicas are Repeated Volumes in the case when the multiple copies of the volume to be positioned are all identical.
- Parameterised Volumes are Repeated Volumes in the case in which the multiple copies of a volume can be different in size, solid type or material.
Checklist
- For more information about what the Logical Volume could do for you, look on slide number 2 and for an example of code, look on slide number 3.
- For a complete set of Set/Get methods provided for R/W access to the Logical Volume's data members, see slide number 5.
- To see what the G4UserLimits object can contain, view slide number 6.
- For definitions of the different techniques that can be used for the physical volumes application, see slide number 7.
- An example of G4PVPlacement code is on slide number 11.
- For an alternative way to specify a Placement that utilizes a different method to place a volume, start on slide number 13.
- The Repeated Volume technique is only available for volumes described by CSG solids. To see these definitions, look at slide number 15.
- Geant4 parameterisations must derive from the G4VPVParameterisation class and implement (at least) two methods. To see these methods and their definitions, view slide number 20.
- In order to create a Logical Volume, did you provide a name, a pointer to a solid, and a pointer to a material?
- Look on slide number 10 if you think that you might have implemented specific characteristics of a positioned volume incorrectly by using the concrete classes that inherit from G4VPhysialVolume.
- Did you create a physical volume by associating a Logical Volume with a rotation matrix and a translation vector?
- If you are having problems with your physical volume, make sure that you did not reuse your rotation matrix.
- Did you make sure that the coordinate axis and the number of replicas need to be specified for the program to compute at run time the transformation matrix corresponding to each copy? See slide number 16 for example code.
- Did you specify a mother volume for the parameterised volumes? View slide number 18 for example code.
- Did you make sure in your parameterisation that the type of the first argument (G4Box& here) corresponds to the type of the object given to the Logical Volume of parameterised physical volume?
Back to the Geant4 Lectures
![]()
For information: wlap@umich.edu http://www.umich.edu/~wlap Last modified: syscmd(date)