Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackingGeometryView3DBase.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackingGeometryView3DBase.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 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 #pragma once
10 
16 
17 #include <fstream>
18 #include <sstream>
19 #include <string>
20 
21 namespace Acts {
22 
23 namespace TrackingGeometryView3DTest {
24 
26 
29 
37 
38 static inline std::string run(IVisualization3D& helper, bool triangulate,
39  const std::string& tag) {
40  std::stringstream cStream;
41 
42  ViewConfig viewSensitive = ViewConfig({0, 180, 240});
43  viewSensitive.triangulate = triangulate;
44  ViewConfig viewPassive = ViewConfig({240, 280, 0});
45  viewPassive.triangulate = triangulate;
46  ViewConfig viewVolume = ViewConfig({220, 220, 0});
47  viewVolume.triangulate = triangulate;
48  ViewConfig viewContainer = ViewConfig({220, 220, 0});
49  viewContainer.triangulate = triangulate;
50  ViewConfig viewGrid = ViewConfig({220, 0, 0});
51  viewGrid.nSegments = 8;
52  viewGrid.offset = 3.;
53  viewGrid.triangulate = triangulate;
54 
55  const Acts::TrackingVolume& tgVolume = *(tGeometry->highestTrackingVolume());
56 
57  GeometryView3D::drawTrackingVolume(helper, tgVolume, tgContext, viewContainer,
58  viewVolume, viewPassive, viewSensitive,
59  viewGrid, true, tag);
60 
61  GeometryView3D::drawTrackingVolume(helper, tgVolume, tgContext, viewContainer,
62  viewVolume, viewPassive, viewSensitive,
63  viewGrid, false);
64  helper.write(cStream);
65 
66  return cStream.str();
67 }
68 
69 } // namespace TrackingGeometryView3DTest
70 } // namespace Acts