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