16
16
#include " G4UIExecutive.hh"
17
17
#include < sstream>
18
18
19
- #include < AdePT/integration/AdePTTrackingManager.hh>
20
-
21
19
int main (int argc, char **argv)
22
20
{
23
21
// Macro name from arguments
@@ -28,6 +26,8 @@ int main(int argc, char **argv)
28
26
bool doValidation = false ;
29
27
G4bool useInteractiveMode = true ;
30
28
G4bool useAdePT = true ;
29
+ G4bool allSensitive = false ; // If set, ignores the sensitive detector flags in the GDML and marks all volumes as
30
+ // sensitive. Useful for validation of geometries with no SD info
31
31
G4String helpMsg (" Usage: " + G4String (argv[0 ]) +
32
32
" [option(s)] \n No additional arguments triggers an interactive mode "
33
33
" executing vis.mac macro. \n Options:\n\t -h\t\t display this help "
@@ -50,9 +50,11 @@ int main(int argc, char **argv)
50
50
} else if (argument == " --do_benchmark" ) {
51
51
doBenchmark = true ;
52
52
} else if (argument == " --do_validation" ) {
53
- doValidation = true ;
54
- } else if (argument == " --no_AdePT " ) {
53
+ doValidation = true ;
54
+ } else if (argument == " --noadept " ) {
55
55
useAdePT = false ;
56
+ } else if (argument == " --allsensitive" ) {
57
+ allSensitive = true ;
56
58
} else {
57
59
G4Exception (" main" , " Unknown argument" , FatalErrorInArgument,
58
60
(" Unknown argument passed to " + G4String (argv[0 ]) + " : " + argument + " \n " + helpMsg).c_str ());
@@ -65,44 +67,42 @@ int main(int argc, char **argv)
65
67
" The options --do_benchmark and --do_validation are mutually exclusive! --do_benchmark will be ignored" );
66
68
}
67
69
if (!doBenchmark && !doValidation) {
68
- G4Exception (
69
- " main()" , " Notification" , JustWarning,
70
- " Testing is enabled but no option has been selected, data will not be collected for this run.\n "
71
- " Available options are:\n "
72
- " --do_benchmark\n "
73
- " --do_validation" );
70
+ G4Exception (" main()" , " Notification" , JustWarning,
71
+ " Testing is enabled but no option has been selected, data will not be collected for this run.\n "
72
+ " Available options are:\n "
73
+ " --do_benchmark\n "
74
+ " --do_validation" );
74
75
}
75
76
76
77
// Initialization of default Run manager
77
78
auto *runManager = G4RunManagerFactory::CreateRunManager (G4RunManagerType::Default);
78
- // auto *runManager = G4RunManagerFactory::CreateRunManager(G4RunManagerType::Serial);
79
+ // auto *runManager = G4RunManagerFactory::CreateRunManager(G4RunManagerType::Serial);
79
80
80
81
// Detector geometry:
81
- auto detector = new DetectorConstruction ();
82
+ auto detector = new DetectorConstruction (allSensitive );
82
83
runManager->SetUserInitialization (detector);
83
84
84
- // Physics list
85
- //
86
- G4VUserPhysicsList *physicsList;
85
+ // Physics list
86
+ //
87
+ G4VUserPhysicsList *physicsList;
87
88
88
- if (useAdePT){
89
- physicsList = new FTFP_BERT_AdePT ();
90
- }
91
- else {
92
- physicsList = new FTFP_BERT_HepEm ();
93
- }
89
+ if (useAdePT) {
90
+ physicsList = new FTFP_BERT_AdePT ();
91
+ } else {
92
+ physicsList = new FTFP_BERT_HepEm ();
93
+ }
94
94
95
- runManager->SetUserInitialization (physicsList);
95
+ runManager->SetUserInitialization (physicsList);
96
96
97
- // reduce verbosity of physics lists
98
- G4EmParameters::Instance ()->SetVerbose (0 );
99
- G4HadronicProcessStore::Instance ()->SetVerbose (0 );
97
+ // reduce verbosity of physics lists
98
+ G4EmParameters::Instance ()->SetVerbose (0 );
99
+ G4HadronicProcessStore::Instance ()->SetVerbose (0 );
100
100
101
101
// -------------------------------
102
102
// UserAction classes
103
103
// -------------------------------
104
104
runManager->SetUserInitialization (
105
- new ActionInitialisation (outputDirectory, outputFilename, doBenchmark, doValidation));
105
+ new ActionInitialisation (outputDirectory, outputFilename, doBenchmark, doValidation));
106
106
107
107
G4UImanager *UImanager = G4UImanager::GetUIpointer ();
108
108
G4String command = " /control/execute " ;
0 commit comments