Download Geant4 User`s Guide for Application Developers

Transcript
Detector Definition and Response
else material= material2;
// Set the material to the current logical volume
G4LogicalVolume* currentLogVol= currentVol->GetLogicalVolume();
currentLogVol->SetMaterial( material );
return material;
}
Nested parameterisations are suitable for the case of regular, 'voxel' geometries in which a large number of 'equal'
volumes are required, and their only difference is in their material. By creating two (or more) levels of parameterised physical volumes it is possible to divide space, while requiring only limited additional memory for very
fine-level optimisation. This provides fast navigation. Alternative implementations, taking into account the regular
structure of such geometries in navigation are under study.
Divisions of Volumes
Divisions in Geant4 are implemented as a specialized type of parameterised volumes.
They serve to divide a volume into identical copies along one of its axes, providing the possibility to define an
offset, and without the limitation that the daugthers have to fill the mother volume as it is the case for the replicas.
In the case, for example, of a tube divided along its radial axis, the copies are not strictly identical, but have
increasing radii, although their widths are constant.
To divide a volume it will be necessary to provide:
1.
2.
the axis of division, and
either
• the number of divisions (so that the width of each division will be automatically calculated), or
• the division width (so that the number of divisions will be automatically calculated to fill as much of the
mother as possible), or
• both the number of divisions and the division width (this is especially designed for the case where the
copies do not fully fill the mother).
An offset can be defined so that the first copy will start at some distance from the mother wall. The dividing copies
will be then distributed to occupy the rest of the volume.
There are three constructors, corresponding to the three input possibilities described above:
•
Giving only the number of divisions:
G4PVDivision( const G4String& pName,
G4LogicalVolume* pCurrentLogical,
G4LogicalVolume* pMotherLogical,
const EAxis pAxis,
const G4int nDivisions,
const G4double offset )
•
Giving only the division width:
G4PVDivision( const G4String& pName,
G4LogicalVolume* pCurrentLogical,
G4LogicalVolume* pMotherLogical,
const EAxis pAxis,
const G4double width,
const G4double offset )
•
Giving the number of divisions and the division width:
G4PVDivision( const G4String& pName,
G4LogicalVolume* pCurrentLogical,
G4LogicalVolume* pMotherLogical,
const EAxis pAxis,
const G4int nDivisions,
const G4double width,
const G4double offset )
84