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
GeometryIdGenerator.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file GeometryIdGenerator.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/Detector/interface/IGeometryIdGenerator.hpp
"
12
#include "
Acts/Geometry/GeometryIdentifier.hpp
"
13
#include "
Acts/Utilities/Logger.hpp
"
14
15
#include <any>
16
17
namespace
Acts {
18
19
class
Surface
;
20
21
namespace
Experimental {
22
23
class
Portal;
24
class
DetectorVolume;
25
41
class
GeometryIdGenerator
final :
public
IGeometryIdGenerator
{
42
public
:
44
struct
Config
{
46
bool
containerMode
=
false
;
48
unsigned
int
containerId
= 0
u
;
50
bool
resetSubCounters
=
true
;
52
bool
overrideExistingIds
=
false
;
53
};
54
56
struct
Cache
{
58
unsigned
int
volumeCount
= 0
u
;
60
unsigned
int
layerCount
= 0
u
;
62
unsigned
int
portalCount
= 0
u
;
64
unsigned
int
passiveCount
= 0
u
;
66
unsigned
int
sensitiveCount
= 0
u
;
67
};
68
73
GeometryIdGenerator
(
const
Config
&
cfg
,
74
std::unique_ptr<const Logger> mlogger =
getDefaultLogger
(
75
"GeometryIdGenerator"
,
Logging::INFO
))
76
:
m_cfg
(cfg),
m_logger
(std::
move
(mlogger)) {}
77
78
~GeometryIdGenerator
()
override
=
default
;
79
82
IGeometryIdGenerator::GeoIdCache
generateCache
() const final;
83
88
void
assignGeometryId
(
IGeometryIdGenerator
::
GeoIdCache
& cache,
89
DetectorVolume
& dVolume) const final;
90
95
void
assignGeometryId
(
IGeometryIdGenerator
::
GeoIdCache
& cache,
96
Portal
& portal) const final;
97
102
void
assignGeometryId
(
IGeometryIdGenerator
::
GeoIdCache
& cache,
103
Surface
&
surface
) const final;
104
105
private
:
112
GeometryIdentifier
volumeId
(Cache& cache,
bool
incrementLayer =
true
) const;
113
115
Config
m_cfg
;
116
118
const
Logger
&
logger
()
const
{
return
*
m_logger
; }
119
121
std::unique_ptr<const Logger>
m_logger
;
122
};
123
124
}
// namespace Experimental
125
}
// namespace Acts
acts
blob
sPHENIX
Core
include
Acts
Detector
GeometryIdGenerator.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:32
using
1.8.2 with
sPHENIX GitHub integration