[807] | 1 | $Id: README,v 1.19 2006/05/15 14:39:20 maire Exp $ |
---|
| 2 | ------------------------------------------------------------------- |
---|
| 3 | |
---|
| 4 | ========================================================= |
---|
| 5 | Geant4 - an Object-Oriented Toolkit for Simulation in HEP |
---|
| 6 | ========================================================= |
---|
| 7 | |
---|
| 8 | TestEm4 |
---|
| 9 | ------- |
---|
| 10 | |
---|
| 11 | Plot energy deposited by 9 MeV photon beam in an homogeneous medium. |
---|
| 12 | |
---|
| 13 | 1- GEOMETRY DEFINITION |
---|
| 14 | |
---|
| 15 | It is a cylinder of 5 cm radius filled with C6F6. |
---|
| 16 | |
---|
| 17 | 2- PHYSICS LIST |
---|
| 18 | |
---|
| 19 | The particle list contains only gamma, electron,positron. |
---|
| 20 | The physics list contains the 'standard' electromagnetic processes. |
---|
| 21 | |
---|
| 22 | 3- AN EVENT : THE PRIMARY GENERATOR |
---|
| 23 | |
---|
| 24 | The primary kinematic is a single 9 MeV gamma randomly shooted at the |
---|
| 25 | middle of the cylinder. |
---|
| 26 | |
---|
| 27 | 4- VISUALIZATION |
---|
| 28 | |
---|
| 29 | The Visualization Manager is set in the main(). |
---|
| 30 | The initialisation of the drawing is done via the commands |
---|
| 31 | /vis/.. in the macro vis.mac. This macro is |
---|
| 32 | automatically read from the main in case of interactive running mode. |
---|
| 33 | |
---|
| 34 | The detector has a default view which is a transversal view of the |
---|
| 35 | cylinder. |
---|
| 36 | |
---|
| 37 | The tracks are drawn at the end of event, and erased at the end of run. |
---|
| 38 | Optionaly one can choose to draw all particles, only the charged one, |
---|
| 39 | or none. This command is defined in EventActionMessenger class. |
---|
| 40 | |
---|
| 41 | 5- PHYSICS SURVEY |
---|
| 42 | |
---|
| 43 | The energy deposited in C6F6 is histogramed. |
---|
| 44 | |
---|
| 45 | 6- HOW TO START ? |
---|
| 46 | |
---|
| 47 | - compile and link to generate an executable |
---|
| 48 | % cd examples/extended/electromagnetic/TestEm4 |
---|
| 49 | % gmake |
---|
| 50 | |
---|
| 51 | - execute TestEm4 in 'batch' mode from macro files |
---|
| 52 | % TestEm4 TestEm4.in |
---|
| 53 | |
---|
| 54 | - execute TestEm4 in 'interactive mode' with visualization |
---|
| 55 | % TestEm4 |
---|
| 56 | .... |
---|
| 57 | Idle> type your commands |
---|
| 58 | .... |
---|
| 59 | Idle> exit |
---|
| 60 | |
---|
| 61 | - visualize the histogram (paw) |
---|
| 62 | paw> h/file 1 testem4.hbook |
---|
| 63 | paw> option stat |
---|
| 64 | paw> option logy |
---|
| 65 | paw> h/pl 1 |
---|
| 66 | |
---|
| 67 | |
---|
| 68 | 7- USING HISTOGRAMS |
---|
| 69 | |
---|
| 70 | By default the histograms are not activated. To activate histograms |
---|
| 71 | the environment variable G4ANALYSIS_USE should be defined. For instance |
---|
| 72 | uncomment the flag G4ANALYSIS_USE in GNUmakefile. |
---|
| 73 | |
---|
| 74 | Before compilation of the example it is optimal to clean up old files: |
---|
| 75 | gmake histclean |
---|
| 76 | gmake |
---|
| 77 | |
---|
| 78 | It is possible to choose the format of the histogram file (hbook, root, XML): |
---|
| 79 | comment/uncomment 1 line in the constructor of RunAction. |
---|
| 80 | |
---|
| 81 | To use histograms, at least one of the AIDA implementations should be |
---|
| 82 | available (see http://aida.freehep.org). |
---|
| 83 | |
---|
| 84 | 7a - PI |
---|
| 85 | |
---|
| 86 | A package including AIDA and extended interfaces also using Python is PI, |
---|
| 87 | available from: http://cern.ch/pi |
---|
| 88 | |
---|
| 89 | Once installed PI or PI-Lite in a specified local area $MYPY, it is required |
---|
| 90 | to add the installation path to $PATH, i.e. for example, for release 1.2.1 of |
---|
| 91 | PI: |
---|
| 92 | setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin |
---|
| 93 | |
---|
| 94 | CERN users can use the PATH to the LCG area on AFS. |
---|
| 95 | Before running the example the command should be issued: |
---|
| 96 | eval `aida-config --runtime csh` |
---|
| 97 | |
---|
| 98 | 7b - OpenScientist |
---|
| 99 | |
---|
| 100 | OpenScientist is available at http://OpenScientist.lal.in2p3.fr. |
---|
| 101 | |
---|
| 102 | You have to "setup" the OpenScientist AIDA implementation before compiling |
---|
| 103 | (then with G4ANALYSIS_USE set) and running your Geant4 application. |
---|
| 104 | |
---|
| 105 | On UNIX you setup, with a csh flavoured shell : |
---|
| 106 | csh> source <<OpenScientist install path>/aida-setup.csh |
---|
| 107 | or with a sh flavoured shell : |
---|
| 108 | sh> . <<OpenScientist install path>/aida-setup.sh |
---|
| 109 | On Windows : |
---|
| 110 | DOS> call <<OpenScientist install path>/aida-setup.bat |
---|
| 111 | |
---|
| 112 | You can use various file formats for writing (AIDA-XML, hbook, root). |
---|
| 113 | These formats are readable by the Lab onx interactive program |
---|
| 114 | or the OpenPAW application. See the web pages. |
---|
| 115 | |
---|
| 116 | |
---|
| 117 | With OpenPAW, on a run.hbook file, one can view the histograms |
---|
| 118 | with something like : |
---|
| 119 | OS> opaw |
---|
| 120 | opaw> h/file 1 run.hbook ( or opaw> h/file 1 run.aida or run.root) |
---|
| 121 | opaw> zone 2 2 |
---|
| 122 | opaw> h/plot 1 |
---|
| 123 | opaw> h/plot 2 |
---|