1 | <HTML> |
---|
2 | <HEAD> |
---|
3 | <TITLE>More Geant4 FAQ</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
---|
4 | <STYLE TYPE="text/css"> |
---|
5 | <!-- |
---|
6 | --> |
---|
7 | </STYLE> |
---|
8 | </HEAD> |
---|
9 | |
---|
10 | <BODY BGCOLOR="#FFFFFF" BACKGROUND="../icons/backg.jpg"> |
---|
11 | <DIV ALIGN="center"> |
---|
12 | <P> |
---|
13 | <IMG SRC="../icons/g4_small.gif" WIDTH="312" HEIGHT="76"> |
---|
14 | </P> |
---|
15 | </DIV><DIV ALIGN="center"> <H1>Frequently Asked Questions</H1><H1> </H1></DIV> |
---|
16 | <P> |
---|
17 | <P> |
---|
18 | <P> |
---|
19 | |
---|
20 | <UL> |
---|
21 | <LI> <B><A NAME="q-general"></A><A HREF="#a-general">General</A></B> |
---|
22 | <OL> |
---|
23 | <LI><A HREF="#gen-1">How do I add a FAQ to this page?</A></LI> |
---|
24 | </OL> |
---|
25 | </LI> |
---|
26 | <BLOCKQUOTE> |
---|
27 | <P> </P> |
---|
28 | </BLOCKQUOTE> |
---|
29 | <LI><B><A NAME="q-install"></A><A HREF="#a-install">Installation</A></B> |
---|
30 | <OL> |
---|
31 | <LI><A HREF="#install-1">When I download the source from the web, and unpack |
---|
32 | the tar file, some files unpack into the top level directory.</A> </LI> |
---|
33 | <LI><A HREF="#install-2">I cannot find CLHEP files or library and I have it |
---|
34 | installed in my system</A>. </LI> |
---|
35 | <LI><a href="#install-3">I installed CLHEP and the "Hist" |
---|
36 | package for histogramming is missing. Where can I find it and how can |
---|
37 | I do for making histograms.</a> </LI> |
---|
38 | <LI><a href="#install-4">While installing the Geant4 libraries I get the |
---|
39 | following message printed:</a><br> |
---|
40 | <code> gmake[1]: cernlib: |
---|
41 | Command not found</code> <br> |
---|
42 | <a href="#install-4">Has Geant4 been installed properly ? What to do to |
---|
43 | solve this error ? </a> </LI> |
---|
44 | <LI><a href="#install-5">Trying building the Geant4 libraries I see several |
---|
45 | of these errors appearing and my installation fails:</a><br> |
---|
46 | <code> .....G4Exception.d:1: |
---|
47 | *** missing separator. Stop.<br> |
---|
48 | </code><code>...../G4DalitzDecayChannel.d:1: |
---|
49 | *** missing separator. Stop. <br> |
---|
50 | :<br> |
---|
51 | : </code> |
---|
52 | <br> |
---|
53 | <a href="#install-5">Has Geant4 been installed properly ? What to do to |
---|
54 | solve this error ? </a> </LI> |
---|
55 | <LI><a href="#install-6">I'm trying to build Geant4 on Linux Red-Hat |
---|
56 | 7.0/7.1 with gcc-2.96.XX and get errors in compilation or when building |
---|
57 | the file dependencies.</a> </LI> |
---|
58 | <LI><a href="#install-7">Trying to install Geant4 on Linux with gcc-3.X |
---|
59 | compiler, I get compilation errors from CLHEP/DRand48Engine. </a> </LI> |
---|
60 | </OL> |
---|
61 | </LI> |
---|
62 | <BLOCKQUOTE> |
---|
63 | <P> </P> |
---|
64 | </BLOCKQUOTE> |
---|
65 | <LI><B><A NAME="q-run"></A><A HREF="#a-run">Runtime Problems</A></B> |
---|
66 | <OL> |
---|
67 | <LI><A HREF="#runtime-1">On Linux Red-Hat 6.1, I get a segmentation fault |
---|
68 | as soon as I run one of the official extended examples. I also noticed |
---|
69 | that random engine status is not stored on file.</A> |
---|
70 | </LI> |
---|
71 | <LI><a href="#runtime-2">I installed Geant4 libraries and built my application, |
---|
72 | when I try to run it I get:</a><br> |
---|
73 | <code> |
---|
74 | |
---|
75 | error in loading shared libraries:<br> |
---|
76 | |
---|
77 | libCLHEP.so: cannot open shared object file:<br> |
---|
78 | |
---|
79 | No such file or directory</code>. |
---|
80 | </LI> |
---|
81 | <LI><A HREF="#runtime-3">On my system I get a Floating Point Exception |
---|
82 | (FPE) since some physics processes sometimes return DBL_MAX as interaction |
---|
83 | length and this number is afterwards multiplied by a number greater than |
---|
84 | 1.</A> |
---|
85 | </LI> |
---|
86 | </OL> |
---|
87 | </LI> |
---|
88 | <BLOCKQUOTE> |
---|
89 | <P> </P> |
---|
90 | </BLOCKQUOTE> |
---|
91 | <LI><A NAME="q-geometry"></A><B><A HREF="#a-geometry">Geometry</A></B> |
---|
92 | <OL> |
---|
93 | <LI><A HREF="#a-geom-1">I have a generic point and I would like to know |
---|
94 | in which physical volume I'm located in my detector geometry.</A></LI> |
---|
95 | <LI><A HREF="#a-geom-2">How can I access the daughter volumes of a specific |
---|
96 | physical volume?</A></LI> |
---|
97 | <LI><A HREF="#a-geom-3">How can I identify the exact copy-number of a specific |
---|
98 | physical volume in my mass geometry? I tried with <code>GetCopyNo()</code> |
---|
99 | from my physical volume pointer, but it doesn't seem to work!</A></LI> |
---|
100 | <LI><A HREF="#a-geom-4">How can I determine the exact position in global coordinates |
---|
101 | in my mass geometry during tracking and how can I convert it to coordinates local to |
---|
102 | the current volume ?</A></LI> |
---|
103 | </OL> |
---|
104 | </LI> |
---|
105 | <BLOCKQUOTE> |
---|
106 | <P> </P> |
---|
107 | </BLOCKQUOTE> |
---|
108 | <LI><B><A NAME="q-phys"></A><A HREF="#a-phys">Physics and cuts</A></B> |
---|
109 | <OL> |
---|
110 | <LI><A HREF="#PHYS-1">How do production cuts (in range) work in Geant4 ? |
---|
111 | Are they also used in tracking ? If a particle has an energy lower than the |
---|
112 | converted cut in energy for the given material and the distance to the next |
---|
113 | boundary is smaller than the cut in range, is the particle killed ?</A> |
---|
114 | </OL> |
---|
115 | </LI> |
---|
116 | <BLOCKQUOTE> |
---|
117 | <P> </P> |
---|
118 | </BLOCKQUOTE> |
---|
119 | <LI><B><A NAME="q-vis"></A><A HREF="#a-vis">Visualization</A></B> |
---|
120 | <OL> |
---|
121 | <LI><A HREF="#VIS-1">I have set G4VIS... environmental variables but visualization |
---|
122 | does not appear to be enabled.</A> |
---|
123 | <LI><A HREF="#VIS-2">Geant4 crashes while trying to open an OpenGLX window.</A> |
---|
124 | </OL> |
---|
125 | </LI> |
---|
126 | </UL> |
---|
127 | |
---|
128 | <HR> |
---|
129 | |
---|
130 | <H3><A NAME="a-general"></A><A HREF="#q-general">General</A></H3> |
---|
131 | <OL> |
---|
132 | <LI><A NAME="gen-1"></A><I>How do I add a FAQ to this page?</I> |
---|
133 | <BR><BR> |
---|
134 | <I>Solution:</I><BR> |
---|
135 | This is done manually at the moment. Please send your FAQ with solution |
---|
136 | to the <A HREF="mailto:Gunter.Folger@cern.ch, Gabriele.Cosmo@cern.ch">editors</A>. |
---|
137 | </LI> |
---|
138 | </OL> |
---|
139 | |
---|
140 | <HR> |
---|
141 | |
---|
142 | <H3> <A NAME="a-install"></A><A HREF="#q-install">Installation</A> </H3> |
---|
143 | <OL> |
---|
144 | <LI><A NAME="install-1"></A><I>When I download the source from the web, and unpack |
---|
145 | the tar file, some files unpack into the top level directory.</I><BR> |
---|
146 | <BR> |
---|
147 | <I>Solution:</I><BR> |
---|
148 | The problem you describe usually is the result of using "UNIX" tar to |
---|
149 | unpack the gtar ("GNU-tar") file, or vice versa, or using zip on either the |
---|
150 | gtar or tar file. Please make certain that you download the correct file for |
---|
151 | your system, and that you use the correct unpacking tool. Note that for Linux |
---|
152 | you must download the gtar.gz file.<P> |
---|
153 | </LI> |
---|
154 | <LI><A NAME="install-2"></A><I>I cannot find CLHEP files or library and I have |
---|
155 | it installed in my system.</I><BR> |
---|
156 | <BR> |
---|
157 | <I>Solution:</I><BR> |
---|
158 | If the standard CLHEP installation procedure has been adopted, the variable |
---|
159 | $CLHEP_BASE_DIR should point to the area where include/ and lib/ directories |
---|
160 | for CLHEP headers & lib are installed (i.e., it should be /usr/local for the |
---|
161 | default CLHEP installation). In case the library name is different than the |
---|
162 | one expected (libCLHEP.a), you should either create a symbolic link with the |
---|
163 | expected name, or define the variable CLHEP_LIB in your environment which |
---|
164 | explicitly sets the name of the CLHEP library. If a non-standard CLHEP installation |
---|
165 | has been adopted, define variables $CLHEP_INCLUDE_DIR, $CLHEP_LIB_DIR (and |
---|
166 | $CLHEP_LIB) to refer explicitly to the place where includes, library (and |
---|
167 | library-name) respectively are placed in your system.<P> |
---|
168 | </LI> |
---|
169 | <li><a name="install-3"></a><i>I installed </i>CLHEP<i> and the |
---|
170 | "</i>Hist<i>" package for histogramming is missing. Where can I find it and |
---|
171 | how can I do for making histograms.</i><br> |
---|
172 | <br> |
---|
173 | <i>Solution:</i><br> |
---|
174 | In Geant4, histogramming is done through the standard AIDA interface; |
---|
175 | these histograms can be displayed or otherwise manipulated using analysis |
---|
176 | tools based on the AIDA interface (JAS, Lizard, Open Scientist, ...). Examples |
---|
177 | are shown in examples/extended/analysis and examples/advanced applications. |
---|
178 | <br> |
---|
179 | <br> |
---|
180 | The obsolete and no-longer maintened "Hist" module can be downloaded from |
---|
181 | the <a href="http://pcitapiww.cern.ch/asd/lhc++/INSTALLATION/clhep-1.5.html"> |
---|
182 | CLHEP 1.5 distribution from web</a>, but requires some modifications to the |
---|
183 | CLHEP installation scripts to be properly installed.<P> |
---|
184 | </li> |
---|
185 | <li><a name="install-4"></a><i>While installing the Geant4 libraries I get |
---|
186 | the following message printed:</i><br> |
---|
187 | |
---|
188 | gmake[1]: cernlib: Command not found <br> |
---|
189 | <i>Has Geant4 been installed properly ? What to do to solve this error ?</i><br> |
---|
190 | <br> |
---|
191 | <i>Solution:</i><br> |
---|
192 | The message:<br> |
---|
193 | <code> |
---|
194 | gmake[1]: cernlib: Command not found |
---|
195 | </code> <br> |
---|
196 | shows that you don't have the 'cernlib' command installed in your system; |
---|
197 | 'cernlib' is a command from the CERN program library (cernlib) returning a |
---|
198 | list of libraries needed to link a cernlib application. This command is only |
---|
199 | used in the 'g3tog4' module, however, if you do not make use of the 'g3tog4' |
---|
200 | tool, it's harmless. The cernlib script (and the needed cernlib libraries) |
---|
201 | are available from: <a href="http://cern.ch/cernlib">http://cern.ch/cernlib</a>.<P> |
---|
202 | </li> |
---|
203 | <li><a name="install-5"></a> <i>Trying building the Geant4 libraries I see several |
---|
204 | of these errors appearing and my installation fails:</i><br> |
---|
205 | <code> |
---|
206 | .....G4Exception.d:1: |
---|
207 | *** missing separator. Stop.<br> |
---|
208 | |
---|
209 | ...../G4DalitzDecayChannel.d:1: |
---|
210 | *** missing separator. Stop. <br> |
---|
211 | |
---|
212 | :<br> |
---|
213 | |
---|
214 | : |
---|
215 | </code> <br> |
---|
216 | <i>Has Geant4 been installed properly ? What to do to solve this error ?</i><br> |
---|
217 | <br> |
---|
218 | <i>Solution:</i><br> |
---|
219 | It looks like some file dependencies (.d) are corrupted, possibly |
---|
220 | due to previous build attempts which failed for some reason.<br> |
---|
221 | You need to remove each of them; you can use: |
---|
222 | <pre> |
---|
223 | gmake dependencies='' clean |
---|
224 | </pre> |
---|
225 | from the affected module (i.e. for this case, from |
---|
226 | $G4INSTALL/source/global/management and |
---|
227 | $G4INSTALL/source/particles/management) |
---|
228 | and rebuild. |
---|
229 | <br>Alternatively, you may use: |
---|
230 | <pre> |
---|
231 | gmake clean |
---|
232 | </pre> |
---|
233 | from geant4/source and rebuild.<P> |
---|
234 | </li> |
---|
235 | <li><a name="install-6"></a><i>I'm trying to build Geant4 on Linux Red-Hat |
---|
236 | 7.0/7.1 with gcc-2.96.XX and get errors in compilation or when building |
---|
237 | the file dependencies.</i><br> |
---|
238 | <br> |
---|
239 | <i>Solution:</i><br> |
---|
240 | Geant4 is supported on Red Hat 6.1 with gcc-2.95.2. Moreover, note |
---|
241 | that on versions 7.X, Red Hat Linux is distributed with a flawed version of |
---|
242 | the gcc compiler which has -never- been officially released by GNU. The compiler |
---|
243 | gcc-2.96.XX may require strict ISO/ANSI setup. If so the following changes |
---|
244 | in Geant4 3.2 may help to build most of the modules in Geant4, although we |
---|
245 | cannot guarantee a correct behavior of a program built with such compiler. |
---|
246 | In geant4/config/sys/Linux-g++.gmk modify the line:<br> |
---|
247 | <code> CXXFLAGS := -pipe -fno-for-scope -DGNU_GCC</code><br> |
---|
248 | to<br> |
---|
249 | <code> CXXFLAGS := -ansi -pedantic -pipe -fno-for-scope |
---|
250 | -DGNU_GCC</code><br> |
---|
251 | <br> |
---|
252 | And the following lines:<br> |
---|
253 | <code> </code><code>ifdef G4USE_OSPACE<br> |
---|
254 | CPPFLAGS += -DOS_LINUX_2 -DOS_NEW_CHECK -DOS_STL_ASSERT<br> |
---|
255 | CPPFLAGS += -DOS_NO_WSTRING -DOS_NO_ALLOCATORS<br> |
---|
256 | CPPFLAGS += -I$(OSPACE_BASE_DIR)/ospace/std |
---|
257 | -I$(OSPACE_BASE_DIR)<br> |
---|
258 | # else<br> |
---|
259 | # G4USE_STD_NAMESPACE := yes<br> |
---|
260 | # CPPFLAGS += -DG4USE_STD_NAMESPACE<br> |
---|
261 | endif</code><br> |
---|
262 | to:<br> |
---|
263 | <code> </code><code>G4USE_STD_NAMESPACE := yes<br> |
---|
264 | CPPFLAGS += -DG4USE_STD_NAMESPACE</code><br> |
---|
265 | <br> |
---|
266 | Rebuild from scratch:<br> |
---|
267 | <code> </code> <code>cd geant4/source<br> |
---|
268 | gmake clean<br> |
---|
269 | gmake<br> |
---|
270 | </code><P> |
---|
271 | </li> |
---|
272 | <li><a name="install-7"></a><i>Trying to install Geant4 on Linux with gcc-3.X |
---|
273 | compiler, I get compilation errors from CLHEP/DRand48Engine.</i><br> |
---|
274 | <br> |
---|
275 | <i>Solution:</i><br> |
---|
276 | To overcome this problem on gcc-3.X, you should reinstall CLHEP and |
---|
277 | comment out or remove the lines included between <br> |
---|
278 | <code> |
---|
279 | #if !defined(__GNUC__) || defined(__STRICT_ANSI__) <BR> |
---|
280 | ... <BR> |
---|
281 | #endif <br></code> |
---|
282 | in DRand48Engine.h. <br> |
---|
283 | This problem is fixed in a higher (>1.7) version of the CLHEP package. |
---|
284 | </li> |
---|
285 | </ol> |
---|
286 | |
---|
287 | <HR> |
---|
288 | |
---|
289 | <H3><A NAME="a-run"></A><A HREF="#q-run">Run Time Problems</A> </H3> |
---|
290 | <OL> |
---|
291 | <LI><A NAME="runtime-1"></A><I>On Linux Red-Hat 6.1, I get a segmentation fault |
---|
292 | as soon as I run one of the official extended examples. I also noticed that |
---|
293 | random engine status is not stored on file.</I><BR> |
---|
294 | <BR> |
---|
295 | <I>Solution:</I><BR> |
---|
296 | Check that the CLHEP library has been installed and compiled with Red-Hat |
---|
297 | 6.1. A binary object produced with Red-Hat 5.X is not fully compatible with |
---|
298 | binaries running on RH 6.X, due to a different libc used in the two configurations.<P> |
---|
299 | </li> |
---|
300 | <li><a name="runtime-2"></a><i>I installed Geant4 libraries and built my application, |
---|
301 | when I try to run it I get:</i><br> |
---|
302 | <code> |
---|
303 | |
---|
304 | error in loading shared libraries:<br> |
---|
305 | |
---|
306 | libCLHEP.so: cannot open shared object file:<br> |
---|
307 | |
---|
308 | No such file or directory. |
---|
309 | </code><br> |
---|
310 | <br> |
---|
311 | <i>Solution:</i><br> |
---|
312 | Your installation of CLHEP includes shared libraries. You need to specify |
---|
313 | the path where libCLHEP.so is installed through your environment variable |
---|
314 | LD_LIBRARY_PATH.<P> |
---|
315 | </li> |
---|
316 | <LI><A NAME="runtime-3"></A><I>On my system I get a Floating Point Exception |
---|
317 | (FPE) since some physics processes sometimes return </I>DBL_MAX<I> as interaction |
---|
318 | length and this number is afterwards multiplied by a number greater than 1.</I><BR> |
---|
319 | <BR> |
---|
320 | <I>Solution:</I><BR> |
---|
321 | Geant4 coding conventions and installation setup explicitly follow the ANSI/IEEE-754 |
---|
322 | Standard for the initialization of floating-point arithmetic hardware and |
---|
323 | portability. The Standard foresees floating-point arithmetic to be nonstop |
---|
324 | and underflows to be gradual. On DEC platforms, for example, the ANSI/IEEE-754 |
---|
325 | Standard compliance needs to be explicitly set (since deactivated by default); |
---|
326 | in this case we use infact the option "-ieee" on the DEC/cxx native C++ compiler |
---|
327 | to achieve this. You should check if your compiler provides compilation options |
---|
328 | for activating Standard initialization of FP arithmetic (it may be platform |
---|
329 | specific). |
---|
330 | </LI> |
---|
331 | </OL> |
---|
332 | |
---|
333 | <HR> |
---|
334 | |
---|
335 | <H3><A NAME="a-geometry"></A><A HREF="#q-geometry">Geometry</A> </H3> |
---|
336 | <OL> |
---|
337 | <LI><A NAME="a-geom-1"></A><I>I have a generic point and I would like to know |
---|
338 | in which physical volume I'm located in my detector geometry.</I> |
---|
339 | <BR><BR> |
---|
340 | <I>Solution:</I><BR> |
---|
341 | The best way of doing this is by invoking the G4Navigator. First get a pointer |
---|
342 | of the navigator through the G4TransportationManager, and then locate the point. |
---|
343 | i.e. |
---|
344 | <pre> |
---|
345 | #include "G4TransportationManager.hh" |
---|
346 | #include "G4Navigator.hh" |
---|
347 | G4ThreeVector myPoint = ....; |
---|
348 | G4Navigator* theNavigator = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking(); |
---|
349 | G4VPhysicalVolume* myVolume = theNavigator->LocateGlobalPointAndSetup(myPoint); |
---|
350 | </pre> |
---|
351 | </LI> |
---|
352 | <LI><A NAME="a-geom-2"></A><I>How can I access the daughter volumes of a specific |
---|
353 | physical volume?</I> |
---|
354 | <BR><BR> |
---|
355 | <I>Solution:</I><BR> |
---|
356 | Through the associated logical volume. |
---|
357 | <pre> |
---|
358 | G4VPhysicalVolume* myPVolume = ....; |
---|
359 | G4LogicalVolume* myLVolume = myPVolume->GetLogicalVolume(); |
---|
360 | for (G4int i=0; i<myLVolume->GetNoDaughters(); i++) |
---|
361 | myPVolume = myLVolume->GetDaughter(i); |
---|
362 | </pre> |
---|
363 | </LI> |
---|
364 | <LI><A NAME="a-geom-3"></A><I>How can I identify the exact copy-number of a specific |
---|
365 | physical volume in my mass geometry? I tried with <code>GetCopyNo()</code> |
---|
366 | from my physical volume pointer, but it doesn't seem to work!</I> |
---|
367 | <BR><BR> |
---|
368 | <I>Solution:</I><BR> |
---|
369 | The correct way to identify -uniquely- a physical volume in your |
---|
370 | mass geometry is by using the touchables (see also section 4.1.5 of the |
---|
371 | User's Guide for Application Developers), as follows: |
---|
372 | <pre> |
---|
373 | G4Step* aStep = ..; |
---|
374 | G4StepPoint* preStepPoint = aStep->GetPreStepPoint(); |
---|
375 | G4TouchableHandle theTouchable = preStepPoint->GetTouchableHandle(); |
---|
376 | G4int copyNo = theTouchable->GetReplicaNumber(); |
---|
377 | G4int motherCopyNo = theTouchable->GetReplicaNumber(1); |
---|
378 | </pre> |
---|
379 | where <code>Replica</code> here stays for any duplicated instance of a physical |
---|
380 | volume, either if it is a <code>G4PVPlacement</code> (multiple placements of the |
---|
381 | same logical volume) or a <code>G4PVReplica</code>/<code>G4PVParameterised</code>.<BR> |
---|
382 | The method <code>GetCopyNo()</code> is meant to return only the serial |
---|
383 | number of placements not duplicated in the geometry tree.<P> |
---|
384 | </LI> |
---|
385 | <LI><A NAME="a-geom-4"></A><I>How can I determine the exact position in global coordinates |
---|
386 | in my mass geometry during tracking and how can I convert it to coordinates local to |
---|
387 | the current volume ?</I> |
---|
388 | <BR><BR> |
---|
389 | <I>Solution:</I><BR> |
---|
390 | You need again to do it through the touchables (see also section 4.1.5 of the |
---|
391 | User's Guide for Application Developers), as follows: |
---|
392 | <pre> |
---|
393 | G4Step* aStep = ..; |
---|
394 | G4StepPoint* preStepPoint = aStep->GetPreStepPoint(); |
---|
395 | G4TouchableHandle theTouchable = preStepPoint->GetTouchableHandle(); |
---|
396 | G4ThreeVector worldPosition = preStepPoint->GetPosition(); |
---|
397 | G4ThreeVector localPosition = theTouchable->GetHistory()-> |
---|
398 | GetTopTransform().TransformPoint(worldPosition); |
---|
399 | </pre> |
---|
400 | where <code>worldPosition</code> here stays for the position related to the world |
---|
401 | volume, while <code>localPosition</code> refers to the coordinates local to the |
---|
402 | volume where the particle is currently placed. |
---|
403 | </LI> |
---|
404 | </OL> |
---|
405 | |
---|
406 | <HR> |
---|
407 | |
---|
408 | <H3><A NAME="a-phys"></A><A HREF="#q-phys">Physics and cuts</A> </H3> |
---|
409 | <OL> |
---|
410 | <LI><I><A NAME="PHYS-1"></A>How do production cuts (in range) work in Geant4 ? |
---|
411 | Are they also used in tracking ? If a particle has an energy lower than the |
---|
412 | converted cut in energy for the given material and the distance to the next |
---|
413 | boundary is smaller than the cut in range, is the particle killed ?</I> |
---|
414 | <BR><BR> |
---|
415 | <I>Answer:</I><BR> |
---|
416 | Geant4 does NOT have a "tracking cut". The toolkit's default behaviour |
---|
417 | is to track particles down to zero range (i.e. zero energy).<BR> |
---|
418 | Of course, it is possible for the user to create and register a process |
---|
419 | that kills particles below a certain energy or range; this is however |
---|
420 | NOT provided by default in Geant4. So there's NO "tracking cut".<BR> |
---|
421 | For example, suppose a particle that is nearing zero energy will at some point |
---|
422 | be proposed by its Ionisation process to undergo one final step, from its current |
---|
423 | energy down to zero energy. This is still only a proposal. If during this step |
---|
424 | the particle crosses a boundary, then the transportation will limit the step at |
---|
425 | a length smaller than the Ionisation -- so the particle will still see and cross |
---|
426 | the relevant boundary, and another step will occur on the other side of that |
---|
427 | boundary.<BR> |
---|
428 | In summary the "production threshold" range and its equivalent in |
---|
429 | energy are not utilised as a "tracking cut". A particle is not abandoned |
---|
430 | by Geant4 below a certain range/energy unless the user registers a process |
---|
431 | to do this by him/her-self. |
---|
432 | </LI> |
---|
433 | </OL> |
---|
434 | |
---|
435 | <HR> |
---|
436 | |
---|
437 | <H3><A NAME="a-vis"></A><A HREF="#q-vis">Visualization</A> </H3> |
---|
438 | <OL> |
---|
439 | <LI><I><A NAME="VIS-1"></A>I have set G4VIS... environmental variables but visualization |
---|
440 | does not appear to be enabled.</I> |
---|
441 | <BR><BR> |
---|
442 | <I>Solution:</I><BR> |
---|
443 | This might be |
---|
444 | because you set the environment variables *after* already compiling. The environment |
---|
445 | variables control C-pre-processor macros of the same name and therefore influence |
---|
446 | what code gets compiled. I suggest: (setenv or export the environment variables) |
---|
447 | <PRE> |
---|
448 | cd $G4INSTALL/source/visualization |
---|
449 | gmake clean |
---|
450 | gmake |
---|
451 | cd $G4INSTALL/source/interfaces |
---|
452 | gmake clean |
---|
453 | gmake |
---|
454 | cd $G4INSTALL/source |
---|
455 | gmake libmap |
---|
456 | cd [your working directory] |
---|
457 | gmake clean |
---|
458 | gmake |
---|
459 | </PRE> |
---|
460 | Try environment variables <CODE>G4VIS_BUILD_xxx_DRIVER</CODE> |
---|
461 | and <CODE>G4VIS_USE_xxx</CODE>, where xxx = <CODE>OPENGLX, DAWN, DANWFILE, VRML, |
---|
462 | VRMLFILE</CODE> all set to 1.<P> |
---|
463 | </LI> |
---|
464 | <LI><I><A NAME="VIS-2"></A>Geant4 crashes while trying to open an OpenGLX window.</I> |
---|
465 | <BR><BR> |
---|
466 | <I>Solution:</I><BR> |
---|
467 | This might be because you are using Mesa-3.1. Mesa-3.0 works. |
---|
468 | </LI> |
---|
469 | </OL> |
---|
470 | |
---|
471 | <HR> |
---|
472 | Wednesday, 21 May 2003 - |
---|
473 | <I> <A HREF="http://consult.cern.ch/xwho/people/20341">GC</A>, |
---|
474 | <A HREF="http://consult.cern.ch/xwho/people/1342">GF</A> |
---|
475 | </I> |
---|
476 | </BODY> |
---|
477 | </HTML> |
---|