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 Responseoptimal granularity level is computed automatically and adapted to the specific geometry setup; however, in somecases (like geometry portions with 'dense' concentration of volumes distributed in a non-uni<strong>for</strong>m way), it may benecessary to adopt manual tuning <strong>for</strong> helping the optimisation process in dealing with the most critical areas. Bysetting the verbosity to 2 through the following UI run-time command:/run/verbose 2a statistics of the memory consumed <strong>for</strong> the allocated optimisation nodes will be displayed volume by volume,allowing to easily identify the critical areas which may eventually require manual intervention.The logical volume provides a way to estimate the mass of a tree of volumes defining a detector or sub-detector.This can be achieved by calling the method:G4double GetMass(G4bool <strong>for</strong>ced=false)The mass of the logical volume tree is computed from the estimated geometrical volume of each solid and materialassociated with the logical volume and its daughters. Note that this computation may require a considerable amountof time, depending on the complexity of the geometry tree. The returned value is cached by default and can beused <strong>for</strong> successive calls, unless recomputation is <strong>for</strong>ced by providing true <strong>for</strong> the boolean argument <strong>for</strong>cedin input. Computation should be <strong>for</strong>ced if the geometry setup has changed after the previous call.Finally, the Logical Volume manages the in<strong>for</strong>mation relative to the Envelopes hierarchy required <strong>for</strong> fast MonteCarlo parameterisations (Section 5.2.6).4.1.3.1. Sub-detector RegionsIn complex geometry setups, such as those found in large detectors in particle physics experiments, it is useful tothink of specific Logical Volumes as representing parts (sub-detectors) of the entire detector setup which per<strong>for</strong>mspecific functions. In such setups, the processing speed of a real simulation can be increased by assigning specificproduction cuts to each of these detector parts. This allows a more detailed simulation to occur only in thoseregions where it is required.The concept of detector Region is introduced to address this need. Once the final geometry setup of the detectorhas been defined, a region can be specified by constructing it with:where:G4Region( const G4String& rName )rNameString identifier <strong>for</strong> the detector regionA G4Region must then be assigned to a logical volume, in order to make it a Root Logical Volume:G4Region* emCalorimeter = new G4Region("EM-Calorimeter");emCalorimeter->AddRootLogicalVolume(emCalorimeter);A root logical volume is the first volume at the top of the hierarchy to which a given region is assigned. Once theregion is assigned to the root logical volume, the in<strong>for</strong>mation is automatically propagated to the volume tree, sothat each daughter volume shares the same region. Propagation on a tree branch will be interrupted if an alreadyexisting root logical volume is encountered.A specific Production Cut can be assigned to the region, by defining and assigning to it a G4ProductionCutobjectemCalorimeter->SetProductionCuts(emCalCuts);Section 5.4.2 describes how to define a production cut. The same region can be assigned to more than one rootlogical volume, and root logical volumes can be removed from an existing region. A logical volume can have onlyone region assigned to it. Regions will be automatically registered in a store which will take care of destroyingthem at the end of the job. A default region with a default production cut is automatically created and assignedto the world volume.84

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

Saved successfully!

Ooh no, something went wrong!