Webmaster Daniele Barbareschi

optimized to 1280 x 800 resolution

 

 

 

 

External packages

 

IlcRoot framework needs the following external packages:

 

PACKAGE VERSION/Tag
   
Pythia6 dummy
Root v5-12-00
Geant3 v1-6
CLHEP 2.0.2.3
Stdhep 5-05-03
IlcRoot HEAD
Fluka 2006.3
Geant4 8.1p01
vgm 2.08.02
Geant4 VMC 1.9
PhotonEvaporation 2.0
G4NDL 3.8
 

 

You need to create a dummy library for Pythia6

type the following commands:

cat > /tmp/p.c <<EOF
void pythia6_common_block_address_() {}
EOF

gcc -c -o /tmp/p.o /tmp/p.c
export LIBDIR=select your path
gcc -o $LIBDIR/libPythia6.so -shared /tmp/p.o

rm -rf /tmp/p.[oc]

Or you can get it clicking here

 

You can get Root from cvs repository at CERN

type the following commands:


export CVSROOT=:pserver:cvs@root.cern.ch:/user/cvs (bash style)
cvs login (cvs as password)
cvs -z3 co -r v5-12-00 root
export ROOTSYS=root directory
export PATH=$PATH:$ROOTSYS/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
export PYTHONPATH=$ROOTSYS/lib:$ROOTSYS/gdml (for gdml support)
cd $ROOTSYS
cvs update -dA geom
cvs update -dA geombuilder (last two updates are needed by IlcRoot geometry importing)
cd $ROOTSYS
./configure linux--enable-pythia6 --with-pythia6-libdir=pithia6 library directory --enable mathmore --enable-mathcore --enable-roofit --enable-asimage --enable-minuit2 --enable-qt
cd $ROOTSYS
gmake
gmake cintdlls
gmake install

 

From the same cvs repository at CERN, you can get Geant3 source code

type the following commands:

cvs -z3 co -r v1-6 geant3
export ILC_TARGET=linux
export GEANT3SYS=geant3 directory
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GEANT3SYS/lib/tgt_${ILC_TARGET}
cd $GEANT3SYS
gmake

you can get CLHEP source code from CERN site, clicking here

you can follow the installation instruction from CERN official site.

 

STDHEP source code is available clicking here

type the following commands:

export STDHEP_DIR=Stdhep directory
cd $STDHEP_DIR
gmake all

You can get IlcRoot source code from CVS at FNAL

(see download section)


export environment variables for packages as described previously
export SWDIR=directory containing all packages (IlcRoot,root,geant3,fluka,...) in the top level directory

export LIBDIR=$SWDIR/lib
export ILC=$SWDIR
export WORKDIR=$ILC
export ILC_LEVEL=IlcRoot directory
export ILC_ROOT=$ILC/$ILC_LEVEL
export ILC_TARGET=linux
export PATH=.:$ILC_ROOT/bin/tgt_${ILC_TARGET}:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR:$ILC_ROOT/lib/tgt_${ILC_TARGET}

NOTE: Don't forget to modify the environment variables with your path values.

cd $ILC_ROOT
gmake
gmake all-TFluka

Fluka 2006.3 source code from official site

type the following commands:

export FLUPRO=Fluka directory

NOTE: Compilation is not needed.

 

you can get Geant4 source code from official site, clicking here

you can follow the installation instruction from G4 official site.

 

you can get vgm source code from CERN site, clicking here

type the following commands:

export VGM_INSTALL=path to the VGM installation
export VGM_SYSTEM=platform (Linux-g++, SunOS, DEC-cxx, HP-aCC)
export CLHEP_BASE_DIR=(I guess this is already set)
cd $VGM_INSTALL/packages
gmake
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$VGM_INSTALL/lib/$VGM_SYSTEM

 

you can get GEANT4 VMC source code from CERN site, clicking here

you can follow the installation instruction from CERN official site.

 

you can get G4NDL source code from official site, clicking here

you can follow the installation instruction from G4 official site.

 

you can get PhotonEvaporation source code from official site, clicking here

you can follow the installation instruction from G4 official site.

 

 

Geometry files

IlcRoot's geometry is defined via root file extension. Each geometry file contain information about shape parameters, material parameter and medium parameters. The correct geometry file must be selected according with subdetectors selection in configuration step (see configuration chapther for more details).Geometry files are available at FNAL's CVS. (see download section)

 

 

Preparation

First of all, I recommend you the following steps:

