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
DD4hepGeometryService.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file DD4hepGeometryService.hpp
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
#pragma once
10
11
#include "
ActsExamples/Framework/BareService.hpp
"
12
#include "
ActsExamples/Framework/ProcessCode.hpp
"
13
#include <
Acts/Geometry/TrackingGeometry.hpp
>
14
#include <
Acts/Material/IMaterialDecorator.hpp
>
15
#include <
Acts/Utilities/BinningType.hpp
>
16
#include <
Acts/Utilities/Logger.hpp
>
17
18
#include <functional>
19
#include <memory>
20
21
#include <DD4hep/DetElement.h>
22
#include <DD4hep/Detector.h>
23
#include <TGeoNode.h>
24
25
namespace
ActsExamples {
26
namespace
DD4hep {
27
35
class
DD4hepGeometryService
final :
public
BareService
{
36
public
:
37
struct
Config
{
39
Acts::Logging::Level
logLevel
=
Acts::Logging::Level::INFO
;
41
std::vector<std::string>
xmlFileNames
;
43
std::string
name
;
45
Acts::BinningType
bTypePhi
;
47
Acts::BinningType
bTypeR
;
49
Acts::BinningType
bTypeZ
;
56
double
envelopeR
;
62
double
envelopeZ
;
63
double
defaultLayerThickness
;
64
std::function<void(std::vector<dd4hep::DetElement>& detectors)>
65
sortDetectors
;
67
std::shared_ptr<const Acts::IMaterialDecorator>
matDecorator
=
nullptr
;
68
};
69
70
DD4hepGeometryService
(
const
Config
& cfg);
71
~DD4hepGeometryService
() final override;
72
75
dd4hep::DetElement
dd4hepGeometry
();
76
79
TGeoNode*
tgeoGeometry
();
80
82
dd4hep::Detector*
lcdd
();
83
87
std::unique_ptr<const Acts::
TrackingGeometry
>
trackingGeometry
(
88
const Acts::
GeometryContext
&
gctx
);
89
90
private:
92
ActsExamples::
ProcessCode
buildDD4hepGeometry
();
93
95
ActsExamples::
ProcessCode
buildTrackingGeometry
(
96
const Acts::
GeometryContext
& gctx);
97
99
Config
m_cfg
;
101
dd4hep::Detector*
m_lcdd
=
nullptr
;
103
dd4hep::DetElement
m_dd4hepGeometry
;
105
std::unique_ptr<const Acts::
TrackingGeometry
>
m_trackingGeometry
;
106
};
107
108
}
// namespace DD4hep
109
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Detectors
DD4hepDetector
include
ActsExamples
DD4hepDetector
DD4hepGeometryService.hpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:24
using
1.8.2 with
EIC GitHub integration