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
DD4hepTestsHelper.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file DD4hepTestsHelper.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2023 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
11
#include "
Acts/Definitions/Algebra.hpp
"
12
#include "
Acts/Geometry/GeometryContext.hpp
"
13
14
#include <string>
15
16
#include <DD4hep/DetFactoryHelper.h>
17
#include <DD4hep/Objects.h>
18
#include <XML/Utilities.h>
19
20
using namespace
std;
21
using namespace
dd4hep;
22
23
namespace
Acts {
24
class
Surface
;
25
}
// namespace Acts
26
27
namespace
DD4hepTestsHelper {
28
35
template
<
typename
T>
36
T
&
ensureExtension
(dd4hep::DetElement& elt) {
37
T
* ext = elt.extension<
T
>(
false
);
38
if
(ext ==
nullptr
) {
39
ext =
new
T
();
40
}
41
elt.addExtension<
T
>(ext);
42
return
*ext;
43
}
44
51
Transform3D
createTransform
(
const
xml_comp_t& x_det_comp);
52
59
std::string
transformToXML
(
const
Acts::Transform3
& tf,
60
const
std::array<int, 2u>& axes = {0, 1});
61
69
std::string
surfaceToXML
(
const
Acts::GeometryContext
&
gctx
,
70
const
Acts::Surface
&
surface
,
71
const
Acts::Transform3
&
ref
);
72
73
}
// namespace DD4hepTestsHelper
acts
blob
sPHENIX
Tests
UnitTests
Plugins
DD4hep
DD4hepTestsHelper.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:46
using
1.8.2 with
sPHENIX GitHub integration