export environment variables, in same way for installation: source env.sh
create your work directory: mkdir $ILC/work
copy .rootrc file from $ILC_ROOT to your work directory: cp $ILC_ROOT/.rootrc $ILC/work
copy Config.C file from $ILC_ROOT/macros/Config.C to $ILC/work: cp $ILC_ROOT/macros/Config.C $ILC/work
copy ILC-VXD-TPC-DREAM.C file from $ILC to your work directory: cp $ILC/ILC-VXD-TPC-DREAM.C $ILC/work

 

Configuration

You can set among several options, by changing the configuration file (Config.C). The main options to set are for:

Virtual MonteCarlo

Events generator
Magnetic field

VXD geometry format

Number of events per file and compression level

debug level

Geometr
y root file
Detector flags

Virtual MonteCarlo

you can set option number 2) in the Config.C to select the MC.

//2) Select your MC
//static MC_t mc = kFLUKA;
//static MC_t mc = kGEANT3;
//static MC_t mc = kGEANT4;
static MC_t mc = kGEANT3TGEO;

NOTE. kGEANT3 is obsolete. kGEANT4 is under development and still has some flow. FLUKA is preferred for calorimetry.


Events generator

you can set option number 1) in the Config.C to select events generator.

// 1) Select your generator
static PprRun_t srun = kGenBox;
//static PprRun_t srun = kGenFixed;
//static PprRun_t srun = kPythia6Jets100; //Pythia jets 49.9-50.1 GeV @ 100 GeV
//static PprRun_t srun = kExtFileTxt; //File txt from external generator like Pandora-Pythia
//static PprRun_t srun = kExtFileStdhep; //File stdhep from external generator like Pandora-Pythia
//static PprRun_t srun = kCocktail; //EXAMPLE of Cocktail. From this example improve your own Cocktail
of particles/generators.

NOTE.to use kExtFileTxt, you need to have a well-formatted txt file. Of course, to use kExtFileStdhep you need to have a stdhep file.

Magnetic field

You can set option number 4) in Config.C to select magnetic field.

//4) Select the magnetic field
//static PprMag_t smag = kMagFC
//static PprMag_t smag = kMagFCM
//static PprMag_t smag = kMagFMaps
static PprMag_t smag = kMagFILC; //Magnetic field of ILC until 3.5 m
//static PprMag_t smag = kMagFILC2; //Magnetic field of ILC until 3.0 m

NOTE. select just kMagFILC or kMagFC, the other magnetic fields are obsoletes.

VXD geometry format

Very soon you will be able to select the format of geometry file for Vertex Detector (gdml,root), but, at present, it's possible only to import the geometry from a root file (based on gdml file generated by SiD concept). You can select it via option number 7) in Config.C

//7) Select detector geometry
//static GEOM_t geom = kGDML;
static GEOM_t geom = kROOT;

Number of events per file and compression level

You can set the number of events per file and compression level of files at option number 8) and option number 9) in Config.C

//8) Select the number of events per a root file
static Int_t evntperfile = 100;

//9) Select the the compression level
static Int_t compresslevel = 2;

Debug level

you set the debug level for printouts via option number 10) in Config.C

//10) Select the debug level
static Int_t debuglevel = 0; // set 0 if you don't want any debug output

Geometry root file

You need to select one geometry root file according to the detectors you want to simulate

//******Please, select the geometry root file according to the detectors you want to simulate******
//*******************Don't forget to put the correct path where the root file is located *******************

//DREAM-MUD-TPC-VXD //gIlc->SetGeometryFileName("$ILC_ROOT/GeometryFiles/DREAM_MUD_TPC_VXD.root");

//DREAM-TPC-VXD
gIlc->SetGeometryFileName("$ILC_ROOT/GeometryFiles/DREAM_TPC_VXD.root");

//TPC-VXD
//gIlc->SetGeometryFileName("$ILC_ROOT/GeometryFiles/TPC_VXD.root");

//VXD
//gIlc->SetGeometryFileName("$ILC_ROOT/GeometryFiles/VXD.root");

Detector flags

You can select the following detector flags according to detectors you want simulate and according to geometry files you have selected in previous step.

Int_t iVXD = 1;
Int_t iDREAM = 1;
Int_t iTPC = 1;
Int_t iMUD = 1;

NOTE. Don't switch on others detectors flags for the moment. Those are not necessary.

 

General use

To run the IlcRoot program type IlcRoot in shell prompt

to run a simulation you can execute ILC-VXD_TPC_MUD_DREAM.C macro.

root [0] .x ILC-VXD_TPC_DREAM.C

If you have changed the Config.C file from the standard one, you need to modify some options in the macro accordingly.You will have as output a list of root files. You can manage them by using the root framework.

Enjoy!!!