EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
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/Geometry/Layer.hpp
>
12
#include <
Acts/Geometry/TrackingGeometry.hpp
>
13
#include <
Acts/Geometry/TrackingVolume.hpp
>
14
#include <
Acts/Visualization/GeometryView3D.hpp
>
15
#include <
Acts/Visualization/ObjVisualization3D.hpp
>
16
17
#include <iostream>
18
19
ActsExamples::ObjTrackingGeometryWriter::ObjTrackingGeometryWriter
(
20
const
ActsExamples::ObjTrackingGeometryWriter::Config
& cfg)
21
: m_cfg(cfg) {}
22
23
std::string
ActsExamples::ObjTrackingGeometryWriter::name
()
const
{
24
return
m_cfg.name;
25
}
26
27
ActsExamples::ProcessCode
ActsExamples::ObjTrackingGeometryWriter::write
(
28
const
AlgorithmContext
& context,
const
Acts::TrackingGeometry
&
tGeometry
) {
29
ACTS_DEBUG
(
">>Obj: Writer for TrackingGeometry object called."
);
30
31
auto
world
= tGeometry.
highestTrackingVolume
();
32
if
(
world
) {
33
write
(context, *
world
);
34
}
35
return
ActsExamples::ProcessCode::SUCCESS
;
36
}
37
38
void
ActsExamples::ObjTrackingGeometryWriter::write
(
39
const
AlgorithmContext
& context,
const
Acts::TrackingVolume
& tVolume) {
40
ACTS_DEBUG
(
">>Obj: Writer for TrackingVolume object called."
);
41
42
Acts::ObjVisualization3D
objVis(m_cfg.outputPrecision, m_cfg.outputScalor);
43
44
Acts::GeometryView3D::drawTrackingVolume
(
45
objVis, tVolume, context.
geoContext
, m_cfg.containerView,
46
m_cfg.volumeView, m_cfg.passiveView, m_cfg.sensitiveView, m_cfg.gridView);
47
}
acts
blob
sPHENIX
Examples
Io
Obj
src
ObjTrackingGeometryWriter.cpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:25
using
1.8.2 with
EIC GitHub integration