Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
a7a4e146
Commit
a7a4e146
authored
Feb 12, 2020
by
Lennart Huth
Browse files
setting the material budget to zero if not defined
parent
9201705f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core/detector/Detector.cpp
View file @
a7a4e146
...
...
@@ -59,6 +59,7 @@ Detector::Detector(const Configuration& config) : m_role(DetectorRole::NONE) {
// Material budget of detector, including support material
if
(
!
config
.
has
(
"material_budget"
))
{
LOG
(
WARNING
)
<<
"No material budget given for "
<<
m_detectorName
<<
", assuming zero"
;
m_materialBudget
=
0.0
;
}
else
if
(
config
.
get
<
double
>
(
"material_budget"
)
<
0
)
{
throw
InvalidValueError
(
config
,
"material_budget"
,
"Material budget has to be positive"
);
}
else
{
...
...
@@ -281,9 +282,7 @@ Configuration Detector::getConfiguration() const {
config
.
set
(
"time_resolution"
,
m_timeResolution
,
{
"ns"
,
"us"
,
"ms"
,
"s"
});
// material budget
if
(
m_materialBudget
>
0.0
)
{
config
.
set
(
"material_budget"
,
m_materialBudget
);
}
config
.
set
(
"material_budget"
,
m_materialBudget
);
// only if detector is not auxiliary:
if
(
!
this
->
isAuxiliary
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment