source: trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/TrackingAndPhysics/physicsProcess.xml @ 1222

Last change on this file since 1222 was 1222, checked in by garnier, 15 years ago

CVS update

File size: 148.1 KB
Line 
1<!-- ******************************************************** -->
2<!--                                                          -->
3<!--  [History]                                               -->
4<!--    Changed by: Katsuya Amako, 30-Jul-1998                -->
5<!--    Proof read by: Joe Chuma,  29-Jun-1999                -->
6<!--    Converted to DocBook: Katsuya Amako, Aug-2006         -->
7<!--                                                          -->
8<!-- ******************************************************** -->
9
10
11<!-- ******************* Section (Level#1) ****************** -->
12<sect1 id="sect.PhysProc">
13<title>
14Physics Processes
15</title>
16
17<para>
18Physics processes describe how particles interact with a
19material. Seven major categories of processes are provided by
20Geant4:
21
22<orderedlist spacing="compact">
23  <listitem><para>
24    <link linkend="sect.PhysProc.EleMag">
25    electromagnetic
26    </link>
27    ,
28  </para></listitem>
29  <listitem><para>
30    <link linkend="sect.PhysProc.Had">
31    hadronic
32    </link>
33    ,
34  </para></listitem>
35  <listitem><para>
36    <link linkend="sect.PhysProc.Decay">
37    decay
38    </link>
39    ,
40  </para></listitem>
41  <listitem><para>
42    <link linkend="sect.PhysProc.PhotoHad">
43    photolepton-hadron
44    </link>
45    ,
46  </para></listitem>
47  <listitem><para>
48    <link linkend="sect.PhysProc.Photo">
49    optical
50    </link>
51    ,
52  </para></listitem>
53  <listitem><para>
54    <link linkend="sect.PhysProc.Param">
55    parameterization
56    </link>
57    and
58  </para></listitem>
59  <listitem><para>
60    <link linkend="sect.PhysProc.Trans">
61    transportation
62    </link>
63    .
64  </para></listitem>
65</orderedlist>
66</para>
67
68<para>
69The generalization and abstraction of physics processes is a key
70issue in the design of Geant4. All physics processes are treated in
71the same manner from the tracking point of view. The Geant4
72approach enables anyone to create a process and assign it to a
73particle type. This openness should allow the creation of processes
74for novel, domain-specific or customised purposes by individuals or
75groups of users.
76</para>
77
78<para>
79Each process has two groups of methods which play an important
80role in tracking, <literal>GetPhysicalInteractionLength</literal> (GPIL) and
81<literal>DoIt</literal>. The GPIL method gives the step length from the
82current space-time point to the next space-time point. It does this
83by calculating the probability of interaction based on the
84process's cross section information. At the end of this step the
85<literal>DoIt</literal> method should be invoked. The <literal>DoIt</literal> method
86implements the details of the interaction, changing the particle's
87energy, momentum, direction and position, and producing secondary
88tracks if required. These changes are recorded as
89<emphasis>G4VParticleChange</emphasis> objects(see
90<link linkend="brhead.PhysProc.PrtChng">
91Particle Change</link>).
92</para>
93
94<!-- ******* Bridgehead ******* -->
95<bridgehead renderas='sect4'>
96G4VProcess
97</bridgehead>
98
99<para>
100<emphasis>G4VProcess</emphasis> is the base class for all physics processes.
101Each physics process must implement virtual methods of
102<emphasis>G4VProcess</emphasis> which describe the interaction (DoIt) and
103determine when an interaction should occur (GPIL). In order to
104accommodate various types of interactions <emphasis>G4VProcess</emphasis>
105provides three <literal>DoIt</literal> methods:
106
107<itemizedlist spacing="compact">
108  <listitem><para>
109    <literal>G4VParticleChange* AlongStepDoIt( const G4Track&amp; track,
110    const G4Step&amp; stepData )</literal>
111    <para>
112    This method is invoked while <emphasis>G4SteppingManager</emphasis> is
113    transporting a particle through one step. The corresponding
114    <literal>AlongStepDoIt</literal> for each defined process is applied for
115    every step regardless of which process produces the minimum step
116    length. Each resulting change to the track information is recorded
117    and accumulated in <emphasis>G4Step</emphasis>. After all processes have been
118    invoked, changes due to <literal>AlongStepDoIt</literal> are applied to
119    <emphasis>G4Track</emphasis>, including the particle relocation and the safety
120    update. Note that after the invocation of <literal>AlongStepDoIt</literal>,
121    the endpoint of the <emphasis>G4Track</emphasis> object is in a new volume if the
122    step was limited by a geometric boundary. In order to obtain
123    information about the old volume, <emphasis>G4Step</emphasis> must be accessed,
124    since it contains information about both endpoints of a step.
125    </para>
126  </para></listitem>
127  <listitem><para>
128    <literal>G4VParticleChange* PostStepDoIt( const G4Track&amp; track,
129    const G4Step&amp; stepData )</literal>
130    <para>
131    This method is invoked at the end point of a step, only if its
132    process has produced the minimum step length, or if the process is
133    forced to occur. <emphasis>G4Track</emphasis> will be updated after each
134    invocation of <literal>PostStepDoIt</literal>, in contrast to the
135    <literal>AlongStepDoIt</literal> method.
136    </para>
137  </para></listitem>
138  <listitem><para>
139    <literal>G4VParticleChange* AtRestDoIt( const G4Track&amp; track,
140    const G4Step&amp; stepData )</literal>
141    <para>
142    This method is invoked only for stopped particles, and only if
143    its process produced the minimum step length or the process is
144    forced to occur.
145    </para>
146  </para></listitem>
147</itemizedlist>
148</para>
149
150<para>
151For each of the above <literal>DoIt</literal> methods <emphasis>G4VProcess</emphasis>
152provides a corresponding pure virtual GPIL method:
153
154<itemizedlist spacing="compact">
155  <listitem><para>
156    <literal>G4double PostStepGetPhysicalInteractionLength( const
157    G4Track&amp; track, G4double previousStepSize, G4ForceCondition*
158    condition )</literal>
159    <para>
160    This method generates the step length allowed by its process. It
161    also provides a flag to force the interaction to occur regardless
162    of its step length.
163    </para>
164  </para></listitem>
165  <listitem><para>
166    <literal>G4double AlongStepGetPhysicalInteractionLength( const
167    G4Track&amp; track, G4double previousStepSize, G4double
168    currentMinimumStep, G4double&amp; proposedSafety, G4GPILSelection*
169    selection )</literal>
170    <para>
171    This method generates the step length allowed by its process.
172    </para>
173  </para></listitem>
174  <listitem><para>
175    <literal>G4double AtRestGetPhysicalInteractionLength( const
176    G4Track&amp; track, G4ForceCondition* condition )</literal>
177    <para>
178    This method generates the step length in time allowed by its
179    process. It also provides a flag to force the interaction to occur
180    regardless of its step length.
181    </para>
182  </para></listitem>
183</itemizedlist>
184</para>
185
186<para>
187Other pure virtual methods in <emphasis>G4VProcess</emphasis> follow:
188
189<itemizedlist spacing="compact">
190  <listitem><para>
191    <literal>virtual G4bool IsApplicable(const
192    G4ParticleDefinition&amp;)</literal>
193    <para>
194    returns true if this process object is applicable to the
195    particle type.
196    </para>
197  </para></listitem>
198    <listitem><para>
199      <literal>virtual void PreparePhysicsTable(const
200      G4ParticleDefinition&amp;)</literal> and
201  </para></listitem>
202  <listitem><para>
203    <literal>virtual void BuildPhysicsTable(const
204    G4ParticleDefinition&amp;)</literal>
205    <para>
206    is messaged by the process manager, whenever cross section
207    tables should be prepared and rebuilt due to changing cut-off
208    values. It is not mandatory if the process is not affected by
209    cut-off values.
210    </para>
211  </para></listitem>
212  <listitem><para>
213    <literal>virtual void StartTracking()</literal> and
214  </para></listitem>
215  <listitem><para>
216    <literal>virtual void EndTracking()</literal>
217    <para>
218    are messaged by the tracking manager at the beginning and end of
219    tracking the current track.
220    </para>
221  </para></listitem>
222</itemizedlist>
223</para>
224
225
226<!-- ******* Bridgehead ******* -->
227<bridgehead renderas='sect4'>
228Other base classes for processes
229</bridgehead>
230
231<para>
232Specialized processes may be derived from seven additional
233virtual base classes which are themselves derived from
234<emphasis>G4VProcess</emphasis>. Three of these classes are used for simple
235processes:
236
237<variablelist>
238  <varlistentry>
239    <term><emphasis>G4VRestProcess</emphasis></term>
240    <listitem>
241      <para>
242      Processes using only the <literal>AtRestDoIt</literal> method.
243      </para>
244      <para>
245      example: neutron capture
246      </para>
247    </listitem>
248  </varlistentry>
249  <varlistentry>
250    <term><emphasis>G4VDiscreteProcess</emphasis></term>
251    <listitem>
252      <para>
253      Processes using only the <literal>PostStepDoIt</literal> method.
254      </para>
255      <para>
256      example: compton scattering, hadron inelastic interaction
257      </para>   
258    </listitem>
259  </varlistentry>
260</variablelist>
261</para>
262
263<para>
264The other four classes are provided for rather complex
265processes:
266
267<variablelist>
268  <varlistentry>
269    <term><emphasis>G4VContinuousDiscreteProcess</emphasis></term>
270    <listitem>
271      <para>
272      Processes using both <literal>AlongStepDoIt</literal> and
273      <literal>PostStepDoIt</literal> methods.
274      </para>
275      <para>
276      example: transportation, ionisation(energy loss and delta ray)
277      </para>   
278    </listitem>
279  </varlistentry>
280  <varlistentry>
281    <term><emphasis>G4VRestDiscreteProcess</emphasis></term>
282    <listitem>
283      <para>
284      Processes using both <literal>AtRestDoIt</literal> and
285      <literal>PostStepDoIt</literal> methods.
286      </para>
287      <para>
288      example: positron annihilation, decay (both in flight and at rest)
289      </para>   
290    </listitem>
291  </varlistentry>
292  <varlistentry>
293    <term><emphasis>G4VRestContinuousProcess</emphasis></term>
294    <listitem>
295      <para>
296      Processes using both <literal>AtRestDoIt</literal> and
297      <literal>AlongStepDoIt</literal> methods.
298      </para>
299    </listitem>
300  </varlistentry>
301  <varlistentry>
302    <term><emphasis>G4VRestContinuousDiscreteProcess</emphasis></term>
303    <listitem>
304      <para>
305      Processes using <literal>AtRestDoIt</literal>,
306      <literal>AlongStepDoIt and</literal> PostStepDoIt methods.
307      </para>
308    </listitem>
309  </varlistentry>
310</variablelist>
311</para>
312
313<!-- ******* Bridgehead ******* -->
314<bridgehead renderas='sect4' id="brhead.PhysProc.PrtChng">
315Particle change
316</bridgehead>
317
318<para>
319<emphasis>G4VParticleChange</emphasis> and its descendants are used to store
320the final state information of the track, including secondary
321tracks, which has been generated by the <literal>DoIt</literal> methods. The
322instance of <emphasis>G4VParticleChange</emphasis> is the only object whose
323information is updated by the physics processes, hence it is
324responsible for updating the step. The stepping manager collects
325secondary tracks and only sends requests via particle change to
326update <emphasis>G4Step</emphasis>.
327</para>
328
329<para>
330<emphasis>G4VParticleChange</emphasis> is introduced as an abstract class. It
331has a minimal set of methods for updating <emphasis>G4Step</emphasis> and
332handling secondaries. A physics process can therefore define its
333own particle change derived from <emphasis>G4VParticleChange</emphasis>. Three
334pure virtual methods are provided,
335
336<itemizedlist spacing="compact">
337  <listitem><para>
338    <literal>virtual G4Step* UpdateStepForAtRest( G4Step* step)</literal>,
339  </para></listitem>
340  <listitem><para>
341    <literal>virtual G4Step* UpdateStepForAlongStep( G4Step* step )</literal>
342    and
343  </para></listitem>
344  <listitem><para>
345    <literal>virtual G4Step* UpdateStepForPostStep( G4Step* step)</literal>,
346  </para></listitem>
347</itemizedlist>
348
349which correspond to the three <literal>DoIt</literal> methods of
350<emphasis>G4VProcess</emphasis>. Each derived class should implement these
351methods.
352</para>
353
354
355<!-- ******************* Section (Level#2) ****************** -->
356<sect2 id="sect.PhysProc.EleMag">
357<title>
358Electromagnetic Interactions
359</title>
360
361<para>
362This section summarizes the electromagnetic (EM) physics processes which
363are provided with Geant4. Extended information are avalable at EM web
364<ulink url="http://geant4.web.cern.ch/geant4/collaboration/EMindex.shtml">
365<emphasis role="bold">pages</emphasis></ulink>.   
366For details on the implementation of these
367processes please refer to the
368<ulink url="http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/PhysicsReferenceManual/html/PhysicsReferenceManual.html">
369<emphasis role="bold">Physics Reference Manual</emphasis></ulink>.
370</para>
371
372<!-- ******************* Section (Level#3) ****************** -->
373<sect3 id="sect.PhysProc.EleMag.Stand">
374<title>
375"Standard" Electromagnetic Processes
376</title> 
377
378<para>
379The following is a summary of the standard electromagnetic
380processes available in Geant4.
381
382<itemizedlist spacing="compact">
383  <listitem><para>
384    Photon processes
385    <itemizedlist spacing="compact">
386      <listitem><para>
387        Compton scattering (class name <emphasis>G4ComptonScattering</emphasis>)
388      </para></listitem>
389      <listitem><para>
390        Gamma conversion (also called pair production, class name
391        <emphasis>G4GammaConversion</emphasis>)
392      </para></listitem>
393      <listitem><para>
394        Photo-electric effect (class name <emphasis>G4PhotoElectricEffect</emphasis>)
395      </para></listitem>
396      <listitem><para>
397        Muon pair production (class name <emphasis>G4GammaConversionToMuons</emphasis>)
398      </para></listitem>
399    </itemizedlist>
400  </para></listitem>
401  <listitem><para>
402    Electron/positron processes
403    <itemizedlist spacing="compact">
404      <listitem><para>
405        Ionisation and delta ray production (class name
406        <emphasis>G4eIonisation</emphasis>)
407      </para></listitem>
408      <listitem><para>
409        Bremsstrahlung (class name <emphasis>G4eBremsstrahlung</emphasis>)
410      </para></listitem>
411      <listitem><para>
412        Multiple scattering (class name <emphasis>G4eMultipleScattering</emphasis>)
413      </para></listitem>
414      <listitem><para>
415        Positron annihilation into two gammas (class name
416        <emphasis>G4eplusAnnihilation</emphasis>)
417      </para></listitem>
418      <listitem><para>
419        Positron annihilation into two muons (class name
420        <emphasis>G4AnnihiToMuPair</emphasis>)
421      </para></listitem>
422      <listitem><para>
423        Positron annihilation into hadrons (class name
424        <emphasis>G4eeToHadrons</emphasis>)
425      </para></listitem> 
426    </itemizedlist>
427  </para></listitem>
428  <listitem><para>
429    Muon processes
430    <itemizedlist spacing="compact">
431      <listitem><para>
432        Bremsstrahlung (class name <emphasis>G4MuBremsstrahlung</emphasis>)
433      </para></listitem>
434      <listitem><para>
435        Ionisation and delta ray production (class name
436        <emphasis>G4MuIonisation</emphasis>)
437      </para></listitem>
438      <listitem><para>
439        Multiple scattering (class name <emphasis>G4MuMultipleScattering</emphasis>)
440      </para></listitem>
441      <listitem><para>
442        e+e- pair production (class name
443        <emphasis>G4MuPairProduction</emphasis>)
444      </para></listitem>
445    </itemizedlist>
446  </para></listitem>
447  <listitem><para>
448    Hadron/ion processes
449    <itemizedlist spacing="compact">
450      <listitem><para>
451        Bremsstrahlung (class name <emphasis>G4hBremsstrahlung</emphasis>)
452      </para></listitem>
453      <listitem><para>
454        Ionisation (class name <emphasis>G4hIonisation</emphasis>)
455      </para></listitem>
456      <listitem><para>
457        e+e- pair production (class name <emphasis>G4hPairProduction</emphasis>)
458      </para></listitem>
459      <listitem><para>
460        Ionisation for ions (class name <emphasis>G4ionIonisation</emphasis>)
461      </para></listitem>
462      <listitem><para>
463        Multiple scattering (class name <emphasis>G4hMultipleScattering</emphasis>)
464      </para></listitem>
465      <listitem><para>
466        Ionisation for heavy exotic particles (class name
467        <emphasis>G4hhIonisation</emphasis>)
468      </para></listitem>
469      <listitem><para>
470        Ionisation for classical magnetic monopole (class name
471        <emphasis>G4mplIonisation</emphasis>)
472      </para></listitem>
473    </itemizedlist>
474  </para></listitem>
475  <listitem><para>
476    Coulomb scattering processes
477    <itemizedlist spacing="compact">
478      <listitem><para>
479        Alternative process for simulation of single Coulomb scattering
480        of all charged particles (class name <emphasis>G4CoulombScattering</emphasis>)
481      </para></listitem>
482      <listitem><para>
483        Alternative process for simulation of single Coulomb scattering
484        of ions (class name <emphasis>G4ScreenedNuclearRecoil</emphasis>)
485      </para></listitem>
486    </itemizedlist>
487  </para></listitem>
488  <listitem><para>
489    Processes for simulation of polarized electron and gamma beams
490    <itemizedlist spacing="compact">
491      <listitem><para>
492        Compton scattering of circularly polarized gamma beam on
493        polarized target (class name <emphasis>G4PolarizedCompton</emphasis>)
494      </para></listitem>
495      <listitem><para>
496        Pair production induced by circularly polarized gamma beam
497        (class name <emphasis>G4PolarizedGammaConversion</emphasis>)
498      </para></listitem>
499      <listitem><para>
500        Photo-electric effect induced by circularly polarized gamma beam
501        (class name <emphasis>G4PolarizedPhotoElectricEffect</emphasis>)
502      </para></listitem>
503      <listitem><para>
504        Bremsstrahlung of polarized electrons and positrons
505        (class name <emphasis>G4ePolarizedBremsstrahlung</emphasis>)
506      </para></listitem>
507      <listitem><para>
508        Ionisation of polarized electron and positron beam
509        (class name <emphasis>G4ePolarizedIonisation</emphasis>)
510      </para></listitem>
511      <listitem><para>
512        Annihilation of polarized positrons
513        (class name <emphasis>G4eplusPolarizedAnnihilation</emphasis>)
514      </para></listitem>
515    </itemizedlist>
516  </para></listitem>
517  <listitem><para>
518    Processes for simulation of X-rays and optical protons production by charged particles
519    <itemizedlist spacing="compact">
520      <listitem><para>
521        Synchrotron radiation (class name <emphasis>G4SynchrotronRadiation</emphasis>)
522      </para></listitem>
523      <listitem><para>
524        Transition radiation
525        (class name <emphasis>G4TransitionRadiation</emphasis>)
526      </para></listitem>
527      <listitem><para>
528        Cerenkov radiation 
529        (class name <emphasis>G4Cerenkov</emphasis>)
530      </para></listitem>
531      <listitem><para>
532        Scintillations
533        (class name <emphasis>G4Scintillation</emphasis>)
534      </para></listitem>
535    </itemizedlist>
536  </para></listitem>
537  <listitem><para>
538    The processes described above use physics model classes, which
539    may be combined according to particle energy. It is possible to
540    change the energy range over which different models are valid, and
541    to apply other models specific to particle type, energy range, and
542    G4Region. The following alternative models are available:
543    <itemizedlist spacing="compact">
544      <listitem><para>
545        Ionisation in thin absorbers (class name <emphasis>G4PAIModel</emphasis>)
546      </para></listitem>
547    </itemizedlist>
548  </para></listitem>
549</itemizedlist>
550</para>
551
552<para>
553It is recommended to use physics constructor classes provided
554with rederence physics lists ($G4INSTALL/source/physics_lists/builders):
555    <itemizedlist spacing="compact">
556      <listitem><para>
557        default EM physics (class name <emphasis>G4EmStandardPhysics</emphasis>)
558      </para></listitem>
559      <listitem><para>
560        optional EM physics providing fast but less acurate electron transport due to
561        "Simple" method of step limitation by multiple scattering, reduced
562        step limitation by ionisation process and  enabled "ApplyCuts" option
563        (class name <emphasis>G4EmStandardPhysics_option1</emphasis>)
564      </para></listitem>
565      <listitem><para>
566        Experimental EM physics with enabled "ApplyCuts" option, <emphasis>G4WentzelVIModel</emphasis>
567        for muon multiple scattering
568        (class name <emphasis>G4EmStandardPhysics_option2</emphasis>)
569      </para></listitem>
570      <listitem><para>
571        EM physics for simulation with high accuracy due to "UseDistanceToBoundary" multiple
572        scattering step limitation, reduced <emphasis>finalRange</emphasis> parameter of stepping function
573        optimized per particle type, <emphasis>G4WentzelVIModel</emphasis>
574        for muon multiple scattering and  <emphasis>G4IonParameterisedLossModel</emphasis> for ion ionisation
575        (class name <emphasis>G4EmStandardPhysics_option3</emphasis>)
576      </para></listitem>
577      <listitem><para>
578        Combined Standard and Low-energy EM physics constructors based on the Option3 constructor;
579        low-energy models are applied below 1 GeV:
580         <itemizedlist spacing="compact">
581           <listitem><para>
582           Models based on Livermore data bases for electrons and gamma (<emphasis>G4EmLivermorePhysics</emphasis>);
583           </para></listitem>   
584          <listitem><para>
585           Polarized models based on Livermore data bases for electrons and gamma (<emphasis>G4EmLivermorePolarizedPhysics</emphasis>);
586           </para></listitem>   
587          <listitem><para>
588           Penelope models for electrons, positrons and gamma (<emphasis>G4EmPenelopePhysics</emphasis>);
589           </para></listitem>   
590          <listitem><para>
591           Low-energy DNA physics (<emphasis>G4EmDNAPhysics</emphasis>).
592           </para></listitem>   
593         </itemizedlist>
594      </para></listitem>    </itemizedlist>
595Examples of the registration of these physics constructor and
596construction of alternative combinations of options are shown
597in novice, extended and advanced examples ($G4INSTALL/examples/extended/electromagnetic and $G4INSTALL/examples/advanced).
598Examples illustrating the use
599of electromagnetic processes are available as part of the Geant4
600<ulink url="http://geant4.web.cern.ch/geant4/support/download.shtml">
601release</ulink>.
602</para>
603
604<para>
605<emphasis role="bold">Options</emphasis> are available for steering of
606electromagnetic processes. These options may be invoked either by
607UI commands or by the interface class G4EmProcessOptions. This
608class has the following public methods:
609
610<itemizedlist spacing="compact">
611   <listitem><para>
612     SetLossFluctuations(G4bool)
613   </para></listitem>
614   <listitem><para>
615     SetSubCutoff(G4bool, const G4Region* r=0)
616   </para></listitem>
617   <listitem><para>
618     SetIntegral(G4bool)
619   </para></listitem>
620   <listitem><para>
621     SetMinSubRange(G4double)
622   </para></listitem>
623   <listitem><para>
624     SetMinEnergy(G4double)
625   </para></listitem>
626   <listitem><para>
627     SetMaxEnergy(G4double)
628   </para></listitem>
629   <listitem><para>
630     SetMaxEnergyForCSDARange(G4double)
631   </para></listitem>
632   <listitem><para>
633     SetMaxEnergyForMuons(G4double)
634   </para></listitem>
635   <listitem><para>
636     SetDEDXBinning(G4int)
637   </para></listitem>
638   <listitem><para>
639     SetDEDXBinningForCSDARange(G4int)
640   </para></listitem>
641   <listitem><para>
642     SetLambdaBinning(G4int)
643   </para></listitem>
644   <listitem><para>
645     SetStepFunction(G4double, G4double)
646   </para></listitem>
647   <listitem><para>
648     SetRandomStep(G4bool)
649   </para></listitem>
650   <listitem><para>
651     SetApplyCuts(G4bool)
652   </para></listitem>
653   <listitem><para>
654     SetSpline(G4bool)
655   </para></listitem>
656   <listitem><para>
657     SetBuildCSDARange(G4bool)
658   </para></listitem>
659   <listitem><para>
660     SetVerbose(G4int, const G4String name= "all")
661   </para></listitem>
662   <listitem><para>
663     SetLambdaFactor(G4double) 
664   </para></listitem>
665   <listitem><para>
666     SetLinearLossLimit(G4double) 
667   </para></listitem>
668   <listitem><para>
669     ActivateDeexcitation(G4bool val, const G4Region* r = 0) 
670   </para></listitem>
671   <listitem><para>
672     SetMscStepLimitation(G4MscStepLimitType val) 
673   </para></listitem>
674   <listitem><para>
675     SetMscLateralDisplacement(G4bool val) 
676   </para></listitem>
677   <listitem><para>
678     SetSkin(G4double) 
679   </para></listitem>
680   <listitem><para>
681     SetMscRangeFactor(G4double) 
682   </para></listitem>
683   <listitem><para>
684     SetMscGeomFactor(G4double) 
685   </para></listitem>
686   <listitem><para>
687     SetLPMFlag(G4bool)
688   </para></listitem>
689   <listitem><para>
690     SetBremsstrahlungTh(G4double)
691   </para></listitem>
692   <listitem><para>
693     SetPolarAngleLimit(G4double)
694   </para></listitem>
695   <listitem><para>
696     SetFactorForAngleLimit(G4double)
697   </para></listitem>
698</itemizedlist>
699</para>
700
701<para>
702The corresponding UI command can be accessed in the UI subdirectory
703"/process/eLoss". The following types of step limitation by multiple scattering
704are available:
705
706<itemizedlist spacing="compact">
707   <listitem><para>
708     fSimple - simplified step limitation as in g4 7.1 version (used in QGSP_BERT_EMV Physics List)
709   </para></listitem>
710   <listitem><para>
711     fUseSafety - default
712   </para></listitem>
713   <listitem><para>
714     fUseDistanceToBoundary - advance method of step limitation used in EM examples,
715     required parameter <emphasis>skin &gt; 0</emphasis>, should be used for
716     setup without magnetic field
717   </para></listitem>
718</itemizedlist>
719</para>
720
721<para>
722<emphasis role="bold">G4EmCalculator</emphasis> is a class which provides
723access to cross sections and stopping powers. This class can be used
724anywhere in the user code provided the physics list has already been
725initialised (G4State_Idle). G4EmCalculator has "Get" methods which
726can be applied to materials for which physics tables are already
727built, and "Compute" methods which can be applied to any material
728defined in the application or existing in the Geant4 internal
729database. The public methods of this class are:
730
731<itemizedlist spacing="compact">
732   <listitem><para>
733     GetDEDX(kinEnergy,particle,material,G4Region region=0)
734   </para></listitem>
735   <listitem><para>
736     GetRangeFromRestrictedDEDX(kinEnergy,particle,material,G4Region* region=0)
737   </para></listitem>
738   <listitem><para>
739     GetCSDARange(kinEnergy,particle,material,G4Region* region=0)
740   </para></listitem>
741   <listitem><para>
742     GetRange(kinEnergy,particle,material,G4Region* region=0)
743   </para></listitem>
744   <listitem><para>
745     GetKinEnergy(range,particle,material,G4Region* region=0)
746   </para></listitem>
747   <listitem><para>
748     GetCrosSectionPerVolume(kinEnergy,particle,material,G4Region* region=0)
749   </para></listitem>
750   <listitem><para>
751     GetMeanFreePath(kinEnergy,particle,material,G4Region* region=0)
752   </para></listitem>
753   <listitem><para>
754     PrintDEDXTable(particle)
755   </para></listitem>
756   <listitem><para>
757     PrintRangeTable(particle)
758   </para></listitem>
759   <listitem><para>
760     PrintInverseRangeTable(particle)
761   </para></listitem>
762   <listitem><para>
763     ComputeDEDX(kinEnergy,particle,process,material,cut=DBL_MAX)
764   </para></listitem>
765   <listitem><para>
766     ComputeElectronicDEDX(kinEnergy,particle,material,cut=DBL_MAX)
767   </para></listitem>
768   <listitem><para>
769     ComputeNuclearDEDX(kinEnergy,particle,material,cut=DBL_MAX)
770   </para></listitem>
771   <listitem><para>
772     ComputeTotalDEDX(kinEnergy,particle,material,cut=DBL_MAX)
773   </para></listitem>
774   <listitem><para>
775     ComputeCrosSectionPerVolume(kinEnergy,particle,process,material,cut=0)
776   </para></listitem>
777   <listitem><para>
778     ComputeCrosSectionPerAtom(kinEnergy,particle,process,Z,A,cut=0)
779   </para></listitem>
780   <listitem><para>
781     ComputeMeanFreePath(kinEnergy,particle,process,material,cut=0)
782   </para></listitem>
783   <listitem><para>
784     ComputeEnergyCutFromRangeCut(range,particle,material)
785   </para></listitem>
786   <listitem><para>
787     FindParticle(const G4String&amp;)
788   </para></listitem>
789   <listitem><para>
790     FindIon(G4int Z, G4int A)
791   </para></listitem>
792   <listitem><para>
793     FindMaterial(const G4String&amp;)
794   </para></listitem>
795   <listitem><para>
796     FindRegion(const G4String&amp;)
797   </para></listitem>
798   <listitem><para>
799     FindCouple(const G4Material*, const G4Region* region=0)
800   </para></listitem>
801   <listitem><para>
802     SetVerbose(G4int)
803   </para></listitem>
804</itemizedlist>
805</para>
806
807<para>
808For these interfaces, particles, materials, or processes may be
809pointers or strings with names.
810</para>
811
812</sect3>
813
814
815<!-- ******************* Section (Level#3) ****************** -->
816<sect3 id="sect.PhysProc.EleMag.LowE">
817<title>
818Low Energy Electromagnetic Processes
819</title>
820
821<para>
822A physical interaction is described by a process class which can handle
823physics models, described by model classes. The following is a summary
824of the Low Energy Electromagnetic physics models available in Geant4.
825Further information is available in the web pages of the
826Geant4 Low Energy Electromagnetic Physics Working Group, accessible
827from the Geant4 web site, “who we are” section, then “working groups”.
828</para>
829
830<para>
831The physics content of these models is documented in the Geant4
832<ulink url="http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/PhysicsReferenceManual/html/PhysicsReferenceManual.html">
833Physics Reference Manual.
834</ulink>
835They are based on the Livermore data library, on the
836ICRU73 data tables or on the Penelope Monte Carlo code. They adopt the
837same software design as the "standard" Geant4 electromagnetic models.
838</para>
839
840<para>
841Examples of the registration of physics constructor with low-energy
842electromagnetic models are shown in Geant4 extended examples
843(<literal>$G4INSTALL/examples/extended/electromagnetic</literal>).
844Advanced examples (<literal>$G4INSTALL/examples/advanced</literal>)
845illustrate alternative instantiation of these processes.
846Both are available as part of the Geant4 release.
847</para>
848
849<para>
850To use the low energy electromagnetic models, data files need to be
851copied by the user to his/her code repository. These files are
852distributed together with Geant4. The user should set the environment
853variable G4LEDATA to the directory where he/she has copied the files.
854</para>
855
856<!-- ******************* Section (Level#4) ****************** -->
857<sect4 id="sect.PhysProc.EleMag.LowE.Livemore">
858<title>
859Livermore based models
860</title> 
861
862<para>
863<itemizedlist spacing="compact">
864  <listitem><para>
865    <emphasis role="bold">Photon models</emphasis>
866    <itemizedlist spacing="compact">
867      <listitem><para>
868        Photo-electric effect (class <emphasis>G4LivermorePhotoElectricModel</emphasis>)
869      </para></listitem>
870      <listitem><para>
871        Polarized Photo-electric effect (class <emphasis>G4LivermorePolarizedPhotoElectricModel</emphasis>)
872      </para></listitem>
873      <listitem><para>
874        Compton scattering (class <emphasis>G4LivermoreComptonModel</emphasis>)
875      </para></listitem>
876      <listitem><para>
877        Polarized Compton scattering (class <emphasis>G4LivermorePolarizedComptonModel</emphasis>)
878      </para></listitem>
879      <listitem><para>
880        Rayleigh scattering (class <emphasis>G4LivermoreRayleighModel</emphasis>)
881      </para></listitem>
882      <listitem><para>
883        Polarized Rayleigh scattering (class <emphasis>G4LivermorePolarizedRayleighModel</emphasis>)
884      </para></listitem>
885      <listitem><para>
886        Gamma conversion (also called pair production, class <emphasis>G4LivermoreGammaConversionModel</emphasis>)
887      </para></listitem>
888      <listitem><para>
889        Polarized gamma conversion (class <emphasis>G4LivermorePolarizedGammaConversionModel</emphasis>)
890      </para></listitem>
891    </itemizedlist>
892  </para></listitem>
893  <listitem><para>
894    <emphasis role="bold">Electron models</emphasis>
895    <itemizedlist spacing="compact">
896      <listitem><para>
897         Bremsstrahlung (class <emphasis>G4LivermoreBremsstrahlungModel</emphasis>)
898      </para></listitem>
899      <listitem><para>
900         Ionisation and delta ray production (class <emphasis>G4LivermoreIonisationModel</emphasis>)
901      </para></listitem>
902    </itemizedlist>
903  </para></listitem>
904</itemizedlist>
905</para>
906
907<para>
908Options can be set in the G4LivermorePhotoElectricModel class, that allow
909the use of alternative photoelectron angular generators:
910
911<itemizedlist spacing="compact">
912  <listitem><para>     
913    SetAngularGenerator(G4VPhotoElectricAngularDistribution* distribution);
914  </para></listitem>
915  <listitem><para>
916    SetAngularGenerator(const G4String&amp; name);     
917  </para></listitem>
918</itemizedlist>
919</para>
920
921<para>
922Currently three angular generators are available:
923G4PhotoElectricAngularGeneratorSimple, G4PhotoElectricAngularGeneratorSauterGavrilla
924and G4PhotoElectricAngularGeneratorPolarized.
925G4PhotoElectricAngularGeneratorSauterGavrilla is selected by default.
926G4PhotoElectricAngularGeneratorSimple, G4PhotoElectricAngularGeneratorSauterGavrilla
927and G4PhotoElectricAngularGeneratorPolarized can be set using respectively the
928strings "default", "standard" and "polarized".
929</para>
930
931<para>
932Options are available in the G4LivermoreBremsstrahlungModel class, that allow
933the use of alternative bremsstrahlung angular generators:
934<itemizedlist spacing="compact">
935  <listitem><para>     
936    SetAngularGenerator(G4VBremAngularDistribution* distribution);
937  </para></listitem>
938  <listitem><para>     
939    SetAngularGenerator(const G4String&amp; name);
940  </para></listitem>
941</itemizedlist>
942</para>
943
944<para>
945Currently three angular generators are available: G4ModifiedTsai,
9462BNGenerator and 2BSGenerator. G4ModifiedTsai is set by default, but it
947can be forced using the string "tsai". 2BNGenerator and 2BSGenerator
948can be set using the strings "2bs" and "2bn". Information regarding
949conditions of use, performance and energy
950limits of different models are available in the Physics Reference Manual .
951</para>
952
953<para>
954Other options G4LivermoreBremsstrahlungModel class are:
955
956<itemizedlist spacing="compact">
957  <listitem><para>     
958    SetCutForLowEnSecPhotons(G4double)
959  </para></listitem>
960</itemizedlist>
961</para>
962
963<para>
964Options are available in the G4LivermoreIonisationModel class:
965
966<itemizedlist spacing="compact">
967  <listitem><para>     
968    ActivateAuger(G4bool)
969  </para></listitem>
970  <listitem><para>     
971    SetCutForLowEnSecPhotons(G4double) 
972  </para></listitem>
973  <listitem><para>     
974    SetCutForLowEnSecElectrons(G4double)
975  </para></listitem>
976</itemizedlist>
977</para>
978
979</sect4>
980
981
982<!-- ******************* Section (Level#4) ****************** -->
983<sect4 id="sect.PhysProc.EleMag.LowE.ICRU73">
984<title>
985ICRU73 based ion model
986</title> 
987
988<para>
989Ionisation and delta ray production (class G4IonParametrisedLossModel)
990</para>
991
992<para>
993The ion model uses ICRU 73 stopping powers, if corresponding ion-material
994combinations are covered by the ICRU 73 report (up to 1 GeV/nucleon), and
995otherwise applies a Bethe-Bloch based formalism. For compounds, ICRU 73
996stopping powers are employed if the material name coincides with the name
997of Geant4 NIST materials (e.g. G4_WATER). Elemental materials are matched
998to the corresponding ICRU 73 stopping powers by means of the atomic number
999of the material. The material name may be arbitrary in this case. For a
1000list of applicable materials, the user is referred to the ICRU 73 report.
1001</para>
1002
1003<para>
1004The model requires data files to be copied by the user to his/her code
1005repository. These files are distributed together with the Geant4 release.
1006The user should set the environment variable G4LEDATA to the directory where
1007he/she has copied the files.
1008</para>
1009
1010<para>
1011The model is dedicated to be used with the G4ionIonisation process and its
1012applicability is restricted to G4GenericIon particles. The ion model is
1013not used by default by this process and must be instantiated and registered
1014by the user:
1015
1016<informalexample>
1017<programlisting>
1018G4ionIonisation* ionIoni = new G4ionIonisation();
1019ionIoni -> SetEmModel(new G4IonParametrisedLossModel());
1020</programlisting>
1021</informalexample>
1022</para>
1023
1024</sect4>
1025
1026<!-- ******************* Section (Level#4) ****************** -->
1027<sect4 id="sect.PhysProc.EleMag.LowE.Penelope">
1028<title>
1029Penelope based models
1030</title> 
1031
1032<para>
1033<itemizedlist spacing="compact">
1034  <listitem><para>
1035    <emphasis role="bold">Photon models</emphasis>
1036    <itemizedlist spacing="compact">
1037      <listitem><para>
1038        Compton scattering (class <emphasis>G4PenelopeComptonModel</emphasis>)
1039      </para></listitem>
1040      <listitem><para>
1041        Rayleigh scattering (class <emphasis>G4PenelopeRayleighModel</emphasis>)
1042      </para></listitem>
1043      <listitem><para>
1044        Gamma conversion (also called pair production, class <emphasis>GPenelopeGammaConversionModel</emphasis>)
1045      </para></listitem>
1046      <listitem><para>
1047        Photo-electric effect (class <emphasis>G4PenelopePhotoElectricModel</emphasis>)
1048      </para></listitem>
1049    </itemizedlist>
1050  </para></listitem>
1051  <listitem><para>
1052    <emphasis role="bold">Electron models</emphasis>
1053    <itemizedlist spacing="compact">
1054      <listitem><para>
1055         Bremsstrahlung (class <emphasis>G4PenelopeBremsstrahlungModel</emphasis>)
1056      </para></listitem>
1057      <listitem><para>
1058         Ionisation and delta ray production (class <emphasis>G4PenelopeIonisationModel</emphasis>)
1059      </para></listitem>
1060    </itemizedlist>
1061  </para></listitem>
1062  <listitem><para>
1063    <emphasis role="bold">Positron models</emphasis>
1064    <itemizedlist spacing="compact">
1065      <listitem><para>
1066         Bremsstrahlung (class <emphasis>G4PenelopeBremsstrahlungModel</emphasis>)
1067      </para></listitem>
1068      <listitem><para>
1069         Ionisation and delta ray production (class <emphasis>G4PenelopeIonisationModel</emphasis>)
1070      </para></listitem>
1071      <listitem><para>
1072         Positron annihilation (class <emphasis>class G4PenelopeAnnihilationModel</emphasis>)
1073      </para></listitem>
1074    </itemizedlist>
1075  </para></listitem>
1076</itemizedlist>
1077</para>
1078
1079<para>
1080All Penelope models can be applied up to a maximum energy of 100 GeV,
1081although it is advisable not to use them above a few hundreds of MeV.
1082</para>
1083
1084<para>
1085Options are available in the all Penelope Models, allowing to set
1086(and retrieve) the verbosity level of the model, namely the amount of
1087information which is printed on the screen.
1088
1089<itemizedlist spacing="compact">
1090  <listitem><para>     
1091    SetVerbosityLevel(G4int)
1092  </para></listitem>
1093  <listitem><para>     
1094    GetVerbosityLevel()
1095  </para></listitem>
1096</itemizedlist>
1097</para>
1098
1099<para>
1100The default verbosity level is 0 (namely, no textual output on the screen).
1101The default value should be used in general for normal runs. Higher
1102verbosity levels are suggested only for testing and debugging purposes.
1103</para>
1104
1105<para>
1106The verbosity scale defined for all Penelope processes is the following:
1107
1108<itemizedlist spacing="compact">
1109  <listitem><para>     
1110    0 = no printout on the screen (default)
1111  </para></listitem>
1112  <listitem><para>     
1113    1 = issue warnings only in the case of energy non-conservation in the final state (should never happen)
1114  </para></listitem>
1115  <listitem><para>     
1116    2 = reports full details on the energy budget in the final state
1117  </para></listitem>
1118  <listitem><para>     
1119    3 = writes also informations on cross section calculation, data file opening and sampling of atoms
1120  </para></listitem>
1121  <listitem><para>     
1122    4 = issues messages when entering in methods
1123  </para></listitem>
1124</itemizedlist>
1125</para>
1126
1127<para>
1128Options are available in G4PenelopeComptonModel, G4PenelopePhotoElectricModel
1129and G4PenelopeIonisationModel to enable or disable the usage of atomic
1130de-excitation via the G4AtomicDeexcitation module.
1131
1132<itemizedlist spacing="compact">
1133  <listitem><para>     
1134    SetDeexcitationFlag(G4bool)
1135  </para></listitem>
1136  <listitem><para>     
1137    DeexcitationFlag()
1138  </para></listitem>
1139</itemizedlist>
1140</para>
1141
1142<para>
1143The default is “true”, namely vacancies in atomic shells produced by the
1144interaction are handled by the G4AtomicDeexcitation module, possibly with
1145the subsequent emission of fluorescence x-rays. If is set to “false”
1146by the user, the energy released in the re-arrangement of atomic vacancies
1147is treated in the model as a local energy deposit, without emission of
1148secondary particles. The methods are actually inherited from G4VEmModel,
1149so they work for all Penelope models; by the way, they have effect only
1150in G4PenelopeComptonModel, G4PenelopePhotoElectricModel and
1151G4PenelopeIonisationModel.
1152</para>
1153
1154<para>
1155An option is also available in these models to enable the production of
1156Auger electrons by the G4AtomicDeexcitation module ActivateAuger(G4bool).
1157The default (coming from G4AtomicDeexcitation) is “false”, namely only
1158fluorescence x-rays are emitted but not Auger electrons. One should
1159notice that this option has effect only if the usage of the atomic
1160deexcitation is enabled. A warning message is printed if one tries to
1161enable the emission of the Auger electrons after having disabled the
1162atomic deexcitation via SetDeexcitationFlag(false).
1163</para>
1164
1165</sect4>
1166</sect3>
1167
1168
1169
1170<!-- ******************* Section (Level#3) ****************** -->
1171<sect3 id="sect.PhysProc.EleMag.VeryLowE">
1172<title>
1173Very Low energy Electromagnetic Processes (Geant4-DNA extension)
1174</title> 
1175
1176<para>
1177The Geant4 low energy electromagnetic Physics package has been extended
1178down to energies of a few electronVolts suitable for the simulation of
1179radiation effects in liquid water for applications in microdosimetry at
1180the cellular and sub-cellular level. These developments take place in
1181the framework of the on-going Geant4-DNA project (see the web pages
1182of the
1183<ulink url="http://geant4.web.cern.ch/geant4/collaboration/working_groups/LEelectromagnetic/">Geant4 Low Energy Electromagnetic Physics Working Group</ulink>).
1184</para>
1185
1186<para>
1187The Geant4-DNA process and model classes apply to electrons, protons,
1188hydrogen, alpha particles and their charge states.
1189</para>
1190
1191
1192<!-- ******* Bridgehead ******* -->
1193<bridgehead renderas='sect4'>
1194 Electron processes and models
1195</bridgehead>
1196<para>
1197<itemizedlist spacing="compact">
1198  <listitem><para>
1199    Elastic scattering :
1200    <itemizedlist spacing="compact">
1201      <listitem><para>
1202        process class is G4DNAElastic
1203      </para></listitem>
1204      <listitem><para>
1205        two alternative model classes are : G4DNAScreenedRutherfordElasticModel
1206        or G4DNAChampionElasticModel
1207      </para></listitem>
1208    </itemizedlist>
1209  </para></listitem>
1210
1211  <listitem><para>
1212    Excitation
1213    <itemizedlist spacing="compact">
1214      <listitem><para>
1215        process class is G4DNAExcitation 
1216      </para></listitem>
1217      <listitem><para>
1218        model class is G4DNAEmfietzoglouExcitationModel
1219      </para></listitem>
1220    </itemizedlist>
1221  </para></listitem>
1222
1223  <listitem><para>
1224    Ionisation
1225    <itemizedlist spacing="compact">
1226      <listitem><para>
1227        process class is G4DNAIonisation
1228      </para></listitem>
1229      <listitem><para>
1230        model class is G4DNABornIonisationModel
1231      </para></listitem>
1232    </itemizedlist>
1233  </para></listitem>
1234</itemizedlist>
1235</para>
1236
1237<!-- ******* Bridgehead ******* -->
1238<bridgehead renderas='sect4'>
1239 Proton processes and models
1240</bridgehead>
1241<para>
1242<itemizedlist spacing="compact">
1243  <listitem><para>
1244    Excitation
1245    <itemizedlist spacing="compact">
1246      <listitem><para>
1247        process class is G4DNAExcitation
1248      </para></listitem>
1249      <listitem><para>
1250        two complementary model classes are G4DNAMillerGreenExcitationModel
1251        (below 500 keV) and G4DNABornExcitationModel (above)               
1252      </para></listitem>
1253    </itemizedlist>
1254  </para></listitem>
1255
1256  <listitem><para>
1257    Ionisation
1258    <itemizedlist spacing="compact">
1259      <listitem><para>
1260        process class is G4DNAIonisation
1261      </para></listitem>
1262      <listitem><para>
1263        two complementary model classes are G4DNARuddIonisationModel
1264        (below 500 keV) and G4DNABornIonisationModel (above)
1265      </para></listitem>
1266    </itemizedlist>
1267  </para></listitem>
1268
1269  <listitem><para>
1270    Charge decrease
1271    <itemizedlist spacing="compact">
1272      <listitem><para>
1273        process class is G4DNAChargeDecrease
1274      </para></listitem>
1275      <listitem><para>
1276        model class is G4DNADingfelderChargeDecreaseModel
1277      </para></listitem>
1278    </itemizedlist>
1279  </para></listitem>
1280</itemizedlist>
1281</para>
1282
1283<!-- ******* Bridgehead ******* -->
1284<bridgehead renderas='sect4'>
1285 Hydrogen processes and models
1286</bridgehead>
1287<para>
1288<itemizedlist spacing="compact">
1289  <listitem><para>
1290    Ionisation
1291    <itemizedlist spacing="compact">
1292      <listitem><para>
1293        process class is G4DNAIonisation
1294      </para></listitem>
1295      <listitem><para>
1296        model class is G4DNARuddIonisationModel       
1297      </para></listitem>
1298    </itemizedlist>
1299  </para></listitem>
1300
1301  <listitem><para>
1302    Charge increase
1303    <itemizedlist spacing="compact">
1304      <listitem><para>
1305        process class is G4DNAChargeIncrease
1306      </para></listitem>
1307      <listitem><para>
1308        model class is G4DNADingfelderChargeIncreaseModel
1309      </para></listitem>
1310    </itemizedlist>
1311  </para></listitem>
1312</itemizedlist>
1313</para>
1314
1315<!-- ******* Bridgehead ******* -->
1316<bridgehead renderas='sect4'>
1317 Helium (neutral) processes and models
1318</bridgehead>
1319<para>
1320<itemizedlist spacing="compact">
1321  <listitem><para>
1322    Excitation
1323    <itemizedlist spacing="compact">
1324      <listitem><para>
1325        process class is G4DNAExcitation
1326      </para></listitem>
1327      <listitem><para>
1328        model class is G4DNAMillerGreenExcitationModel       
1329      </para></listitem>
1330    </itemizedlist>
1331  </para></listitem>
1332
1333  <listitem><para>
1334    Ionisation
1335    <itemizedlist spacing="compact">
1336      <listitem><para>
1337        process class is G4DNAIonisation         
1338      </para></listitem>
1339      <listitem><para>
1340        model class is G4DNARuddIonisationModel
1341      </para></listitem>
1342    </itemizedlist>
1343  </para></listitem>
1344
1345  <listitem><para>
1346    Charge increase
1347    <itemizedlist spacing="compact">
1348      <listitem><para>
1349        process class is G4DNAChargeIncrease
1350      </para></listitem>
1351      <listitem><para>
1352        model class is G4DNADingfelderChargeIncreaseModel
1353      </para></listitem>
1354    </itemizedlist>
1355  </para></listitem>
1356</itemizedlist>
1357</para>
1358
1359<!-- ******* Bridgehead ******* -->
1360<bridgehead renderas='sect4'>
1361 Helium+ (ionized once) processes and models
1362</bridgehead>
1363<para>
1364<itemizedlist spacing="compact">
1365  <listitem><para>
1366    Excitation
1367    <itemizedlist spacing="compact">
1368      <listitem><para>
1369        process class is G4DNAExcitation
1370      </para></listitem>
1371      <listitem><para>
1372        model class is G4DNAMillerGreenExcitationModel
1373      </para></listitem>
1374    </itemizedlist>
1375  </para></listitem>
1376
1377  <listitem><para>
1378    Ionisation
1379    <itemizedlist spacing="compact">
1380      <listitem><para>
1381        process class is G4DNAIonisation
1382      </para></listitem>
1383      <listitem><para>
1384        model classes is G4DNARuddIonisationModel
1385      </para></listitem>
1386    </itemizedlist>
1387  </para></listitem>
1388
1389  <listitem><para>
1390    Charge increase
1391    <itemizedlist spacing="compact">
1392      <listitem><para>
1393        process class is G4DNAChargeIncrease
1394      </para></listitem>
1395      <listitem><para>
1396        model classes is G4DNADingfelderChargeIncreaseModel       
1397      </para></listitem>
1398    </itemizedlist>
1399  </para></listitem>
1400
1401  <listitem><para>
1402    Charge decrease
1403    <itemizedlist spacing="compact">
1404      <listitem><para>
1405        process class is G4DNAChargeDecrease
1406      </para></listitem>
1407      <listitem><para>
1408        model classes is G4DNADingfelderChargeDecreaseModel
1409      </para></listitem>
1410    </itemizedlist>
1411  </para></listitem>
1412</itemizedlist>
1413</para>
1414
1415<!-- ******* Bridgehead ******* -->
1416<bridgehead renderas='sect4'>
1417 Helium++ (ionised twice) processes and models
1418</bridgehead>
1419<para>
1420<itemizedlist spacing="compact">
1421  <listitem><para>
1422    Excitation
1423    <itemizedlist spacing="compact">
1424      <listitem><para>
1425        process class is G4DNAExcitation
1426      </para></listitem>
1427      <listitem><para>
1428        model classes is G4DNAMillerGreenExcitationModel       
1429      </para></listitem>
1430    </itemizedlist>
1431  </para></listitem>
1432
1433  <listitem><para>
1434    Ionisation
1435    <itemizedlist spacing="compact">
1436      <listitem><para>
1437        process class is G4DNAIonisation
1438      </para></listitem>
1439      <listitem><para>
1440        model classes is G4DNARuddIonisationModel 
1441      </para></listitem>
1442    </itemizedlist>
1443  </para></listitem>
1444
1445  <listitem><para>
1446    Charge decrease
1447    <itemizedlist spacing="compact">
1448      <listitem><para>
1449        process class is G4DNAChargeDecrease
1450      </para></listitem>
1451      <listitem><para>
1452        model classes is G4DNADingfelderChargeDecreaseModel
1453      </para></listitem>
1454    </itemizedlist>
1455  </para></listitem>
1456</itemizedlist>
1457</para>
1458
1459<para>
1460An example of the registration of these processes in a physics list is
1461given here below and may be found in the microdosimetry advanced example.
1462
1463
1464<informalexample>
1465<programlisting>
1466#include "G4DNAElastic.hh"
1467#include "G4DNAChampionElasticModel.hh"
1468#include "G4DNAScreenedRutherfordElasticModel.hh"
1469
1470#include "G4DNAExcitation.hh"
1471#include "G4DNAEmfietzoglouExcitationModel.hh"
1472#include "G4DNAMillerGreenExcitationModel.hh"
1473#include "G4DNABornExcitationModel.hh"
1474
1475#include "G4DNAIonisation.hh"
1476#include "G4DNABornIonisationModel.hh"
1477#include "G4DNARuddIonisationModel.hh"
1478
1479#include "G4DNAChargeDecrease.hh"
1480#include "G4DNADingfelderChargeDecreaseModel.hh"
1481
1482#include "G4DNAChargeIncrease.hh"
1483#include "G4DNADingfelderChargeIncreaseModel.hh"
1484
1485//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1486
1487void PhysicsList::ConstructEM()
1488{
1489  theParticleIterator-&gt;reset();
1490
1491  while( (*theParticleIterator)() )
1492  {
1493
1494    G4ParticleDefinition* particle = theParticleIterator-&gt;value();
1495    G4ProcessManager* pmanager = particle-&gt;GetProcessManager();
1496    G4String particleName = particle-&gt;GetParticleName();
1497
1498// DNA processes per particle type
1499
1500    if (particleName == "e-") {
1501
1502      G4DNAElastic* theDNAElasticProcess = new G4DNAElastic("e-_G4DNAElastic");
1503      theDNAElasticProcess-&gt;SetModel(new G4DNAChampionElasticModel());
1504      // or alternative model
1505      // theDNAElasticProcess-&gt;SetModel(new G4DNAScreenedRutherfordElasticModel());
1506      pmanager-&gt;AddDiscreteProcess(theDNAElasticProcess);
1507
1508      pmanager-&gt;AddDiscreteProcess(new G4DNAExcitation("e-_G4DNAExcitation"));
1509      pmanager-&gt;AddDiscreteProcess(new G4DNAIonisation("e-_G4DNAIonisation"));
1510           
1511    } else if ( particleName == "proton" ) {
1512
1513      pmanager-&gt;AddDiscreteProcess(new G4DNAExcitation("proton_G4DNAExcitation"));
1514      pmanager-&gt;AddDiscreteProcess(new G4DNAIonisation("proton_G4DNAIonisation"));
1515      pmanager-&gt;AddDiscreteProcess(new G4DNAChargeDecrease("proton_G4DNAChargeDecrease"));
1516
1517    } else if ( particleName == "hydrogen" ) {
1518
1519      pmanager-&gt;AddDiscreteProcess(new G4DNAIonisation("hydrogen_G4DNAIonisation"));
1520      pmanager-&gt;AddDiscreteProcess(new G4DNAChargeIncrease("hydrogen_G4DNAChargeIncrease"));
1521
1522    } else if ( particleName == "alpha" ) {
1523
1524      pmanager-&gt;AddDiscreteProcess(new G4DNAExcitation("alpha_G4DNAExcitation"));
1525      pmanager-&gt;AddDiscreteProcess(new G4DNAIonisation("alpha_G4DNAIonisation"));
1526      pmanager-&gt;AddDiscreteProcess(new G4DNAChargeDecrease("alpha_G4DNAChargeDecrease"));
1527
1528    } else if ( particleName == "alpha+" ) {
1529
1530      pmanager-&gt;AddDiscreteProcess(new G4DNAExcitation("alpha+_G4DNAExcitation"));
1531      pmanager-&gt;AddDiscreteProcess(new G4DNAIonisation("alpha+_G4DNAIonisation"));
1532      pmanager-&gt;AddDiscreteProcess(new G4DNAChargeDecrease("alpha+_G4DNAChargeDecrease"));
1533      pmanager-&gt;AddDiscreteProcess(new G4DNAChargeIncrease("alpha+_G4DNAChargeIncrease"));
1534           
1535    } else if ( particleName == "helium" ) {
1536
1537      pmanager-&gt;AddDiscreteProcess(new G4DNAExcitation("helium_G4DNAExcitation"));
1538      pmanager-&gt;AddDiscreteProcess(new G4DNAIonisation("helium_G4DNAIonisation"));
1539      pmanager-&gt;AddDiscreteProcess(new G4DNAChargeIncrease("helium_G4DNAChargeIncrease"));
1540
1541    }
1542
1543  } // Loop on particles
1544}
1545
1546//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1547</programlisting>
1548</informalexample>
1549</para>
1550
1551<para>
1552Note that in the above example, "alpha" particles are helium atoms ionised
1553twice and "helium" particles are neutral helium atoms. The definition of
1554particles in the physics list may be for example implemented as follows :
1555
1556<informalexample>
1557<programlisting>
1558//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
1559
1560#include "G4DNAGenericIonsManager.hh"
1561void PhysicsList::ConstructBaryons()
1562{
1563// construct baryons ---
1564// Geant4 DNA particles
1565G4GenericIon::GenericIonDefinition() ;
1566G4DNAGenericIonsManager * genericIonsManager;
1567genericIonsManager=G4DNAGenericIonsManager::Instance();
1568genericIonsManager-&gt;GetIon("alpha++");
1569genericIonsManager-&gt;GetIon("alpha+");
1570genericIonsManager-&gt;GetIon("helium");
1571genericIonsManager-&gt;GetIon("hydrogen");
1572}
1573
1574//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
1575</programlisting>
1576</informalexample>
1577</para>
1578
1579<para>
1580To run the Geant4-DNA extension, data files need to be copied by the
1581user to his/her code repository. These files are distributed together
1582with the Geant4 release. The user should set the environment variable
1583G4LEDATA to the directory where he/she has copied the files.
1584</para>
1585
1586</sect3>
1587</sect2>
1588
1589
1590<!-- ******************* Section (Level#2) ****************** -->
1591<sect2 id="sect.PhysProc.Had">
1592<title>
1593Hadronic Interactions
1594</title>
1595
1596<para>
1597This section briefly introduces the hadronic physics processes
1598installed in Geant4. For details of the implementation of hadronic
1599interactions available in Geant4, please refer to the
1600<ulink url="http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/PhysicsReferenceManual/html/PhysicsReferenceManual.html">
1601<emphasis role="bold">Physics Reference Manual</emphasis></ulink>.
1602</para>
1603
1604<!-- ******************* Section (Level#3) ****************** -->
1605<sect3 id="sect.PhysProc.Had.TreatCross">
1606<title>
1607Treatment of Cross Sections
1608</title>
1609
1610<!-- ******* Bridgehead ******* -->
1611<bridgehead renderas='sect4'>
1612Cross section data sets
1613</bridgehead>
1614
1615<para>
1616Each hadronic process object (derived from
1617<emphasis>G4HadronicProcess</emphasis>) may have one or more cross section data
1618sets associated with it. The term "data set" is meant, in a broad
1619sense, to be an object that encapsulates methods and data for
1620calculating total cross sections for a given process. The methods
1621and data may take many forms, from a simple equation using a few
1622hard-wired numbers to a sophisticated parameterisation using large
1623data tables. Cross section data sets are derived from the abstract
1624class <emphasis>G4VCrossSectionDataSet</emphasis>, and are required to implement
1625the following methods:
1626
1627<informalexample>
1628<programlisting>
1629    G4bool IsApplicable( const G4DynamicParticle*, const G4Element* )
1630</programlisting>
1631</informalexample>
1632</para>
1633
1634<para>
1635This method must return <literal>True</literal> if the data set is able to
1636calculate a total cross section for the given particle and
1637material, and <literal>False</literal> otherwise.
1638
1639<informalexample>
1640<programlisting>
1641    G4double GetCrossSection( const G4DynamicParticle*, const G4Element* )
1642</programlisting>
1643</informalexample>
1644</para>
1645
1646<para>
1647This method, which will be invoked only if <literal>True</literal> was
1648returned by <literal>IsApplicable</literal>, must return a cross section, in
1649Geant4 default units, for the given particle and material.
1650
1651<informalexample>
1652<programlisting>
1653    void BuildPhysicsTable( const G4ParticleDefinition&amp; )
1654</programlisting>
1655</informalexample>
1656</para>
1657
1658<para>
1659This method may be invoked to request the data set to recalculate
1660its internal database or otherwise reset its state after a change
1661in the cuts or other parameters of the given particle type.
1662
1663
1664<informalexample>
1665<programlisting>
1666    void DumpPhysicsTable( const G4ParticleDefinition&amp; ) = 0
1667</programlisting>
1668</informalexample>
1669</para>
1670
1671<para>
1672This method may be invoked to request the data set to print its
1673internal database and/or other state information, for the given
1674particle type, to the standard output stream.
1675</para>
1676
1677<!-- ******* Bridgehead ******* -->
1678<bridgehead renderas='sect4'>
1679Cross section data store
1680</bridgehead>
1681
1682<para>
1683Cross section data sets are used by the process for the
1684calculation of the physical interaction length. A given cross
1685section data set may only apply to a certain energy range, or may
1686only be able to calculate cross sections for a particular type of
1687particle. The class <emphasis>G4CrossSectionDataStore</emphasis> has been
1688provided to allow the user to specify, if desired, a series of data
1689sets for a process, and to arrange the priority of data sets so
1690that the appropriate one is used for a given energy range,
1691particle, and material. It implements the following public
1692methods:
1693
1694<informalexample>
1695<programlisting>
1696    G4CrossSectionDataStore()
1697
1698   ~G4CrossSectionDataStore()
1699</programlisting>
1700</informalexample>
1701
1702and
1703
1704<informalexample>
1705<programlisting>
1706    G4double GetCrossSection( const G4DynamicParticle*, const G4Element* )
1707</programlisting>
1708</informalexample>
1709</para>
1710
1711<para>
1712For a given particle and material, this method returns a cross
1713section value provided by one of the collection of cross section
1714data sets listed in the data store object. If there are no known
1715data sets, a <literal>G4Exception</literal> is thrown and <literal>DBL_MIN</literal> is
1716returned. Otherwise, each data set in the list is queried, in
1717reverse list order, by invoking its <literal>IsApplicable</literal> method
1718for the given particle and material. The first data set object that
1719responds positively will then be asked to return a cross section
1720value via its <literal>GetCrossSection</literal> method. If no data set
1721responds positively, a <literal>G4Exception</literal> is thrown and
1722<literal>DBL_MIN</literal> is returned.
1723</para>
1724
1725<para>
1726<informalexample>
1727<programlisting>
1728    void AddDataSet( G4VCrossSectionDataSet* aDataSet )
1729</programlisting>
1730</informalexample>
1731
1732This method adds the given cross section data set to the end of the
1733list of data sets in the data store. For the evaluation of cross
1734sections, the list has a LIFO (Last In First Out) priority, meaning
1735that data sets added later to the list will have priority over
1736those added earlier to the list. Another way of saying this, is
1737that the data store, when given a <literal>GetCrossSection</literal> request,
1738does the <literal>IsApplicable</literal> queries in the reverse list order,
1739starting with the last data set in the list and proceeding to the
1740first, and the first data set that responds positively is used to
1741calculate the cross section.
1742</para>
1743
1744<para>
1745<informalexample>
1746<programlisting>
1747    void BuildPhysicsTable( const G4ParticleDefinition&amp; aParticleType )
1748</programlisting>
1749</informalexample>
1750
1751This method may be invoked to indicate to the data store that there
1752has been a change in the cuts or other parameters of the given
1753particle type. In response, the data store will invoke the
1754<literal>BuildPhysicsTable</literal> of each of its data sets.
1755</para>
1756
1757<para>
1758<informalexample>
1759<programlisting>
1760    void DumpPhysicsTable( const G4ParticleDefinition&amp; )
1761</programlisting>
1762</informalexample>
1763
1764This method may be used to request the data store to invoke the
1765<literal>DumpPhysicsTable</literal> method of each of its data sets.
1766</para>
1767
1768<!-- ******* Bridgehead ******* -->
1769<bridgehead renderas='sect4'>
1770Default cross sections
1771</bridgehead>
1772
1773<para>
1774The defaults for total cross section data and calculations have
1775been encapsulated in the singleton class
1776<emphasis>G4HadronCrossSections</emphasis>. Each hadronic process:
1777<emphasis>G4HadronInelasticProcess</emphasis>,
1778<emphasis>G4HadronElasticProcess</emphasis>,
1779<emphasis>G4HadronFissionProcess</emphasis>,
1780and <emphasis>G4HadronCaptureProcess</emphasis>,
1781comes already equipped with a cross section data store and a
1782default cross section data set. The data set objects are really
1783just shells that invoke the singleton <emphasis>G4HadronCrossSections</emphasis>
1784to do the real work of calculating cross sections.
1785</para>
1786
1787<para>
1788The default cross sections can be overridden in whole or in part
1789by the user. To this end, the base class <emphasis>G4HadronicProcess</emphasis>
1790has a ``get'' method:
1791
1792<informalexample>
1793<programlisting>
1794    G4CrossSectionDataStore* GetCrossSectionDataStore()
1795</programlisting>
1796</informalexample>
1797
1798which gives public access to the data store for each process. The
1799user's cross section data sets can be added to the data store
1800according to the following framework:
1801
1802<informalexample>
1803<programlisting>
1804    G4Hadron...Process aProcess(...)
1805
1806    MyCrossSectionDataSet myDataSet(...)
1807
1808    aProcess.GetCrossSectionDataStore()-&gt;AddDataSet( &amp;MyDataSet )
1809</programlisting>
1810</informalexample>
1811</para>
1812
1813<para>
1814The added data set will override the default cross section data
1815whenever so indicated by its <literal>IsApplicable</literal> method.
1816</para>
1817
1818<para>
1819In addition to the ``get'' method, <emphasis>G4HadronicProcess</emphasis> also
1820has the method
1821
1822<informalexample>
1823<programlisting>
1824    void SetCrossSectionDataStore( G4CrossSectionDataStore* )
1825</programlisting>
1826</informalexample>
1827
1828which allows the user to completely replace the default data
1829store with a new data store.
1830</para>
1831
1832<para>
1833It should be noted that a process does not send any information
1834about itself to its associated data store (and hence data set)
1835objects. Thus, each data set is assumed to be formulated to
1836calculate cross sections for one and only one type of process. Of
1837course, this does not prevent different data sets from sharing
1838common data and/or calculation methods, as in the case of the
1839<emphasis>G4HadronCrossSections</emphasis> class mentioned above. Indeed,
1840<emphasis>G4VCrossSectionDataSet</emphasis> specifies only the abstract interface
1841between physics processes and their data sets, and leaves the user
1842free to implement whatever sort of underlying structure is
1843appropriate.
1844</para>
1845
1846<para>
1847The current implementation of the data set
1848<emphasis>G4HadronCrossSections</emphasis> reuses the total cross-sections for
1849inelastic and elastic scattering, radiative capture and fission as
1850used with <emphasis role="bold">GHEISHA</emphasis> to provide cross-sections
1851for calculation
1852of the respective mean free paths of a given particle in a given
1853material.
1854</para>
1855
1856<!-- ******* Bridgehead ******* -->
1857<bridgehead renderas='sect4'>
1858Cross-sections for low energy neutron transport
1859</bridgehead>
1860
1861<para>
1862The cross section data for low energy neutron transport are
1863organized in a set of files that are read in by the corresponding
1864data set classes at time zero. Hereby the file system is used, in
1865order to allow highly granular access to the data. The ``root''
1866directory of the cross-section directory structure is accessed
1867through an environment variable, <literal>NeutronHPCrossSections</literal>,
1868which is to be set by the user. The classes accessing the total
1869cross-sections of the individual processes, i.e., the cross-section
1870data set classes for low energy neutron transport, are
1871<emphasis>G4NeutronHPElasticData</emphasis>,
1872<emphasis>G4NeutronHPCaptureData</emphasis>,
1873<emphasis>G4NeutronHPFissionData</emphasis>,
1874and <emphasis>G4NeutronHPInelasticData</emphasis>.
1875</para>
1876
1877<para>
1878For detailed descriptions of the low energy neutron total
1879cross-sections, they may be registered by the user as described
1880above with the data stores of the corresponding processes for
1881neutron interactions.
1882</para>
1883
1884<para>
1885It should be noted that using these total cross section classes
1886does not require that the neutron_hp models also be used. It is up
1887to the user to decide whethee this is desirable or not for his
1888particular problem.
1889</para>
1890
1891<para>
1892A prototype of the compact version of neutron cross sections derived from HP database
1893are provided with new classes <emphasis>G4NeutronHPElasticData</emphasis>,
1894<emphasis>G4NeutronCaptureXS</emphasis>,
1895<emphasis>G4NeutronElasticXS</emphasis>,
1896and <emphasis>G4NeutronInelasticXS</emphasis>.
1897</para>
1898
1899</sect3>
1900
1901<!-- ******************* Section (Level#3) ****************** -->
1902<sect3 id="sect.PhysProc.Had.AtRest">
1903<title>
1904Hadrons at Rest
1905</title>
1906
1907<!-- ******* Bridgehead ******* -->
1908<bridgehead renderas='sect4'>
1909List of implemented "Hadron at Rest" processes
1910</bridgehead>
1911
1912<para>
1913The following process classes have been implemented:
1914
1915<itemizedlist spacing="compact">
1916  <listitem><para>
1917    pi- absorption (class name <emphasis>G4PionMinusAbsorptionAtRest</emphasis>
1918    or <emphasis>G4PiMinusAbsorptionAtRest</emphasis>)
1919  </para></listitem>
1920  <listitem><para>
1921    kaon- absorption (class name <emphasis>G4KaonMinusAbsorptionAtRest</emphasis>
1922    or <emphasis>G4KaonMinusAbsorption</emphasis>)
1923  </para></listitem>
1924  <listitem><para>
1925    neutron capture (class name <emphasis>G4NeutronCaptureAtRest</emphasis>)
1926  </para></listitem>
1927  <listitem><para>
1928    anti-proton annihilation (class name
1929    <emphasis>G4AntiProtonAnnihilationAtRest</emphasis>)
1930  </para></listitem>
1931  <listitem><para>
1932    anti-neutron annihilation (class name
1933    <emphasis>G4AntiNeutronAnnihilationAtRest</emphasis>)
1934  </para></listitem>
1935  <listitem><para>
1936    mu- capture (class name <emphasis>G4MuonMinusCaptureAtRest</emphasis>)
1937  </para></listitem>
1938  <listitem><para>
1939    alternative CHIPS model for any negativly charged particle
1940    (class name <emphasis>G4QCaptureAtRest</emphasis>)
1941  </para></listitem>
1942</itemizedlist>
1943</para>
1944
1945<para>
1946Obviously the last process does not, strictly speaking, deal with a
1947``hadron at rest''. It does, nonetheless, share common features
1948with the others in the above list because of the implementation
1949model chosen. The differences between the alternative
1950implementation for kaon and pion absorption concern the fast part
1951of the emitted particle spectrum. G4PiMinusAbsorptionAtRest, and
1952G4KaonMinusAbsorptionAtRest focus especially on a good description
1953of this part of the spectrum.
1954</para>
1955
1956<!-- ******* Bridgehead ******* -->
1957<bridgehead renderas='sect4'>
1958Implementation Interface to Geant4
1959</bridgehead>
1960
1961<para>
1962All of these classes are derived from the abstract class
1963<emphasis>G4VRestProcess</emphasis>. In addition to the constructor and
1964destructor methods, the following public methods of the abstract
1965class have been implemented for each of the above six
1966processes:
1967
1968<itemizedlist spacing="compact">
1969  <listitem><para>
1970    <para>
1971    <literal>AtRestGetPhysicalInteractionLength( const G4Track&amp;,
1972    G4ForceCondition* )</literal>
1973    </para>
1974    <para>
1975    This method returns the time taken before the interaction actually
1976    occurs. In all processes listed above, except for muon capture, a
1977    value of zero is returned. For the muon capture process the muon
1978    capture lifetime is returned.
1979    </para>
1980  </para></listitem>
1981  <listitem><para>
1982    <para>
1983    <literal>AtRestDoIt( const G4Track&amp;, const G4Step&amp;)</literal>
1984    </para>
1985    <para>
1986    This method generates the secondary particles produced by the
1987    process.
1988    </para>
1989  </para></listitem>
1990  <listitem><para>
1991    <para>
1992    <literal>IsApplicable( const G4ParticleDefinition&amp; )</literal>
1993    </para>
1994    <para>
1995    This method returns the result of a check to see if the process is
1996    possible for a given particle.
1997    </para>
1998  </para></listitem>
1999</itemizedlist>
2000</para>
2001
2002
2003<!-- ******* Bridgehead ******* -->
2004<bridgehead renderas='sect4'>
2005Example of how to use a hadron at rest process
2006</bridgehead>
2007
2008<para>
2009Including a ``hadron at rest'' process for a particle, a pi- for
2010example, into the Geant4 system is straightforward and can be done
2011in the following way:
2012
2013<itemizedlist spacing="compact">
2014  <listitem><para>
2015    create a process:
2016    <informalexample>
2017    <programlisting>
2018       theProcess = new G4PionMinusAbsorptionAtRest();
2019    </programlisting>
2020    </informalexample>
2021  </para></listitem>
2022  <listitem><para>
2023    register the process with the particle's process manager:
2024    <informalexample>
2025    <programlisting>
2026       theParticleDef = G4PionMinus::PionMinus();
2027       G4ProcessManager* pman = theParticleDef-&gt;GetProcessManager();
2028       pman-&gt;AddRestProcess( theProcess );
2029    </programlisting>
2030    </informalexample>
2031  </para></listitem>
2032</itemizedlist>
2033</para>
2034
2035</sect3>
2036
2037<!-- ******************* Section (Level#3) ****************** -->
2038<sect3 id="sect.PhysProc.Had.Flight">
2039<title>
2040Hadrons in Flight
2041</title>
2042
2043<!-- ******* Bridgehead ******* -->
2044<bridgehead renderas='sect4'>
2045What processes do you need?
2046</bridgehead>
2047
2048<para>
2049For hadrons in motion, there are four physics process classes.
2050<xref linkend="table.PhysProc_1" /> shows each process and the
2051particles for which it is relevant.
2052
2053<table id="table.PhysProc_1">
2054<title>
2055Hadronic processes and relevant particles.
2056</title>
2057
2058<tgroup cols="2">
2059  <tbody>
2060  <row>
2061    <entry>
2062      <emphasis>G4HadronElasticProcess</emphasis>
2063    </entry>
2064    <entry>
2065      pi+, pi-, K<superscript>+</superscript>,
2066      K<superscript>0</superscript><subscript>S</subscript>,
2067      K<superscript>0</superscript><subscript>L</subscript>,
2068      K<superscript>-</superscript>,
2069      p, p-bar, n, n-bar, lambda, lambda-bar,
2070      Sigma<superscript>+</superscript>, Sigma<superscript>-</superscript>,
2071      Sigma<superscript>+</superscript>-bar,
2072      Sigma<superscript>-</superscript>-bar,
2073      Xi<superscript>0</superscript>, Xi<superscript>-</superscript>,
2074      Xi<superscript>0</superscript>-bar, Xi<superscript>-</superscript>-bar
2075    </entry>
2076  </row>
2077  <row>
2078    <entry>
2079      <emphasis>G4HadronInelasticProcess</emphasis>
2080    </entry>
2081    <entry>
2082      pi+, pi-, K<superscript>+</superscript>,
2083      K<superscript>0</superscript><subscript>S</subscript>,
2084      K<superscript>0</superscript><subscript>L</subscript>,
2085      K<superscript>-</superscript>,
2086      p, p-bar, n, n-bar, lambda, lambda-bar,
2087      Sigma<superscript>+</superscript>, Sigma<superscript>-</superscript>,
2088      Sigma<superscript>+</superscript>-bar,
2089      Sigma<superscript>-</superscript>-bar, Xi<superscript>0</superscript>,
2090      Xi<superscript>-</superscript>, Xi<superscript>0</superscript>-bar,
2091      Xi<superscript>-</superscript>-bar
2092    </entry>
2093  </row>
2094  <row>
2095    <entry>
2096      <emphasis>G4HadronFissionProcess</emphasis>
2097    </entry>
2098    <entry>
2099      all
2100    </entry>
2101  </row>
2102  <row>
2103    <entry>
2104      <emphasis>G4CaptureProcess</emphasis>
2105    </entry>
2106    <entry>
2107      n, n-bar
2108    </entry>
2109  </row>
2110  </tbody>
2111</tgroup>
2112</table>
2113</para>
2114
2115<!-- ******* Bridgehead ******* -->
2116<bridgehead renderas='sect4'>
2117How to register Models
2118</bridgehead>
2119
2120<para>
2121To register an inelastic process model for a particle, a proton
2122for example, first get the pointer to the particle's process
2123manager:
2124
2125<informalexample>
2126<programlisting>
2127   G4ParticleDefinition *theProton = G4Proton::ProtonDefinition();
2128   G4ProcessManager *theProtonProcMan = theProton-&gt;GetProcessManager();
2129</programlisting>
2130</informalexample>
2131</para>
2132
2133<para>
2134Create an instance of the particle's inelastic process:
2135
2136<informalexample>
2137<programlisting>
2138   G4ProtonInelasticProcess *theProtonIEProc = new G4ProtonInelasticProcess();
2139</programlisting>
2140</informalexample>
2141</para>
2142
2143<para>
2144Create an instance of the model which determines the secondaries
2145produced in the interaction, and calculates the momenta of the
2146particles:
2147
2148<informalexample>
2149<programlisting>
2150   G4LEProtonInelastic *theProtonIE = new G4LEProtonInelastic();
2151</programlisting>
2152</informalexample>
2153</para>
2154
2155<para>
2156Register the model with the particle's inelastic process:
2157
2158<informalexample>
2159<programlisting>
2160   theProtonIEProc-&gt;RegisterMe( theProtonIE );
2161</programlisting>
2162</informalexample>
2163</para>
2164
2165<para>
2166Finally, add the particle's inelastic process to the list of
2167discrete processes:
2168
2169<informalexample>
2170<programlisting>
2171   theProtonProcMan-&gt;AddDiscreteProcess( theProtonIEProc );
2172</programlisting>
2173</informalexample>
2174</para>
2175
2176<para>
2177The particle's inelastic process class,
2178<emphasis>G4ProtonInelasticProcess</emphasis> in the example above, derives from
2179the <emphasis>G4HadronicInelasticProcess</emphasis> class, and simply defines the
2180process name and calls the <emphasis>G4HadronicInelasticProcess</emphasis>
2181constructor. All of the specific particle inelastic processes
2182derive from the <emphasis>G4HadronicInelasticProcess</emphasis> class, which
2183calls the <literal>PostStepDoIt</literal> function, which returns the
2184particle change object from the <emphasis>G4HadronicProcess</emphasis> function
2185<literal>GeneralPostStepDoIt</literal>. This class also gets the mean free
2186path, builds the physics table, and gets the microscopic cross
2187section. The <emphasis>G4HadronicInelasticProcess</emphasis> class derives from
2188the <emphasis>G4HadronicProcess</emphasis> class, which is the top level hadronic
2189process class. The <emphasis>G4HadronicProcess</emphasis> class derives from the
2190<emphasis>G4VDiscreteProcess</emphasis> class. The inelastic, elastic, capture,
2191and fission processes derive from the <emphasis>G4HadronicProcess</emphasis>
2192class. This pure virtual class also provides the energy range
2193manager object and the <literal>RegisterMe</literal> access function.
2194</para>
2195
2196<para>
2197A sample case for the proton's inelastic interaction model class
2198is shown in <xref linkend="programlist_PhysProc_3" />, where
2199<literal>G4LEProtonInelastic.hh</literal> is the name of the include
2200file:
2201
2202<example id="programlist_PhysProc_3">
2203<title>
2204An example of a proton inelastic interaction model class.
2205</title>
2206
2207<programlisting>
2208 ----------------------------- include file ------------------------------------------
2209
2210#include "G4InelasticInteraction.hh"
2211 class G4LEProtonInelastic : public G4InelasticInteraction
2212 {
2213 public:
2214    G4LEProtonInelastic() : G4InelasticInteraction()
2215    {
2216      SetMinEnergy( 0.0 );
2217      SetMaxEnergy( 25.*GeV );
2218    }
2219    ~G4LEProtonInelastic() { }
2220    G4ParticleChange *ApplyYourself( const G4Track &amp;aTrack,
2221                                     G4Nucleus &amp;targetNucleus );
2222 private:
2223    void CascadeAndCalculateMomenta( required arguments );
2224 };
2225
2226 ----------------------------- source file ------------------------------------------
2227
2228 #include "G4LEProtonInelastic.hh"
2229 G4ParticleChange *
2230  G4LEProton Inelastic::ApplyYourself( const G4Track &amp;aTrack,
2231                                       G4Nucleus &amp;targetNucleus )
2232  {
2233    theParticleChange.Initialize( aTrack );
2234    const G4DynamicParticle *incidentParticle = aTrack.GetDynamicParticle();
2235    // create the target particle
2236    G4DynamicParticle *targetParticle = targetNucleus.ReturnTargetParticle();
2237    CascadeAndCalculateMomenta( required arguments )
2238    { ... }
2239    return &amp;theParticleChange;
2240  }
2241</programlisting>
2242</example>
2243</para>
2244
2245<para>
2246The <literal>CascadeAndCalculateMomenta</literal> function is the bulk of
2247the model and is to be provided by the model's creator. It should
2248determine what secondary particles are produced in the interaction,
2249calculate the momenta for all the particles, and put this
2250information into the <emphasis>ParticleChange</emphasis> object which is
2251returned.
2252</para>
2253
2254<para>
2255The <emphasis>G4LEProtonInelastic</emphasis> class derives from the
2256<emphasis>G4InelasticInteraction</emphasis> class, which is an abstract base
2257class since the pure virtual function <literal>ApplyYourself</literal> is not
2258defined there. <emphasis>G4InelasticInteraction</emphasis> itself derives from
2259the <emphasis>G4HadronicInteraction</emphasis> abstract base class. This class is
2260the base class for all the model classes. It sorts out the energy
2261range for the models and provides class utilities. The
2262<emphasis>G4HadronicInteraction</emphasis> class provides the
2263<literal>Set/GetMinEnergy</literal> and the <literal>Set/GetMaxEnergy</literal>
2264functions which determine the minimum and maximum energy range for
2265the model. An energy range can be set for a specific element, a
2266specific material, or for general applicability:
2267
2268<informalexample>
2269<programlisting>
2270 void SetMinEnergy( G4double anEnergy, G4Element *anElement )
2271 void SetMinEnergy( G4double anEnergy, G4Material *aMaterial )
2272 void SetMinEnergy( const G4double anEnergy )
2273 void SetMaxEnergy( G4double anEnergy, G4Element *anElement )
2274 void SetMaxEnergy( G4double anEnergy, G4Material *aMaterial )
2275 void SetMaxEnergy( const G4double anEnergy )
2276</programlisting>
2277</informalexample>
2278</para>
2279
2280<!-- ******* Bridgehead ******* -->
2281<bridgehead renderas='sect4'>
2282Which models are there, and what are the defaults
2283</bridgehead>
2284
2285<para>
2286In Geant4, any model can be run together with any other model
2287without the need for the implementation of a special interface, or
2288batch suite, and the ranges of applicability for the different
2289models can be steered at initialisation time. This way, highly
2290specialised models (valid only for one material and particle, and
2291applicable only in a very restricted energy range) can be used in
2292the same application, together with more general code, in a
2293coherent fashion.
2294</para>
2295
2296<para>
2297Each model has an intrinsic range of applicability, and the
2298model chosen for a simulation depends very much on the use-case.
2299Consequently, there are no ``defaults''. However, physics lists are
2300provided which specify sets of models for various purposes.
2301</para>
2302
2303<para>
2304Three types of hadronic shower models have been implemented:
2305parametrisation driven models, data driven models, and theory
2306driven models.
2307
2308<itemizedlist spacing="compact">
2309  <listitem><para>
2310    Parametrisation driven models are used for all processes
2311    pertaining to particles coming to rest, and interacting with the
2312    nucleus. For particles in flight, two sets of models exist for
2313    inelastic scattering; low energy, and high energy models. Both sets
2314    are based originally on the <emphasis role="bold">GHEISHA</emphasis> 
2315    package of Geant3.21,
2316    and the original approaches to primary interaction, nuclear
2317    excitation, intra-nuclear cascade and evaporation is kept. The
2318    models are located in the sub-directories
2319    <literal>hadronics/models/low_energy</literal> and
2320    <literal>hadronics/models/high_energy</literal>. The low energy models are
2321    targeted towards energies below 20 GeV; the high energy models
2322    cover the energy range from 20 GeV to O(TeV). Fission, capture and
2323    coherent elastic scattering are also modeled through parametrised
2324    models.
2325  </para></listitem>
2326  <listitem><para>
2327    Data driven models are available for the transport of low
2328    energy neutrons in matter in sub-directory
2329    <literal>hadronics/models/neutron_hp</literal>. The modeling is based
2330    on the data formats of <emphasis role="bold">ENDF/B-VI</emphasis>,
2331    and all distributions of this standard data format are implemented.
2332    The data sets used are selected from data libraries that conform to
2333    these standard formats. The file system is used in order to allow granular
2334    access to, and flexibility in, the use of the cross sections for different
2335    isotopes, and channels. The energy coverage of these models is from
2336    thermal energies to 20 MeV.
2337  </para></listitem>
2338  <listitem><para>
2339    Theory driven models are available for inelastic scattering in
2340    a first implementation, covering the full energy range of LHC
2341    experiments. They are located in sub-directory
2342    <literal>hadronics/models/generator</literal>. The current philosophy
2343    implies the usage of parton string models at high energies, of
2344    intra-nuclear transport models at intermediate energies, and of
2345    statistical break-up models for de-excitation.
2346  </para></listitem>
2347</itemizedlist>
2348</para>
2349
2350</sect3>
2351</sect2>
2352
2353<!-- ******************* Section (Level#2) ****************** -->
2354<sect2 id="sect.PhysProc.Decay">
2355<title>
2356Particle Decay Process
2357</title>
2358
2359<para>
2360This section briefly introduces decay processes installed in
2361Geant4. For details of the implementation of particle decays,
2362please refer to the
2363<ulink url="http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/PhysicsReferenceManual/html/PhysicsReferenceManual.html">
2364<emphasis role="bold">Physics Reference Manual</emphasis></ulink>.
2365</para>
2366
2367<!-- ******************* Section (Level#3) ****************** -->
2368<sect3 id="sect.PhysProc.Decay.Class">
2369<title>
2370Particle Decay Class
2371</title>
2372
2373<para>
2374Geant4 provides a <emphasis>G4Decay</emphasis> class for both ``at rest'' and
2375``in flight'' particle decays. <emphasis>G4Decay</emphasis> can be applied to all
2376particles except:
2377
2378<variablelist>
2379  <varlistentry>
2380    <term>
2381      massless particles, i.e.,
2382    </term>
2383    <listitem>
2384      <literal>G4ParticleDefinition::thePDGMass &lt;= 0</literal>
2385    </listitem>
2386  </varlistentry>
2387  <varlistentry>
2388    <term>
2389      particles with ``negative'' life time, i.e.,
2390    </term>
2391    <listitem>
2392      <literal>G4ParticleDefinition::thePDGLifeTime &lt; 0</literal>
2393    </listitem>
2394  </varlistentry>
2395  <varlistentry>
2396    <term>
2397      shortlived particles, i.e.,
2398    </term>
2399    <listitem>
2400      <literal>G4ParticleDefinition::fShortLivedFlag = True</literal>
2401    </listitem>
2402  </varlistentry>
2403</variablelist>
2404</para>
2405
2406<para>
2407Decay for some particles may be switched on or off by using
2408<literal>G4ParticleDefinition::SetPDGStable()</literal> as well as
2409<literal>ActivateProcess()</literal> and <literal>InActivateProcess()</literal> 
2410methods of <emphasis>G4ProcessManager</emphasis>.
2411</para>
2412
2413<para>
2414<emphasis>G4Decay</emphasis> proposes the step length (or step time for
2415<literal>AtRest</literal>) according to the lifetime of the particle unless
2416<literal>PreAssignedDecayProperTime</literal> is defined in
2417<emphasis>G4DynamicParticle</emphasis>.
2418</para>
2419
2420<para>
2421The <emphasis>G4Decay</emphasis> class itself does not define decay modes of
2422the particle. Geant4 provides two ways of doing this:
2423
2424<itemizedlist spacing="compact">
2425  <listitem><para>
2426    using <emphasis>G4DecayChannel</emphasis> in <emphasis>G4DecayTable</emphasis>,
2427    and
2428  </para></listitem>
2429  <listitem><para>
2430    using <literal>thePreAssignedDecayProducts</literal> of
2431    <emphasis>G4DynamicParticle</emphasis>
2432  </para></listitem>
2433</itemizedlist>
2434</para>
2435
2436<para>
2437The <emphasis>G4Decay</emphasis> class calculates the
2438<literal>PhysicalInteractionLength</literal> and boosts decay products
2439created by <emphasis>G4VDecayChannel</emphasis> or event generators. See below
2440for information on the determination of the decay modes.
2441</para>
2442
2443<para>
2444An object of <emphasis>G4Decay</emphasis> can be shared by particles.
2445Registration of the decay process to particles in the
2446<literal>ConstructPhysics</literal> method of <emphasis>PhysicsList</emphasis> 
2447(see <xref linkend="sect.HowToSpecPhysProc.SpecPhysProc" />)
2448is shown in <xref linkend="programlist_PhysProc_4" />.
2449
2450<example id="programlist_PhysProc_4">
2451<title>
2452Registration of the decay process to particles in the
2453<literal>ConstructPhysics</literal> method of <emphasis>PhysicsList</emphasis>.
2454</title>
2455
2456<programlisting>
2457#include "G4Decay.hh"
2458void ExN02PhysicsList::ConstructGeneral()
2459{
2460  // Add Decay Process
2461  G4Decay* theDecayProcess = new G4Decay();
2462  theParticleIterator-&gt;reset();
2463  while( (*theParticleIterator)() ){
2464    G4ParticleDefinition* particle = theParticleIterator-&gt;value();
2465    G4ProcessManager* pmanager = particle-&gt;GetProcessManager();
2466    if (theDecayProcess-&gt;IsApplicable(*particle)) {
2467      pmanager -&gt;AddProcess(theDecayProcess);
2468      // set ordering for PostStepDoIt and AtRestDoIt
2469      pmanager -&gt;SetProcessOrdering(theDecayProcess, idxPostStep);
2470      pmanager -&gt;SetProcessOrdering(theDecayProcess, idxAtRest);
2471    }
2472  }
2473}
2474</programlisting>
2475</example>
2476</para>
2477
2478</sect3>
2479
2480<!-- ******************* Section (Level#3) ****************** -->
2481<sect3 id="sect.PhysProc.Decay.Table">
2482<title>
2483Decay Table
2484</title>
2485
2486<para>
2487Each particle has its <emphasis>G4DecayTable</emphasis>, which stores information
2488on the decay modes of the particle. Each decay mode, with its
2489branching ratio, corresponds to an object of various ``decay
2490channel'' classes derived from <emphasis>G4VDecayChannel</emphasis>. Default
2491decay modes are created in the constructors of particle classes.
2492For example, the decay table of the neutral pion has
2493<emphasis>G4PhaseSpaceDecayChannel</emphasis> and
2494<emphasis>G4DalitzDecayChannel</emphasis> as follows:
2495
2496<informalexample>
2497<programlisting>
2498  // create a decay channel
2499  G4VDecayChannel* mode;
2500  // pi0 -&gt; gamma + gamma
2501  mode = new G4PhaseSpaceDecayChannel("pi0",0.988,2,"gamma","gamma");
2502  table-&gt;Insert(mode);
2503  // pi0 -&gt; gamma + e+ + e-
2504  mode = new G4DalitzDecayChannel("pi0",0.012,"e-","e+");
2505  table-&gt;Insert(mode);
2506</programlisting>
2507</informalexample>
2508</para>
2509
2510<para>
2511Decay modes and branching ratios defined in Geant4 are listed in
2512<xref linkend="sect.Parti.Def" />.
2513</para>
2514
2515<para>
2516Branching ratios and life time can be set in tracking time.
2517<informalexample>
2518<programlisting>
2519  // set lifetime
2520  G4Neutron::Neutron()->SetPDGLifeTime(885.7*second);
2521  // allow neutron decay
2522  G4Neutron::Neutron()->SetPDGStable(false);
2523</programlisting>
2524</informalexample>
2525</para>
2526
2527<para>
2528Branching ratios and life time can be modified by using user commands, also.
2529</para>
2530
2531<para>
2532<emphasis role="bold">Example: Set 100% br for dalitz decay of pi0</emphasis>
2533
2534<informalexample>
2535<programlisting>
2536  Idle&gt; /particle/select pi0
2537  Idle&gt; /particle/property/decay/select 0
2538  Idle&gt; /particle/property/decay/br 0
2539  Idle&gt; /particle/property/decay/select 1
2540  Idle&gt; /particle/property/decay/br 1
2541  Idle&gt; /particle/property/decay/dump
2542        G4DecayTable:  pi0
2543           0:  BR:  0  [Phase Space]   :   gamma gamma
2544           1:  BR:  1  [Dalitz Decay]  :   gamma e- e+
2545</programlisting>
2546</informalexample>
2547
2548</para>
2549
2550</sect3>
2551
2552<!-- ******************* Section (Level#3) ****************** -->
2553<sect3 id="sect.PhysProc.Decay.PreAssgn">
2554<title>
2555Pre-assigned Decay Modes by Event Generators
2556</title>
2557
2558<para>
2559Decays of heavy flavor particles such as B mesons are very complex,
2560with many varieties of decay modes and decay mechanisms. There are
2561many models for heavy particle decay provided by various event
2562generators and it is impossible to define all the decay modes of
2563heavy particles by using <emphasis>G4VDecayChannel</emphasis>. In other words,
2564decays of heavy particles cannot be defined by the Geant4 decay
2565process, but should be defined by event generators or other
2566external packages. Geant4 provides two ways to do this:
2567<literal>pre-assigned decay mode</literal> and <literal>external decayer</literal>.
2568</para>
2569
2570<para>
2571In the latter approach, the class <emphasis>G4VExtDecayer</emphasis> is used
2572for the interface to an external package which defines decay modes
2573for a particle. If an instance of <emphasis>G4VExtDecayer</emphasis> is attached
2574to <emphasis>G4Decay</emphasis>, daughter particles will be generated by the
2575external decay handler.
2576</para>
2577
2578<para>
2579In the former case, decays of heavy particles are simulated by
2580an event generator and the primary event contains the decay
2581information. <emphasis>G4VPrimaryGenerator</emphasis> automatically attaches any
2582daughter particles to the parent particle as the
2583PreAssignedDecayProducts member of <emphasis>G4DynamicParticle</emphasis>.
2584<emphasis>G4Decay</emphasis> adopts these pre-assigned daughter particles instead
2585of asking <emphasis>G4VDecayChannel</emphasis> to generate decay products.
2586</para>
2587
2588<para>
2589In addition, the user may assign a <literal>pre-assigned</literal> decay
2590time for a specific track in its rest frame (i.e. decay time is
2591defined in the proper time) by using the
2592<emphasis>G4PrimaryParticle::SetProperTime()</emphasis> method.
2593<emphasis>G4VPrimaryGenerator</emphasis> sets the PreAssignedDecayProperTime
2594member of <emphasis>G4DynamicParticle</emphasis>. <emphasis>G4Decay</emphasis> 
2595uses this decay time instead of the life time of the particle type.
2596</para>
2597
2598</sect3>
2599</sect2>
2600
2601
2602<!-- ******************* Section (Level#2) ****************** -->
2603<sect2 id="sect.PhysProc.PhotoHad">
2604<title>
2605Photolepton-hadron Processes
2606</title>
2607
2608<para>
2609To be delivered.
2610</para>
2611
2612</sect2>
2613
2614
2615<!-- ******************* Section (Level#2) ****************** -->
2616<sect2 id="sect.PhysProc.Photo">
2617<title>
2618Optical Photon Processes
2619</title>
2620
2621<para>
2622A photon is considered to be <emphasis>optical</emphasis> when its wavelength
2623is much greater than the typical atomic spacing. In GEANT4 optical
2624photons are treated as a class of particle distinct from their
2625higher energy <emphasis>gamma</emphasis> cousins. This implementation allows the
2626wave-like properties of electromagnetic radiation to be
2627incorporated into the optical photon process. Because this
2628theoretical description breaks down at higher energies, there is no
2629smooth transition as a function of energy between the optical
2630photon and gamma particle classes.
2631</para>
2632
2633<para>
2634For the simulation of optical photons to work correctly in
2635GEANT4, they must be imputed a linear polarization. This is unlike
2636most other particles in GEANT4 but is automatically and correctly
2637done for optical photons that are generated as secondaries by
2638existing processes in GEANT4. Not so, if the user wishes to start
2639optical photons as primary particles. In this case, the user must
2640set the linear polarization using particle gun methods, the General
2641Particle Source, or his/her PrimaryGeneratorAction. For an
2642unpolarized source, the linear polarization should be sampled
2643randomly for each new primary photon.
2644</para>
2645
2646<para>
2647The GEANT4 catalogue of processes at optical wavelengths
2648includes refraction and reflection at medium boundaries, bulk
2649absorption and Rayleigh scattering. Processes which produce optical
2650photons include the Cerenkov effect, transition radiation and
2651scintillation. Optical photons are generated in GEANT4 without
2652energy conservation and their energy must therefore not be tallied
2653as part of the energy balance of an event.
2654</para>
2655
2656<para>
2657The optical properties of the medium which are key to the
2658implementation of these types of processes are stored as entries in
2659a <literal>G4MaterialPropertiesTable</literal> which is linked to the
2660<literal>G4Material</literal> in question. These properties may be constants
2661or they may be expressed as a function of the photon's wavelength.
2662This table is a private data member of the <literal>G4Material</literal>
2663class. The <literal>G4MaterialPropertiesTable</literal> is implemented as a
2664hash directory, in which each entry consists of a <emphasis>value</emphasis> and
2665a <emphasis>key</emphasis>. The key is used to quickly and efficiently retrieve
2666the corresponding value. All values in the dictionary are either
2667instantiations of <literal>G4double</literal> or the class
2668<literal>G4MaterialPropertyVector</literal>, and all keys are of type
2669<literal>G4String</literal>.
2670</para>
2671
2672<para>
2673A <literal>G4MaterialPropertyVector</literal> is composed of
2674instantiations of the class <literal>G4MPVEntry</literal>. The
2675<literal>G4MPVEntry</literal> is a pair of numbers, which in the case of an
2676optical property, are the photon momentum and corresponding
2677property value. The <literal>G4MaterialPropertyVector</literal> is
2678implemented as a <literal>G4std::vector</literal>, with the sorting operation
2679defined as
2680MPVEntry<subscript>1</subscript> &lt; MPVEntry<subscript>2</subscript> ==
2681photon_momentum<subscript>1</subscript> &lt; photon_momentum<subscript>2</subscript>.
2682This results in all <literal>G4MaterialPropertyVector</literal>s being sorted in
2683ascending order of photon momenta. It is possible for the user to
2684add as many material (optical) properties to the material as he
2685wishes using the methods supplied by the
2686<literal>G4MaterialPropertiesTable</literal> class. An example of this is
2687shown in <xref linkend="programlist_PhysProc_5" />.
2688
2689<example id="programlist_PhysProc_5">
2690<title>
2691Optical properties added to a <literal>G4MaterialPropertiesTable</literal> 
2692and linked to a <literal>G4Material</literal>
2693</title>
2694
2695<programlisting>
2696const G4int NUMENTRIES = 32;
2697
2698G4double ppckov[NUMENTRIES] = {2.034*eV, ......, 4.136*eV};
2699G4double rindex[NUMENTRIES] = {1.3435, ......, 1.3608};
2700G4double absorption[NUMENTRIES] = {344.8*cm, ......, 1450.0*cm];
2701
2702G4MaterialPropertiesTable *MPT = new G4MaterialPropertiesTable();
2703
2704MPT -&gt; AddConstProperty("SCINTILLATIONYIELD",100./MeV);
2705
2706MPT -&gt; AddProperty("RINDEX",ppckov,rindex,NUMENTRIES};
2707MPT -&gt; AddProperty("ABSLENGTH",ppckov,absorption,NUMENTRIES};
2708
2709scintillator -&gt; SetMaterialPropertiesTable(MPT);
2710</programlisting>
2711</example>
2712</para>
2713
2714
2715<!-- ******************* Section (Level#3) ****************** -->
2716<sect3 id="sect.PhysProc.Photo.Cerenkov">
2717<title>
2718Generation of Photons in
2719<literal>processes/electromagnetic/xrays</literal> - Cerenkov Effect
2720</title>
2721
2722<para>
2723The radiation of Cerenkov light occurs when a charged particle
2724moves through a dispersive medium faster than the group velocity of
2725light in that medium. Photons are emitted on the surface of a cone,
2726whose opening angle with respect to the particle's instantaneous
2727direction decreases as the particle slows down. At the same time,
2728the frequency of the photons emitted increases, and the number
2729produced decreases. When the particle velocity drops below the
2730local speed of light, the radiation ceases and the emission cone
2731angle collapses to zero. The photons produced by this process have
2732an inherent polarization perpendicular to the cone's surface at
2733production.
2734</para>
2735
2736<para>
2737The flux, spectrum, polarization and emission of Cerenkov
2738radiation in the <literal>AlongStepDoIt</literal> method of the class
2739<literal>G4Cerenkov</literal> follow well-known formulae, with two inherent
2740computational limitations. The first arises from step-wise
2741simulation, and the second comes from the requirement that
2742numerical integration calculate the average number of Cerenkov
2743photons per step. The process makes use of a
2744<literal>G4PhysicsTable</literal> which contains incremental integrals to
2745expedite this calculation.
2746</para>
2747
2748<para>
2749The time and position of Cerenkov photon emission are calculated
2750from quantities known at the beginning of a charged particle's
2751step. The step is assumed to be rectilinear even in the presence of
2752a magnetic field. The user may limit the step size by specifying a
2753maximum (average) number of Cerenkov photons created during the
2754step, using the <literal>SetMaxNumPhotonsPerStep(const G4int
2755NumPhotons)</literal> method. The actual number generated will
2756necessarily be different due to the Poissonian nature of the
2757production. In the present implementation, the production density
2758of photons is distributed evenly along the particle's track
2759segment, even if the particle has slowed significantly during the
2760step.
2761</para>
2762
2763<para>
2764The frequently very large number of secondaries produced in a
2765single step (about 300/cm in water), compelled the idea in
2766GEANT3.21 of suspending the primary particle until all its progeny
2767have been tracked. Despite the fact that GEANT4 employs dynamic
2768memory allocation and thus does not suffer from the limitations of
2769GEANT3.21 with its fixed large initial ZEBRA store, GEANT4
2770nevertheless provides for an analogous functionality with the
2771public method <literal>SetTrackSecondariesFirst</literal>. An example of the
2772registration of the Cerenkov process is given in
2773<xref linkend="programlist_PhysProc_6" />.
2774
2775<example id="programlist_PhysProc_6">
2776<title>
2777Registration of the Cerenkov process in <literal>PhysicsList</literal>.
2778</title>
2779
2780<programlisting>
2781#include "G4Cerenkov.hh"
2782
2783void ExptPhysicsList::ConstructOp(){
2784
2785  G4Cerenkov*   theCerenkovProcess = new G4Cerenkov("Cerenkov");
2786
2787  G4int MaxNumPhotons = 300;
2788
2789  theCerenkovProcess-&gt;SetTrackSecondariesFirst(true);
2790  theCerenkovProcess-&gt;SetMaxNumPhotonsPerStep(MaxNumPhotons);
2791
2792  theParticleIterator-&gt;reset();
2793  while( (*theParticleIterator)() ){
2794    G4ParticleDefinition* particle = theParticleIterator-&gt;value();
2795    G4ProcessManager* pmanager = particle-&gt;GetProcessManager();
2796    G4String particleName = particle-&gt;GetParticleName();
2797    if (theCerenkovProcess-&gt;IsApplicable(*particle)) {
2798      pmanager-&gt;AddContinuousProcess(theCerenkovProcess);
2799    }
2800  }
2801}
2802</programlisting>
2803</example>
2804</para>
2805
2806</sect3>
2807
2808
2809<!-- ******************* Section (Level#3) ****************** -->
2810<sect3 id="sect.PhysProc.Photo.Scinti">
2811<title>
2812Generation of Photons in
2813<literal>processes/electromagnetic/xrays</literal> - Scintillation
2814</title>
2815
2816<para>
2817Every scintillating material has a characteristic light yield,
2818<literal>SCINTILLATIONYIELD</literal>, and an intrinsic resolution,
2819<literal>RESOLUTIONSCALE</literal>, which generally broadens the statistical
2820distribution of generated photons. A wider intrinsic resolution is
2821due to impurities which are typical for doped crystals like NaI(Tl)
2822and CsI(Tl). On the other hand, the intrinsic resolution can also
2823be narrower when the Fano factor plays a role. The actual number of
2824emitted photons during a step fluctuates around the mean number of
2825photons with a width given by
2826<literal>ResolutionScale*sqrt(MeanNumberOfPhotons)</literal>. The average
2827light yield, <literal>MeanNumberOfPhotons</literal>, has a linear dependence
2828on the local energy deposition, but it may be different for minimum
2829ionizing and non-minimum ionizing particles.
2830</para>
2831
2832<para>
2833A scintillator is also characterized by its photon emission
2834spectrum and by the exponential decay of its time spectrum. In
2835GEANT4 the scintillator can have a fast and a slow component. The
2836relative strength of the fast component as a fraction of total
2837scintillation yield is given by the <literal>YIELDRATIO</literal>.
2838Scintillation may be simulated by specifying these empirical
2839parameters for each material. It is sufficient to specify in the
2840user's <literal>DetectorConstruction</literal> class a relative spectral
2841distribution as a function of photon energy for the scintillating
2842material. An example of this is shown in
2843<xref linkend="programlist_PhysProc_7" />
2844
2845<example id="programlist_PhysProc_7">
2846<title>
2847Specification of scintillation properties in
2848<literal>DetectorConstruction</literal>.
2849</title>
2850<programlisting>
2851  const G4int NUMENTRIES = 9;
2852  G4double Scnt_PP[NUMENTRIES] = { 6.6*eV, 6.7*eV, 6.8*eV, 6.9*eV,
2853                                   7.0*eV, 7.1*eV, 7.2*eV, 7.3*eV, 7.4*eV };
2854
2855  G4double Scnt_FAST[NUMENTRIES] = { 0.000134, 0.004432, 0.053991, 0.241971,
2856                                     0.398942, 0.000134, 0.004432, 0.053991,
2857                                     0.241971 };
2858  G4double Scnt_SLOW[NUMENTRIES] = { 0.000010, 0.000020, 0.000030, 0.004000,
2859                                     0.008000, 0.005000, 0.020000, 0.001000,
2860                                     0.000010 };
2861
2862  G4Material* Scnt;
2863  G4MaterialPropertiesTable* Scnt_MPT = new G4MaterialPropertiesTable();
2864
2865  Scnt_MPT-&gt;AddProperty("FASTCOMPONENT", Scnt_PP, Scnt_FAST, NUMENTRIES);
2866  Scnt_MPT-&gt;AddProperty("SLOWCOMPONENT", Scnt_PP, Scnt_SLOW, NUMENTRIES);
2867
2868  Scnt_MPT-&gt;AddConstProperty("SCINTILLATIONYIELD", 5000./MeV);
2869  Scnt_MPT-&gt;AddConstProperty("RESOLUTIONSCALE", 2.0);
2870  Scnt_MPT-&gt;AddConstProperty("FASTTIMECONSTANT",  1.*ns);
2871  Scnt_MPT-&gt;AddConstProperty("SLOWTIMECONSTANT", 10.*ns);
2872  Scnt_MPT-&gt;AddConstProperty("YIELDRATIO", 0.8);
2873
2874  Scnt-&gt;SetMaterialPropertiesTable(Scnt_MPT);
2875</programlisting>
2876</example>
2877</para>
2878
2879<para>
2880In cases where the scintillation yield of a scintillator depends
2881on the particle type, different scintillation processes may be
2882defined for them. How this yield scales to the one specified for
2883the material is expressed with the
2884<literal>ScintillationYieldFactor</literal> in the user's
2885<literal>PhysicsList</literal> as shown in
2886<xref linkend="programlist_PhysProc_8" />.
2887In those cases where the fast to slow excitation ratio changes with particle
2888type, the method <literal>SetScintillationExcitationRatio</literal> can be
2889called for each scintillation process (see the advanced
2890underground_physics example). This overwrites the
2891<literal>YieldRatio</literal> obtained from the
2892<literal>G4MaterialPropertiesTable</literal>.
2893
2894<example id="programlist_PhysProc_8">
2895<title>
2896Implementation of the scintillation process in
2897<literal>PhysicsList</literal>.
2898</title>
2899
2900<programlisting>
2901  G4Scintillation* theMuonScintProcess = new G4Scintillation("Scintillation");
2902
2903  theMuonScintProcess-&gt;SetTrackSecondariesFirst(true);
2904  theMuonScintProcess-&gt;SetScintillationYieldFactor(0.8);
2905
2906  theParticleIterator-&gt;reset();
2907  while( (*theParticleIterator)() ){
2908    G4ParticleDefinition* particle = theParticleIterator-&gt;value();
2909    G4ProcessManager* pmanager = particle-&gt;GetProcessManager();
2910    G4String particleName = particle-&gt;GetParticleName();
2911    if (theMuonScintProcess-&gt;IsApplicable(*particle)) {
2912       if (particleName == "mu+") {
2913          pmanager-&gt;AddProcess(theMuonScintProcess);
2914          pmanager-&gt;SetProcessOrderingToLast(theMuonScintProcess, idxAtRest);
2915          pmanager-&gt;SetProcessOrderingToLast(theMuonScintProcess, idxPostStep);
2916       }
2917    }
2918  }
2919</programlisting>
2920</example>
2921</para>
2922
2923<para>
2924A Gaussian-distributed number of photons is generated according
2925to the energy lost during the step. A resolution scale of 1.0
2926produces a statistical fluctuation around the average yield set
2927with <literal>AddConstProperty("SCINTILLATIONYIELD")</literal>, while values
2928&gt; 1 broaden the fluctuation. A value of zero produces no
2929fluctuation. Each photon's frequency is sampled from the empirical
2930spectrum. The photons originate evenly along the track segment and
2931are emitted uniformly into 4&pi; with a random linear polarization
2932and at times characteristic for the scintillation component.
2933</para>
2934
2935</sect3>
2936
2937<!-- ******************* Section (Level#3) ****************** -->
2938<sect3 id="sect.PhysProc.Photo.WaveShift">
2939<title>
2940Generation of Photons in
2941<literal>processes/optical</literal> - Wavelength Shifting
2942</title>
2943
2944<para>
2945Wavelength Shifting (WLS) fibers are used in many high-energy
2946particle physics experiments. They absorb light at one wavelength
2947and re-emit light at a different wavelength and are used for
2948several reasons. For one, they tend to decrease the self-absorption
2949of the detector so that as much light reaches the PMTs as possible.
2950WLS fibers are also used to match the emission spectrum of the
2951detector with the input spectrum of the PMT.
2952</para>
2953
2954<para>
2955A WLS material is characterized by its photon absorption and
2956photon emission spectrum and by a possible time delay between the
2957absorption and re-emission of the photon. Wavelength Shifting may
2958be simulated by specifying these empirical parameters for each WLS
2959material in the simulation. It is sufficient to specify in the
2960user's <literal>DetectorConstruction</literal> class a relative spectral
2961distribution as a function of photon energy for the WLS material.
2962WLSABSLENGTH is the absorption length of the material as a function
2963of the photon's momentum. WLSCOMPONENT is the relative emission
2964spectrum of the material as a function of the photon's momentum,
2965and WLSTIMECONSTANT accounts for any time delay which may occur
2966between absorption and re-emission of the photon. An example is
2967shown in <xref linkend="programlist_PhysProc_9" />.
2968
2969<example id="programlist_PhysProc_9">
2970<title>
2971Specification of WLS properties in <literal>DetectorConstruction</literal>.
2972</title>
2973
2974<programlisting>
2975 const G4int nEntries = 9;
2976
2977 G4double PhotonEnergy[nEntries] = { 6.6*eV, 6.7*eV, 6.8*eV, 6.9*eV,
2978                                   7.0*eV, 7.1*eV, 7.2*eV, 7.3*eV, 7.4*eV };
2979
2980 G4double RIndexFiber[nEntries] =
2981           { 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60 };
2982 G4double AbsFiber[nEntries] =
2983           {0.1*mm,0.2*mm,0.3*mm,0.4*cm,1.0*cm,10*cm,1.0*m,10.0*m,10.0*m};
2984 G4double EmissionFiber[nEntries] =
2985           {0.0, 0.0, 0.0, 0.1, 0.5, 1.0, 5.0, 10.0, 10.0 };
2986
2987  G4Material* WLSFiber;
2988  G4MaterialPropertiesTable* MPTFiber = new G4MaterialPropertiesTable();
2989
2990  MPTFiber-&gt;AddProperty("RINDEX",PhotonEnergy,RIndexFiber,nEntries);
2991  MPTFiber-&gt;AddProperty("WLSABSLENGTH",PhotonEnergy,AbsFiber,nEntries);
2992  MPTFiber-&gt;AddProperty("WLSCOMPONENT",PhotonEnergy,EmissionFiber,nEntries);
2993  MPTFiber-&gt;AddConstProperty("WLSTIMECONSTANT", 0.5*ns);
2994
2995  WLSFiber-&gt;SetMaterialPropertiesTable(MPTFiber);
2996</programlisting>
2997</example>
2998</para>
2999
3000<para>
3001The process is defined in the PhysicsList in the usual way. The
3002process class name is G4OpWLS. It should be instantiated with
3003theWLSProcess = new G4OpWLS("OpWLS") and attached to the process
3004manager of the optical photon as a DiscreteProcess. The way the
3005WLSTIMECONSTANT is used depends on the time profile method chosen
3006by the user. If in the PhysicsList
3007theWLSProcess-&gt;UseTimeGenerator("exponential") option is set,
3008the time delay between absorption and re-emission of the photon is
3009sampled from an exponential distribution, with the decay term equal
3010to WLSTIMECONSTANT. If, on the other hand,
3011theWLSProcess-&gt;UseTimeGenerator("delta") is chosen, the time
3012delay is a delta function and equal to WLSTIMECONSTANT. The default
3013is "delta" in case the G4OpWLS::UseTimeGenerator(const G4String
3014name) method is not used.
3015</para>
3016
3017</sect3>
3018
3019
3020<!-- ******************* Section (Level#3) ****************** -->
3021<sect3 id="sect.PhysProc.Photo.Track">
3022<title>
3023Tracking of Photons in <literal>processes/optical</literal>
3024</title>
3025
3026<!-- ******* Bridgehead ******* -->
3027<bridgehead renderas='sect4'>
3028Absorption
3029</bridgehead>
3030
3031<para>
3032The implementation of optical photon bulk absorption,
3033<literal>G4OpAbsorption</literal>, is trivial in that the process merely
3034kills the particle. The procedure requires the user to fill the
3035relevant <literal>G4MaterialPropertiesTable</literal> with empirical data for
3036the absorption length, using <literal>ABSLENGTH</literal> as the property key
3037in the public method <literal>AddProperty</literal>. The absorption length is
3038the average distance traveled by a photon before being absorpted by
3039the medium; i.e. it is the mean free path returned by the
3040<literal>GetMeanFreePath</literal> method.
3041</para>
3042
3043<!-- ******* Bridgehead ******* -->
3044<bridgehead renderas='sect4'>
3045Rayleigh Scattering
3046</bridgehead>
3047
3048<para>
3049The differential cross section in Rayleigh scattering,
3050&sigma;/&omega;, is proportional
3051to cos<superscript>2</superscript>(&thetas;),
3052where &thetas; is the polar of the new polarization vector with
3053respect to the old polarization vector. The <literal>G4OpRayleigh</literal>
3054scattering process samples this angle accordingly and then
3055calculates the scattered photon's new direction by requiring that
3056it be perpendicular to the photon's new polarization in such a way
3057that the final direction, initial and final polarizations are all
3058in one plane. This process thus depends on the particle's
3059polarization (spin). The photon's polarization is a data member of
3060the <literal>G4DynamicParticle</literal> class.
3061</para>
3062
3063<para>
3064A photon which is not assigned a polarization at production,
3065either via the <literal>SetPolarization</literal> method of the
3066<literal>G4PrimaryParticle</literal> class, or indirectly with the
3067<literal>SetParticlePolarization</literal> method of the
3068<literal>G4ParticleGun</literal> class, may not be Rayleigh scattered.
3069Optical photons produced by the <literal>G4Cerenkov</literal> process have
3070inherently a polarization perpendicular to the cone's surface at
3071production. Scintillation photons have a random linear polarization
3072perpendicular to their direction.
3073</para>
3074
3075<para>
3076The process requires a <literal>G4MaterialPropertiesTable</literal> to be
3077filled by the user with Rayleigh scattering length data. The
3078Rayleigh scattering attenuation length is the average distance
3079traveled by a photon before it is Rayleigh scattered in the medium
3080and it is the distance returned by the <literal>GetMeanFreePath</literal>
3081method. The <literal>G4OpRayleigh</literal> class provides a
3082<literal>RayleighAttenuationLengthGenerator</literal> method which calculates
3083the attenuation coefficient of a medium following the
3084Einstein-Smoluchowski formula whose derivation requires the use of
3085statistical mechanics, includes temperature, and depends on the
3086isothermal compressibility of the medium. This generator is
3087convenient when the Rayleigh attenuation length is not known from
3088measurement but may be calculated from first principles using the
3089above material constants. For a medium named <emphasis>Water</emphasis> and no
3090Rayleigh scattering attenutation length specified by the user, the
3091program automatically calls the
3092<literal>RayleighAttenuationLengthGenerator</literal>
3093which calculates it for 10 degrees Celsius liquid water.
3094</para>
3095
3096<!-- ******* Bridgehead ******* -->
3097<bridgehead renderas='sect4'>
3098Boundary Process
3099</bridgehead>
3100
3101<para>
3102Reference: E. Hecht and A. Zajac, Optics
3103<citation>
3104<xref linkend="biblio.hecht1974" endterm="biblio.hecht1974.abbrev" />
3105</citation>
3106</para>
3107
3108<para>
3109For the simple case of a perfectly smooth interface between two
3110dielectric materials, all the user needs to provide are the
3111refractive indices of the two materials stored in their respective
3112<literal>G4MaterialPropertiesTable</literal>. In all other cases, the optical
3113boundary process design relies on the concept of <emphasis>surfaces</emphasis>.
3114The information is split into two classes. One class in the
3115material category keeps information about the physical properties
3116of the surface itself, and a second class in the geometry category
3117holds pointers to the relevant physical and logical volumes
3118involved and has an association to the physical class. Surface
3119objects of the second type are stored in a related table and can be
3120retrieved by either specifying the two ordered pairs of physical
3121volumes touching at the surface, or by the logical volume entirely
3122surrounded by this surface. The former is called a <emphasis>border
3123surface</emphasis> while the latter is referred to as the <emphasis>skin
3124surface</emphasis>. This second type of surface is useful in situations
3125where a volume is coded with a reflector and is placed into many
3126different mother volumes. A limitation is that the skin surface can
3127only have one and the same optical property for all of the enclosed
3128volume's sides. The border surface is an ordered pair of physical
3129volumes, so in principle, the user can choose different optical
3130properties for photons arriving from the reverse side of the same
3131interface. For the optical boundary process to use a border
3132surface, the two volumes must have been positioned with
3133<literal>G4PVPlacement</literal>. The ordered combination can exist at many
3134places in the simulation. When the surface concept is not needed,
3135and a perfectly smooth surface exists beteen two dielectic
3136materials, the only relevant property is the index of refraction, a
3137quantity stored with the material, and no restriction exists on how
3138the volumes were positioned.
3139</para>
3140
3141<para>
3142The physical surface object also specifies which model the
3143boundary process should use to simulate interactions with that
3144surface. In addition, the physical surface can have a material
3145property table all its own. The usage of this table allows all
3146specular constants to be wavelength dependent. In case the surface
3147is painted or wrapped (but not a cladding), the table may include
3148the thin layer's index of refraction. This allows the simulation of
3149boundary effects at the intersection between the medium and the
3150surface layer, as well as the Lambertian reflection at the far side
3151of the thin layer. This occurs within the process itself and does
3152not invoke the <literal>G4Navigator</literal>. Combinations of surface finish
3153properties, such as <emphasis>polished</emphasis> or
3154<emphasis>ground</emphasis> and <emphasis>front
3155painted</emphasis> or <emphasis>back painted</emphasis>, enumerate the different
3156situations which can be simulated.
3157</para>
3158
3159<para>
3160When a photon arrives at a medium boundary its behavior depends
3161on the nature of the two materials that join at that boundary.
3162Medium boundaries may be formed between two dielectric materials or
3163a dielectric and a metal. In the case of two dielectric materials,
3164the photon can undergo total internal reflection, refraction or
3165reflection, depending on the photon's wavelength, angle of
3166incidence, and the refractive indices on both sides of the
3167boundary. Furthermore, reflection and transmission probabilites are
3168sensitive to the state of linear polarization. In the case of an
3169interface between a dielectric and a metal, the photon can be
3170absorbed by the metal or reflected back into the dielectric. If the
3171photon is absorbed it can be detected according to the
3172photoelectron efficiency of the metal.
3173</para>
3174
3175<para>
3176As expressed in Maxwell's equations, Fresnel reflection and
3177refraction are intertwined through their relative probabilities of
3178occurrence. Therefore neither of these processes, nor total
3179internal reflection, are viewed as individual processes deserving
3180separate class implementation. Nonetheless, an attempt was made to
3181adhere to the abstraction of having independent processes by
3182splitting the code into different methods where practicable.
3183</para>
3184
3185<para>
3186One implementation of the <literal>G4OpBoundaryProcess</literal> class
3187employs the
3188<ulink url="http://geant4.slac.stanford.edu/UsersWorkshop/G4Lectures/Peter/moisan.ps">
3189UNIFIED model</ulink>
3190 [A. Levin and C. Moisan, A More Physical Approach
3191to Model the Surface Treatment of Scintillation Counters and its
3192Implementation into DETECT, TRIUMF Preprint TRI-PP-96-64, Oct.
31931996] of the DETECT program [G.F. Knoll, T.F. Knoll and T.M.
3194Henderson, Light Collection Scintillation Detector Composites for
3195Neutron Detection, IEEE Trans. Nucl. Sci., 35 (1988) 872.]. It
3196applies to dielectric-dielectric interfaces and tries to provide a
3197realistic simulation, which deals with all aspects of surface
3198finish and reflector coating. The surface may be assumed as smooth
3199and covered with a metallized coating representing a specular
3200reflector with given reflection coefficient, or painted with a
3201diffuse reflecting material where Lambertian reflection occurs. The
3202surfaces may or may not be in optical contact with another
3203component and most importantly, one may consider a surface to be
3204made up of micro-facets with normal vectors that follow given
3205distributions around the nominal normal for the volume at the
3206impact point. For very rough surfaces, it is possible for the
3207photon to inversely aim at the same surface again after reflection
3208of refraction and so multiple interactions with the boundary are
3209possible within the process itself and without the need for
3210relocation by <literal>G4Navigator</literal>.
3211</para>
3212
3213<para>
3214The UNIFIED model provides for a range of different reflection
3215mechanisms. The specular lobe constant represents the reflection
3216probability about the normal of a micro facet. The specular spike
3217constant, in turn, illustrates the probability of reflection about
3218the average surface normal. The diffuse lobe constant is for the
3219probability of internal Lambertian reflection, and finally the
3220back-scatter spike constant is for the case of several reflections
3221within a deep groove with the ultimate result of exact
3222back-scattering. The four probabilities must add up to one, with
3223the diffuse lobe constant being implicit. The reader may consult
3224the reference for a thorough description of the model.
3225
3226<example id="programlist_PhysProc_10">
3227<title>
3228Dielectric-dielectric surface properties
3229defined via the <emphasis>G4OpticalSurface</emphasis>.
3230</title>
3231
3232<programlisting>
3233G4VPhysicalVolume* volume1;
3234G4VPhysicalVolume* volume2;
3235
3236G4OpticalSurface* OpSurface = new G4OpticalSurface("name");
3237
3238G4LogicalBorderSurface* Surface = new
3239  G4LogicalBorderSurface("name",volume1,volume2,OpSurface);
3240
3241G4double sigma_alpha = 0.1;
3242
3243OpSurface -&gt; SetType(dielectric_dielectric);
3244OpSurface -&gt; SetModel(unified);
3245OpSurface -&gt; SetFinish(groundbackpainted);
3246OpSurface -&gt; SetSigmaAlpha(sigma_alpha);
3247
3248const G4int NUM = 2;
3249
3250G4double pp[NUM] = {2.038*eV, 4.144*eV};
3251G4double specularlobe[NUM] = {0.3, 0.3};
3252G4double specularspike[NUM] = {0.2, 0.2};
3253G4double backscatter[NUM] = {0.1, 0.1};
3254G4double rindex[NUM] = {1.35, 1.40};
3255G4double reflectivity[NUM] = {0.3, 0.5};
3256G4double efficiency[NUM] = {0.8, 0.1};
3257
3258G4MaterialPropertiesTable* SMPT = new G4MaterialPropertiesTable();
3259
3260SMPT -&gt; AddProperty("RINDEX",pp,rindex,NUM);
3261SMPT -&gt; AddProperty("SPECULARLOBECONSTANT",pp,specularlobe,NUM);
3262SMPT -&gt; AddProperty("SPECULARSPIKECONSTANT",pp,specularspike,NUM);
3263SMPT -&gt; AddProperty("BACKSCATTERCONSTANT",pp,backscatter,NUM);
3264SMPT -&gt; AddProperty("REFLECTIVITY",pp,reflectivity,NUM);
3265SMPT -&gt; AddProperty("EFFICIENCY",pp,efficiency,NUM);
3266
3267OpSurface -&gt; SetMaterialPropertiesTable(SMPT);
3268</programlisting>
3269</example>
3270</para>
3271
3272<para>
3273The original
3274<ulink url="http://wwwasdoc.web.cern.ch/wwwasdoc/geant_html3/node231.html">
3275GEANT3.21 implementation</ulink>  of this process is also available via
3276the GLISUR methods flag. [GEANT Detector Description and Simulation
3277Tool, Application Software Group, Computing and Networks Division,
3278CERN, PHYS260-6 tp 260-7.].
3279
3280<example id="programlist_PhysProc_11">
3281<title>
3282Dielectric metal surface properties defined via the
3283<emphasis>G4OpticalSurface</emphasis>.
3284</title>
3285
3286<programlisting>
3287G4LogicalVolume* volume_log;
3288
3289G4OpticalSurface* OpSurface = new G4OpticalSurface("name");
3290
3291G4LogicalSkinSurface* Surface = new
3292  G4LogicalSkinSurface("name",volume_log,OpSurface);
3293
3294OpSurface -&gt; SetType(dielectric_metal);
3295OpSurface -&gt; SetFinish(ground);
3296OpSurface -&gt; SetModel(glisur);
3297
3298G4double polish = 0.8;
3299
3300G4MaterialPropertiesTable *OpSurfaceProperty = new G4MaterialPropertiesTable();
3301
3302OpSurfaceProperty -&gt; AddProperty("REFLECTIVITY",pp,reflectivity,NUM);
3303OpSurfaceProperty -&gt; AddProperty("EFFICIENCY",pp,efficiency,NUM);
3304
3305OpSurface -&gt; SetMaterialPropertiesTable(OpSurfaceProperty);
3306</programlisting>
3307</example>
3308</para>
3309
3310<para>
3311The reflectivity off a metal surface can also be calculated by way of a complex
3312index of refraction. Instead of storing the REFLECTIVITY directly, the user
3313stores the real part (REALRINDEX) and the imaginary part (IMAGINARYRINDEX) as
3314a function of photon energy separately in the G4MaterialPropertyTable. Geant4
3315then
3316<ulink url="./AllResources/TrackingAndPhysics/physicsProcessOptical.src/GetReflectivity.pdf">
3317calculates the reflectivity
3318</ulink>
3319depending on the incident angle, photon energy, degree of TE and TM
3320polarization, and this complex refractive index.
3321</para>
3322
3323<para>
3324The program defaults to the GLISUR model and <emphasis>polished</emphasis>
3325surface finish when no specific model and surface finish is
3326specified by the user. In the case of a dielectric-metal interface,
3327or when the GLISUR model is specified, the only surface finish
3328options available are <emphasis>polished</emphasis> or <emphasis>ground</emphasis>. For
3329dielectric-metal surfaces, the <literal>G4OpBoundaryProcess</literal> also
3330defaults to unit reflectivity and zero detection efficiency. In
3331cases where the user specifies the UNIFIED model, but does not
3332otherwise specify the model reflection probability constants, the
3333default becomes Lambertian reflection.
3334</para>
3335
3336<para>
3337Martin Janecek and Bill Moses (Lawrence Berkeley National Laboratory)
3338built an instrument for measuring the angular reflectivity distribution
3339inside of BGO crystals with common surface treatments and reflectors
3340applied. These results have been incorporate into the Geant4 code. A
3341third class of reflection type besides dielectric_metal and
3342dielectric_dielectric is added: dielectric_LUT. The distributions have
3343been converted to 21 look-up-tables (LUT); so far for 1 scintillator
3344material (BGO) x 3 surface treatments x 7 reflector materials.  The
3345modified code allows the user to specify the surface treatment
3346(rough-cut, chemically etched, or mechanically polished), the attached
3347reflector (Lumirror, Teflon, ESR film, Tyvek, or TiO2 paint), and the
3348bonding type (air-coupled or glued). The glue used is MeltMount, and the
3349ESR film used is VM2000. Each LUT consists of measured angular
3350distributions with 4º by 5º resolution in theta and phi, respectively,
3351for incidence angles from 0º to 90º degrees, in 1º-steps. The code might
3352in the future be updated by adding more LUTs, for instance, for other
3353scintillating materials (such as LSO or NaI). To use these LUT the user
3354has to download them from
3355<ulink url="http://geant4.web.cern.ch/geant4/support/download.shtml">
3356Geant4 Software Download</ulink> and set an environment variable,
3357<literal>G4REALSURFACEDATA</literal>, to the directory of
3358<literal>geant4/data/RealSurface1.0</literal>. For details see:
3359
3360<ulink url="./AllResources/TrackingAndPhysics/physicsProcessOptical.src/Janecek-TNS-00249-2009R1.pdf">
3361M. Janecek, W. Moses IEEE Transactions on Nuclear Science
3362</ulink>.
3363</para>
3364
3365<para>
3366The enumeration G4OpticalSurfaceFinish has been extended to include
3367(what follows should be a 2 column table):
3368
3369<informalexample>
3370<programlisting>
3371  polishedlumirrorair,         // mechanically polished surface, with lumirror
3372  polishedlumirrorglue,        // mechanically polished surface, with lumirror &amp; meltmount
3373  polishedair,                 // mechanically polished surface
3374  polishedteflonair,           // mechanically polished surface, with teflon
3375  polishedtioair,              // mechanically polished surface, with tio paint
3376  polishedtyvekair,            // mechanically polished surface, with tyvek
3377  polishedvm2000air,           // mechanically polished surface, with esr film
3378  polishedvm2000glue,          // mechanically polished surface, with esr film &amp; meltmount
3379  etchedlumirrorair,           // chemically etched surface, with lumirror
3380  etchedlumirrorglue,          // chemically etched surface, with lumirror &amp; meltmount
3381  etchedair,                   // chemically etched surface
3382  etchedteflonair,             // chemically etched surface, with teflon
3383  etchedtioair,                // chemically etched surface, with tio paint
3384  etchedtyvekair,              // chemically etched surface, with tyvek
3385  etchedvm2000air,             // chemically etched surface, with esr film
3386  etchedvm2000glue,            // chemically etched surface, with esr film &amp; meltmount
3387  groundlumirrorair,           // rough-cut surface, with lumirror
3388  groundlumirrorglue,          // rough-cut surface, with lumirror &amp; meltmount
3389  groundair,                   // rough-cut surface
3390  groundteflonair,             // rough-cut surface, with teflon
3391  groundtioair,                // rough-cut surface, with tio paint
3392  groundtyvekair,              // rough-cut surface, with tyvek
3393  groundvm2000air,             // rough-cut surface, with esr film
3394  groundvm2000glue             // rough-cut surface, with esr film &amp; meltmount
3395</programlisting>
3396</informalexample>
3397</para>
3398
3399<para>
3400To use a look-up-table, all the user needs to specify for an
3401<literal>G4OpticalSurface</literal> is:
3402<literal>SetType(dielectric_LUT), SetModel(LUT)</literal> and for example,
3403<literal>SetFinish(polishedtyvekair)</literal>.
3404</para>
3405
3406</sect3>
3407</sect2>
3408
3409
3410<!-- ******************* Section (Level#2) ****************** -->
3411<sect2 id="sect.PhysProc.Param">
3412<title>
3413Parameterization
3414</title>
3415
3416<para>
3417In this section we describe how to use the parameterization or
3418"fast simulation" facilities of GEANT4. Examples are provided in
3419the <emphasis role="bold">examples/novice/N05 directory</emphasis>.
3420</para>
3421
3422
3423<!-- ******************* Section (Level#3) ****************** -->
3424<sect3 id="sect.PhysProc.Param.Gene">
3425<title>
3426Generalities:
3427</title>
3428
3429<para>
3430The Geant4 parameterization facilities allow you to shortcut the
3431detailed tracking in a given volume and for given particle types in
3432order for you to provide your own implementation of the physics and
3433of the detector response.
3434</para>
3435
3436<para>
3437Parameterisations are bound to a
3438<emphasis role="bold"><literal>G4Region</literal></emphasis>
3439object, which, in the case of fast simulation is also called an
3440<emphasis role="bold">envelope</emphasis>. Prior to release 8.0,
3441parameterisations were bound
3442to a <literal>G4LogicalVolume</literal>, the root of a volume hierarchy.
3443These root volumes are now attributes of the <literal>G4Region</literal>.
3444Envelopes often correspond to the volumes of sub-detectors:
3445electromagnetic calorimeters, tracking chambers, etc. With GEANT4
3446it is also possible to define envelopes by overlaying a parallel or
3447"ghost" geometry as discussed in <xref linkend="sect.PhysProc.Param.Ghost" />.
3448</para>
3449
3450<para>
3451In GEANT4, parameterisations have three main features. You must
3452specify:
3453
3454<itemizedlist spacing="compact">
3455  <listitem><para>
3456    the particle types for which your parameterisation is valid;
3457  </para></listitem>
3458  <listitem><para>
3459    the dynamics conditions for which your parameterisation is
3460    valid and must be triggered;
3461  </para></listitem>
3462  <listitem><para>
3463    the parameterisation itself: where the primary will be killed
3464    or moved, whether or not to create it or create secondaries, etc.,
3465    and where the detector response will be computed.
3466  </para></listitem>
3467</itemizedlist>
3468</para>
3469
3470<para>
3471GEANT4 will message your parameterisation code for each step
3472starting in any root G4LogicalVolume (including daughters.
3473sub-daughters, etc. of this volume) of the <literal>G4Region</literal>.
3474It will proceed by first asking the available parameterisations for
3475the current particle type if one of them (and only one) wants to
3476issue a trigger. If so it will invoke its parameterisation. In this
3477case, the tracking
3478<emphasis role="bold"><emphasis>will not apply physics</emphasis></emphasis> 
3479to the particle in the step. Instead, the UserSteppingAction will be
3480invoked.
3481</para>
3482
3483<para>
3484Parameterisations look like a "user stepping action" but are more
3485advanced because:
3486
3487<itemizedlist spacing="compact">
3488  <listitem><para>
3489    parameterisation code is messaged only in the
3490    <literal>G4Region</literal> to which it is bound;
3491  </para></listitem>
3492  <listitem><para>
3493    parameterisation code is messaged anywhere in the
3494    <literal>G4Region</literal>, that is, any volume in which the track is
3495    located;
3496  </para></listitem>
3497  <listitem><para>
3498    GEANT4 will provide information to your parameterisation code
3499    about the current root volume of the <literal>G4Region</literal> 
3500    in which the track is travelling.
3501  </para></listitem>
3502</itemizedlist>
3503</para>
3504
3505</sect3>
3506
3507
3508<!-- ******************* Section (Level#3) ****************** -->
3509<sect3 id="sect.PhysProc.Param.OvComp">
3510<title>
3511Overview of Parameterisation Components
3512</title>
3513
3514<para>
3515The GEANT4 components which allow the implementation and control
3516of parameterisations are:
3517
3518<variablelist>
3519  <varlistentry>
3520    <term>
3521      <literal><emphasis role="bold">G4VFastSimulationModel</emphasis></literal> 
3522    </term>
3523    <listitem><para>
3524      This is the abstract class for the implementation of parameterisations.
3525      You must inherit from it to implement your concrete parameterisation model.
3526    </para></listitem>
3527  </varlistentry>
3528  <varlistentry>
3529    <term>
3530      <literal><emphasis role="bold">G4FastSimulationManager</emphasis></literal>
3531    </term>
3532    <listitem><para>
3533      The G4VFastSimulationModel objects are attached to the
3534      <literal>G4Region</literal> through a G4FastSimulationManager.
3535      This object will manage the list of models and will message them at
3536      tracking time.
3537    </para></listitem>
3538  </varlistentry>
3539  <varlistentry>
3540    <term>
3541      <literal><emphasis role="bold">G4Region/Envelope</emphasis></literal>
3542    </term>
3543    <listitem><para>
3544      As mentioned before, an envelope in GEANT4 is a
3545      <literal><emphasis role="bold">G4Region</emphasis></literal>.
3546      The parameterisation is bound to the <literal>G4Region</literal> by
3547      setting a <literal>G4FastSimulationManager</literal> pointer to it.
3548      </para>
3549      <para>
3550      The figure below shows how the <literal>G4VFastSimulationModel</literal>
3551      and <literal>G4FastSimulationManager</literal> objects are bound to the
3552      <literal>G4Region</literal>. Then for all root G4LogicalVolume's held by
3553      the G4Region, the fast simulation code is active.
3554
3555      <mediaobject>
3556        <imageobject role="fo">
3557          <imagedata fileref="./AllResources/TrackingAndPhysics/physicsProcessPARAM.src/ComponentsWithRegion.jpg" 
3558                     format="JPG" contentwidth="7.0cm" align="center" />
3559        </imageobject>
3560        <imageobject role="html">
3561          <imagedata fileref="./AllResources/TrackingAndPhysics/physicsProcessPARAM.src/ComponentsWithRegion.jpg" 
3562                     format="JPG" align="center" />
3563        </imageobject>
3564        <caption>
3565        </caption>
3566      </mediaobject>
3567
3568    </para></listitem>
3569  </varlistentry>
3570  <varlistentry>
3571    <term>
3572      <literal><emphasis role="bold">G4FastSimulationManagerProcess</emphasis></literal>
3573    </term>
3574    <listitem><para>
3575      This is a <literal>G4VProcess</literal>. It provides the interface
3576      between the tracking and the parameterisation. It must be set in the
3577      process list of the particles you want to parameterise.
3578    </para></listitem>
3579  </varlistentry>
3580  <varlistentry>
3581    <term>
3582      <literal><emphasis role="bold">G4GlobalFastSimulationManager</emphasis></literal>
3583    </term>
3584    <listitem><para>
3585      This a singleton class which provides the management of the
3586      <literal>G4FastSimulationManager</literal> objects and some ghost
3587      facilities.
3588    </para></listitem>
3589  </varlistentry>
3590</variablelist>   
3591</para>
3592
3593</sect3>
3594
3595
3596<!-- ******************* Section (Level#3) ****************** -->
3597<sect3 id="sect.PhysProc.Param.FastSimModel">
3598<title>
3599The <literal>G4VFastSimulationModel</literal> Abstract Class
3600</title>
3601
3602<!-- ******* Bridgehead ******* -->
3603<bridgehead renderas='sect4'>
3604Constructors:
3605</bridgehead>
3606
3607<para>
3608The <literal>G4VFastSimulationModel</literal> class has two constructors.
3609The second one allows you to get started quickly:
3610
3611<variablelist>
3612  <varlistentry>
3613    <term>
3614      <emphasis role="bold"><literal>G4VFastSimulationModel(
3615       const G4String&amp; aName)</literal></emphasis>:
3616    </term>
3617    <listitem><para>
3618      Here <literal>aName</literal> identifies the parameterisation model.
3619    </para></listitem>
3620  </varlistentry>
3621  <varlistentry>
3622    <term>
3623      <emphasis role="bold"><literal>G4VFastSimulationModel(const G4String&amp; 
3624       aName, G4Region*, G4bool IsUnique=false):</literal></emphasis>
3625    </term>
3626    <listitem><para>
3627      In addition to the model name, this constructor accepts a G4Region pointer.
3628      The needed G4FastSimulationManager object is constructed if necessary,
3629      passing to it the G4Region pointer and the boolean value. If it
3630      already exists, the model is simply added to this manager. Note
3631      that the <emphasis>G4VFastSimulationModel object will not keep track of
3632      the G4Region passed in the constructor</emphasis>.
3633      The boolean argument is there for optimization purposes: if you
3634      know that the G4Region has a unique root G4LogicalVolume, uniquely
3635      placed, you can set the boolean value to "true".
3636    </para></listitem>
3637  </varlistentry>
3638</variablelist>
3639</para>
3640
3641<!-- ******* Bridgehead ******* -->
3642<bridgehead renderas='sect4'>
3643Virtual methods:
3644</bridgehead>
3645
3646<para>
3647The G4VFastSimulationModel has three pure virtual methods which
3648must be overriden in your concrete class:
3649
3650<variablelist>
3651  <varlistentry>
3652    <term>
3653      <emphasis role="bold"><literal>G4VFastSimulationModel(
3654      <emphasis>const G4String&amp; aName</emphasis>):</literal></emphasis>
3655    </term>
3656    <listitem><para>
3657      Here aName identifies the parameterisation model.
3658    </para></listitem>
3659  </varlistentry>
3660  <varlistentry>
3661    <term>
3662      <emphasis role="bold"><literal>G4bool ModelTrigger(
3663      <emphasis>const G4FastTrack&amp;</emphasis>):</literal></emphasis>
3664    </term>
3665    <listitem><para>
3666      You must return "true" when the dynamic conditions to trigger your
3667      parameterisation are fulfilled.
3668      G4FastTrack provides access to the current G4Track, gives simple
3669      access to the current root G4LogicalVolume related features (its
3670      G4VSolid, and G4AffineTransform references between the global and
3671      the root G4LogicalVolume local coordinates systems) and simple
3672      access to the position and momentum expressed in the root
3673      G4LogicalVolume coordinate system. Using these quantities and the
3674      G4VSolid methods, you can for example easily check how far you are
3675      from the root G4LogicalVolume boundary.
3676    </para></listitem>
3677  </varlistentry>
3678  <varlistentry>
3679    <term>
3680      <emphasis role="bold"><literal>G4bool IsApplicable(
3681      <emphasis>const G4ParticleDefinition&amp;</emphasis>):</literal></emphasis>
3682    </term>
3683    <listitem><para>
3684      In your implementation, you must return "true" when your model is
3685      applicable to the G4ParticleDefinition passed to this method. The
3686      G4ParticleDefinition provides all intrinsic particle information
3687      (mass, charge, spin, name ...).
3688      </para>
3689      <para>
3690      If you want to implement a model which is valid only for certain
3691      particle types, it is recommended for efficiency that you use the
3692      static pointer of the corresponding particle classes.
3693      </para>
3694      <para>
3695      As an example, in a model valid for <emphasis>gamma</emphasis>s only,
3696      the IsApplicable() method should take the form:
3697
3698      <informalexample>
3699      <programlisting>
3700      #include "G4Gamma.hh"
3701
3702      G4bool MyGammaModel::IsApplicable(const G4ParticleDefinition&amp; partDef)
3703      {
3704        return &amp;partDef == G4Gamma::GammaDefinition();
3705      }
3706      </programlisting>
3707      </informalexample>
3708    </para></listitem>
3709  </varlistentry>
3710  <varlistentry>
3711    <term>
3712      <emphasis role="bold"><literal>G4bool ModelTrigger(
3713      <emphasis>const G4FastTrack&amp;</emphasis>):</literal></emphasis> 
3714    </term>
3715    <listitem><para>
3716      You must return "true" when the dynamic conditions to trigger your
3717      parameterisation are fulfilled.
3718      The G4FastTrack provides access to the current G4Track, gives
3719      simple access to envelope related features (G4LogicalVolume,
3720      G4VSolid, and G4AffineTransform references between the global and
3721      the envelope local coordinates systems) and simple access to the
3722      position and momentum expressed in the envelope coordinate system.
3723      Using these quantities and the G4VSolid methods, you can for
3724      example easily check how far you are from the envelope boundary.
3725    </para></listitem>
3726  </varlistentry>
3727  <varlistentry>
3728    <term>
3729      <emphasis role="bold"><literal>void DoIt(
3730      <emphasis>const G4FastTrack&amp;, G4FastStep&amp;</emphasis>):</literal></emphasis>
3731    </term>
3732    <listitem><para>
3733      The details of your parameterisation will be implemented in this method.
3734      The G4FastTrack reference provides the input information, and the final
3735      state of the particles after parameterisation must be returned
3736      through the G4FastStep reference. Tracking for the final state
3737      particles is requested after your parameterisation has been invoked.
3738    </para></listitem>
3739  </varlistentry>
3740</variablelist>
3741</para>
3742
3743</sect3>
3744
3745
3746<!-- ******************* Section (Level#3) ****************** -->
3747<sect3 id="sect.PhysProc.Param.FastSimMan">
3748<title>
3749The <literal>G4FastSimulationManager</literal> Class:
3750</title>
3751
3752<para>
3753G4FastSimulationManager functionnalities regarding the use of ghost
3754volumes are explained in <xref linkend="sect.PhysProc.Param.Ghost" />.
3755</para>
3756
3757<!-- ******* Bridgehead ******* -->
3758<bridgehead renderas='sect4'>
3759Constructor:
3760</bridgehead>
3761
3762<para>
3763<variablelist>
3764  <varlistentry>
3765    <term>
3766      <literal><emphasis role="bold">G4FastSimulationManager(
3767      <emphasis>G4Region *anEnvelope, G4bool IsUnique=false</emphasis>):
3768      </emphasis></literal> 
3769    </term>
3770    <listitem><para>
3771      This is the only constructor. You specify the G4Region by providing
3772      its pointer. The G4FastSimulationManager object will bind itself
3773      to this G4Region. If you know that this G4Region has a single root
3774      G4LogicalVolume, placed only once, you can set the IsUnique boolean
3775      to "true" to allow some optimization.
3776      </para>
3777      <para>
3778      Note that if you choose to use the G4VFastSimulationModel(const
3779      G4String&amp;, G4Region*, G4bool) constructor for your model, the
3780      G4FastSimulationManager will be constructed using the given
3781      G4Region* and G4bool values of the model constructor.
3782    </para></listitem>
3783  </varlistentry>
3784</variablelist>
3785</para>
3786
3787<!-- ******* Bridgehead ******* -->
3788<bridgehead renderas='sect4'>
3789G4VFastSimulationModel object management:
3790</bridgehead>
3791
3792<para>
3793The following two methods provide the usual management
3794functions.
3795
3796<itemizedlist spacing="compact">
3797  <listitem><para>
3798    <literal><emphasis role="bold">void AddFastSimulationModel(
3799    G4VFastSimulationModel*)</emphasis></literal>
3800  </para></listitem>
3801  <listitem><para>
3802    <literal><emphasis role="bold">RemoveFastSimulationModel(
3803    G4VFastSimulationModel*)</emphasis></literal>
3804  </para></listitem>
3805</itemizedlist>
3806</para>
3807
3808<!-- ******* Bridgehead ******* -->
3809<bridgehead renderas='sect4'>
3810Interface with the G4FastSimulationManagerProcess:
3811</bridgehead>
3812
3813<para>
3814This is described in the User's Guide for Toolkit Developers
3815(
3816<!-- !!! xref linkend=""/ or ulink url="" -->
3817section 3.9.6
3818<!-- !! /ulink (remove this tag for xref) -->
3819)
3820</para>
3821
3822</sect3>
3823
3824<!-- ******************* Section (Level#3) ****************** -->
3825<sect3 id="sect.PhysProc.Param.FastSimManProc">
3826<title>
3827The <literal>G4FastSimulationManagerProcess</literal> Class
3828</title>
3829
3830<para>
3831This G4VProcess serves as an interface between the tracking and the
3832parameterisation. At tracking time, it collaborates with the
3833G4FastSimulationManager of the current volume, if any, to allow the
3834models to trigger. If no manager exists or if no model issues a
3835trigger, the tracking goes on normally.
3836</para>
3837
3838<para>
3839<emphasis>In the present implementation, you must set this process in
3840the G4ProcessManager of the particles you parameterise to enable
3841your parameterisation.</emphasis>
3842</para>
3843
3844<para>
3845The processes ordering is:
3846
3847<informalexample>
3848<programlisting>
3849    [n-3] ...
3850    [n-2] Multiple Scattering
3851    [n-1] G4FastSimulationManagerProcess
3852    [ n ] G4Transportation
3853</programlisting>
3854</informalexample>
3855</para>
3856
3857<para>
3858This ordering is important if you use ghost geometries, since the
3859G4FastSimulationManagerProcess will provide navigation in the ghost
3860world to limit the step on ghost boundaries.
3861</para>
3862
3863<para>
3864The G4FastSimulationManager must be added to the process list of a
3865particle as a continuous and discrete process if you use ghost
3866geometries for this particle. You can add it as a discrete process
3867if you don't use ghosts.
3868</para>
3869
3870<para>
3871The following code registers the G4FastSimulationManagerProcess
3872with all the particles as a discrete and continuous process:
3873
3874<informalexample>
3875<programlisting>
3876void MyPhysicsList::addParameterisation()
3877{
3878  G4FastSimulationManagerProcess*
3879    theFastSimulationManagerProcess = new G4FastSimulationManagerProcess();
3880  theParticleIterator-&gt;reset();
3881  while( (*theParticleIterator)() )
3882    {
3883      G4ParticleDefinition* particle = theParticleIterator-&gt;value();
3884      G4ProcessManager* pmanager = particle-&gt;GetProcessManager();
3885      pmanager-&gt;AddProcess(theFastSimulationManagerProcess, -1, 0, 0);
3886    }
3887}
3888</programlisting>
3889</informalexample>
3890</para>
3891
3892</sect3>
3893
3894<!-- ******************* Section (Level#3) ****************** -->
3895<sect3 id="sect.PhysProc.Param.FastSimManSing">
3896<title>
3897The <literal>G4GlobalFastSimulationManager</literal> Singleton Class
3898</title>
3899
3900<para>
3901This class is a singleton which can be accessed as follows:
3902
3903<informalexample>
3904<programlisting>
3905#include "G4GlobalFastSimulationManager.hh"
3906...
3907...
3908G4GlobalFastSimulationManager* globalFSM;
3909globalFSM = G4GlobalFastSimulationManager::getGlobalFastSimulationManager();
3910...
3911...
3912</programlisting>
3913</informalexample>
3914</para>
3915
3916<para>
3917Presently, you will mainly need to use the
3918GlobalFastSimulationManager if you use ghost geometries.
3919</para>
3920
3921</sect3>
3922
3923<!-- ******************* Section (Level#3) ****************** -->
3924<sect3 id="sect.PhysProc.Param.Ghost">
3925<title>
3926Parameterisation Using Ghost Geometries
3927</title>
3928
3929<para>
3930In some cases, volumes of the tracking geometry do not allow
3931envelopes to be defined. This may be the case with a geometry
3932coming from a CAD system. Since such a geometry is flat, a parallel
3933geometry must be used to define the envelopes.
3934</para>
3935
3936<para>
3937Another interesting case involves defining an envelope which groups
3938the electromagnetic and hadronic calorimeters of a detector into
3939one volume. This may be useful when parameterizing the interaction
3940of charged pions. You will very likely not want electrons to see
3941this envelope, which means that ghost geometries have to be
3942organized by particle flavours.
3943</para>
3944
3945<para>
3946Using ghost geometries implies some more overhead in the
3947parameterisation mechanism for the particles sensitive to ghosts,
3948since navigation is provided in the ghost geometry by the
3949G4FastSimulationManagerProcess. Usually, however, only a few
3950volumes will be placed in this ghost world, so that the geometry
3951computations will remain rather cheap.
3952</para>
3953
3954<para>
3955In the existing implementation (temporary implementation with
3956G4Region but before parallel geometry implementation), you may only
3957consider ghost G4Regions with just one root G4LogicalVolume. The
3958G4GlobalFastSimulationManager provides the construction of the
3959ghost geometry by making first an empty "clone" of the world for
3960tracking provided by the construct() method of your
3961G4VUserDetectorConstruction concrete class. You provide the
3962placement of the G4Region root G4LogicalVolume relative to the
3963ghost world coordinates in the G4FastSimulationManager objects. A
3964ghost G4Region is recognized by the fact that its associated
3965G4FastSimulationManager retains a non-empty list of placements.
3966</para>
3967
3968<para>
3969The G4GlobalFastSimulationManager will then use both those
3970placements and the IsApplicable() methods of the models attached to
3971the G4FastSimulationManager objects to build the flavour-dependant
3972ghost geometries.
3973</para>
3974
3975<para>
3976Then at the beginning of the tracking of a particle, the
3977appropriate ghost world, if any, will be selected.
3978</para>
3979
3980<para>
3981The steps required to build one ghost G4Region are:
3982
3983<orderedlist spacing="compact">
3984  <listitem><para>
3985    built the ghost G4Region : myGhostRegion;
3986  </para></listitem>
3987  <listitem><para>
3988    build the root G4LogicalVolume: myGhostLogical, set it to
3989    myGhostRegion;
3990  </para></listitem>
3991  <listitem><para>
3992    build a G4FastSimulationManager object, myGhostFSManager,
3993    giving myGhostRegion as argument of the constructor;
3994  </para></listitem>
3995  <listitem><para>
3996    <para>
3997    give to the G4FastSimulationManager the placement of the
3998    myGhostLogical, by invoking for the G4FastSimulationManager method:
3999    <informalexample>
4000    <programlisting>
4001     AddGhostPlacement(G4RotationMatrix*, const G4ThreeVector&amp;);
4002    </programlisting>
4003    </informalexample>
4004    or:
4005    <informalexample>
4006    <programlisting>
4007     AddGhostPlacement(G4Transform3D*);
4008    </programlisting>
4009    </informalexample>
4010
4011    where the rotation matrix and translation vector of the 3-D
4012    transformation describe the placement relative to the ghost world
4013    coordinates.
4014    </para>
4015  </para></listitem>
4016  <listitem><para>
4017    build your G4VFastSimulationModel objects and add them to the
4018    myGhostFSManager.
4019    <emphasis>The IsApplicable() methods of your models will be used by the
4020    G4GlobalFastSimulationManager to build the ghost geometries
4021    corresponding to a given particle type.</emphasis>
4022  </para></listitem>
4023  <listitem><para>
4024    <para>
4025    Invoke the G4GlobalFastSimulationManager method:
4026
4027    <informalexample>
4028    <programlisting>
4029     G4GlobalFastSimulationManager::getGlobalFastSimulationManager()-&gt;
4030
4031          CloseFastSimulation();
4032    </programlisting>
4033    </informalexample>
4034    </para>
4035  </para></listitem>
4036</orderedlist>
4037</para>
4038
4039<para>
4040This last call will cause the G4GlobalFastSimulationManager to
4041build the flavour-dependent ghost geometries. This call must be
4042done before the RunManager closes the geometry. (It is foreseen
4043that the run manager in the future will invoke the
4044CloseFastSimulation() to synchronize properly with the closing of
4045the geometry).
4046</para>
4047
4048<para>
4049Visualization facilities are provided for ghosts geometries. After
4050the CloseFastSimulation() invocation, it is possible to ask for the
4051drawing of ghosts in an interactive session. The basic commands
4052are:
4053
4054<itemizedlist spacing="compact">
4055  <listitem><para>
4056    <para>
4057    /vis/draw/Ghosts particle_name
4058    </para>
4059    <para>
4060    which makes the drawing of the ghost geometry associated with the
4061    particle specified by name in the command line.
4062    </para>
4063  </para></listitem>
4064  <listitem><para>
4065    /vis/draw/Ghosts
4066    <para>
4067    which draws all the ghost geometries.
4068    </para>
4069  </para></listitem>
4070</itemizedlist>
4071</para>
4072
4073</sect3>
4074
4075<!-- ******************* Section (Level#3) ****************** -->
4076<sect3 id="sect.PhysProc.Param.GFlash">
4077<title>
4078Gflash Parameterization
4079</title>
4080
4081<para>
4082This section describes how to use the Gflash library. Gflash is a
4083concrete parameterization which is based on the equations and
4084parameters of the original Gflash package from H1(hep-ex/0001020,
4085Grindhammer &amp; Peters, see physics manual) and uses the "fast
4086simulation" facilities of GEANT4 described above. Briefly, whenever
4087a e-/e+ particle enters the calorimeter, it is parameterized if it
4088has a minimum energy and the shower is expected to be contained in
4089the calorimeter (or " parameterization envelope"). If this is
4090fulfilled the particle is killed, as well as all secondaries, and
4091the energy is deposited according to the Gflash equations. An
4092example, provided in
4093<emphasis role="bold">examples/extended/parametrisation/gflash/</emphasis>,
4094shows how to interface Gflash to your application. The simulation time is
4095measured, so the user can immediately see the speed increase
4096resulting from the use of Gflash.
4097</para>
4098
4099</sect3>
4100
4101<!-- ******************* Section (Level#3) ****************** -->
4102<sect3 id="sect.PhysProc.Param.UsingGFlash">
4103<title>
4104Using the Gflash Parameterisation
4105</title>
4106
4107<para>
4108To use Gflash "out of the box" the following steps are necessary:
4109
4110<itemizedlist spacing="compact">
4111  <listitem><para>
4112    The user must add the fast simulation process to his process
4113    manager:
4114
4115    <informalexample>
4116    <programlisting>
4117  void MyPhysicsList::addParameterisation()
4118  {
4119    G4FastSimulationManagerProcess*
4120      theFastSimulationManagerProcess = new G4FastSimulationManagerProcess();
4121    theParticleIterator-&gt;reset();
4122    while( (*theParticleIterator)() )
4123      {
4124        G4ParticleDefinition* particle = theParticleIterator-&gt;value();
4125        G4ProcessManager* pmanager = particle-&gt;GetProcessManager();
4126        pmanager-&gt;AddProcess(theFastSimulationManagerProcess, -1, 0, 0);
4127      }
4128  }
4129    </programlisting>
4130    </informalexample>
4131  </para></listitem>
4132  <listitem><para>
4133    <para>
4134    The envelope in which the parameterization should be performed
4135    must be specified (below: G4Region m_calo_region) and the
4136    GFlashShowerModel must be assigned to this region. Furthermore, the
4137    classes GFlashParticleBounds (which provides thresholds for the
4138    parameterization like minimal energy etc.), GflashHitMaker(a helper
4139    class to generate hits in the sensitive detector) and
4140    GFlashHomoShowerParamterisation (which does the computations) must
4141    be constructed (by the user at the moment) and assigned to the
4142    GFlashShowerModel. Please note that at the moment only homogeneous
4143    calorimeters are supported.
4144    </para>
4145    <para>
4146    <informalexample>
4147    <programlisting>
4148  m_theFastShowerModel = new GFlashShowerModel("fastShowerModel",m_calo_region);
4149  m_theParametrisation = new GFlashHomoShowerParamterisation(matManager-&gt;getMaterial(mat));
4150  m_theParticleBounds  = new GFlashParticleBounds();
4151  m_theHMaker          = new GFlashHitMaker();
4152  m_theFastShowerModel-&gt;SetParametrisation(*m_theParametrisation);
4153  m_theFastShowerModel-&gt;SetParticleBounds(*m_theParticleBounds) ;
4154  m_theFastShowerModel-&gt;SetHitMaker(*m_theHMaker);
4155    </programlisting>
4156    </informalexample>
4157    </para>
4158    <para>
4159    The user must also set the material of the calorimeter, since the
4160    computation depends on the material.
4161    </para>
4162  </para></listitem>
4163  <listitem><para>
4164    <para>
4165    It is mandatory to use G4VGFlashSensitiveDetector as
4166    (additional) base class for the sensitive detector.
4167    </para>
4168    <para>
4169    <informalexample>
4170    <programlisting>
4171  class ExGflashSensitiveDetector: public G4VSensitiveDetector ,public G4VGFlashSensitiveDetector
4172    </programlisting>
4173    </informalexample>
4174    </para>
4175    <para>
4176    Here it is necessary to implement a separate interface, where the
4177    GFlash spots are processed.
4178    </para>
4179    <para>
4180    <informalexample>
4181    <programlisting>
4182  (ProcessHits(G4GFlashSpot*aSpot ,G4TouchableHistory* ROhist))
4183    </programlisting>
4184    </informalexample>
4185    </para>
4186    <para>
4187    A separate interface is used, because the Gflash spots naturally
4188    contain less information than the full simulation.
4189    </para>
4190  </para></listitem>
4191</itemizedlist>
4192</para>
4193
4194<para>
4195Since the parameters in the Gflash package are taken from fits to
4196full simulations with Geant3, some retuning might be necessary for
4197good agreement with Geant4 showers. For experiment-specific
4198geometries some retuning might be necessary anyway. The tuning is
4199quite complicated since there are many parameters (some correlated)
4200and cannot be described here (see again hep-ex/0001020). For brave
4201users the Gflash framework already forsees the possibility of
4202passing a class with the (users)
4203parameters,<emphasis role="bold">GVFlashHomoShowerTuning</emphasis>,
4204to the GFlashHomoShowerParamterisation constructor.
4205The default parameters are the original Gflash parameters:
4206
4207<informalexample>
4208<programlisting>
4209GFlashHomoShowerParameterisation(G4Material * aMat, GVFlashHomoShowerTuning * aPar = 0);
4210</programlisting>
4211</informalexample>
4212</para>
4213
4214<para>
4215Now there is also a preliminary implemenation of a parameterization
4216for sampling calorimeters.
4217</para>
4218
4219<para>
4220The user must specify the active and passive material, as well as
4221the thickness of the active and passive layer.
4222</para>
4223
4224<para>
4225The sampling structure of the calorimeter is taken into account by
4226using an "effective medium" to compute the shower shape.
4227</para>
4228
4229<para>
4230All material properties needed are calculated automatically. If
4231tuning is required,  the user can pass his own parameter set in
4232the class
4233<emphasis role="bold">GFlashSamplingShowerTuning</emphasis>.
4234Here the user can also set his calorimeter resolution.
4235</para>
4236
4237<para>
4238All in all the constructor looks the following:
4239
4240<informalexample>
4241<programlisting>
4242GFlashSamplingShowerParamterisation(G4Material * Mat1, G4Material * Mat2,G4double d1,G4double d2,
4243GVFlashSamplingShowerTuning * aPar = 0);
4244</programlisting>
4245</informalexample>
4246</para>
4247
4248<para>
4249An implementation of some tools that should help the user to tune
4250the parameterization is forseen.
4251</para>
4252
4253</sect3>
4254</sect2>
4255
4256
4257<!-- ******************* Section (Level#2) ****************** -->
4258<sect2 id="sect.PhysProc.Trans">
4259<title>
4260Transportation Process
4261</title>
4262
4263<para>
4264To be delivered by J. Apostolakis (<email>John.Apostolakis@cern.ch</email>).
4265</para>
4266
4267
4268</sect2>
4269</sect1>
Note: See TracBrowser for help on using the repository browser.