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
KDTreeTrackingGeometryBuilder.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file KDTreeTrackingGeometryBuilder.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2022 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/Detector/ProtoDetector.hpp
"
13
#include "
Acts/Geometry/GeometryContext.hpp
"
14
#include "
Acts/Geometry/GeometryIdentifier.hpp
"
15
#include "
Acts/Geometry/ITrackingGeometryBuilder.hpp
"
16
#include "
Acts/Geometry/TrackingGeometryBuilder.hpp
"
17
#include "
Acts/Utilities/KDTree.hpp
"
18
#include "
Acts/Utilities/Logger.hpp
"
19
20
#include <array>
21
#include <cstddef>
22
#include <memory>
23
#include <string>
24
#include <vector>
25
26
namespace
Acts {
27
28
class
TrackingGeometry
;
29
class
Layer;
30
class
LayerCreator;
31
class
Surface
;
32
class
ITrackingVolumeHelper;
33
class
TrackingVolume;
34
41
class
KDTreeTrackingGeometryBuilder
:
public
ITrackingGeometryBuilder
{
42
public
:
44
struct
Config
{
46
std::shared_ptr<const ITrackingVolumeHelper>
trackingVolumeHelper
=
nullptr
;
48
std::shared_ptr<const LayerCreator>
layerCreator
=
nullptr
;
50
std::vector<std::shared_ptr<Surface>>
surfaces
= {};
52
ProtoDetector
protoDetector
;
54
std::shared_ptr<const GeometryIdentifierHook>
geometryIdentifierHook
=
55
std::make_shared<GeometryIdentifierHook>();
57
std::string
hierarchyIndent
=
" "
;
58
};
59
60
using
SurfaceKDT
=
61
KDTree<2u, std::shared_ptr<Surface>
,
ActsScalar
,
std::array
, 100>;
62
67
KDTreeTrackingGeometryBuilder
(
68
const
Config
&
cfg
,
69
std::unique_ptr<const Logger>
logger
=
70
getDefaultLogger
(
"KDTreeTrackingGeometryBuilder"
,
Logging::INFO
));
71
77
std::unique_ptr<const TrackingGeometry>
trackingGeometry
(
78
const
GeometryContext
&
gctx
)
const
final
;
79
80
private
:
82
Config
m_cfg
;
83
85
const
Logger
&
logger
()
const
{
return
*
m_logger
; }
86
88
std::unique_ptr<const Logger>
m_logger
;
89
91
struct
Cache
{
92
size_t
surfaceCounter
= 0;
93
};
94
104
std::shared_ptr<TrackingVolume>
translateVolume
(
105
Cache
& cCache,
const
GeometryContext
&
gctx
,
const
SurfaceKDT
& kdt,
106
const
ProtoVolume
& ptVolume,
const
std::string
& indent =
""
)
const
;
107
117
std::shared_ptr<const Layer>
translateLayer
(
118
Cache
& cCache,
const
GeometryContext
&
gctx
,
const
SurfaceKDT
& kdt,
119
const
ProtoVolume
& plVolume,
const
std::string
& indent =
""
)
const
;
120
};
121
122
}
// namespace Acts
acts
blob
sPHENIX
Core
include
Acts
Geometry
KDTreeTrackingGeometryBuilder.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:33
using
1.8.2 with
sPHENIX GitHub integration