GEMC  1.8
Geant4 Monte-Carlo Framework
SConstruct
Go to the documentation of this file.
1 from init_env import init_environment
2 
3 env = init_environment("qt4 geant4 clhep evio xercesc")
4 
5 
6 # Include Path
7 incpath = ['.', 'src', 'gui/src', 'materials', 'parameters']
8 env.Append(CPPPATH = incpath)
9 
10 env.Append(LIBPATH = ['lib'])
11 env.Append(LIBS = ['materials', 'parameters'])
12 
13 
14 # Sources
15 gemc_sources = Split("""gemc.cc
16  src/detector.cc
17  src/detector_io_mysql.cc
18  src/dmesg_init.cc
19  src/identifier.cc
20  src/run_conditions.cc
21  src/usage.cc
22  src/MagneticField.cc
23  src/MBankdefs.cc
24  src/MDetectorConstruction.cc
25  src/MDetectorMessenger.cc
26  src/MEventAction.cc
27  src/MHit.cc
28  src/MPHBaseClass.cc
29  src/MOutputBaseClass.cc
30  src/MPrimaryGeneratorAction.cc
31  src/MSensitiveDetector.cc
32  src/MSteppingAction.cc
33  src/string_utilities.cc
34  gui/src/gemc_MainGui.cc
35  gui/src/detector_editor.cc
36  gui/src/run_control.cc
37  gui/src/camera_control.cc
38  gui/src/detector_tree.cc
39  gui/src/infos.cc
40  gui/src/g4dialog.cc
41  gui/src/gsignal.cc""")
42 
43 # Physics
44 phys_sources = Split("""physics/EMPhysics.cc
45  physics/GeneralPhysics.cc
46  physics/HadronPhysics.cc
47  physics/IonPhysics.cc
48  physics/MPhysicsList.cc
49  physics/OpticalPhysics.cc""")
50 incpath = ['physics']
51 env.Append(CPPPATH = incpath)
52 
53 
54 
55 # Materials
56 materials_sources = Split("""materials/material_factory.cc
57  materials/cpp_materials.cc
58  materials/mysql_materials.cc""")
59 
60 # Parameters
61 parameters_sources = Split("""parameters/parameter_factory.cc
62  parameters/mysql_parameters.cc""")
63 
64 
65 # Hit Processes
66 hitp_sources = Split("""hitprocess/HitProcess_MapRegister.cc
67  hitprocess/clas12/svt/BST_hitprocess.cc
68  hitprocess/clas12/svt/bst_strip.cc
69  hitprocess/clas12/svt/FST_hitprocess.cc
70  hitprocess/clas12/svt/fst_strip.cc
71  hitprocess/clas12/micromegas/FMT_hitprocess.cc
72  hitprocess/clas12/micromegas/fmt_strip.cc
73  hitprocess/clas12/micromegas/BMT_hitprocess.cc
74  hitprocess/clas12/micromegas/bmt_strip.cc
75  hitprocess/clas12/micromegas/FTM_hitprocess.cc
76  hitprocess/clas12/micromegas/ftm_strip.cc
77  hitprocess/clas12/CND_hitprocess.cc
78  hitprocess/clas12/CTOF_hitprocess.cc
79  hitprocess/clas12/DC_hitprocess.cc
80  hitprocess/clas12/IC_hitprocess.cc
81  hitprocess/clas12/FT_hitprocess.cc
82  hitprocess/clas12/FTH_hitprocess.cc
83  hitprocess/clas12/OTOF_hitprocess.cc
84  hitprocess/clas12/EC_hitprocess.cc
85  hitprocess/clas12/ECwithG4strips_hitprocess.cc
86  hitprocess/clas12/PCAL_hitprocess.cc
87  hitprocess/clas12/raw_hitprocess.cc
88  hitprocess/clas12/flux_hitprocess.cc
89  hitprocess/clas12/RICH_hitprocess.cc
90  hitprocess/clas12/LTCC_hitprocess.cc
91  hitprocess/clas12/HTCC_hitprocess.cc
92  hitprocess/Aprime/HS_hitprocess.cc
93  hitprocess/Aprime/STR_hitprocess.cc
94  hitprocess/Aprime/str_strip.cc
95  hitprocess/GlueX/CVRT_hitprocess.cc""")
96 
97 incpath = ['hitprocess', 'hitprocess/clas12', 'hitprocess/clas12/svt', 'hitprocess/clas12/micromegas']
98 incpath += ['hitprocess/Aprime', 'hitprocess/GlueX', 'hitprocess/solid']
99 env.Append(CPPPATH = incpath)
100 
101 
102 # Outputs
103 output_sources = Split("""output/Output_Register.cc
104  output/evio_output.cc
105  output/txt_output.cc""")
106 incpath = ['output']
107 env.Append(CPPPATH = incpath)
108 
109 env.Library(source = materials_sources, target = "lib/materials")
110 env.Library(source = parameters_sources, target = "lib/parameters")
111 
112 
113 Target = 'gemc'
114 env.Program(source = gemc_sources + phys_sources + hitp_sources + output_sources, target = Target)
115 
116 if env['LIBRARY'] == "static":
117  env.Library(source = gemc_sources + phys_sources + hitp_sources + output_sources, target = Target)
118 
119 if env['LIBRARY'] == "shared":
120  env.SharedLibrary(source = gemc_sources + phys_sources + hitp_sources + output_sources, target = Target)
121 
122 
123 
124