Geant4 User's Guide
For Application Developers Tracking and Physics |
5.5.1 General Concepts
Beginning with Geant4 version 5.1, the concept of a region has been defined
for use in geometrical descriptions. Details about regions and how to use
them are available in
subsection 4.1.3.1.
As an example, suppose a user defines three regions, corresponding to the
tracking volume, the calorimeter and the bulk structure of a detector.
For performance reasons, the user may not be interested in the detailed
development of electromagnetic showers in the insensitive bulk structure,
but wishes to maintain the best possible accuracy in the tracking region.
In such a use case, Geant4 allows the user to set different production
thresholds ("cuts") for each geometrical region. This ability, referred to as
"cuts per region", is also a new feature provided by the Geant4 5.1 release.
The general concepts of production thresholds were presented in the
previous section.
Please note that this new feature is intended only for users who
Please note that the default region and its default production cuts are created and set automatically by G4RunManager. The user is not allowed to set a region to the world volume, nor to assign other production cuts to the default region.
void MyPhysicsList::SetCuts() { // default production thresholds for the world volume SetCutsWithDefault(); // Production thresholds for detector regions G4Region* region; G4String regName; G4ProductionCuts* cuts; regName = "tracker"; region = G4RegionStore::GetInstance()->GetRegion(regName); cuts = new G4ProductionCuts; cuts->SetProductionCut(0.01*mm); // same cuts for gamma, e- and e+ region->SetProductionCuts(cuts); regName = "calorimeter"; region = G4RegionStore::GetInstance()->GetRegion(regName); cuts = new G4ProductionCuts; cuts->SetProductionCut(0.01*mm,G4ProductionCuts::GetIndex("gamma")); cuts->SetProductionCut(0.1*mm,G4ProductionCuts::GetIndex("e-")); cuts->SetProductionCut(0.1*mm,G4ProductionCuts::GetIndex("e+")); region->SetProductionCuts(cuts); } |
Source listing 5.5.1 Setting production cuts to a region |