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
ObjTrackingGeometryWriter.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ObjTrackingGeometryWriter.cpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2017 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/Plugins/Obj/ObjTrackingGeometryWriter.hpp
"
10
11
#include "
Acts/Utilities/Logger.hpp
"
12
#include "
ActsExamples/Framework/AlgorithmContext.hpp
"
13
#include <
Acts/Geometry/TrackingGeometry.hpp
>
14
#include <
Acts/Visualization/GeometryView3D.hpp
>
15
#include <
Acts/Visualization/ObjVisualization3D.hpp
>
16
17
ActsExamples::ObjTrackingGeometryWriter::ObjTrackingGeometryWriter
(
18
const
ActsExamples::ObjTrackingGeometryWriter::Config
&
config
,
19
Acts::Logging::Level
level
)
20
:
m_logger
{
Acts::getDefaultLogger
(
name
(), level)},
m_cfg
(
config
) {}
21
22
std::string
ActsExamples::ObjTrackingGeometryWriter::name
()
const
{
23
return
"ObjTrackingGeometryWriter"
;
24
}
25
26
ActsExamples::ProcessCode
ActsExamples::ObjTrackingGeometryWriter::write
(
27
const
AlgorithmContext
& context,
const
Acts::TrackingGeometry
&
tGeometry
) {
28
ACTS_DEBUG
(
">>Obj: Writer for TrackingGeometry object called."
);
29
30
auto
world = tGeometry.
highestTrackingVolume
();
31
if
(world !=
nullptr
) {
32
write
(context, *world);
33
}
34
return
ActsExamples::ProcessCode::SUCCESS
;
35
}
36
37
void
ActsExamples::ObjTrackingGeometryWriter::write
(
38
const
AlgorithmContext
& context,
const
Acts::TrackingVolume
& tVolume) {
39
ACTS_DEBUG
(
">>Obj: Writer for TrackingVolume object called."
);
40
41
Acts::ObjVisualization3D
objVis(
m_cfg
.outputPrecision,
m_cfg
.outputScalor);
42
43
Acts::GeometryView3D::drawTrackingVolume
(
44
objVis, tVolume, context.
geoContext
,
m_cfg
.containerView,
45
m_cfg
.volumeView,
m_cfg
.passiveView,
m_cfg
.sensitiveView,
m_cfg
.gridView,
46
true
,
""
,
m_cfg
.outputDir);
47
}
acts
blob
sPHENIX
Examples
Io
Obj
src
ObjTrackingGeometryWriter.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:38
using
1.8.2 with
sPHENIX GitHub integration