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

Last change on this file since 1013 was 921, checked in by garnier, 16 years ago

en test de gl2ps. Problemes de libraries

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