Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
4a651357
Commit
4a651357
authored
9 years ago
by
Nikiforos Nikiforou
Browse files
Options
Downloads
Patches
Plain Diff
Added minor functionality to DDCore/XML/Layering
parent
ddc3f44e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
DDCore/include/XML/Layering.h
+3
-0
3 additions, 0 deletions
DDCore/include/XML/Layering.h
DDCore/src/XML/Layering.cpp
+25
-0
25 additions, 0 deletions
DDCore/src/XML/Layering.cpp
doc/release.notes
+9
-0
9 additions, 0 deletions
doc/release.notes
with
37 additions
and
0 deletions
DDCore/include/XML/Layering.h
+
3
−
0
View file @
4a651357
...
...
@@ -154,6 +154,9 @@ namespace DD4hep {
return
_stack
.
totalThickness
();
}
double
singleLayerThickness
(
XML
::
Element
e
)
const
;
double
absorberThicknessInLayer
(
XML
::
Element
e
)
const
;
void
sensitivePositionsInLayer
(
XML
::
Element
e
,
std
::
vector
<
double
>&
sens_pos
)
const
;
};
/// Namespace containing utilities to parse XML files using XercesC or TinyXML
...
...
This diff is collapsed.
Click to expand it.
DDCore/src/XML/Layering.cpp
+
25
−
0
View file @
4a651357
...
...
@@ -121,3 +121,28 @@ double Layering::singleLayerThickness(XML::Element e) const {
}
return
thickness
;
}
double
Layering
::
absorberThicknessInLayer
(
XML
::
Element
e
)
const
{
Component
lay
=
e
;
double
thickness
=
0e0
;
for
(
Collection_t
s
(
lay
,
_U
(
slice
));
s
;
++
s
)
{
Component
slice
=
s
;
if
(
slice
.
isRadiator
())
thickness
+=
slice
.
thickness
();
}
return
thickness
;
}
void
Layering
::
sensitivePositionsInLayer
(
XML
::
Element
e
,
std
::
vector
<
double
>&
sens_pos
)
const
{
Component
lay
=
e
;
double
pos
=-
singleLayerThickness
(
e
)
/
2.0
;
for
(
Collection_t
s
(
lay
,
_U
(
slice
));
s
;
++
s
)
{
Component
slice
=
s
;
pos
+=
slice
.
thickness
();
if
(
slice
.
isSensitive
()){
//store the position at the center of the slice
sens_pos
.
push_back
(
pos
-
slice
.
thickness
()
/
2.
);
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
doc/release.notes
+
9
−
0
View file @
4a651357
...
...
@@ -3,6 +3,15 @@
DD4hep ---- Release Notes
=================================
2015-08-12 N.Nikiforou
-----------------------
- DDCore/XML: Added new helper functions to Layering engine:
- double absorberThicknessInLayer(XML::Element e) :
returns total absorber thickness in given layer
- void sensitivePositionsInLayer(XML::Element e, std::vector<double>& sens_pos) :
provides positions of sensitive slices within a layer with respect to the
center of the layer
2015-07-25 M.Frank
------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment