EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
sPHENIX
CI
Core
include
Acts
EventData
Geometry
MagneticField
Material
detail
AccumulatedMaterialSlab.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
MaterialSlab.hpp
ProtoSurfaceMaterial.hpp
ProtoVolumeMaterial.hpp
SurfaceMaterialMapper.hpp
VolumeMaterialMapper.hpp
Propagator
Seeding
Surfaces
TrackFinding
TrackFitting
Utilities
Vertexing
Visualization
src
docs
Examples
Fatras
Plugins
Tests
thirdparty
BeastMagneticField
delphes_EIC
Doxygen_Assist
east
eic-smear
EicRoot
eicsmear-jetexample
eicsmeardetectors
EicToyModel
estarlight
Fun4All-lmon
fun4all_coresoftware
fun4all_eic_qa
fun4all_eic_tutorials
fun4all_eicdetectors
fun4all_eicmacros
fun4all_g4jleic
fun4all_GenFit
fun4all_macros
fun4all_tutorials
g4exampledetector
g4lblvtx
online_distribution
PEPSI
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Material.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Material.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2016-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/Utilities/Definitions.hpp
"
12
13
#include <iosfwd>
14
#include <limits>
15
16
namespace
Acts {
17
38
class
Material
{
39
public
:
40
using
ParametersVector
=
Acts::ActsVectorF<5>
;
41
42
// Both mass and molar density are stored as a float and can thus not be
43
// distinguished by their types. Just changing the last element in the
44
// previously existing constructor that took five floats as input to represent
45
// molar density instead of mass density could have lead to significant
46
// confusion compared to the previous behaviour. To avoid any ambiguity,
47
// construction from separate material parameters must happen through the
48
// following named constructors.
49
57
static
Material
fromMolarDensity
(
float
x0,
float
l0,
float
ar,
float
z
,
58
float
molarRho);
70
static
Material
fromMassDensity
(
float
x0,
float
l0,
float
ar,
float
z
,
71
float
massRho);
73
Material
() =
default
;
75
Material
(
const
ParametersVector
&
parameters
);
76
77
Material
(
Material
&& mat) =
default
;
78
Material
(
const
Material
& mat) =
default
;
79
~Material
() =
default
;
80
Material
&
operator=
(
Material
&& mat) =
default
;
81
Material
&
operator=
(
const
Material
& mat) =
default
;
82
84
constexpr
operator
bool()
const
{
return
0.0f <
m_ar
; }
85
87
constexpr
float
X0
()
const
{
return
m_x0
; }
89
constexpr
float
L0
()
const
{
return
m_l0
; }
91
constexpr
float
Ar
()
const
{
return
m_ar
; }
93
constexpr
float
Z
()
const
{
return
m_z
; }
95
constexpr
float
molarDensity
()
const
{
return
m_molarRho
; }
97
constexpr
float
molarElectronDensity
()
const
{
return
m_z
*
m_molarRho
; }
99
float
massDensity
()
const
;
101
float
meanExcitationEnergy
()
const
;
102
104
ParametersVector
parameters
()
const
;
105
106
private
:
107
float
m_x0
= std::numeric_limits<float>::infinity();
108
float
m_l0
= std::numeric_limits<float>::infinity();
109
float
m_ar
= 0.0f;
110
float
m_z
= 0.0f;
111
float
m_molarRho
= 0.0f;
112
113
friend
constexpr
bool
operator==
(
const
Material
& lhs,
const
Material
& rhs) {
114
return
(lhs.
m_x0
== rhs.
m_x0
) and (lhs.
m_l0
== rhs.
m_l0
) and
115
(lhs.
m_ar
== rhs.
m_ar
) and (lhs.
m_z
== rhs.
m_z
) and
116
(lhs.
m_molarRho
== rhs.
m_molarRho
);
117
}
118
friend
constexpr
bool
operator!=
(
const
Material
& lhs,
const
Material
& rhs) {
119
return
!(lhs == rhs);
120
}
121
};
122
123
std::ostream&
operator<<
(std::ostream& os,
const
Material&
material
);
124
125
}
// namespace Acts
acts
blob
sPHENIX
Core
include
Acts
Material
Material.hpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:23
using
1.8.2 with
EIC GitHub integration