1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
2 "http://www.w3.org/TR/REC-html40/loose.dtd">
5 <TITLE>How to run AliRoot</TITLE>
6 <!-- Changed by: , 1-Nov-1999 -->
7 <link rev="made" href="mailto:Federico.Carminati@cern.ch">
13 COL, COLGROUP, TABLE, TBODY, TD, TR {
15 text-decoration: none;
22 <link rel="stylesheet" href="http://www.w3.org/StyleSheets/Core/Swiss" type="text/css">
25 <BODY background=#FFFFFF>
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">
35 <H2><A NAME="#Content">Content</A></H2>
39 <LI><A HREF="#For the impatient">For the impatient user</A></LI>
41 <LI><A HREF="#A more detailed view">A more detailed view</A></LI>
43 <LI><A HREF="#Batch processing">Batch processing</A></LI>
49 <h2><A HREF="#Content" NAME="For the impatient">For the impatient user</A></h2>
51 <p> <a href="picts/menubar.gif">
52 <img src="picts/menubar.gif" alt="AliRoot menu bar"
53 height=250 align=right></a>
55 <p> To start up AliRoot after installation just type
57 <p> <KBD> $ aliroot </KBD>
59 <p> this starts AliRoot in interactive mode. When the <b>root [0]</b>
60 prompt appears, you can start an AliRoot interactive session by creating
63 <p> <KBD> root[0] .x menu.C </KBD>
65 <p> The macro <A HREf="roothtml/examples/menu.C.html">menu.C</A> invokes
66 the <A HREF="roothtml/AliRun.html">AliRun</A>::Init() method. In turn this
67 calls the configuration file <A
68 HREF="roothtml/examples/Config.C.html">Config.C</A> where the configuration
69 of the detector and several simulation parameters can be specified.
71 <p> When the initialisation is finished the <b>root</b> prompt apears
72 again and the Root control bar appears.
74 <p> <a href="picts/display.gif">
75 <img src="picts/display.gif" alt="AliRoot Event Display"
76 height=160 align=right></a>
78 <p> You can now select several actions from the menu.
82 <p> generates an event with the number of tracks and the
83 configuration as specified in <A
84 HREF="roothtml/examples/Config.C.html">Config.C</A>. The hits deposited
88 <p> <a href="picts/legoex.gif">
89 <img src="picts/legoex.gif" alt="Example of Lego Plot"
90 height=150 align=right></a>
92 <p> generates the standard lego plots for radiation and absorption
93 length. By default the granularity is 60 rays in theta and 60 rays in phi.
95 <p> To view the results when this command is finished type:
97 <p> <KBD> root[0] .x <A HREF="roothtml/examples/lego.C.html">lego.C</A> </KBD>
99 <p> the parameters of the lego run can be specified
100 in the calling sequence of the RunLego method as follows:
102 <p> <KBD> root[3] gAlice->RunLego (your list of parameters) </KBD>
104 <p> <a href="picts/treex.gif">
105 <img src="picts/treex.gif" alt="Example of Tree"
106 height=150 align=right></a>
108 <p> see <A HREF="roothtml/AliRun.html">AliRun</a>::RunLego for details
110 <p> <b>Menu Trees</b>
112 <p> This shows a new menu from which you can draw the geometry tree for the
113 Alice detectors. Clicking with the right button on the pad with the name of
114 a geometrical element gives access to a number of graphic and inspect
115 functions. Double-clicking on the pad generates a drawing of the specifications
116 of the geometry of the element.
118 <p> <a href="picts/tpcex.gif">
119 <img src="picts/tpcex.gif" alt="Example of Picture"
120 height=150 align=right></a>
122 <p> <b>Menu Pictures</b>
124 <p> From this menu you can draw pretty pictures of the major ALICE components.
125 Note that some pictures may take a long time to be produced.
129 <p> <KBD>root [ ] .q</KBD>
131 <h2><A HREF="#Content" NAME="A more detailed view">A more detailed view</A></h2>
133 <p> After startup of the <b>aliroot</b> program the simulation
134 infrastructure is initialised by the <a
135 href="roothtml/AliRun.html">AliRun</a>::Init() method. This method takes
136 an argument that is the name of the initialisation script. The default
137 name for this script is <a
138 href="roothtml/examples/Config.C.html">Config.C</a>. This script
139 initialises the version of the different detectors and of the generator to
140 be used. In particular some generators can generate a fixed number of
141 particles and in this case this number is an argument of the generator
144 <p> A global variable <var>gAlice</var> holds the pointer to the instance
145 of the <a href="roothtml/AliRun.html">AliRun</a> class.
147 <p> <KBD>root [ ] gAlice->Init()</KBD>
149 <p> The <em>Init</em> method loads the chosen MonteCarlo (for the moment
150 only Geant3 is available in production) and initialises it. Another global
151 variable <var>gMC</var> holds the pointer to the instance of the virtual
152 MonteCarlo Class <a href="roothtml/AliMC.html">AliMC</a>. This allows to
153 access all the functions of the Virtual Monte Carlo interface. Some of the
154 functions are specific to Geant3, and these can be accessed recasting this
155 pointer to a specific Geant3 pointer via the statement
157 <p> <KBD>root [ ] TGeant3 *g3 = (TGeant3*) gMC</KBD>
159 <p> <a href="picts/itsex.gif">
160 <img src="picts/itsex.gif" alt="Example of Picture"
161 height=150 align=right></a>
163 <p> In particular all the drawing functions of Geant3 are available via
164 this interface. To draw a cut view of the ITS the following commands
169 root [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)
174 <p> Note that several TGeant3 functions are also available by clicking with
175 the right button on a canvas while in the AliRoot session.
177 <p> The <a href="roothtml/AliRun.html">AliRun</a>::Run() method starts a run
178 composed by a single event. This method takes as argument the number of events
179 to be processed. If this number is negative, the run is not terminated and
180 more events can be run. If this number is positive, after the indicated number
181 of events the run is terminated. No more events can be run.
183 <h2><A HREF="#Content" NAME="Batch processing">Batch processing</A></h2>
185 <p> In AliRoot there is really no difference between batch and interactive
186 processing. An <a href="roothtml/examples/grun.C.html">elementary macro</a>
187 to run AliRoot in batch mode is provided amongst the examples, and it can
188 be used in the following way to run a 10 events run
190 <p> <KBD> aliroot -b -q grun.C\(10\)</KBD>
192 <p> Note that the backslashes are necessary to prevent the shell from
193 interpreting the brackets.
195 <p> For very large output files we strongly discourage the use of afs
196 space, as it has performance penalty and it is really intended to be used
197 for user and program files and not data files. Users needing access to
198 large data files should use the ALICE staging facility. The procedure is
203 <li> Define a <var>STAGE_HOST</var> variable which is in our case
204 <var>shiftalice</var>
206 <p><li> In your <var>Config.C</var> macro, or in any other place where
207 you open a file, instead of opening the file as
210 TFile *f = new TFile("filename","option");
216 TFile *f = TFile::Open("rfio:filename","option");
219 <p><li>Stage a file via the command
221 stagealloc -p alice_stage filename
224 <p>This will create in your working directory a link <var>filename</var>
225 that points to the <em>real</em> file in the stage pool.
227 <p><li>Now you can run
229 <p><li>When done with the file, do not <kbd>rm filename</kbd>. It will
230 remove the link only, the file will still be in the pool, occupying our
231 precious disk space. To delete a staged file instead do
233 stageclr -P `stageqry -p alice_stage -A filename -P`
235 <p>and this will do a proper job.
238 <p>More information on stage can be found in the <a
239 href="http://wwwinfo.cern.ch/pdp/castor/doc/public/all_man_pages.html">man pages</a> of
240 the different stage commands or in the CORE <a
241 href="http://wwwinfo.cern.ch/pdp/sc/coreplus.html">User Guide</a>.
246 Last modified Thu Oct 07 11:33:05 1999
247 by <A href="mailto:Federico.Carminati@cern.ch">Federico Carminati</A>