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
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
master
CI
Core
include
Acts
EventData
Fitter
Geometry
MagneticField
Material
AccumulatedMaterialProperties.hpp
AccumulatedSurfaceMaterial.hpp
AccumulatedVolumeMaterial.hpp
BinnedSurfaceMaterial.hpp
HomogeneousSurfaceMaterial.hpp
HomogeneousVolumeMaterial.hpp
IMaterialDecorator.hpp
Interactions.hpp
InterpolatedMaterialMap.hpp
ISurfaceMaterial.hpp
IVolumeMaterial.hpp
Material.hpp
MaterialCollector.hpp
MaterialComposition.hpp
MaterialGridHelper.hpp
MaterialMapUtils.hpp
MaterialProperties.hpp
ProtoSurfaceMaterial.hpp
ProtoVolumeMaterial.hpp
SurfaceMaterialMapper.hpp
VolumeMaterialMapper.hpp
Propagator
Seeding
Surfaces
TrackFinder
Utilities
Vertexing
Visualization
src
doc
Examples
Fatras
Plugins
Tests
thirdparty
analysis
coresoftware
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
VolumeMaterialMapper.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file VolumeMaterialMapper.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2019-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/AccumulatedVolumeMaterial.hpp
"
15
#include "
Acts/Material/MaterialProperties.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/VolumeCollector.hpp
"
21
#include "
Acts/Utilities/Definitions.hpp
"
22
#include "
Acts/Utilities/Logger.hpp
"
23
#include "
Acts/Utilities/detail/Axis.hpp
"
24
#include "
Acts/Utilities/detail/Grid.hpp
"
25
26
namespace
Acts {
27
29
using
RecordedMaterialPoint
=
30
std::vector<std::pair<Acts::MaterialProperties, Acts::Vector3D>>;
31
32
//
55
56
class
VolumeMaterialMapper
{
57
public
:
58
using
StraightLinePropagator
=
Propagator<StraightLineStepper, Navigator>
;
59
61
struct
MaterialVolume
{
62
bool
operator()
(
const
TrackingVolume
& vf)
const
{
63
return
(vf.
volumeMaterial
() !=
nullptr
);
64
}
65
};
66
70
struct
Config
{
72
float
mappingStep
= 1.;
74
bool
mapperDebugOutput
=
false
;
75
};
76
80
struct
State
{
82
State
(std::reference_wrapper<const GeometryContext>
gctx
,
83
std::reference_wrapper<const MagneticFieldContext> mctx)
84
:
geoContext
(gctx),
magFieldContext
(mctx) {}
85
87
std::map<GeometryID, RecordedMaterialPoint>
recordedMaterial
;
88
90
std::map<GeometryID, BinUtility>
materialBin
;
91
93
std::map<GeometryID, std::unique_ptr<const IVolumeMaterial>>
volumeMaterial
;
94
96
std::reference_wrapper<const GeometryContext>
geoContext
;
97
99
std::reference_wrapper<const MagneticFieldContext>
magFieldContext
;
100
};
101
103
VolumeMaterialMapper
() =
delete
;
104
110
VolumeMaterialMapper
(
const
Config
& cfg,
StraightLinePropagator
propagator,
111
std::unique_ptr<const Logger> slogger =
getDefaultLogger
(
112
"VolumeMaterialMapper"
,
Logging::INFO
));
113
121
State
createState
(
const
GeometryContext
&
gctx
,
122
const
MagneticFieldContext
& mctx,
123
const
TrackingGeometry
&
tGeometry
)
const
;
124
132
void
finalizeMaps
(
State
& mState)
const
;
133
141
void
mapMaterialTrack
(
State
& mState,
RecordedMaterialTrack
& mTrack)
const
;
142
143
private
:
148
void
resolveMaterialVolume
(
State
& mState,
149
const
TrackingVolume
& tVolume)
const
;
150
155
void
checkAndInsert
(
State
&
/*mState*/
,
const
TrackingVolume
&
volume
)
const
;
156
161
void
collectMaterialSurface
(
State
&
/*mState*/
,
162
const
TrackingVolume
& tVolume)
const
;
163
165
const
Logger
&
logger
()
const
{
return
*
m_logger
; }
166
168
Config
m_cfg
;
169
171
StraightLinePropagator
m_propagator
;
172
174
std::unique_ptr<const Logger>
m_logger
;
175
};
176
177
}
// namespace Acts
acts
blob
master
Core
include
Acts
Material
VolumeMaterialMapper.hpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:20
using
1.8.2 with
ECCE GitHub integration