]> git.uio.no Git - u/mrichter/AliRoot.git/blame - html/howtorun.html
Input number added to Print
[u/mrichter/AliRoot.git] / html / howtorun.html
CommitLineData
14c31136 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
2 "http://www.w3.org/TR/REC-html40/loose.dtd">
3<HTML>
4<HEAD>
5<TITLE>How to run AliRoot</TITLE>
4c505702 6<!-- Changed by: , 1-Nov-1999 -->
14c31136 7<link rev="made" href="mailto:Federico.Carminati@cern.ch">
8<STYLE>
9BODY {
10 background: #FFFFFF;
11 }
12
13COL, COLGROUP, TABLE, TBODY, TD, TR {
14 color: black;
15 text-decoration: none;
16 border-color: black;
17 border-style: none;
18 background: #FFFFFF;
19 }
20
21</STYLE>
22<link rel="stylesheet" href="http://www.w3.org/StyleSheets/Core/Swiss" type="text/css">
23</HEAD>
24
25<BODY background=#FFFFFF>
26<TABLE>
27<TR>
28<TD><img src="picts/MadHatter.gif" alt="ALICE Off-line Project Logo">
29<TD><img src="picts/howtorun_name.gif" alt="How to Run AliRoot">
30<TD><img src="picts/AliceLogo.gif" alt="ALICE Logo">
31</TR>
32</TABLE>
33
14c31136 34
4c505702 35<H2><A NAME="#Content">Content</A></H2>
36
37<UL>
38
39<LI><A HREF="#For the impatient">For the impatient user</A></LI>
40
41<LI><A HREF="#A more detailed view">A more detailed view</A></LI>
42
319116ce 43<LI><A HREF="#Batch processing">Batch processing</A></LI>
44
4c505702 45</UL>
46
47<HR>
48
319116ce 49<h2><A HREF="#Content" NAME="For the impatient">For the impatient user</A></h2>
14c31136 50
51<p> <a href="picts/menubar.gif">
52<img src="picts/menubar.gif" alt="AliRoot menu bar"
87ad6e14 53height=250 align=right></a>
14c31136 54
55<p> To start up AliRoot after installation just type
56
57<p> <KBD> $ aliroot </KBD>
58
59<p> this starts AliRoot in interactive mode. When the <b>root [0]</b>
60prompt appears, you can start an AliRoot interactive session by creating
61the standard menu
62
63<p> <KBD> root[0] .x menu.C </KBD>
64
65<p> The macro <A HREf="roothtml/examples/menu.C.html">menu.C</A> invokes
66the <A HREF="roothtml/AliRun.html">AliRun</A>::Init() method. In turn this
67calls the configuration file <A
68HREF="roothtml/examples/Config.C.html">Config.C</A> where the configuration
69of the detector and several simulation parameters can be specified.
70
71<p> When the initialisation is finished the <b>root</b> prompt apears
72again and the Root control bar appears.
73
74<p> <a href="picts/display.gif">
75<img src="picts/display.gif" alt="AliRoot Event Display"
87ad6e14 76height=160 align=right></a>
14c31136 77
78<p> You can now select several actions from the menu.
79
80<p> <b>Run</b>
81
4c505702 82<p> generates an event with the number of tracks and the
14c31136 83configuration as specified in <A
84HREF="roothtml/examples/Config.C.html">Config.C</A>. The hits deposited
85
86<p> <b> RunLego </b>
87
88<p> <a href="picts/legoex.gif">
89<img src="picts/legoex.gif" alt="Example of Lego Plot"
87ad6e14 90height=150 align=right></a>
14c31136 91
92<p> generates the standard lego plots for radiation and absorption
93length. By default the granularity is 60 rays in theta and 60 rays in phi.
94
95<p> To view the results when this command is finished type:
96
97<p> <KBD> root[0] .x <A HREF="roothtml/examples/lego.C.html">lego.C</A> </KBD>
98
4c505702 99<p> the parameters of the lego run can be specified
100in the calling sequence of the RunLego method as follows:
14c31136 101
102<p> <KBD> root[3] gAlice->RunLego (your list of parameters) </KBD>
103
104<p> <a href="picts/treex.gif">
105<img src="picts/treex.gif" alt="Example of Tree"
87ad6e14 106height=150 align=right></a>
14c31136 107
108<p> see <A HREF="roothtml/AliRun.html">AliRun</a>::RunLego for details
109
110<p> <b>Menu Trees</b>
111
112<p> This shows a new menu from which you can draw the geometry tree for the
113Alice detectors. Clicking with the right button on the pad with the name of
4c505702 114a geometrical element gives access to a number of graphic and inspect
14c31136 115functions. Double-clicking on the pad generates a drawing of the specifications
116of the geometry of the element.
117
118<p> <a href="picts/tpcex.gif">
119<img src="picts/tpcex.gif" alt="Example of Picture"
87ad6e14 120height=150 align=right></a>
14c31136 121
122<p> <b>Menu Pictures</b>
123
124<p> From this menu you can draw pretty pictures of the major ALICE components.
125Note that some pictures may take a long time to be produced.
126
127<p> To quit AliRoot
128
129<p> <KBD>root [ ] .q</KBD>
130
319116ce 131<h2><A HREF="#Content" NAME="A more detailed view">A more detailed view</A></h2>
14c31136 132
133<p> After startup of the <b>aliroot</b> program the simulation
134infrastructure is initialised by the <a
135href="roothtml/AliRun.html">AliRun</a>::Init() method. This method takes
136an argument that is the name of the initialisation script. The default
137name for this script is <a
138href="roothtml/examples/Config.C.html">Config.C</a>. This script
139initialises the version of the different detectors and of the generator to
4c505702 140be used. In particular some generators can generate a fixed number of
14c31136 141particles and in this case this number is an argument of the generator
142constructor.
143
144<p> A global variable <var>gAlice</var> holds the pointer to the instance
145of the <a href="roothtml/AliRun.html">AliRun</a> class.
146
147<p> <KBD>root [ ] gAlice->Init()</KBD>
148
149<p> The <em>Init</em> method loads the chosen MonteCarlo (for the moment
150only Geant3 is available in production) and initialises it. Another global
151variable <var>gMC</var> holds the pointer to the instance of the virtual
152MonteCarlo Class <a href="roothtml/AliMC.html">AliMC</a>. This allows to
153access all the functions of the Virtual Monte Carlo interface. Some of the
154functions are specific to Geant3, and these can be accessed recasting this
155pointer to a specific Geant3 pointer via the statement
156
87ad6e14 157<p> <KBD>root [ ] TGeant3 *g3 = (TGeant3*) gMC</KBD>
14c31136 158
159<p> <a href="picts/itsex.gif">
160<img src="picts/itsex.gif" alt="Example of Picture"
87ad6e14 161height=150 align=right></a>
14c31136 162
163<p> In particular all the drawing functions of Geant3 are available via
4c505702 164this interface. To draw a cut view of the ITS the following commands
165can be used
14c31136 166
167<p>
168<KBD>
169root [1] TGeant3 *g3 = (TGeant3*)gMC
170<br>root [2] g3->Gsatt("*","seen",1)
171<br>root [3] g3->Gdrawc("ITSV",1,.1,10,10,.125,.125)
172</KBD>
173
174<p> Note that several TGeant3 functions are also available by clicking with
175the right button on a canvas while in the AliRoot session.
176
177<p> The <a href="roothtml/AliRun.html">AliRun</a>::Run() method starts a run
178composed by a single event. This method takes as argument the number of events
179to be processed. If this number is negative, the run is not terminated and
180more events can be run. If this number is positive, after the indicated number
181of events the run is terminated. No more events can be run.
182
319116ce 183<h2><A HREF="#Content" NAME="Batch processing">Batch processing</A></h2>
14c31136 184
185<p> In AliRoot there is really no difference between batch and interactive
186processing. An <a href="roothtml/examples/grun.C.html">elementary macro</a>
187to run AliRoot in batch mode is provided amongst the examples, and it can
188be used in the following way to run a 10 events run
189
d083603f 190<p> <KBD> aliroot -b -q grun.C\(10\)</KBD>
14c31136 191
192<p> Note that the backslashes are necessary to prevent the shell from
193interpreting the brackets.
194
319116ce 195<p> For very large output files we strongly discourage the use of afs
196space, as it has performance penalty and it is really intended to be used
197for user and program files and not data files. Users needing access to
198large data files should use the ALICE staging facility. The procedure is
199the following:
200
201<p><ol>
202
203<li> Define a <var>STAGE_HOST</var> variable which is in our case
204<var>shiftalice</var>
205
481bb6ef 206<p><li> In your <var>Config.C</var> macro, or in any other place where
207you open a file, instead of opening the file as
319116ce 208
209<p><kbd>
210 TFile *f = new TFile("filename","option");
211</kbd>
212
213<p>use
214
215<p><kbd>
481bb6ef 216 TFile *f = TFile::Open("rfio:filename","option");
319116ce 217</kbd>
218
219<p><li>Stage a file via the command
220<p><kbd>
221 stagealloc -p alice_stage filename
222</kbd>
223
224<p>This will create in your working directory a link <var>filename</var>
225that points to the <em>real</em> file in the stage pool.
226
227<p><li>Now you can run
228
229<p><li>When done with the file, do not <kbd>rm filename</kbd>. It will
230remove the link only, the file will still be in the pool, occupying our
231precious disk space. To delete a staged file instead do
232<p><kbd>
233 stageclr -P `stageqry -p alice_stage -A filename -P`
234</kbd>
235<p>and this will do a proper job.
236</ol>
237
238<p>More information on stage can be found in the <a
241c61af 239href="http://wwwinfo.cern.ch/pdp/castor/doc/public/all_man_pages.html">man pages</a> of
319116ce 240the different stage commands or in the CORE <a
241href="http://wwwinfo.cern.ch/pdp/sc/coreplus.html">User Guide</a>.
242
243<br clear>
14c31136 244<hr>
245<address>
87ad6e14 246 Last modified Thu Oct 07 11:33:05 1999
247by <A href="mailto:Federico.Carminati@cern.ch">Federico Carminati</A>
248</ADDRESS>
14c31136 249</BODY>
250</HTML>