Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
sPHENIX
Alignment
CI
cmake
Core
docs
Examples
Algorithms
Detectors
Framework
Io
Csv
EDM4hep
HepMC3
Json
NuclearInteractions
Obj
Performance
Root
include
ActsExamples
Io
Root
RootAthenaNTupleReader.hpp
RootBFieldWriter.hpp
RootMaterialDecorator.hpp
RootMaterialTrackReader.hpp
RootMaterialTrackWriter.hpp
RootMaterialWriter.hpp
RootMeasurementWriter.hpp
RootParticleReader.hpp
RootParticleWriter.hpp
RootPlanarClusterWriter.hpp
RootPropagationStepsWriter.hpp
RootSimHitReader.hpp
RootSimHitWriter.hpp
RootSpacepointWriter.hpp
RootTrackParameterWriter.hpp
RootTrajectoryStatesWriter.hpp
RootTrajectorySummaryReader.hpp
RootTrajectorySummaryWriter.hpp
src
Svg
Python
Run
Scripts
Fatras
Plugins
Tests
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
RootMaterialWriter.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RootMaterialWriter.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2017-2019 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/ProcessCode.hpp
"
12
#include "
ActsExamples/MaterialMapping/IMaterialWriter.hpp
"
13
#include <
Acts/Definitions/Algebra.hpp
>
14
#include <
Acts/Geometry/GeometryIdentifier.hpp
>
15
#include <
Acts/Geometry/TrackingGeometry.hpp
>
16
#include <
Acts/Geometry/TrackingVolume.hpp
>
17
#include <
Acts/Material/IMaterialDecorator.hpp
>
18
#include <
Acts/Material/ISurfaceMaterial.hpp
>
19
#include <
Acts/Material/IVolumeMaterial.hpp
>
20
#include <
Acts/Surfaces/Surface.hpp
>
21
#include <
Acts/Utilities/Logger.hpp
>
22
23
#include <map>
24
#include <memory>
25
#include <mutex>
26
#include <string>
27
#include <utility>
28
29
class
TFile;
30
31
namespace
Acts {
32
class
ISurfaceMaterial;
33
class
IVolumeMaterial;
34
class
Layer;
35
class
TrackingGeometry
;
36
class
TrackingVolume;
37
38
using
SurfaceMaterialMap
=
39
std::map<GeometryIdentifier, std::shared_ptr<const ISurfaceMaterial>>;
40
using
VolumeMaterialMap
=
41
std::map<GeometryIdentifier, std::shared_ptr<const IVolumeMaterial>>;
42
using
DetectorMaterialMaps
= std::pair<SurfaceMaterialMap, VolumeMaterialMap>;
43
}
// namespace Acts
44
45
namespace
ActsExamples {
46
51
class
RootMaterialWriter
:
public
IMaterialWriter
{
52
public
:
56
struct
Config
{
58
bool
processSensitives
=
true
;
59
61
bool
processApproaches
=
true
;
62
64
bool
processRepresenting
=
true
;
65
67
bool
processBoundaries
=
true
;
68
70
bool
processVolumes
=
true
;
71
73
std::string
folderSurfaceNameBase
=
"SurfaceMaterial"
;
75
std::string
folderVolumeNameBase
=
"VolumeMaterial"
;
77
std::string
voltag
=
"_vol"
;
79
std::string
boutag
=
"_bou"
;
81
std::string
laytag
=
"_lay"
;
83
std::string
apptag
=
"_app"
;
85
std::string
sentag
=
"_sen"
;
87
std::string
ntag
=
"n"
;
89
std::string
vtag
=
"v"
;
91
std::string
otag
=
"o"
;
93
std::string
mintag
=
"min"
;
95
std::string
maxtag
=
"max"
;
97
std::string
ttag
=
"t"
;
99
std::string
x0tag
=
"x0"
;
101
std::string
l0tag
=
"l0"
;
103
std::string
atag
=
"A"
;
105
std::string
ztag
=
"Z"
;
107
std::string
rhotag
=
"rho"
;
109
std::string
filePath
=
"material-maps.root"
;
111
std::string
fileMode
=
"RECREATE"
;
112
};
113
118
RootMaterialWriter
(
const
Config
&
config
,
Acts::Logging::Level
level
);
119
121
~RootMaterialWriter
()
override
;
122
126
void
writeMaterial
(
const
Acts::DetectorMaterialMaps
& detMaterial)
override
;
127
131
void
write
(
const
Acts::TrackingGeometry
&
tGeometry
);
132
134
const
Config
&
config
()
const
{
return
m_cfg
; }
135
136
private
:
141
void
collectMaterial
(
const
Acts::TrackingVolume
& tVolume,
142
Acts::DetectorMaterialMaps
& detMatMap);
143
148
void
collectMaterial
(
const
Acts::Layer
& tLayer,
149
Acts::DetectorMaterialMaps
& detMatMap);
150
152
Config
m_cfg
;
153
155
std::unique_ptr<const Acts::Logger>
m_logger
;
156
158
const
Acts::Logger
&
logger
()
const
{
return
*
m_logger
; }
159
160
TFile*
m_outputFile
{
nullptr
};
161
};
162
163
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Io
Root
include
ActsExamples
Io
Root
RootMaterialWriter.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:38
using
1.8.2 with
sPHENIX GitHub integration