[904] | 1 | <!-- ******************************************************** --> |
---|
| 2 | <!-- Docbook Version: For Toolkit Developers Guide --> |
---|
| 3 | <!-- ******************************************************** --> |
---|
| 4 | |
---|
| 5 | <!-- ******************** Top of Section ******************** --> |
---|
| 6 | <sect1 id="sect.DsgnFuncEvnt"> |
---|
| 7 | <title> |
---|
| 8 | Event |
---|
| 9 | </title> |
---|
| 10 | |
---|
| 11 | <!-- ******************* Section (Level#2) ****************** --> |
---|
| 12 | <sect2 id="sect.sect.DsgnFuncEvnt.DsgPhlsp"> |
---|
| 13 | <title> |
---|
| 14 | Design Philosophy |
---|
| 15 | </title> |
---|
| 16 | |
---|
| 17 | <para> |
---|
| 18 | In high energy physics the primary unit of an experimental run is an event. |
---|
| 19 | An event consists of a set of primary particles produced in an interaction, |
---|
| 20 | and a set of detector responses to these particles. |
---|
| 21 | </para> |
---|
| 22 | |
---|
| 23 | <para> |
---|
| 24 | In Geant4, objects of the G4Event class are the primary units of a |
---|
| 25 | simulation run. Before the event is processed, it contains primary |
---|
| 26 | vertices and primary particles produced by an external physics generator. |
---|
| 27 | After the event is processed, it may also contain hits, digitizations ,and |
---|
| 28 | optionally, trajectories generated by the simulation. The event category |
---|
| 29 | manages events and provides an abstract interface to external physics |
---|
| 30 | generators. |
---|
| 31 | </para> |
---|
| 32 | |
---|
| 33 | <para> |
---|
| 34 | G4Event and its content vertices and particles are independent of |
---|
| 35 | other classes. This isolation allows Geant4-based simulation programs |
---|
| 36 | to be independent of specific choices for physics generators and of specific |
---|
| 37 | solutions for storing the ``Monte Carlo truth''. G4Event avoids |
---|
| 38 | keeping any transient information which is not meaningful after event |
---|
| 39 | processing is complete. Thus the user can store objects of this class for |
---|
| 40 | processing further down the program chain. For performance reasons, |
---|
| 41 | G4Event and its content classes are not persistent. Instead the user |
---|
| 42 | must provide the transient-to-persistent conversion. |
---|
| 43 | </para> |
---|
| 44 | |
---|
| 45 | </sect2> |
---|
| 46 | |
---|
| 47 | <!-- ******************* Section (Level#2) ****************** --> |
---|
| 48 | <sect2 id="sect.sect.DsgnFuncEvnt.ClassDsg"> |
---|
| 49 | <title> |
---|
| 50 | Class Design |
---|
| 51 | </title> |
---|
| 52 | |
---|
| 53 | <itemizedlist spacing="compact"> |
---|
| 54 | <listitem><para> |
---|
| 55 | <emphasis role="bold">G4Event</emphasis> - This class represents an event. |
---|
| 56 | It is constructed and deleted by G4RunManager or its derived class. |
---|
| 57 | </para></listitem> |
---|
| 58 | <listitem><para> |
---|
| 59 | <emphasis role="bold">G4EventManager</emphasis> - This class controls an |
---|
| 60 | event. It must be a singleton and should be constructed by G4RunManager. |
---|
| 61 | </para></listitem> |
---|
| 62 | <listitem><para> |
---|
| 63 | <emphasis role="bold">G4VPrimaryGenerator</emphasis> - the abstract base |
---|
| 64 | class of all of primary generators. This class has only one pure virtual |
---|
| 65 | method, GeneratePrimaryVertex(), which takes a G4Event object, generates |
---|
| 66 | a primary vertex and associates primary particles with the vertex. |
---|
| 67 | </para></listitem> |
---|
| 68 | </itemizedlist> |
---|
| 69 | |
---|
| 70 | <para> |
---|
| 71 | Booch diagrams for classes related to the event and event generator classes |
---|
| 72 | are shown in <xref linkend="fig.DsgnFuncEvnt_1" /> and |
---|
| 73 | <xref linkend="fig.DsgnFuncEvnt_2" />. |
---|
| 74 | |
---|
| 75 | <figure id="fig.DsgnFuncEvnt_1"> |
---|
| 76 | <title> |
---|
| 77 | Event |
---|
| 78 | </title> |
---|
| 79 | <mediaobject> |
---|
| 80 | <imageobject role="fo"> |
---|
[921] | 81 | <imagedata fileref="./AllResources/OOAnalysisDesign/Event/classDgmEventManager.jpg" |
---|
| 82 | format="JPG" contentwidth="10.0cm" align="center" /> |
---|
[904] | 83 | </imageobject> |
---|
| 84 | <imageobject role="html"> |
---|
[921] | 85 | <imagedata fileref="./AllResources/OOAnalysisDesign/Event/classDgmEventManager.jpg" |
---|
[1208] | 86 | format="JPG" contentwidth="120%" align="center" /> |
---|
[904] | 87 | </imageobject> |
---|
| 88 | </mediaobject> |
---|
| 89 | </figure> |
---|
| 90 | |
---|
| 91 | <figure id="fig.DsgnFuncEvnt_2"> |
---|
| 92 | <title> |
---|
| 93 | Event Generator |
---|
| 94 | </title> |
---|
| 95 | <mediaobject> |
---|
| 96 | <imageobject role="fo"> |
---|
[921] | 97 | <imagedata fileref="./AllResources/OOAnalysisDesign/Event/classDgmEventGen.jpg" |
---|
| 98 | format="JPG" contentwidth="10.0cm" align="center" /> |
---|
[904] | 99 | </imageobject> |
---|
| 100 | <imageobject role="html"> |
---|
[921] | 101 | <imagedata fileref="./AllResources/OOAnalysisDesign/Event/classDgmEventGen.jpg" |
---|
[1208] | 102 | format="JPG" contentwidth="120%" align="center" /> |
---|
[904] | 103 | </imageobject> |
---|
| 104 | </mediaobject> |
---|
| 105 | </figure> |
---|
| 106 | </para> |
---|
| 107 | |
---|
| 108 | <!-- ******* Bridgehead ******* --> |
---|
| 109 | <bridgehead role="revisionHistory" renderas='sect4'> |
---|
| 110 | [Status of this chapter] |
---|
| 111 | </bridgehead> |
---|
| 112 | |
---|
| 113 | <para> |
---|
| 114 | <simplelist type="var"> |
---|
| 115 | <member> |
---|
| 116 | 27.06.05 design philosophy section added (from Geant4 general paper) by |
---|
| 117 | D.H. Wright |
---|
| 118 | </member> |
---|
| 119 | <member> |
---|
| 120 | Dec. 2006 Conversion from latex to Docbook verson by K. Amako |
---|
| 121 | </member> |
---|
| 122 | </simplelist> |
---|
| 123 | </para> |
---|
| 124 | |
---|
| 125 | </sect2> |
---|
| 126 | </sect1> |
---|
| 127 | |
---|
| 128 | |
---|