$Id$ ----------------------------------------------------------------- Geant4 related files in AliRoot: ================================ AliRoot/TGeant4 - source of TGeant4 category AliRoot/AliGeant4 - source of AliGeant4 category AliRoot/AliGeant4/config: configuration scripts: setup.sh, setup.csh script for generating HTML documentation: doc_XXc++2html.pl, doc_XXddl2html.pl, doc_XXsorthtml.pl, doc_XXcategory.pl where XX = al, g4 scripts and template files for automatic generation of G4 test macros: test_create.sh, test_create_in.sh, test_create_struct.sh, test_run.sh, test_run_in.sh, test_run_struct.sh, test_default_det_novis.in, test_default_det_vis.in test_default_genN.in; N = 0,1,2,3 test_default_visN.in; N = 1 script for generation source directories with files sorted in subdirectories corresponding to subcategories: make_source.pl AliRoot/AliGeant4/doc: README README.CodingConvention; CodePrototype.html, G4CodePrototype.html - main code html pages (they are not produced automatically) HTML directory is created here by doc_alc++2html.sh script; HTML documentation of Geant4 can be created by doc_g4c++2html.pl AliRoot/AliGeant4/macro: Detector specific root and G4 macros (in detector subdirectories); Examples of G4 macros: alirunN.in Root macros: g4libs.C - Root macro for loading G4 and AliRoot libraries g4menu.C - primitive GUI for instantiating TGeant4 and switching to G4 UI g4Config.C - alternative of Config.C for G4 Alice Geant4 related environment variables: ========================================== (used when code is compiled; see config/setup.sh) AG4_INSTALL the path to AliRoot/AliGeant4; AG4_VERSION the Geant4 version; if set: the provided Geant4 version and not the default one is set Deafault: unset AG4_VISUALIZE if set: the program is compiled with visualisation (default) Categories affected: geometry, main, visualization Default: set AG4_OPACS if set: the program is compiled with OPACS visualisation Categories affected: geometry, main, visualization Default: unset TG4_DEBUG if set: checks for existence fStep, fTrack are performed in TG4StepManager Categories affected: event Default: unset Default setting: ---------------- Can be set running the setup.sh script: . $ALICE_ROOT/AliGeant4/config/setup.sh for zsh users source $ALICE_ROOT/AliGeant4/config/setup.csh for tcsh users The setup script can be added into a user login script: for zsh users: # can be added to .zshenv # Alice and Geant4 default settings . $ALICE_ROOT/AliGeant4/config/setup.sh for tcsh users (not available yet) # can be added to .login # Alice and Geant4 default settings source $ALICE_ROOT/AliGeant4/config/setup.csh Supported systems: HP-aCC, Linux-g++. Compilation: ============ cd $ALICE_ROOT gmake geant4 Code documentation: =================== doc_alc++2html.pl - perl script using Pavel Binko's ddl2html perl script (http://wwwinfo.cern.ch/~binko/Ddl2Html/Ddl2Html.code) for automatic generating of code documentation in html; creates doc/HTML directory containing *.html files for all *.hh, *.ddl, *.cc, alice.mk, GNUmakefile*, alice_*.(c)sh and *.html index pages according to class categories - calls: doc_alddl2html.pl: modified ddl2html doc_alsorthtml.pl: generates html pages for class categories - the main page AG4CodePrototype.html with links to category index pages and the alphabetical index page was created manually Executables: ============ (in $ALICE_ROOT/bin/tgt_SYSTEM/) aliroot - standard aliroot main; not linked with G4 libs, starts in Root UI; !! cannot be used with all G4 GUIs aligeant4 - main linked with G4 libs, starts in G4 UI 1. Interactive mode ----------------- 1.A. with aliroot: aliroot [Xm] .x g4menu.C 1.B. with aligeant4: B.1. aligeant4 [Xm] terminal is used for typing commands; if Xm is specified Motif Window is open for typing commands !! when simple terminal used with Xo driver it may freeze the whole X server -> use A. instead of this possibility B.2.a. java gag java GAG GUI is activated; select: GEANT4 -> Execute GEANT4 and select aligeant4 executable in file browser B.2.b tmomo Tcl/Tk Momo and GAG GUI is activated; select GAG -> Function -> Run GEANT4 and select aligean4 executable in file browser B.3. aligeant4 Wo OPACS GUI is activated 2. Batch mode: ----------- Use aliroot for running in batch mode with Root macros (*.C) and aligeant4 with G4 macros (*.in): aliroot macro.C aligeant4 macro.in G4 macro "macro.in" can be called from Root macro: (TGeant4*)gMC->ProcessGeantMacro("macro.in"); Root macro "macro.C" can be called from G4 macro: /g4mc/rootMacro macro Several examples of Geant4 macros for running aligeant4 in a batch mode are available in $ALICE_ROOT/macro: alirun0.in - the simple macro how to run with default setup using g4 commands alirun1.in - example of interactive particle gun usage and drawing trajectories; alirun2.in - example of special lego run with calling Root macro lego.C from g4 and switching to root UI Alice Geant4 Commands: ======================= /aliDet /aliDet/switchOn modNameVer modNameVer: NONE, ALL, DDD[n] where NONE no modules are selected (default) ALL all available modules (default versions) are selected DDD[n] AliRoot module DDD of n-th version is selected; if n is not specified the default version is selected !! work only during preinit phase; /aliDet/switchOff whichVolume whichVolume: ALL, LV, DDD default value: no !! work only during preinit phase; /aliDet/list list of all modules currently switched on /aliDet/listAvailable list of all available modules /aliDet/fieldValue value define magnetic field in Z direction /aliDet/setAllSensitive bool if true: all logical volumes are associated with sensitive detectors if false: only volumes defined with asensitive tracking medium are associated with sensitive detectors It has lower priority than individual module setting /aliDet/forceAllSensitive If true: force to set all logical volumes sensitive. (Each logical is volume associated with a sensitive detector.) It has higher priority than individual module setting /aliDet/writeGeometry true generate g3calls.dat for all built AliRoot detectors /aliDet/readGeometry true build AliRoot detectors from g3calls.dat instead of processing AliModule->CreateGeometry() /aliDet/printMaterials prints all materials /aliDet/generateXML generate geometry XML file Sub-directories /aliDet/XXX/ commands : setFrame * Set detector frame list * List all logical volumes of body detector listLong * List all logical volumes and number of its physical volumes (daughters) that are placed in this LV listDaughters * List daughters of the given logical volumes listLongDaughters * List daughters of the given logical volumes setVolume * Set the current logical volume. setVisibility * Make body detector visible/invisible. setLVTreeVisibility * Make current volume tree visible/invisible. setVolVisibility * Make current volume visible/invisible. setColour * Set colour for all body detector volumes. setLVTreeColour * Set colour for the current volume tree. setVolColour * Set colour for the current volume. setAllSensitive * If true: set all module's logical volumes sensitive. /aliGenerator set primary generator action /aliGenerator/set generatorName generatorName: Gun -> particle gun (default) Geantino -> geantino with random momentum (default); GhargedGeantino -> charged geantino with random momentum; AliGenerator -> generator from AliRoot defined either in Config.C or interactively in Root shell /aliGenerator/nofParticles number default value: 1 Comment: does not set nof particles for AliGenerator ( it has to be set by Aligenerator set method) /aliGenerator/verbose verboseLevel verboseLevel: 0, 1, 2 default value: 0 /aliGun build a gun of particles with given properties /aliGun/listAvailable list of available particles /aliGun/listCurrent list of the properties of the current gun particle, that can be add to the gun using addGun command /aliGun/particle set the current particle definition /aliGun/momentum set the current particle momentum /aliGun/position set the current particle position /aliGun/time set the current particle initial time /aliGun/polarization set the current particle polarization /aliGun/direction set the current particle momentum direction /aliGun/kinEnergy set the current particle kinetic energy /aliGun/list list of all particles in the Alice gun /aliGun/addParticle add the current particle to the gun /aliGun/removeParticle i remove the i-th particle from the gun /aliGun/reset remove all the particles from the gun /aliEvent /aliEvent/drawTracks drawFlag drawFlag: ALL tracks for all particles are drawn CHARGED tracks for charged particles only are drawn NONE no tracks are drawn default value: CHARGED /aliEvent/verbose verboseLevel verboseLevel: 0 no hits information is printed 1 number of hits for hits collections stored per event is printed 2 full hits information for hits collections stored per event is printed default value: 0 /aliTracking /aliTracking/verbose verboseLevel verboseLevel: 0 no information from AlTrackingAction is printed 1 each 100th primary track id is printed 2 each primary track id is printed default value: 0 /aliTracking/loopVerbose loopVerboseLevel set tracking verbose level for detected looping tracks loopVerboseLevel: see /tracking/verbose default value: 0 /aliRunAction /aliRunAction/verbose verboseLevel verboseLevel: 0 - 2 no influence on output yet /aliRun redefinition of /run commands for AliRoot: !! /aliRun commands has to be used instead of /run commands in order to perform AliRun actions, too /aliRun/initialize /aliRun/beamOn nofEvent /aliRun/lego special lego run from AliRoot (with default lego parameters) /aliRun/setConfig set configuration macro name (default Config) /g4mc Commands: setOptical * Set Cerenkov and optical processes. setHadron * Set hadron processes. setSpecialCuts * Set special cuts process. setSpecialFlags * Set special flags process. root * Switch to Root interactive shell. rootMacro * Process Root macro with given name (from file name.C) rootCmd * Process Root command g3Defaults * Set G3 default parameters (cut values, tracking media max step values, ...) setProcessActivation * Activate/inactivate physics processes (for development tests only)