ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
analysis
coresoftware
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
tree
geant4-10.6-release
config
environments
examples
advanced
basic
extended
analysis
biasing
common
electromagnetic
errorpropagation
eventgenerator
exoticphysics
field
g3tog4
geometry
hadronic
medical
optical
parallel
parameterisations
persistency
gdml
G01
G02
G03
include
src
gdml_ext.cc
G04
P01
P02
P03
physicslists
polarisation
radioactivedecay
runAndEvent
visualization
source
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
gdml_ext.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file gdml_ext.cc
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
28
//
29
//
30
//
31
//
32
// --------------------------------------------------------------
33
// GEANT 4 - read_ext
34
//
35
// --------------------------------------------------------------
36
37
// Geant4 includes
38
//
39
#include "
G4RunManager.hh
"
40
#include "
G4UImanager.hh
"
41
#include "
globals.hh
"
42
43
// A pre-built physics list
44
//
45
#include "
QGSP_BERT.hh
"
46
47
// Example includes
48
//
49
#include "
G03DetectorConstruction.hh
"
50
#include "
G03PrimaryGeneratorAction.hh
"
51
#include "
G03RunAction.hh
"
52
53
#include "
G4VisExecutive.hh
"
54
#include "
G4UIExecutive.hh
"
55
56
// --------------------------------------------------------------
57
58
int
main
(
int
argc,
char
** argv)
59
{
60
61
// Construct the default run manager
62
//
63
G4RunManager
* runManager =
new
G4RunManager
;
64
65
// Set mandatory initialization and user action classes
66
//
67
G03DetectorConstruction
* detector =
new
G03DetectorConstruction
;
68
runManager->
SetUserInitialization
(detector);
69
runManager->
SetUserInitialization
(
new
QGSP_BERT
);
70
runManager->
SetUserAction
(
new
G03PrimaryGeneratorAction
);
71
G03RunAction
* runAction =
new
G03RunAction
;
72
runManager->
SetUserAction
(runAction);
73
74
// Initialisation of runManager via macro for the interactive mode
75
// This gives possibility to give different names for GDML file to READ
76
77
// Initialize visualization
78
//
79
G4VisManager
* visManager =
new
G4VisExecutive
;
80
visManager->
Initialize
();
81
82
// Run initialisation macro
83
//
84
G4UImanager
* UImanager =
G4UImanager::GetUIpointer
();
85
86
if
( argc==1 )
// Define UI session for interactive mode.
87
{
88
G4UIExecutive
* ui =
new
G4UIExecutive
(argc, argv);
89
UImanager->
ApplyCommand
(
"/control/execute vis.mac"
);
90
ui->
SessionStart
();
91
delete
ui;
92
}
93
else
// Batch mode
94
{
95
G4UIExecutive
* ui =
new
G4UIExecutive
(argc, argv);
96
G4String
command =
"/control/execute "
;
97
G4String
fileName = argv[1];
98
UImanager->
ApplyCommand
(command+fileName);
99
ui->
SessionStart
();
100
delete
ui;
101
}
102
103
// Job termination
104
//
105
delete
visManager;
106
delete
runManager;
107
108
return
0;
109
}
geant4
tree
geant4-10.6-release
examples
extended
persistency
gdml
G03
gdml_ext.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:10
using
1.8.2 with
ECCE GitHub integration