ALICE Off-line Project Logo How to Run AliRoot ALICE Logo

Content


For the impatient user

AliRoot menu bar

To start up AliRoot after installation just type

$ aliroot

this starts AliRoot in interactive mode. When the root [0] prompt appears, you can start an AliRoot interactive session by creating the standard menu

root[0] .x menu.C

The macro menu.C invokes the AliRun::Init() method. In turn this calls the configuration file Config.C where the configuration of the detector and several simulation parameters can be specified.

When the initialisation is finished the root prompt apears again and the Root control bar appears.

AliRoot Event Display

You can now select several actions from the menu.

Run

generates an event with the number of tracks and the configuration as specified in Config.C. The hits deposited

RunLego

Example of Lego Plot

generates the standard lego plots for radiation and absorption length. By default the granularity is 60 rays in theta and 60 rays in phi.

To view the results when this command is finished type:

root[0] .x lego.C

the parameters of the lego run can be specified in the calling sequence of the RunLego method as follows:

root[3] gAlice->RunLego (your list of parameters)

Example of Tree

see AliRun::RunLego for details

Menu Trees

This shows a new menu from which you can draw the geometry tree for the Alice detectors. Clicking with the right button on the pad with the name of a geometrical element gives access to a number of graphic and inspect functions. Double-clicking on the pad generates a drawing of the specifications of the geometry of the element.

Example of Picture

Menu Pictures

From this menu you can draw pretty pictures of the major ALICE components. Note that some pictures may take a long time to be produced.

To quit AliRoot

root [ ] .q

A more detailed view

After startup of the aliroot program the simulation infrastructure is initialised by the AliRun::Init() method. This method takes an argument that is the name of the initialisation script. The default name for this script is Config.C. This script initialises the version of the different detectors and of the generator to be used. In particular some generators can generate a fixed number of particles and in this case this number is an argument of the generator constructor.

A global variable gAlice holds the pointer to the instance of the AliRun class.

root [ ] gAlice->Init()

The Init method loads the chosen MonteCarlo (for the moment only Geant3 is available in production) and initialises it. Another global variable gMC holds the pointer to the instance of the virtual MonteCarlo Class AliMC. This allows to access all the functions of the Virtual Monte Carlo interface. Some of the functions are specific to Geant3, and these can be accessed recasting this pointer to a specific Geant3 pointer via the statement

root [ ] TGeant3 *g3 = (TGeant3*) gMC

Example of Picture

In particular all the drawing functions of Geant3 are available via this interface. To draw a cut view of the ITS the following commands can be used

root [1] TGeant3 *g3 = (TGeant3*)gMC
root [2] g3->Gsatt("*","seen",1)
root [3] g3->Gdrawc("ITSV",1,.1,10,10,.125,.125)

Note that several TGeant3 functions are also available by clicking with the right button on a canvas while in the AliRoot session.

The AliRun::Run() method starts a run composed by a single event. This method takes as argument the number of events to be processed. If this number is negative, the run is not terminated and more events can be run. If this number is positive, after the indicated number of events the run is terminated. No more events can be run.

Batch processing

In AliRoot there is really no difference between batch and interactive processing. An elementary macro to run AliRoot in batch mode is provided amongst the examples, and it can be used in the following way to run a 10 events run

aliroot -b -q grun.C\(10\)

Note that the backslashes are necessary to prevent the shell from interpreting the brackets.

For very large output files we strongly discourage the use of afs space, as it has performance penalty and it is really intended to be used for user and program files and not data files. Users needing access to large data files should use the ALICE staging facility. The procedure is the following:

  1. Define a STAGE_HOST variable which is in our case shiftalice

  2. In your Config.C macro, or in any other place where you open a file, instead of opening the file as

    TFile *f = new TFile("filename","option");

    use

    TFile *f = TFile::Open("rfio:filename","option");

  3. Stage a file via the command

    stagealloc -p alice_stage filename

    This will create in your working directory a link filename that points to the real file in the stage pool.

  4. Now you can run

  5. When done with the file, do not rm filename. It will remove the link only, the file will still be in the pool, occupying our precious disk space. To delete a staged file instead do

    stageclr -P `stageqry -p alice_stage -A filename -P`

    and this will do a proper job.

More information on stage can be found in the man pages of the different stage commands or in the CORE User Guide.


Last modified Thu Oct 07 11:33:05 1999 by Federico Carminati