Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
sPHENIX
Alignment
CI
cmake
Core
docs
Examples
Fatras
Plugins
ActSVG
Autodiff
Cuda
DD4hep
EDM4hep
ExaTrkX
FpeMonitoring
Geant4
Identification
Json
include
src
AlgebraJsonConverter.cpp
DetectorJsonConverter.cpp
DetectorVolumeJsonConverter.cpp
ExtentJsonConverter.cpp
GridJsonConverter.cpp
IndexedSurfacesJsonConverter.cpp
JsonMaterialDecorator.cpp
MaterialJsonConverter.cpp
MaterialMapJsonConverter.cpp
PortalJsonConverter.cpp
ProtoDetectorJsonConverter.cpp
SurfaceBoundsJsonConverter.cpp
SurfaceJsonConverter.cpp
UtilitiesJsonConverter.cpp
VolumeBoundsJsonConverter.cpp
VolumeJsonConverter.cpp
Legacy
Mlpack
Onnx
Podio
Sycl
TGeo
Tests
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SurfaceBoundsJsonConverter.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SurfaceBoundsJsonConverter.cpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2021 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 "
Acts/Plugins/Json/SurfaceBoundsJsonConverter.hpp
"
10
11
#include "
Acts/Plugins/Json/DetrayJsonHelper.hpp
"
12
#include "
Acts/Surfaces/SurfaceBounds.hpp
"
13
14
void
Acts::to_json
(nlohmann::json&
j
,
const
Acts::SurfaceBounds
&
bounds
) {
15
j[
"type"
] = bounds.
type
();
16
j[
"values"
] = bounds.
values
();
17
}
18
19
nlohmann::json
Acts::SurfaceBoundsJsonConverter::toJson
(
20
const
Acts::SurfaceBounds
&
bounds
) {
21
return
nlohmann::json(bounds);
22
}
23
24
nlohmann::json
Acts::SurfaceBoundsJsonConverter::toJsonDetray
(
25
const
Acts::SurfaceBounds
&
bounds
,
bool
portal) {
26
nlohmann::json jMask;
27
auto
[
shape
, boundaries] =
DetrayJsonHelper::maskFromBounds
(bounds, portal);
28
jMask[
"shape"
] =
shape
;
29
jMask[
"boundaries"
] = boundaries;
30
return
jMask;
31
}
acts
blob
sPHENIX
Plugins
Json
src
SurfaceBoundsJsonConverter.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:41
using
1.8.2 with
sPHENIX GitHub integration