Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
DD4hepMaterialRecording.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file DD4hepMaterialRecording.cpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2017-2020 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#include "
ActsExamples/DD4hepDetector/DD4hepDetector.hpp
"
10
#include "
ActsExamples/DD4hepDetector/DD4hepGeometryService.hpp
"
11
#include "
ActsExamples/DDG4/DDG4DetectorConstruction.hpp
"
12
#include "
ActsExamples/Detector/DD4hepDetectorOptions.hpp
"
13
#include "
ActsExamples/Geant4/Geant4Common.hpp
"
14
#include "
ActsExamples/Options/CommonOptions.hpp
"
15
#include "
ActsExamples/Options/Geant4Options.hpp
"
16
#include "
ActsExamples/Options/ParticleGunOptions.hpp
"
17
18
#include <memory>
19
20
#include <boost/program_options.hpp>
21
22
using namespace
ActsExamples;
23
24
int
main
(
int
argc,
char
* argv[]) {
25
// Setup and parse options
26
auto
desc =
Options::makeDefaultOptions
();
27
Options::addSequencerOptions
(desc);
28
Options::addOutputOptions
(desc, OutputFormat::Root);
29
Options::addDD4hepOptions
(desc);
30
Options::addGeant4Options
(desc);
31
Options::addParticleGunOptions
(desc);
32
Options::addRandomNumbersOptions
(desc);
33
auto
vm =
Options::parse
(desc, argc, argv);
34
if
(vm.empty()) {
35
return
EXIT_FAILURE;
36
}
37
38
// Setup the DD4hep detector
39
auto
dd4hepCfg = Options::readDD4hepConfig<po::variables_map>(vm);
40
auto
geometrySvc = std::make_shared<DD4hep::DD4hepGeometryService>(dd4hepCfg);
41
auto
detector
= std::make_shared<DD4hep::DD4hepDetector>(geometrySvc);
42
43
return
runMaterialRecording
(
44
vm, std::make_unique<DDG4DetectorConstructionFactory>(detector));
45
}
acts
blob
sPHENIX
Examples
Run
Geant4
DD4hep
DD4hepMaterialRecording.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:40
using
1.8.2 with
sPHENIX GitHub integration