Geant4 Cross Reference |
1 1 2 ========================================= 2 ===================================================================== 3 Geant4 - Cexmc advance 3 Geant4 - Cexmc advanced example 4 ========================================= 4 ===================================================================== 5 5 6 README 6 README 7 ----------------- 7 ----------------------- 8 8 9 Author: A. Radkov (alexey.radkov@gmail.com) 9 Author: A. Radkov (alexey.radkov@gmail.com) 10 10 11 ------> Introduction 11 ------> Introduction 12 12 13 Cexmc stands for Charge EXchange Monte Carlo. 13 Cexmc stands for Charge EXchange Monte Carlo. The program was used to simulate 14 real experiments in Petersburg Nuclear Physics 14 real experiments in Petersburg Nuclear Physics Institute (PNPI, Russia). 15 Detailed User's Manual and explanatory images 15 Detailed User's Manual and explanatory images of the experimental setup can be 16 found in directory doc/ of this example. 16 found in directory doc/ of this example. 17 17 18 ------> Compilation 18 ------> Compilation 19 19 20 Basic modules of Cexmc must compile with Geant 20 Basic modules of Cexmc must compile with Geant4 version 9.4. Cexmc won't compile 21 with older versions of Geant4. Cexmc contains 21 with older versions of Geant4. Cexmc contains several optional modules which can 22 be enabled or disabled in the makefile by sett 22 be enabled or disabled in the makefile by setting dedicated macros: most of them 23 are listed in the beginning of the makefile an 23 are listed in the beginning of the makefile and well commented. Modules may 24 involve additional dependencies. In the follow 24 involve additional dependencies. In the following table the dependencies and 25 related modules are shown. 25 related modules are shown. 26 26 27 Dependency Requirement Makefile Macro 27 Dependency Requirement Makefile Macro / Module Comment 28 ---------------------------------------------- 28 -------------------------------------------------------------------------------- 29 boost::serialize Optional CEXMC_USE_PERS 29 boost::serialize Optional CEXMC_USE_PERSISTENCY / used when 30 Persistency 30 Persistency (de)serialization of 31 31 events and run data 32 32 33 boost::split Optional CEXMC_USE_PERS 33 boost::split Optional CEXMC_USE_PERSISTENCY / used when parsing 34 Main 34 Main command line 35 35 arguments related to 36 36 persistency module 37 37 38 boost::spirit Optional CEXMC_USE_CUST 38 boost::spirit Optional CEXMC_USE_CUSTOM_FILTER / used in custom 39 Custom filter 39 Custom filter filter engine 40 40 41 cernlib Optional CEXMC_USE_GENB 41 cernlib Optional CEXMC_USE_GENBOD / Main user can choose 42 42 native GENBOD() as 43 43 phase space 44 44 generator 45 45 46 CERN ROOT Optional CEXMC_USE_ROOT 46 CERN ROOT Optional CEXMC_USE_ROOT / used in histograming 47 Histograming 47 Histograming 48 48 49 CERN ROOT / Qt Optional CEXMC_USE_ROOT 49 CERN ROOT / Qt Optional CEXMC_USE_ROOTQT / used for live 50 binding Histograming 50 binding Histograming histograms in Qt 51 51 sessions 52 ---------------------------------------------- 52 -------------------------------------------------------------------------------- 53 53 54 The persistency module is compatible with a pr 54 The persistency module is compatible with a pretty old boost::serialize version 55 (compilation was tested under Scientific Linux 55 (compilation was tested under Scientific Linux 4.8 with gcc 3.4.6 and boost 56 version 1.32). Custom filter requires a newer 56 version 1.32). Custom filter requires a newer boost as far as it uses modern 57 boost::spirit library which requires boost ver 57 boost::spirit library which requires boost version 1.37 and higher. 58 Presence of CERN ROOT libraries is tested auto 58 Presence of CERN ROOT libraries is tested automatically in the makefile, but it 59 is possible to disable or enable the histogram 59 is possible to disable or enable the histograming framework manually using flag 60 CEXMC_USE_HISTOGRAMING in the makefile. 60 CEXMC_USE_HISTOGRAMING in the makefile. 61 Compilation of visualization modules and inter 61 Compilation of visualization modules and interactive sessions depends on whether 62 standard Geant4 macros like G4VIS_USE, G4UI_US 62 standard Geant4 macros like G4VIS_USE, G4UI_USE, G4UI_USE_TCSH and G4UI_USE_QT 63 have been set. 63 have been set. 64 If boost is installed in a special path in you 64 If boost is installed in a special path in your system then you may need to 65 properly set environment variables BOOST_INCLU 65 properly set environment variables BOOST_INCLUDE_PATH and BOOST_LIBRARY_PATH 66 which denote directories where boost include f 66 which denote directories where boost include files and libraries are located. 67 67 68 ------> Run modes 68 ------> Run modes 69 69 70 Run modes are set from command-line options. T 70 Run modes are set from command-line options. To see available command-line 71 options type in terminal 'cexmc -h' or just 'c 71 options type in terminal 'cexmc -h' or just 'cexmc'. Some run modes can be 72 unavailable if certain modules were not compil 72 unavailable if certain modules were not compiled. 73 73 74 Here is list of run modes categorized by type 74 Here is list of run modes categorized by type of interaction with user: 75 75 76 1. Batch mode. The simplest mode without an 76 1. Batch mode. The simplest mode without any interaction with user. 77 No command line option is required. 77 No command line option is required. 78 2. Interactive mode. The program provides a 78 2. Interactive mode. The program provides an interactive shell. 79 To run in the interactive mode command l 79 To run in the interactive mode command line option -i must be specified. 80 3. Graphical Qt mode. This mode is specifie 80 3. Graphical Qt mode. This mode is specified by command line option -g. 81 81 82 List of run modes categorized by task: 82 List of run modes categorized by task: 83 83 84 1. Straight mode (or Monte Carlo mode). The 84 1. Straight mode (or Monte Carlo mode). The program will read preinit and 85 init macros, then calculate acceptances 85 init macros, then calculate acceptances and (optionally) save data in 86 project files. Project files are saved i 86 project files. Project files are saved in a directory defined by 87 environment variable CEXMC_PROJECTS_DIR 87 environment variable CEXMC_PROJECTS_DIR (or in the current directory if it 88 is not defined), name of the project is 88 is not defined), name of the project is specified by option -w. Preinit 89 and init macros are set by options -p an 89 and init macros are set by options -p and -m respectively. In the straight 90 mode preinit macro must be specified exp 90 mode preinit macro must be specified explicitly, as far as desired 91 production model can be instantiated onl 91 production model can be instantiated only in preinit phase. 92 2. Replay mode (or Read project mode). In t 92 2. Replay mode (or Read project mode). In this mode the program will not use 93 common Geant4's event loop. Instead, it 93 common Geant4's event loop. Instead, it will sequentially read event data 94 from an existing project and pass them i 94 from an existing project and pass them into 95 CexmcEventAction::EndOfEventAction(). Th 95 CexmcEventAction::EndOfEventAction(). The read project is specified by 96 option -r. This mode is useful when user 96 option -r. This mode is useful when user wants to recalculate data from an 97 existing project with different conditio 97 existing project with different conditions (for example with different 98 reconstruction parameters) or apply a cu 98 reconstruction parameters) or apply a custom filter. The results of run 99 can be written again into another projec 99 can be written again into another project. 100 3. Show results mode (or Output mode). The 100 3. Show results mode (or Output mode). The program will output various data 101 from an existing project (specified by o 101 from an existing project (specified by option -r). Type(s) of data are 102 specified in option -o. For example, to 102 specified in option -o. For example, to show results of a run user can 103 specify -orun in command line. To show e 103 specify -orun in command line. To show events, geometry and run results 104 user can specify -oevents,geom,run. 104 user can specify -oevents,geom,run.