The new geometry viewer from A.Morsch
[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
43</UL>
44
45<HR>
46
47<h3><A HREF="#Content" NAME="For the impatient">For the impatient user</A></h3>
14c31136 48
49<p> <a href="picts/menubar.gif">
50<img src="picts/menubar.gif" alt="AliRoot menu bar"
87ad6e14 51height=250 align=right></a>
14c31136 52
53<p> To start up AliRoot after installation just type
54
55<p> <KBD> $ aliroot </KBD>
56
57<p> this starts AliRoot in interactive mode. When the <b>root [0]</b>
58prompt appears, you can start an AliRoot interactive session by creating
59the standard menu
60
61<p> <KBD> root[0] .x menu.C </KBD>
62
63<p> The macro <A HREf="roothtml/examples/menu.C.html">menu.C</A> invokes
64the <A HREF="roothtml/AliRun.html">AliRun</A>::Init() method. In turn this
65calls the configuration file <A
66HREF="roothtml/examples/Config.C.html">Config.C</A> where the configuration
67of the detector and several simulation parameters can be specified.
68
69<p> When the initialisation is finished the <b>root</b> prompt apears
70again and the Root control bar appears.
71
72<p> <a href="picts/display.gif">
73<img src="picts/display.gif" alt="AliRoot Event Display"
87ad6e14 74height=160 align=right></a>
14c31136 75
76<p> You can now select several actions from the menu.
77
78<p> <b>Run</b>
79
4c505702 80<p> generates an event with the number of tracks and the
14c31136 81configuration as specified in <A
82HREF="roothtml/examples/Config.C.html">Config.C</A>. The hits deposited
83
84<p> <b> RunLego </b>
85
86<p> <a href="picts/legoex.gif">
87<img src="picts/legoex.gif" alt="Example of Lego Plot"
87ad6e14 88height=150 align=right></a>
14c31136 89
90<p> generates the standard lego plots for radiation and absorption
91length. By default the granularity is 60 rays in theta and 60 rays in phi.
92
93<p> To view the results when this command is finished type:
94
95<p> <KBD> root[0] .x <A HREF="roothtml/examples/lego.C.html">lego.C</A> </KBD>
96
4c505702 97<p> the parameters of the lego run can be specified
98in the calling sequence of the RunLego method as follows:
14c31136 99
100<p> <KBD> root[3] gAlice->RunLego (your list of parameters) </KBD>
101
102<p> <a href="picts/treex.gif">
103<img src="picts/treex.gif" alt="Example of Tree"
87ad6e14 104height=150 align=right></a>
14c31136 105
106<p> see <A HREF="roothtml/AliRun.html">AliRun</a>::RunLego for details
107
108<p> <b>Menu Trees</b>
109
110<p> This shows a new menu from which you can draw the geometry tree for the
111Alice detectors. Clicking with the right button on the pad with the name of
4c505702 112a geometrical element gives access to a number of graphic and inspect
14c31136 113functions. Double-clicking on the pad generates a drawing of the specifications
114of the geometry of the element.
115
116<p> <a href="picts/tpcex.gif">
117<img src="picts/tpcex.gif" alt="Example of Picture"
87ad6e14 118height=150 align=right></a>
14c31136 119
120<p> <b>Menu Pictures</b>
121
122<p> From this menu you can draw pretty pictures of the major ALICE components.
123Note that some pictures may take a long time to be produced.
124
125<p> To quit AliRoot
126
127<p> <KBD>root [ ] .q</KBD>
128
129<h3>A more detailed view</h3>
4c505702 130<h3><A HREF="#Content" NAME="A more detailed view">A more detailed view</A></h3>
14c31136 131
132<p> After startup of the <b>aliroot</b> program the simulation
133infrastructure is initialised by the <a
134href="roothtml/AliRun.html">AliRun</a>::Init() method. This method takes
135an argument that is the name of the initialisation script. The default
136name for this script is <a
137href="roothtml/examples/Config.C.html">Config.C</a>. This script
138initialises the version of the different detectors and of the generator to
4c505702 139be used. In particular some generators can generate a fixed number of
14c31136 140particles and in this case this number is an argument of the generator
141constructor.
142
143<p> A global variable <var>gAlice</var> holds the pointer to the instance
144of the <a href="roothtml/AliRun.html">AliRun</a> class.
145
146<p> <KBD>root [ ] gAlice->Init()</KBD>
147
148<p> The <em>Init</em> method loads the chosen MonteCarlo (for the moment
149only Geant3 is available in production) and initialises it. Another global
150variable <var>gMC</var> holds the pointer to the instance of the virtual
151MonteCarlo Class <a href="roothtml/AliMC.html">AliMC</a>. This allows to
152access all the functions of the Virtual Monte Carlo interface. Some of the
153functions are specific to Geant3, and these can be accessed recasting this
154pointer to a specific Geant3 pointer via the statement
155
87ad6e14 156<p> <KBD>root [ ] TGeant3 *g3 = (TGeant3*) gMC</KBD>
14c31136 157
158<p> <a href="picts/itsex.gif">
159<img src="picts/itsex.gif" alt="Example of Picture"
87ad6e14 160height=150 align=right></a>
14c31136 161
162<p> In particular all the drawing functions of Geant3 are available via
4c505702 163this interface. To draw a cut view of the ITS the following commands
164can be used
14c31136 165
166<p>
167<KBD>
168root [1] TGeant3 *g3 = (TGeant3*)gMC
169<br>root [2] g3->Gsatt("*","seen",1)
170<br>root [3] g3->Gdrawc("ITSV",1,.1,10,10,.125,.125)
171</KBD>
172
173<p> Note that several TGeant3 functions are also available by clicking with
174the right button on a canvas while in the AliRoot session.
175
176<p> The <a href="roothtml/AliRun.html">AliRun</a>::Run() method starts a run
177composed by a single event. This method takes as argument the number of events
178to be processed. If this number is negative, the run is not terminated and
179more events can be run. If this number is positive, after the indicated number
180of events the run is terminated. No more events can be run.
181
182<h3>Batch processing</h3>
183
184<p> In AliRoot there is really no difference between batch and interactive
185processing. An <a href="roothtml/examples/grun.C.html">elementary macro</a>
186to run AliRoot in batch mode is provided amongst the examples, and it can
187be used in the following way to run a 10 events run
188
189<p> <KBD> aliroot -b grun.C\(10\)</KBD>
190
191<p> Note that the backslashes are necessary to prevent the shell from
192interpreting the brackets.
193
194<hr>
195<address>
87ad6e14 196 Last modified Thu Oct 07 11:33:05 1999
197by <A href="mailto:Federico.Carminati@cern.ch">Federico Carminati</A>
198</ADDRESS>
14c31136 199</BODY>
200</HTML>