ECCE @ EIC Software
Reference for
ECCE @ 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
SurfaceMaterialMapper.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SurfaceMaterialMapper.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2018-2020 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/GeometryContext.hpp
"
12
#include "
Acts/Geometry/GeometryID.hpp
"
13
#include "
Acts/MagneticField/MagneticFieldContext.hpp
"
14
#include "
Acts/Material/AccumulatedSurfaceMaterial.hpp
"
15
#include "
Acts/Material/ISurfaceMaterial.hpp
"
16
#include "
Acts/Propagator/MaterialInteractor.hpp
"
17
#include "
Acts/Propagator/Navigator.hpp
"
18
#include "
Acts/Propagator/Propagator.hpp
"
19
#include "
Acts/Propagator/StraightLineStepper.hpp
"
20
#include "
Acts/Propagator/SurfaceCollector.hpp
"
21
#include "
Acts/Propagator/VolumeCollector.hpp
"
22
#include "
Acts/Surfaces/Surface.hpp
"
23
#include "
Acts/Utilities/Logger.hpp
"
24
25
namespace
Acts {
26
27
class
TrackingGeometry
;
28
30
struct
MaterialSurface
{
31
bool
operator()
(
const
Surface
& sf)
const
{
32
return
(sf.
surfaceMaterial
() !=
nullptr
);
33
}
34
};
35
37
struct
MaterialVolume
{
38
bool
operator()
(
const
TrackingVolume
& vf)
const
{
39
return
(vf.
volumeMaterial
() !=
nullptr
);
40
}
41
};
42
68
class
SurfaceMaterialMapper
{
69
public
:
70
using
StraightLinePropagator
=
Propagator<StraightLineStepper, Navigator>
;
71
75
struct
Config
{
77
std::array<double, 2>
etaRange
= {{-6., 6.}};
79
bool
emptyBinCorrection
=
true
;
81
bool
mapperDebugOutput
=
false
;
82
};
83
87
struct
State
{
89
State
(std::reference_wrapper<const GeometryContext>
gctx
,
90
std::reference_wrapper<const MagneticFieldContext> mctx)
91
:
geoContext
(gctx),
magFieldContext
(mctx) {}
92
94
std::map<GeometryID, AccumulatedSurfaceMaterial>
accumulatedMaterial
;
95
97
std::map<GeometryID, std::unique_ptr<const ISurfaceMaterial>>
98
surfaceMaterial
;
99
101
std::reference_wrapper<const GeometryContext>
geoContext
;
102
104
std::reference_wrapper<const MagneticFieldContext>
magFieldContext
;
105
};
106
108
SurfaceMaterialMapper
() =
delete
;
109
115
SurfaceMaterialMapper
(
const
Config
& cfg,
StraightLinePropagator
propagator,
116
std::unique_ptr<const Logger> slogger =
117
getDefaultLogger
(
"SurfaceMaterialMapper"
,
118
Logging::INFO
));
119
127
State
createState
(
const
GeometryContext
&
gctx
,
128
const
MagneticFieldContext
& mctx,
129
const
TrackingGeometry
&
tGeometry
)
const
;
130
138
void
finalizeMaps
(
State
& mState)
const
;
139
147
void
mapMaterialTrack
(
State
& mState,
RecordedMaterialTrack
& mTrack)
const
;
148
149
private
:
154
void
resolveMaterialSurfaces
(
State
& mState,
155
const
TrackingVolume
& tVolume)
const
;
156
161
void
checkAndInsert
(
State
&
/*mState*/
,
const
Surface
&
surface
)
const
;
162
164
const
Logger
&
logger
()
const
{
return
*
m_logger
; }
165
167
Config
m_cfg
;
168
170
StraightLinePropagator
m_propagator
;
171
173
std::unique_ptr<const Logger>
m_logger
;
174
};
175
}
// namespace Acts
acts
blob
master
Core
include
Acts
Material
SurfaceMaterialMapper.hpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:20
using
1.8.2 with
ECCE GitHub integration