Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Projects
Groups
Snippets
Sign up now
Login
Sign in / Register
Toggle navigation
Menu
Open sidebar
EIC
Project Juggler
Commits
1f404145
Commit
1f404145
authored
Jul 08, 2021
by
Chao Peng
Browse files
fix an issue with non-existing tracking geometry
parent
8aebe6a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
JugBase/src/components/GeoSvc.cpp
View file @
1f404145
...
...
@@ -128,22 +128,22 @@ StatusCode GeoSvc::initialize() {
Acts
::
equidistant
,
Acts
::
equidistant
));
if
(
m_trackingGeo
)
{
draw_surfaces
(
m_trackingGeo
,
"tracking_geometry.obj"
);
}
debug
()
<<
"visiting all the surfaces "
<<
endmsg
;
m_trackingGeo
->
visitSurfaces
([
this
](
const
Acts
::
Surface
*
surface
)
{
// for now we just require a valid surface
if
(
not
surface
)
{
return
;
}
auto
det_element
=
dynamic_cast
<
const
Acts
::
DD4hepDetectorElement
*>
(
surface
->
associatedDetectorElement
());
if
(
!
det_element
)
{
debug
()
<<
"invalid det_element!!! "
<<
endmsg
;
return
;
}
this
->
m_surfaces
.
insert_or_assign
(
det_element
->
identifier
(),
surface
);
});
debug
()
<<
"visiting all the surfaces "
<<
endmsg
;
m_trackingGeo
->
visitSurfaces
([
this
](
const
Acts
::
Surface
*
surface
)
{
// for now we just require a valid surface
if
(
not
surface
)
{
return
;
}
auto
det_element
=
dynamic_cast
<
const
Acts
::
DD4hepDetectorElement
*>
(
surface
->
associatedDetectorElement
());
if
(
!
det_element
)
{
debug
()
<<
"invalid det_element!!! "
<<
endmsg
;
return
;
}
this
->
m_surfaces
.
insert_or_assign
(
det_element
->
identifier
(),
surface
);
});
}
return
StatusCode
::
SUCCESS
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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