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
ProtoDetector.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ProtoDetector.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/Geometry/Extent.hpp
"
12
#include "
Acts/Geometry/GeometryContext.hpp
"
13
#include "
Acts/Surfaces/Surface.hpp
"
14
#include "
Acts/Utilities/BinningData.hpp
"
15
#include "
Acts/Utilities/BinningType.hpp
"
16
#include "
Acts/Utilities/Logger.hpp
"
17
18
#include <functional>
19
#include <map>
20
#include <memory>
21
#include <optional>
22
#include <string>
23
#include <tuple>
24
#include <vector>
25
26
namespace
Acts {
27
28
struct
ProtoVolume
;
29
30
namespace
Experimental {
31
32
class
DetectorVolume;
33
class
Portal;
34
36
using
DetectorVolumes
= std::vector<std::shared_ptr<DetectorVolume>>;
38
using
ProtoContainer
= std::map<unsigned int, std::shared_ptr<Portal>>;
40
using
DetectorBlock
= std::tuple<DetectorVolumes, ProtoContainer>;
41
43
using
DetectorBlockBuilder
= std::function<void(
44
DetectorBlock
&,
const
GeometryContext
&,
Acts::Logging::Level
)>;
45
}
// namespace Experimental
46
49
struct
ProtoVolume
{
50
// Internal structure information
51
struct
InternalStructure
{
53
Surface::SurfaceType
layerType
= Surface::SurfaceType::Other;
55
std::vector<BinningData>
surfaceBinning
= {};
56
};
57
58
// Container structure information
59
struct
ContainerStructure
{
61
std::vector<ProtoVolume>
constituentVolumes
= {};
63
std::vector<BinningData>
constituentBinning
= {};
65
bool
layerContainer
=
false
;
66
};
67
69
std::string
name
=
""
;
71
Extent
extent
;
72
74
std::optional<InternalStructure>
internal
= std::nullopt;
75
77
std::optional<ContainerStructure>
container
= std::nullopt;
78
80
Experimental::DetectorBlockBuilder
blockBuilder
;
81
85
bool
operator==
(
const
ProtoVolume
& ptVolume)
const
;
86
92
void
harmonize
(
bool
legacy =
true
);
93
98
void
extendUp
(
ProtoVolume
& ptVolume);
99
102
void
propagateMinDown
(
BinningValue
bValue);
103
106
void
propagateMaxDown
(
BinningValue
bValue);
107
112
void
constrainDown
(
const
ProtoVolume
& ptVolume);
113
116
std::string
toString
(
const
std::string
& indent =
""
)
const
;
117
};
118
121
struct
ProtoDetector
{
122
std::string
name
=
""
;
123
ProtoVolume
worldVolume
;
124
131
void
harmonize
(
bool
legacy =
true
) {
132
worldVolume
.
extendUp
(
worldVolume
);
133
worldVolume
.
constrainDown
(
worldVolume
);
134
worldVolume
.
harmonize
(legacy);
135
}
136
139
std::string
toString
(
const
std::string
& indent =
""
)
const
;
140
};
141
142
}
// namespace Acts
acts
blob
sPHENIX
Core
include
Acts
Detector
ProtoDetector.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:32
using
1.8.2 with
sPHENIX GitHub integration