source: trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/TrackingAndPhysics/cutsPerRegion.xml @ 1345

Last change on this file since 1345 was 904, checked in by garnier, 16 years ago

ajout de la doc

File size: 4.9 KB
Line 
1<!-- ******************************************************** -->
2<!--                                                          -->
3<!--  [History]                                               -->
4<!--    Created by: Makoto Asai,       14-Apr-2003            -->
5<!--    Converted to DocBook: Katsuya Amako, Aug-2006         -->
6<!--                                                          -->
7<!-- ******************************************************** -->
8
9
10<!-- ******************* Section (Level#1) ****************** -->
11<sect1 id="sect.CutReg">
12<title>
13Cuts per Region
14</title>
15
16
17<!-- ******************* Section (Level#2) ****************** -->
18<sect2 id="sect.CutReg.Gene">
19<title>
20General Concepts
21</title>
22
23<para>
24Beginning with Geant4 version 5.1, the concept of a region has been
25defined for use in geometrical descriptions. Details about regions
26and how to use them are available in
27<xref linkend="sect.Geom.LogVol.SubReg" />.
28As an example, suppose a user defines three regions, corresponding to
29the tracking volume, the calorimeter and the bulk structure of a
30detector. For performance reasons, the user may not be interested
31in the detailed development of electromagnetic showers in the
32insensitive bulk structure, but wishes to maintain the best
33possible accuracy in the tracking region. In such a use case,
34Geant4 allows the user to set different production thresholds
35("cuts") for each geometrical region. This ability, referred to as
36"cuts per region", is also a new feature provided by the Geant4 5.1
37release. The general concepts of production thresholds were
38presented in the <xref linkend="sect.ProThres" />.
39</para>
40
41<para>
42Please note that this new feature is intended only for users
43who
44
45<orderedlist spacing="compact">
46  <listitem><para>
47    are simulating the most complex geometries, such as an LHC
48    detector, and
49  </para></listitem>
50  <listitem><para>
51    are experienced in simulating electromagnetic showers in
52    matter.
53  </para></listitem>
54</orderedlist>
55</para>
56
57<para>
58We strongly recommend that results generated with this new feature
59be compared with results using the same geometry and uniform
60production thresholds. Setting completely different cut values for
61individual regions may break the coherent and comprehensive
62accuracy of the simulation. Therefore cut values should be
63carefully optimized, based on a comparison with results obtained
64using uniform cuts.
65</para>
66
67</sect2>
68
69
70<!-- ******************* Section (Level#2) ****************** -->
71<sect2 id="sect.CutReg.DefReg">
72<title>
73Default Region
74</title>
75
76<para>
77The world volume is treated as a region by default. A
78<emphasis>G4Region</emphasis> object is automatically assigned to the world
79volume and is referred to as the "default region". The production
80cuts for this region are the defaults which are defined in the
81<emphasis>UserPhysicsList</emphasis>. Unless the user defines different cut
82values for other regions, the cuts in the default region will be
83used for the entire geometry.
84</para>
85
86<para>
87Please note that the default region and its default production
88cuts are created and set automatically by <emphasis>G4RunManager</emphasis>.
89The user is <emphasis role="bold">not</emphasis> allowed to set a region to
90the world volume, <emphasis role="bold">nor</emphasis> to assign other
91production cuts to the default region.
92</para>
93
94</sect2>
95
96
97<!-- ******************* Section (Level#2) ****************** -->
98<sect2 id="sect.CutReg.Assig">
99<title>
100Assigning Production Cuts to a Region
101</title>
102
103<para>
104In the <literal>SetCuts()</literal> method of the user's physics list, the
105user must first define the default cuts. Then a
106<emphasis>G4ProductionCuts</emphasis> object must be created and initialized with
107the cut value desired for a given region. This object must in turn
108be assigned to the region object, which can be accessed by name
109from the <emphasis>G4RegionStore</emphasis>. An example <literal>SetCuts()</literal> 
110code follows.
111
112<example id="programlist_CutReg_1">
113<title>
114<literal>Setting production cuts to a region</literal>
115</title>
116
117<programlisting>
118void MyPhysicsList::SetCuts()
119{
120  // default production thresholds for the world volume
121  SetCutsWithDefault();
122
123  // Production thresholds for detector regions
124  G4Region* region;
125  G4String regName;
126  G4ProductionCuts* cuts;
127
128  regName = "tracker";
129  region = G4RegionStore::GetInstance()-&gt;GetRegion(regName);
130  cuts = new G4ProductionCuts;
131  cuts-&gt;SetProductionCut(0.01*mm); // same cuts for gamma, e- and e+
132  region-&gt;SetProductionCuts(cuts);
133
134  regName = "calorimeter";
135  region = G4RegionStore::GetInstance()-&gt;GetRegion(regName);
136  cuts = new G4ProductionCuts;
137  cuts-&gt;SetProductionCut(0.01*mm,G4ProductionCuts::GetIndex("gamma"));
138  cuts-&gt;SetProductionCut(0.1*mm,G4ProductionCuts::GetIndex("e-"));
139  cuts-&gt;SetProductionCut(0.1*mm,G4ProductionCuts::GetIndex("e+"));
140  region-&gt;SetProductionCuts(cuts);
141}
142</programlisting>
143</example>
144</para>
145
146
147</sect2>
148</sect1>
Note: See TracBrowser for help on using the repository browser.