Alice Off-Line Project |
please send comments to: Yiota Foka
The new version of GALICE has assembled in few months to be used for the Technical Design Report exercise. This has left little time to work on documentation. Therefore we invite readers of this page to provide comments, suggestions and complaints to the Simulation Mailing list.
please send comments to: Yiota Foka
The data card file distributed with GALICE contains three categories of FFREAD cards:
please send comments to: Yiota Foka
This is a standard GEANT data card, but the meaning of the different field is defind by the user. The first field is integer and the others floating point. Note that this is a mixed data cards, and it mandatory to input floating point numbers with a decimal point. In GALICE the meaning is the following:
KINE 1 x y z theta phi pmom part
One particle per trigger, starting from x, y, z with angles theta and phi, momentum pmom and particle type NINT(part). Angles are given in degrees.
KINE 2 thmin thmax phimin phimax pmin pmax part npart
NINT(npart) particles per trigger centered at the interaction point (SXIPXS) with theta, phi and p in the range (thmin,thmax), (phimin,phimax), (pmin,pmax) and particle type NINT(part). Angles are given in degrees.
KINE -2 thmin thmax phimin phimax pmean sigma part npart
Same as before, but with a gaussian momentum distribution with average pmean and standard deviation sigma. Angles are given in degrees.
KINE 3 parmin parmax thmin thmax phimin phimax pmin pmax
Source is read from an external file in VENUS format. Only accept particle with part, theta, phi, pmom in the range (parmin, parmax), (thmin, themax), (phimin, phimax) and (pmin, pmax) where part is the GEANT particle code. Angles are given in degrees. This interface is now obsolete and has been kept for backward compatibility only.
KINE 4 thmin thmax phimin phimax pmin pmax npart
NINT(npart)
source particles are generated per event
according to a pt and eta distribution which is parametrised on the SHAKER
distribution. Angular and momentum cuts are possible with the same meaning
than the previous cards.
KINE 5 thmin thmax phimin phimax pmin pmax part
One particle of type part
is generated per event
according to a pt and eta distribution which is parametrised on the CDF data and PYTHIA
simulation. Code provided by Andreas Morsch (see ALICE notes 95-05
and 96-31);
decay is simulated only in phase space. Only accept particle with theta,
phi and pmom in the range (thmin, themax), (phimin, phimax) and (pmin,
pmax). Angles are given in degrees. The code of the particles is the
following:
part | Particle |
---|---|
113 | J/Psi |
114 | Upsilon |
115 | Phi |
SXLEGO thmin thmax phimin phimax rmin rmax zmax nthe nphi iflego
Activates LEGO option. See below for explanation of this option. GEANTINOS are shot in nthe bins in theta and nphi in phi with the above angular limitations, and statistics on the matter traversed is accumulated per r in the range (rmin,rmax) and z in the range (0, zmax). iflego has to be set to 1 for the card to take effect.
SXEVT ifirst
First even to be used when reading from file.
SXnnn OnOff Gate Version Debug TrackPrint GeomDraw TrackDraw RAW/SPC PAW
Steers the simulation of a module. nnn can be any of the currently implemented module names (see above). All values are integers.
Flag | Explanation |
---|---|
OnOff | 0 the module is absent from the run 1 the module is present in the run |
Gate | time gate in nanoseconds for the module |
Version | version of the geometry. -1 is the default version, whichever is defined in the program |
Debug | debug level for a module, can be 0, 1 or 2 |
TrackPrint | print flag for tracks, can be 0 or 1 |
GeomDraw | draw flag for the geometry, can be 0 or 1 |
TrackDraw | draw flag for the tracks, can be 0 or 1 |
RAW/SPC | 0 do not output raw data and space points 1 output raw data and space points |
PAW | level of paw output (0,1,2) |
The meaning of these cards is largely module dependent.
SXDCH idraw
Select charge of tracks to be drawn: idraw=100*ineg+10*ineut*ipos, where the track is drawn if the flag of the corresponding charge is 1.
SXHID ihid
Hidden line removal (ihid 0=off, 1=on) for drawings.
SXLUN input zebra spc paw draw rdb raw
Fortran logical unit numbers.
SXWKS imeta
Workstation type of graphics output. See the HIGZ
manual for more information.
SXIPX X Y Z
Sigma in (X,Y,Z) (cm) on interaction point position.
SXFLD ISXFLD ISXFMAP SXMAGN SXMGMX
Defines the magnetic field to be used:
SXHACC isxhacc
Selects acceptance of heavy particles decay in muon chambers: when
SXTREE chtree
Selects the Root trees that are written onto the Root output file. One letter
selects one tree:
SXVAC ivac
Selects the material of the Alice mother volume (1 vacuum, 0 air).
SXMAXD sxrmax sxzmax
Tracking stops if the radius is larger than SXRMA or the absolute value
of z is larger than SXZMA.
Parameter Explanation
input
input unit for the event generator file containing the events as column
wise ntuples (CWN)
zebra
output unit in zebra format for the /hits
spc
output unit for the raw space points (explained later)
paw
output unit for histograms and other paw objects
draw
output unit for metafile
rdb
input/output unit for initialisation data structures in RZ format. If positive
the initialisation structures are written to disk, and if negative they are read
from disk.
raw
logical unit for writing raw data information (not used yet)
Flag Explanation
ISXFLD
Magnetic field transport flag 0=no field, 1=Runge Kutta, 2=helix
ISXFMAP
Magnetic field map version (see later)
SXMAGN
Scale factor for the magnetic field
SXMGMX
Maximum value for the magnetic field
isxhacc
is different from zero, Galice keeps only events with
both muons in the 2-9 degrees window.
Letter Tree
E Event Header Tree
K Event Kinematic Tree
H Hits Tree
D Digits Tree
Module specific control cards can be defined via the nnn_FKEY routines.
please send comments to: Yiota Foka
In the simulation of the transport of radiation in matter it is important to be able to change the energy cuts of the different particles and the physic processes for each tracking medium. In GEANT 3.21 this is done by setting the parameters directly in the code. To allow changing these parameters without recompiling, a file, if it exists, is read in at initialisation time, where the energy thresholds and the flags for the different physics processes can be specified for each tracking medium.
The format of the file is the following:
ITMED GAM ELE NH CH MU EBR MBR EDEL MUDEL MUPA ANNI BREM COMP DRAY LOSS MULS PAIR PHOT RAYL
Where
Field | Meaning |
---|---|
ITMED | user tracking medium number, i.e. the position in the array IDTMED where the actual tracking medium number has been returned by the routine SXSTME. |
GAM | (REAL) Photon transport threshold |
ELE | (REAL) Electron/positron transport threshold |
NH | (REAL) Neutral hadrons transport threshold |
CH | (REAL) Charged hadrons transport threshold |
MU | (REAL) Muon transport threshold |
EBR | (REAL) Electron/positron energy threshold for bremstrahlung production |
MUBR | (REAL) Muon energy threshold for bremstrahlung |
EDEL | (REAL) Electron/positron energy threshold for delta rays production |
MUDEL | (REAL) Muon energy threshold for delta rays production |
MUPA | (REAL) Muon energy threshold for direct pair production |
ANNI | (INTEGER) Positron annihilation flag |
BREM | (INTEGER) Bremstrahlung flag |
COMP | (INTEGER) Compton scattering flag |
DRAY | (INTEGER) Delta Ray flag |
LOSS | (INTEGER) Energy loss flag |
MULS | (INTEGER) Multiple scattering flag |
PAIR | (INTEGER) Pair production flag |
PHOT | (INTEGER) Photelectric effect flag |
RAYL | (INTEGER) Rayleigh scattering flag |
The first 10 paremeters are energy cuts, and should be entered as floating point numbers. Energies are kinetic, and should be entered in GeV. The remaining 9 numbers are integers. A negative value is ignored. The file name is fixed: galice.cuts.
Please note: when reading the initialisation data structure from disk (triggered when the rdb parameter in SXLUN data card is negative) the galice.cuts file is not read. So any change will remain ineffective. If cuts need to be changed, then the initialisation data structure needs to be recreated.
please send comments to: Yiota Foka
This transport option allows to evaluate the material budget from a given radius to the surface of an arbitrary cylinder along radial directions from the centre. When the SXLEGO data card is specified, the normal event generation and transport cycle is altered. In this case Galice will produce only nthe times nphi events. Each event is composed by a single primary track, a geantino, corresponding to GEANT particle code 48, with unit momentum and angle at regular intervals between phimin and phimax and themin and themax.
Geantinos are produced at the origin and then moved at the surface of a cylinder of radius rmin, where they start being transported. If rmin=0 geantinos start from the origin. Geantinos are stopped when they reach the surface of a cylinder of radius rmax and half length in z zmax.
At the beginning of the job, three double dimensional plots are created with nphi times nthe bins:
-100 | Radiation length map |
-101 | Interaction length map |
-102 | g/cm2 length map |
please send comments to: Yiota Foka
The code of GALICE is composed by two parts. One is a set of FORTRAN routines in the framework of GEANT and the other is a set of C++ routines that constitute the interface with ROOT. The FORTRAN code is contained in a single cmz file called galice.cmz, while the C++ code is contained in a set of file and headers that are managed by a makefile.
ROOTIO | Activates the ROOT interface. |
---|
The code is divided in modules, each one describing a part of the experiment. The code relevant to each module is kept in a dedicated cmz directory, called PATCH. Each module is composed by one or more routines, which are called at different times during the execution of the program and perform different actions related to the module. They are contained in dedicated to the module DECKs which compose the corresponding PATCH, as can be seen for the TPC.
The code contains the following patches:
Patch | Content |
---|---|
$VERSION | Standard cmz PATCH containing version control information. |
WRITEUP | Description of the program (this file). |
HISTORY | The modification log. |
$KUMACS | The macros needed to install the program. |
DATA | Examples of data cards and cut files. |
EXAMPLES | Examples of run decks. |
*GALICE | Pilot patch for the standalone version of GALICE. |
*ALIROOT | Pilot patch for the ROOT I/O version of GALICE. |
GCDES | GEANT common blocks |
GALICE | Main programs. |
GUCODE | GEANT user routines. |
STEER | Steering routines for GALICE. |
ITS | Description of the Inner Tracking System |
MAG | Description of the L3 magnet. |
TPC | Description of the Time Projection Chamber |
TOF | Description of the Time Of Flight apparatus |
PMD | Description of the Photon Multiplicity Detector |
PHOS | Description of the Photon Detector |
RICH | Description of the HMPID Rich detector |
MUON | Description of the Muon Chambers in the Muon Arm |
FRAME | Description of the Support Frame for the TPC |
CASTOR | Description of the Castor detector |
FMD | Description of the Forward Multiplicity Detector |
SUCODE | Dummy user routines |
HALL | Description of the experimental hall |
ABSO | Description of the Muon Absorber |
SHIL | Description of the Muon Arm Shield |
DIPO | Description of the Dipole Magnet |
TRD | Description of the Transition Radiation Detector |
PIPE | Description of the Beam Pipe |
LEGO | Routines needed for the LEGO option |
MISC | Miscellaneous routines |
DUMMIES | Dummy routines |
GPATCH | Corrections for GEANT 3.21 |
GDEBUG | Debug version of GEANT 3.21 routines |
ROOTIO | Code specific for ROOT I/O |
LAST | Last PATCH |
please send comments to: Yiota Foka
Some simple coding conventions have been adopted. Only standard ANSI Fortran 77 is accepted with the following Fortran 90 compatible extensions:
FORTRAN statements are written in CAPITALS. Comment lines start with a
CAPITAL C or * while the rest of the comment line can be written in mixed
case. The use of explicit type defintion in combination with IMPLICIT
NONE
is recommended but not enforced. In any case variable names
should follow the implicit typing of FORTRAN:
Type | Coding |
---|---|
INTEGER | Variable name starts with I-N |
REAL | Variable names starts with A-H or O-Z |
CHARACTER | Variable name starts with CH |
LOGICAL | Variable name starts with L |
DOUBLE PRECISION | Variable name starts with D |
This allows the detector space point data to be directly entered into the SPC data CWN and also the type of routines/functions arguments can be checked directly from the variable names by compiler utilities and/or CMZ.
We strongly encourage the users developing code to follow these rules.
please send comments to: Yiota Foka
Each module has a name, a number and a one letter code:
Description | Name | Number | Code |
---|---|---|---|
Inner Tracking System | ITS | 2 | I |
L3 magnet | MAG | 3 | M |
Time Projection Chamber | TPC | 4 | T |
Time Of Flight apparatus | TOF | 5 | F |
Photon Multiplicity Detector | PMD | 6 | W |
Photon Detector | PHOS | 7 | P |
Zero Degree Calorimeter | ZDC | 8 | Z |
Forward Multiplicity Detector | FMD | 9 | G |
HMPID Rich detector | RICH | 10 | R |
Muon Chambers in the Muon Arm | MUON | 11 | C |
Support Frame for the TPC | FRAME | 12 | B |
Transition Radiation Detector | TRD | 13 | U |
Castor detector | CASTOR | 15 | S |
Muon Absorber | ABSO | 16 | A |
Muon Arm Shield | SHIL | 17 | Y |
Dipole Magnet | DIPO | 18 | D |
Experimental hall | HALL | 19 | H |
Beam Pipe | PIPE | 20 | Q |
The detector module numbers are contained in PARAMETERs called ID_nnn in sequence SCXDB.
To each module is assigned a range of integers:
ID_nnn*100->ID_nnn*100+99
thad is used throughout the program every time a detector identifier is needed. We will refer to this range as the module range. The modules specific letter will be hereon indicated with char.
The ROUTINES in the different modules are called nnn_fff, where nnn is the name of the module: ITS, MAG, TPC, TOF, PMD, PHOS, RICH, MUON, FRAME, CASTOR, FMD, HALL, ABSO, SHIL, DIPO, TRD, PIPE.
When several version of a given module are present, a routine may act as a switchyard, to version-specific routines where the last letter is replaced by a digit. So if there are 2 version of the TPC, the routine TPC_GEOM would just call TPC_GEO0 or TPC_GEO1 according to the version chosen for the run.
The complete code referring to a certain detector has to be contained in 1 patch with the structure:
+PATCH,name. Contains the code related to module 'nnn' +DECK,CDES. Contains the private KEEP sequences +DECK,nnn_fff. Contains the code of routine 'nnn_fff'
Example:
+PATCH,TOF. +DECK,CDES. +KEEP,T_START. COMMON /S_START/ JCOUNT,MOD_FIRST C +KEEP,T_SPC. PARAMETER (MAX6=1000) COMMON /SCXSCR/ NHIT6,IROW6(MAX6),ICOL6(MAX6),IADC6(MAX6) C +DECK,TOF_INIT. SUBROUTINE TOF_INIT C +CDE,T_START. C * END +DECK,TOF_DIGT. SUBROUTINE TOF_DIGT C +CDE,T_SPC. C * END
These patches are in the galice.cmz file as described in the layout of the galice.cmz file.
Any printout message should contain the name of the routine which produced it. The recommended way to produce printouts is the FORTRAN WRITE instruction. The nnn_INIT and nnn_END routines must printout a message with the name of the detector.
The dummy SU routines may be used to test out new component simulation packages. Note that these routines are always called, irrespective of the FFREAD data cards selections.
Each module can create private histograms and/or ntuples to investigate its performance. All this HBOOK/PAW activity must be under the control of the flags related to the SXnnn FFREAD data cards.
Examples of actions in the module routines are:
where IDN stands for the HBOOK identifier with the convention:
IDN | 1000*J+N |
---|---|
J | detector identification number (0 for steerings) |
N | histogram number (0 <= N <= 99) |
Notes: |
|
PAW file opening, directory setting and writing out of the ntuples etc... is done by the general steering routines.
please send comments to: Yiota Foka
The COMMONS of the various detectors are called char_uuuuuu, uuuuuu = Left free to the user. An exception on this are the STEERING commons which are called SCXuuuuu
Note: |
|
---|
+KEEP,SCXIO.------------------------------------------------------------------------ C --- Common which contains the units for the various I/O streams --- INTEGER LUNIN,LUNZEB,LUNSPC,LUNPAW,LUNDRW,LUNRDB,LUNRAW $, NKEYS,JRECO C COMMON /SCXIO/ LUNIN,LUNZEB,LUNSPC,LUNPAW,LUNDRW,LUNRDB,LUNRAW $, NKEYS,JRECO CHARACTER*4 KEYS COMMON /SCXIO2/ KEYS(4) C LUNIN Logical input unit for the generator data file in case IKINE=3 (see card KINE). LUNZEB Logical input unit for writing ZEBRA data structures. LUNSPC Logical unit for writing Alice space point Column Wise Ntuples. LUNPAW Logical unit for PAW Ntuple output LUNDRW Logical unit for graphic metafil LUNRDB Logical unit for initial data structure file NKEYS Number of structures to save every event on LUNZEB KEYS Name of the structures to save every event on LUNZEB
+KEEP,SCXDB.------------------------------------------------------------------------ C --- Common which contains debug flags for the various detectors --- C IDBUGF(J) = Debug level (0,1,2) for detector "J" C --- Also control flags (JPAWF,JVERF,JOUTF) for each detector added --- INTEGER NDBMAX PARAMETER (NDBMAX=20) C INTEGER ID_ITS,ID_MAG,ID_TPC,ID_TOF,ID_PMD,ID_PHOS $, ID_ZDC,ID_FMD,ID_RICH,ID_STEE,ID_MUON,ID_FRAME,ID_TRD $, ID_CASTOR,ID_ABSO,ID_SHIL,ID_DIPO,ID_HALL,ID_PIPE $, ID_ALICE C PARAMETER (ID_ALICE=0, ID_ITS=2,ID_MAG=3,ID_TPC=4,ID_TOF=5 $, ID_PMD=6,ID_PHOS=7,ID_ZDC=8,ID_FMD=9,ID_RICH=10 $, ID_MUON=11,ID_FRAME=12,ID_TRD=13,ID_CASTOR=15 $, ID_ABSO=16,ID_SHIL=17,ID_DIPO=18,ID_HALL=19,ID_PIPE=20 $, ID_STEE=NDBMAX+1) C INTEGER IDBUGF,JPAWF,JVERF,JOUTF,IDTMED,ILTMED C INTEGER MMEDIA CHARACTER*6 CHNVOL PARAMETER (MMEDIA=1000) COMMON /SCXDB/ IDBUGF(NDBMAX+1),JPAWF(NDBMAX+1),JVERF(NDBMAX+1) $, JOUTF(NDBMAX+1) $, IDTMED(100*(NDBMAX+1)) $, ILTMED(2,0:NDBMAX) $, IMEDIA(MMEDIA),CHNVOL(0:NDBMAX) C IDBUGF Debug flag for all modules (0->2). The storing of the hits requires a value >0 of this flag. JPAWF PAW flag for all modules (0->2). This flag triggers booking and filling of histograms. JVERF Version chosen for all modules. JOUTF Raw data (digits) output flag for modules (0, 1). IDTMED Translation array between tracking media codes and GEANT numbers. ILTMED Tracking media id ranges for different modules. The tracking media identifiers (ID) of module I are such that ILTMED(1,I)SCXFF
+KEEP,SCXFF.------------------------------------------------------------------------ C --- Common which contains FFREAD stuff for the GALICE package --- C --- as well as the total processed event counter --- INTEGER NSXDET,NLUNS,NPARS $, JDETF,JTRAF,JDRGF,JDRTF,IFDRAT,ISXDCH,JDCHM,JDCHN,JDCHP $, ISXWKS,ISXVAC,NSXEVT,IFPART,IFVOLU,IFMATE $, IFTMED,IFVERT,IFKINE,IFSETS,IFHITS,IFDIGI,IFSECS $, IFXSEC,IFLOSS,ISXEVT,ISXHID,ISXFLD,ISXFMAP $, ISXITS,ISXMAG,ISXTPC,ISXTOF,ISXPMD,ISXPHOS $, ISXZDC,ISXFMD,ISXRICH,ISXMUON,ISXFRAME,ISXTRD,ISXCASTOR $, ISXSTEE,ISXABSO,ISXSHIL,ISXDIPO,ISXHALL,ISXPIPE $, ISXHACC REAL SXGATE,SXMAGN,SXIPXS,SXMGMX,SXRMAX,SXZMAX C PARAMETER (NSXDET=20,NLUNS=7,NPARS=9) COMMON /SCXFF/ JDETF(NSXDET+1),JTRAF(NSXDET+1) $, JDRGF(NSXDET+1),JDRTF(NSXDET+1),IFDRAT $, ISXDCH,JDCHM,JDCHN,JDCHP $, SXGATE(NSXDET) $, ISXWKS,ISXVAC,NSXEVT $, IFPART,IFVOLU,IFMATE,IFTMED,IFVERT,IFKINE $, IFSETS,IFHITS,IFDIGI,IFSECS $, IFXSEC,IFLOSS $, ISXEVT,SXIPXS(3),ISXHID $, ISXFLD,ISXFMAP,SXMAGN,SXMGMX $, ISXITS(NPARS),ISXMAG(NPARS) $, ISXTPC(NPARS),ISXTOF(NPARS),ISXPMD(NPARS) $, ISXPHOS(NPARS),ISXZDC(NPARS),ISXFMD(NPARS) $, ISXRICH(NPARS),ISXMUON(NPARS),ISXFRAME(NPARS) $, ISXTRD(NPARS),ISXCASTOR(NPARS) $, ISXABSO(NPARS),ISXSHIL(NPARS),ISXDIPO(NPARS) $, ISXHALL(NPARS),ISXPIPE(NPARS) $, ISXSTEE(NPARS),SXRMAX,SXZMAX $, ISXHACC C JDETF 0 if the module does not exist, 1 otherwise JTRAF Step by step printing for the module if not 0 JDRGF Draw in the view bank for the module if not 0 JDRTF Store the track points in memory for the module if not 0 IFDRAT Not 0 if at least one module is drawn. Then every event is drawn superinposed to the modules in the view banks. ISXDCH Charge of particles drawn (100*NEG+10*NEUT+ICHAR, where NEG, NEUT and ICHAR can be 0 or 1) JDCHM 1 if negative particles are drawn JDCHN 1 if neutral particles are drawn JDCHP 1 if positive particles are drawn SXGATE Time gate for the each module ISXWKS Graphics metafile code ISXVAC If 1 Alice will be filled with vacuum, if 0 with air NSXEVT Global event counter IFPART If 1 PART data structure is printed IFVOLU If 1 VOLU data structure is printed IFMATE If 1 MATE data structure is printed IFTMED If 1 TMED data structure is printed IFVERT If 1 VERT data structure is printed IFKINE If 1 KINE data structure is printed IFSETS If 1 SETS data structure is printed IFHITS If 1 HITS data structure is printed IFDIGI If 1 DIGI data structure is printed IFSECS If 1 Secondary statistic is printed IFXSEC If 1 hadronic cross section is printed IFLOSS If 1 energy loss information is printed ISXEVT Start event number when reading from a file SXIPXS Interaction point ISXHID If 1 turns on HIDE option for drawing ISXFLD Magnetic field transport flag 0=no field, 2=helix, 3=Runge Kutta ISXFMAP Magnetic field map version (1, 2 see later) SXMAGN Scale factor for the magnetic field SXMGMX Maximum value for the magnetic field ISXITS Input array of flags for ITS ISXMAG Input array of flags for MAG ISXTPC Input array of flags for TPC ISXTOF Input array of flags for TOF ISXPMD Input array of flags for PMD ISXPHOS Input array of flags for PHOS ISXZDC Input array of flags for ZDC ISXFMD Input array of flags for FMD ISXRICH Input array of flags for RICH ISXMUON Input array of flags for MUON ISXFRAME Input array of flags for FRAME ISXTRD Input array of flags for TRD ISXCASTOR Input array of flags for CASTOR ISXABSO Input array of flags for ABSO ISXSHIL Input array of flags for SHIL ISXDIPO Input array of flags for DIPO ISXHALL Input array of flags for HALL ISXPIPE Input array of flags for PIPE ISXSTEE Input array of flags for STEE SXRMAX Maximum radius for transport SXZMAX Maximum value of z for transport ISXHACC Accept heavy particle decays within mu-chambers acceptance CSCXGEO
+KEEP,SCXGEO.----------------------------------------------------------------------- C --- Common which contains some general geometry parameters --- REAL DALIC C COMMON /SCXGEO/ DALIC(3) C DALIC Dimension of the Alice mother volumeSCXPAW
+KEEP,SCXPAW.----------------------------------------------------------------------- C --- Common which contains the NTUPLE info for the steerings --- INTEGER NVRS1 REAL VALS1 C PARAMETER (NVRS1=2) CHARACTER*6 VARS1 COMMON /SCXPAW/ VALS1(NVRS1) COMMON /SCXPW2/ VARS1(NVRS1) C VALS1 Names of the NTUPLE variables for the steering VARS1 Values of the NTUPLE variables for the steeringSCXPST
+KEEP,SCXPST.----------------------------------------------------------------------- C --- Common which contains secondary particle statistics --- INTEGER IPCNT C COMMON /SCXPST/ IPCNT(100) CHARACTER*20 NAME,NAMES COMMON /SCXPS2/ NAME,NAMES(100) C SAVE /SCXPST/ SAVE /SCXPS2/ C IPCNT Number of secondaries for each particle species NAME Temporary storage for the name of the particle NAMES Names of the particlesSCXEVT
+KEEP,SCXEVT.----------------------------------------------------------------------- C --- Common which contains standard event parameters --- INTEGER JSXRUN,JSXEVT,JSXNPA,JSXZB,JSXZT,NSXPIN,IPX,IPY,IPZ REAL RSXIMP,RSXPNU,RSXECM C COMMON /SCXEVT/ JSXRUN,JSXEVT,JSXNPA,JSXZB,JSXZT $, RSXIMP,RSXPNU,RSXECM,NSXPIN(48) $, IPX,IPY,IPZ C JSXRUN JSXEVT JSXNPA JSXZB JSXZT RSXIMP RSXPNU RSXECM NSXPIN(48) IPX IPY IPZSCXSCR
+KEEP,SCXSCR.----------------------------------------------------------------------- C --- Common containing scratch space for detector SPC/RAW arrays --- INTEGER NSCR,IARR C PARAMETER (NSCR=100000) COMMON /SCXSCR/ IARR(NSCR) CSLATE
+KEEP,SLATE. C --- CERNLIB common with additional info for the DATIME package --- INTEGER ISL REAL DUMMY C COMMON /SLATE/ ISL(6),DUMMY(34) CQUEST
+KEEP,QUEST. C --- CERNLIB common for communication with the ZEBRA package --- INTEGER IQUEST C COMMON /QUEST/ IQUEST(100) CSCXGEN
+KEEP,SCXGEN. C --- Common containing event generator data --- INTEGER NIHMAX,NRHMAX,NRGEN,JRGEN,JTKGEN,NIHEAD,IHEAD,NRHEAD,IPAR REAL RHEAD,THETA,PHI,PMOM,E C PARAMETER (NIHMAX=12,NRHMAX=6) COMMON /SCXGEN/ NRGEN,JRGEN,JTKGEN $, NIHEAD,IHEAD(NIHMAX),NRHEAD,RHEAD(NRHMAX) $, IPAR,THETA,PHI,PMOM,E CSCXZLN
+KEEP,SCXZLN C --- Alice permanent links for ZEBRA banks INTEGER NALINK, JALINK, JLEDEP PARAMETER (NALINK=1) COMMON / SCXZLN / JALINK(NALINK) EQUIVALENCE (JLEDEP,JALINK(1))SCKINE
+KEEP,SCKINE,IF=ROOTIO CHARACTER*4 CHTREE COMMON / SCKINE / MTRACK, MPRIMA +, CHTREE(2) C MTRACK Track number in the Root stack C MPRIMA Number of primaries generated C CHTREE Root trees to be created in memorySCXMFD
+KEEP,SCXMFD,IF=-ROOTIO. C --- Common containing magnetic field map data REAL DZ,DX,DY,UDX,UDY,UDZ $,XMBEG,YMBEG,ZMBEG,XMEND,YMEND,ZMEND $,BV INTEGER NX,NY,NZ PARAMETER(MAXFLD=250000) COMMON /SCXMFD/ NX,NY,NZ,DZ,DX,DY,UDX,UDY,UDZ $,XMBEG,YMBEG,ZMBEG,XMEND,YMEND,ZMEND $,BV(MAXFLD) C C NX, NY, NZ Number of map points C DX, DY, DZ Map cell side C XMBEG, XMEND Map extension in X C YMBEG, YMEND Map extension in Y C ZMBEG, ZMEND Map extension in Z C BV Array of field values (BX,BY,BZ)(IX,IY,IZ) C CSCXLEGO
+KEEP,SCXLEGO C --- LEGO option for calculating material traversed C C THEMIN Minimum generation theta C THEMAX Maximum generation theta C PHIMIN Minimum generation phi C PHIMAX Maximum generation phi C RLMIN Generation radius C RLMAX Maximum tracking radius C ZLMAX Maximum tracking Z C NLTHE Number of bins in Theta C NLPHI Numner of bins in Phi C IFLEGO Lego Flag C ICTHE Current theta bin C ICPHI Current phi bin C CURTHE Current theta of track C CURPHI Current phi of track C TOTRADL Total Radiation length C TOTABSO Total absorption length C TOTGCM2 Total G/CM2 traversed C COMMON / SCXLEGO / THEMIN, THEMAX, PHIMIN, PHIMAX, RLMIN, RLMAX, $ZLMAX, NLTHE, NLPHI, IFLEGO, ICTHE, ICPHI, TOTRADL, TOTABSO, $TOTGCM2, CURPHI, CURTHESCCPROTO
+KEEP,SCCPROTO,IF=ROOTIO // // Prototypes for Galice // #ifdef WIN32 #define sxsrot SXSROT #define type_of_call _stdcall #else #define sxsrot sxsrot_ #define type_of_call #endif extern "C" void type_of_call sxsrot(int &nmat, const float &theta1, const float &phi1, const float &theta2, const float &phi2, const float &theta3, const float &phi3);
please send comments to: Yiota Foka
Contains the main programs for the standalone FORTRAN version:
$GALIBAT | Batch main program. |
---|---|
$GALINT | Interactive main program. |
These are obsolete.
Contains dummy routines needed to satisfy all externals. These are called internally from CERNLIB routines.
Contains the routines to calculate the material budget maps when the LEGO option is activated by the SXLEGO data card.
X(3) | Current position |
---|---|
V(3) | Current direction (unnormalised) |
R | Radius of the cylinder |
Z | half length of the cylinder |
T | distance to the boundary |
Contains corrections for GEANT 3.21
and fff is:
nnn_FKEY | Definition of the FFREAD data cards specific for a given module. |
---|---|
nnn_INIT | Initialisation routine for a given module. |
nnn_MEDIA | Definition of materials and tracking media |
nnn_GEOM | Definition of geometry |
nnn_SENS | Definition of hits and digit structure |
nnn_DRAW | Drawing routine |
nnn_STEP | Specific routine called at each step |
nnn_TRKI | Routine called at the beginning of each new track |
nnn_TRKE | Routine called at the end of each new track |
nnn_DIGT | Digitisation routine called at the end of each track |
nnn_DIGE | Digitisation routine called after each event |
nnn_EVE | Termination routine called after each event |
nnn_END | Termination routine called at the end of the run |
When several version of a given module are present, a routine may act as a switchyard, to version-specific routines where the last letter is replaced by a digit. So if there are 2 version of the TPC, the routine TPC_GEOM would just call TPC_GEO0 or TPC_GEO1 according to the version chosen for the run.
This patch contains the GALICE Steering Routines
In the nnn_DIGT routines the detector specific SPC data arrays contained
in the Note that this code has not yet been developed for
all detectors and it implies that the CWN I/O instead that the ROOT I/O is
used. CWN output is not supported and will be discontinued soon. When
using the ROOT I/O, the digitisation is performed after the simulation in a
separate pass with a ROOT macro or a C++ program.
For a detector complex as Alice the creation of the permanent ZEBRA data
structures (DRAW, MATE, PART, ROTM, RUNG, SETS, TMED, VOLU and SCAN) can be
quite a long process. This is not disturbing in long production runs, but
can hit badly a debug cycle. The structures can be saved on disk and
reread, but in the standard version of GEANT the common /GCMULO/ is not
saved and restored. This implies that a call to the GPHYSI routine is
always needed, which can be very time-consuming. The routine SXMULO save
and restores this common together with the arrays IDTMED and IMEDIA in
common SCXDB.
Not to alter the generality of the standard GEANT I/O routines this
information is attached as a next bank to the JRUNG bank, that in the
original version of GEANT does not have a next bank. Unfortunately the
standard I/O routines of GEANT do not read or write linear structures, so
we had to introduce modified I/O routines in GPATCH.
The material is assumed ideal, which means that impurities and aging
effects are not taken into account. The algorithm for MODE=1, the only one
implemented is:
The values of MODE, RKB and C can be entered via
GSTPAR:
The basic units of the coefficient are g/(MeV*cm2) because the DE/DX
is expressed in MeV/cm Exp. values from NIM 80 (1970) 239-244 are:
RKB = 0.013 g/MeV*cm2
MEC
Mechanism code.
CHMECA
(CHARACTER*4) Mechanism name.
IMATE
Material number. 0 means all materials.
IPART
Particle number. 0 means Electron, Positron, Gamma,
Pi+, Pi-, Neutron, Proton, Alpha.
MECHA
(CHARACTER*4) the mechanism for which the information is
requested. It can be 'LOSS', 'PHOT', 'ANNI', 'COMP',
'MUNU', 'BREM', 'PAIR', 'DRAY', 'PFIS', 'HADT', 'HADG',
'ALL'
IPAR
Action flag:
1
initialisation
2
updating statistics
3
printout of statistics.
MODE
Attenuation mode.
1 organic scintillator
2 Liquid (Not yet implemented)
3 for Gas (Not yet implemented).
CALL GSTPAR(IMATE,'BIRK1',VALUE)
to set MODE
CALL GSTPAR(IMATE,'BIRK2',VALUE)
to set RKB
CALL GSTPAR(IMATE,'BIRK3',VALUE)
to set C
C = 9.6 10-6 g2/(MeV2)(cm4)
+ STEMAX,DEEMAX,EPSIL,STMIN,UBUF,NWBUF)
X,Y,Z Position of the particle;
PX,PY,PZ Momentum of the particle;
JTK Track number;
IPA Particle code;
JSTACK Stack number;
User Steering Routines
Description of Geant User Routines
please send comments to: Yiota Foka
There are currently two options for the output format of GALICE:
The FORTRAN/ZEBRA output format has been kept for backward compatiblity and may be removed in the near future if there are no requests to maintain it. It is described in the galice.cmz file in the DECK FORMAT of the different patches, and the reader is referred to the code for more information.
The ROOT Object I/O is described together with the rest of the ROOT interface to Galice in the next chapter.
please send comments to: Yiota Foka
During 1998 GALICE has been upgraded and modified to provide a simulation tool for the Technical Design Reports. Those upgrades lead to two releases of the package in June 1998 and are detailed elsewhere. Version 2.02 of GALICE is the first version of the package that includes the ROOT interface.
The main reasons for that were to:
The old galice 1.05 program uses GEANT3.21 in the standard way, with
KUIP as the interactive interface and the FFREAD cards to specify at run
time the source of primary tracks in one event, to select the detectors
taking part in the simulation and to switch on or off the sensitive media
of the detectors that produce hits that are written out as PAW ntuples. The
user routine UGINIT initializes the package and calls UGEOM that sets up
the geometry.
To process an event GUKINE takes an event from the event generator or generates the primary tracks internally, creating the Geant stacks JVERTEX and JKINE. These stacks are too small to contain a full ALICE event, then secondary tracks are added to them as the tracks are followed though the setup and produce secondaries, overflowing at 65K tracks.
The Geometry of the setup and the Hits in the sensitive parts of the detectors are coded by the users in FORTRAN.
please send comments to: Yiota Foka
To move to the Object Oriented world and to be able to handle simulations of the ALICE detectors in an efficient way for the work being done for the Technical Design Reports (TDRs), it was decided to provide GALICE with a ROOT output. This was done in a way almost transparent to the galice users, keeping the KUIP and FFCARDS steering and the definition of the Geometry and Hits with the same user routines in FORTRAN. A future version in which the steering is done within ROOT and the Geometry and Hits can be defined by users in C++ is in preparation.
The code of this C++ interface is entirely documented here.
The GEANT routines GUKINE, GTREVE and GUSTEP have been modified so that the GEANT engine only follows one particle at a time and the output objects of the kinematics and hits are stored in ROOT Tree structures. The advantage of treating one particle at a time is that even if in one full ALICE event hundred of thousands of particles are followed, the program runs in less than 20 MBytes of memory.
GUKINE when given an event to simulate, sets up a ROOT stack: fParticles, in which all particles are inserted, which will not overflow and which also keeps all the history of all the particles so that if in a later generation a particle crosses a sensitive detector and the hit is written out, one can know from what type of primary it originates and which processes and in which materials gave rise to it.
When simulating one event, GUKINE takes one particle at a time and inserts it in the GEANT stack JKINE which is taken by GTREVE and followed through the setup. If in a given tracking step new particles are produced, GUSTEP inserts in the ROOT stack the kinematics of the secondary vertex and all the produced particles which will be fed eventually one by one to the GEANT 3 engine.
An ALICE class library has been created that contains classes corresponding to the Hits defined for each detector in the Fortran routines.
The Hits are written out after each track in a ROOT Tree structure TreeH, of the file galice.root. There is one such tree per event. The kinematics of all the particles that produce hits, together with their genealogy up to the primary tracks is stared in the galice.root file in an other tree TreeK of which exists one per event. An additional tree of digits called TreeD is written out at each event. This tree contains information which is relative to the whole event and not track per track, as for instance the energy clusters in the TPC and PHOS. Finally the information of the events in the run is stored in the same file in the tree TreeE, containing the run and event number, the number of vertices, tracks and primary tracks in the event.
Control class for Alice C++ Only one single instance of this class exists. The object is created in main program aliroot and is pointed by the global gAlice.
To be able to communicate between the FORTRAN code of GEANT and the ROOT data structure, a number of interface routines have been developed. These are in the source file aliroot.cxx.
IDET | detector number as found in GEANT common block GCSETS. |
---|---|
MTRACK | Number of the track generting the hit. The ROOT stack track number is found in common block SCKINE |
NUMBV | Array of voume numbers as found in common block GCSETS. |
HITS | Array of user defined hits. |
MTRACK | Track number in the ROOT stack. If MTRACK=0 no more tracks are left in the stack to be transported. |
---|---|
IPART | Particle code in the GEANT conventions. |
PMOM(3) | Particle momentum in GeV/c |
E | Particle energy in GeV |
VPOS(3) | Particle position |
TOF | Particle time of flight in seconds |
IDONE | Status of the track. If IDONE=0 the track is put on the ROOT stack but it is not fetched for transport. |
---|---|
IPARENT | Parent track. If IPARENT=0 the track is a primary. In GUSTEP the routine is normally called to store secondaries generated by the current track whose ROOT stack number is MTRACK (common SCKINE. |
IPART | Particle code in the GEANT conventions. |
PMOM(3) | Particle momentum in GeV/c |
VPOS(3) | Particle position |
TOF | Particle time of flight in seconds |
CHMECA | (CHARACTER*10) Particle origin. This field is user defined and it is not used inside the GALICE code. |
NT | Number assigned to the particle in the ROOT stack. |
IRUN | Current run number |
---|---|
IDEVT | Current user event number |
CHFILE | (CHARACTER*(*)) file name to be opened. |
---|
IEVENT | Number of the current event. |
---|
please send comments to: Yiota Foka
At the moment there are two magnetic field maps supported.
Map 1
This is a constant field map for the L3 magnet and a parametrised
dipole field with the following features:
position | field |
---|---|
z (725,1225) | {7*(1-1E-5*(975-z)**2), 0, 0) |
z (-700,700) and sqrt(x**2+(y+30)**2)<560 | {0,0,2) |
elsewhere | {0,0,0} |
Map 2
This is a constant field map for the L3 magnet and a field map for
the dipole. The data are contained in the file field01.dat in the same
directory than the rest of the files.
please send comments to: Yiota Foka
The detailed history of the changes to the fortran code can be found in the CMZ history file. A general description of the modifications including those in the C++ code can be found in the introduction.
please send comments to: Yiota Foka