Skip to content

Commit

Permalink
Merge branch 'HEP-FCC:main' into gmarchio-main-ModuleThetaReadout
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannimarchiori authored Aug 25, 2023
2 parents 5c07f29 + daab3f9 commit 09de0b3
Show file tree
Hide file tree
Showing 15 changed files with 3,440 additions and 407 deletions.
13 changes: 9 additions & 4 deletions Detector/DetCommon/src/SimpleLayeredCylinder_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@

namespace det {
/**
Factory for a shape from multiple cylinders. Meant for material approximations.
Expected xml structure:
Factory for a shape from multiple cylinders.
Expected xml structure (the 'sensitive' keyword is optional and default to false):
<detector type="SimpleLayeredCylinder" ...>
<dimensions rmin="..." rmax="..." dz="..." z_offset="..."> <!-- envelope -->
<layer rmin="..." rmax="..." dz="..." z_offset="..." material="...">
...
<layer rmin="..." rmax="..." dz="..." z_offset="..." material="...">
<layer rmin="..." rmax="..." dz="..." z_offset="..." material="..." sensitive="true">
</detector>
@author: Joschka Lingemann
*/
static dd4hep::Ref_t createSimpleLayeredCylinder(dd4hep::Detector& lcdd,
dd4hep::xml::Handle_t xmlElement,
dd4hep::SensitiveDetector /*sensDet*/) {
dd4hep::SensitiveDetector sensDet) {
dd4hep::xml::DetElement xmlDet = static_cast<dd4hep::xml::DetElement>(xmlElement);
std::string name = xmlDet.nameStr();
dd4hep::DetElement detElement(name, xmlDet.id());
Expand All @@ -39,6 +39,11 @@ static dd4hep::Ref_t createSimpleLayeredCylinder(dd4hep::Detector& lcdd,
if (layer.hasAttr("vis")) {
layerVolume.setVisAttributes(lcdd, layerDet.visStr());
}
if (layer.hasAttr("sensitive") && layerDet.isSensitive()) {
dd4hep::xml::Dimension sdType(xmlElement.child(_U(sensitive)));// if called outside of the loop it breaks existing configs without sensitive layers
sensDet.setType(sdType.typeStr());
layerVolume.setSensitiveDetector(sensDet);
}
layer.m_node = layers.next();
}

Expand Down
Loading

0 comments on commit 09de0b3

Please sign in to comment.