diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0314604ab..e4f2ba8b8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,4 +22,4 @@ install(FILES ${CMAKE_BINARY_DIR}/fccrun
RENAME run)
gaudi_project(FCCSW HEAD
- USE Gaudi v28r2 )
+ USE Gaudi v29r2 )
diff --git a/Detector/DetCommon/CMakeLists.txt b/Detector/DetCommon/CMakeLists.txt
index 0efc6d9e2..0baa652ea 100644
--- a/Detector/DetCommon/CMakeLists.txt
+++ b/Detector/DetCommon/CMakeLists.txt
@@ -9,8 +9,6 @@ find_package(DD4hep COMPONENTS DDG4 DDSegmentation REQUIRED)
find_package(Geant4)
include(${Geant4_USE_FILE})
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${DD4hep_ROOT}/cmake )
-include( DD4hep )
find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED)
@@ -18,7 +16,7 @@ gaudi_install_headers(DetCommon)
gaudi_add_library(DetCommon
src/*.cpp
INCLUDE_DIRS DD4hep ROOT Geant4 DetSegmentation
- LINK_LIBRARIES GaudiKernel DD4hep ROOT Geant4 DetSegmentation ${DD4hep_COMPONENT_LIBRARIES}
+ LINK_LIBRARIES GaudiKernel DD4hep ROOT Geant4 DetSegmentation
PUBLIC_HEADERS DetCommon)
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION Detector/DetCommon)
diff --git a/Detector/DetCommon/DetCommon/DetUtils.h b/Detector/DetCommon/DetCommon/DetUtils.h
index c9d784e6a..f5b83b233 100644
--- a/Detector/DetCommon/DetCommon/DetUtils.h
+++ b/Detector/DetCommon/DetCommon/DetUtils.h
@@ -2,7 +2,7 @@
#define DETCOMMON_DETUTILS_H
// FCCSW
-#include "DetSegmentation/GridPhiEta.h"
+#include "DetSegmentation/FCCSWGridPhiEta.h"
// DD4hep
#include "DD4hep/DetFactoryHelper.h"
@@ -26,11 +26,11 @@
e.g. returns when called with (detector, "layer", "name", "1") */
namespace det {
namespace utils {
-DD4hep::XML::Component getNodeByStrAttr(const DD4hep::XML::Handle_t& mother, const std::string& nodeName,
+dd4hep::xml::Component getNodeByStrAttr(const dd4hep::xml::Handle_t& mother, const std::string& nodeName,
const std::string& attrName, const std::string& attrValue);
/// try to get attribute with double value, return defaultValue if attribute not found
-double getAttrValueWithFallback(const DD4hep::XML::Component& node, const std::string& attrName,
+double getAttrValueWithFallback(const dd4hep::xml::Component& node, const std::string& attrName,
const double& defaultValue);
/** Retrieves the cellID based on the position of the step and the detector segmentation.
@@ -40,7 +40,7 @@ double getAttrValueWithFallback(const DD4hep::XML::Component& node, const std::s
* or the middle of the step.
*/
-uint64_t cellID(const DD4hep::Geometry::Segmentation& aSeg, const G4Step& aStep, bool aPreStepPoint = true);
+uint64_t cellID(const dd4hep::Segmentation& aSeg, const G4Step& aStep, bool aPreStepPoint = true);
/** Get neighbours in many dimensions.
* @param[in] aDecoder Handle to the bitfield decoder.
@@ -49,7 +49,7 @@ uint64_t cellID(const DD4hep::Geometry::Segmentation& aSeg, const G4Step& aStep,
* @param[in] aCellId ID of cell.
* return Vector of neighbours.
*/
-std::vector neighbours(DD4hep::DDSegmentation::BitField64& aDecoder,
+std::vector neighbours(dd4hep::DDSegmentation::BitField64& aDecoder,
const std::vector& aFieldNames,
const std::vector>& aFieldExtremes,
uint64_t aCellId);
@@ -59,7 +59,7 @@ std::vector neighbours(DD4hep::DDSegmentation::BitField64& aDecoder,
* @param[in] aFieldNames Names of the fields for which extremes are found.
* return Vector of pairs (min,max)
*/
-std::vector> bitfieldExtremes(DD4hep::DDSegmentation::BitField64& aDecoder,
+std::vector> bitfieldExtremes(dd4hep::DDSegmentation::BitField64& aDecoder,
const std::vector& aFieldNames);
/** Get the half widths of the box envelope (TGeoBBox).
@@ -81,7 +81,7 @@ CLHEP::Hep3Vector tubeDimensions(uint64_t aVolumeId);
* @param[in] aSeg Handle to the segmentation of the volume.
* return Array of the number of cells in (X, Y).
*/
-std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentation::CartesianGridXY& aSeg);
+std::array numberOfCells(uint64_t aVolumeId, const dd4hep::DDSegmentation::CartesianGridXY& aSeg);
/** Get the number of cells for the volume and a given Cartesian XYZ segmentation.
* For an example see: Test/TestReconstruction/tests/options/testcellcountingXYZ.py.
@@ -90,7 +90,7 @@ std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentati
* @param[in] aSeg Handle to the segmentation of the volume.
* return Array of the number of cells in (X, Y, Z).
*/
-std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentation::CartesianGridXYZ& aSeg);
+std::array numberOfCells(uint64_t aVolumeId, const dd4hep::DDSegmentation::CartesianGridXYZ& aSeg);
/** Get the number of cells for the volume and a given Phi-Eta segmentation.
* It is assumed that the volume has a cylindrical shape (and full azimuthal coverage)
@@ -101,7 +101,7 @@ std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentati
* @param[in] aSeg Handle to the segmentation of the volume.
* return Array of the number of cells in (phi, eta).
*/
-std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentation::GridPhiEta& aSeg);
+std::array numberOfCells(uint64_t aVolumeId, const dd4hep::DDSegmentation::FCCSWGridPhiEta& aSeg);
/** Get the number of cells for the volume and a given R-phi segmentation.
* It is assumed that the volume has a cylindrical shape - TGeoTube (and full azimuthal coverage)
@@ -112,7 +112,7 @@ std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentati
* @param[in] aSeg Handle to the segmentation of the volume.
* return Array of the number of cells in (r, phi).
*/
-std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentation::PolarGridRPhi& aSeg);
+std::array numberOfCells(uint64_t aVolumeId, const dd4hep::DDSegmentation::PolarGridRPhi& aSeg);
/** Get the number of the volumes containing a given name.
* For an example see: Test/TestReconstruction/tests/options/testcellcountingXYZ.py.
diff --git a/Detector/DetCommon/bin/TGeoExporter.cpp b/Detector/DetCommon/bin/TGeoExporter.cpp
new file mode 100644
index 000000000..f0aca98e5
--- /dev/null
+++ b/Detector/DetCommon/bin/TGeoExporter.cpp
@@ -0,0 +1,11 @@
+
+#include "DD4hep/Detector.h"
+#include "TGeoManager.h"
+
+int main(int argc, char *argv[]) {
+ std::string filename = argv[1];
+ auto lcdd = &(dd4hep::Detector::getInstance());
+ lcdd->fromCompact(filename);
+ gGeoManager->Export((filename + ".root").c_str());
+
+ }
diff --git a/Detector/DetCommon/src/DetUtils.cpp b/Detector/DetCommon/src/DetUtils.cpp
index 3d63bdf3a..edacf5b9c 100644
--- a/Detector/DetCommon/src/DetUtils.cpp
+++ b/Detector/DetCommon/src/DetUtils.cpp
@@ -12,18 +12,18 @@
namespace det {
namespace utils {
-DD4hep::XML::Component getNodeByStrAttr(const DD4hep::XML::Handle_t& mother, const std::string& nodeName,
+dd4hep::xml::Component getNodeByStrAttr(const dd4hep::xml::Handle_t& mother, const std::string& nodeName,
const std::string& attrName, const std::string& attrValue) {
- for (DD4hep::XML::Collection_t xCompColl(mother, nodeName.c_str()); nullptr != xCompColl; ++xCompColl) {
+ for (dd4hep::xml::Collection_t xCompColl(mother, nodeName.c_str()); nullptr != xCompColl; ++xCompColl) {
if (xCompColl.attr(attrName.c_str()) == attrValue) {
- return static_cast(xCompColl);
+ return static_cast(xCompColl);
}
}
// in case there was no xml daughter with matching name
- return DD4hep::XML::Component(nullptr);
+ return dd4hep::xml::Component(nullptr);
}
-double getAttrValueWithFallback(const DD4hep::XML::Component& node, const std::string& attrName,
+double getAttrValueWithFallback(const dd4hep::xml::Component& node, const std::string& attrName,
const double& defaultValue) {
if (node.hasAttr(_Unicode(attrName.c_str()))) {
return node.attr(attrName.c_str());
@@ -32,9 +32,9 @@ double getAttrValueWithFallback(const DD4hep::XML::Component& node, const std::s
}
}
-uint64_t cellID(const DD4hep::Geometry::Segmentation& aSeg, const G4Step& aStep, bool aPreStepPoint) {
- DD4hep::Simulation::Geant4VolumeManager volMgr = DD4hep::Simulation::Geant4Mapping::instance().volumeManager();
- DD4hep::Geometry::VolumeManager::VolumeID volID = volMgr.volumeID(aStep.GetPreStepPoint()->GetTouchable());
+uint64_t cellID(const dd4hep::Segmentation& aSeg, const G4Step& aStep, bool aPreStepPoint) {
+ dd4hep::sim::Geant4VolumeManager volMgr = dd4hep::sim::Geant4Mapping::instance().volumeManager();
+ dd4hep::VolumeID volID = volMgr.volumeID(aStep.GetPreStepPoint()->GetTouchable());
if (aSeg.isValid()) {
G4ThreeVector global;
if (aPreStepPoint) {
@@ -44,15 +44,15 @@ uint64_t cellID(const DD4hep::Geometry::Segmentation& aSeg, const G4Step& aStep,
}
G4ThreeVector local =
aStep.GetPreStepPoint()->GetTouchable()->GetHistory()->GetTopTransform().TransformPoint(global);
- DD4hep::Geometry::Position loc(local.x() * MM_2_CM, local.y() * MM_2_CM, local.z() * MM_2_CM);
- DD4hep::Geometry::Position glob(global.x() * MM_2_CM, global.y() * MM_2_CM, global.z() * MM_2_CM);
- DD4hep::Geometry::VolumeManager::VolumeID cID = aSeg.cellID(loc, glob, volID);
+ dd4hep::Position loc(local.x() * MM_2_CM, local.y() * MM_2_CM, local.z() * MM_2_CM);
+ dd4hep::Position glob(global.x() * MM_2_CM, global.y() * MM_2_CM, global.z() * MM_2_CM);
+ dd4hep::VolumeID cID = aSeg.cellID(loc, glob, volID);
return cID;
}
return volID;
}
-std::vector neighbours(DD4hep::DDSegmentation::BitField64& aDecoder,
+std::vector neighbours(dd4hep::DDSegmentation::BitField64& aDecoder,
const std::vector& aFieldNames,
const std::vector>& aFieldExtremes,
uint64_t aCellId) {
@@ -74,7 +74,7 @@ std::vector neighbours(DD4hep::DDSegmentation::BitField64& aDecoder,
return std::move(neighbours);
}
-std::vector> bitfieldExtremes(DD4hep::DDSegmentation::BitField64& aDecoder,
+std::vector> bitfieldExtremes(dd4hep::DDSegmentation::BitField64& aDecoder,
const std::vector& aFieldNames) {
std::vector> extremes;
int width = 0;
@@ -90,8 +90,8 @@ std::vector> bitfieldExtremes(DD4hep::DDSegmentation::BitFie
}
CLHEP::Hep3Vector envelopeDimensions(uint64_t aVolumeId) {
- DD4hep::Geometry::VolumeManager volMgr = DD4hep::Geometry::LCDD::getInstance().volumeManager();
- auto pvol = volMgr.lookupPlacement(aVolumeId);
+ dd4hep::VolumeManager volMgr = dd4hep::Detector::getInstance().volumeManager();
+ auto pvol = volMgr.lookupVolumePlacement(aVolumeId);
auto solid = pvol.volume().solid();
// get the envelope of the shape
TGeoBBox* box = (dynamic_cast(solid.ptr()));
@@ -99,7 +99,7 @@ CLHEP::Hep3Vector envelopeDimensions(uint64_t aVolumeId) {
return CLHEP::Hep3Vector(box->GetDX(), box->GetDY(), box->GetDZ());
}
-std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentation::CartesianGridXY& aSeg) {
+std::array numberOfCells(uint64_t aVolumeId, const dd4hep::DDSegmentation::CartesianGridXY& aSeg) {
// // get half-widths
auto halfSizes = envelopeDimensions(aVolumeId);
// get segmentation cell widths
@@ -111,7 +111,7 @@ std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentati
return {cellsX, cellsY};
}
-std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentation::CartesianGridXYZ& aSeg) {
+std::array numberOfCells(uint64_t aVolumeId, const dd4hep::DDSegmentation::CartesianGridXYZ& aSeg) {
// // get half-widths
auto halfSizes = envelopeDimensions(aVolumeId);
// get segmentation cell widths
@@ -126,8 +126,8 @@ std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentati
}
CLHEP::Hep3Vector tubeDimensions(uint64_t aVolumeId) {
- DD4hep::Geometry::VolumeManager volMgr = DD4hep::Geometry::LCDD::getInstance().volumeManager();
- auto pvol = volMgr.lookupPlacement(aVolumeId);
+ dd4hep::VolumeManager volMgr = dd4hep::Detector::getInstance().volumeManager();
+ auto pvol = volMgr.lookupVolumePlacement(aVolumeId);
auto solid = pvol.volume().solid();
// get the envelope of the shape
TGeoConeSeg* tube = (dynamic_cast(solid.ptr()));
@@ -138,7 +138,7 @@ CLHEP::Hep3Vector tubeDimensions(uint64_t aVolumeId) {
return CLHEP::Hep3Vector(tube->GetRmin1(), tube->GetRmax1(), tube->GetDZ());
}
-std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentation::GridPhiEta& aSeg) {
+std::array numberOfCells(uint64_t aVolumeId, const dd4hep::DDSegmentation::FCCSWGridPhiEta& aSeg) {
// get half-widths,
auto tubeSizes = tubeDimensions(aVolumeId);
// get segmentation number of bins in phi
@@ -151,7 +151,7 @@ std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentati
return {phiCellNumber, cellsEta};
}
-std::array numberOfCells(uint64_t aVolumeId, const DD4hep::DDSegmentation::PolarGridRPhi& aSeg) {
+std::array numberOfCells(uint64_t aVolumeId, const dd4hep::DDSegmentation::PolarGridRPhi& aSeg) {
// get half-widths,
auto tubeSizes = tubeDimensions(aVolumeId);
// get segmentation cell width
diff --git a/Detector/DetCommon/src/Disc_geo.cpp b/Detector/DetCommon/src/Disc_geo.cpp
index 8bbc56715..caa3ed18b 100644
--- a/Detector/DetCommon/src/Disc_geo.cpp
+++ b/Detector/DetCommon/src/Disc_geo.cpp
@@ -1,14 +1,13 @@
#include "DD4hep/DetFactoryHelper.h"
using namespace std;
-using namespace DD4hep;
-using namespace DD4hep::Geometry;
+using namespace dd4hep;
/**
Simple cylinder using Tube to be used to define cylinder composed of 1 single material
@author Clement Helsens
**/
-static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector /*sens*/) {
+static Ref_t create_element(Detector& lcdd, xml_h e, SensitiveDetector /*sens*/) {
xml_det_t x_det = e;
string name = x_det.nameStr();
DetElement cylinder(name, x_det.id());
diff --git a/Detector/DetCommon/src/LayeredCone_geo.cpp b/Detector/DetCommon/src/LayeredCone_geo.cpp
index 8ac6c6632..14b2a497d 100644
--- a/Detector/DetCommon/src/LayeredCone_geo.cpp
+++ b/Detector/DetCommon/src/LayeredCone_geo.cpp
@@ -13,40 +13,40 @@ Expected xml structure:
@author: Joschka Lingemann
*/
-static DD4hep::Geometry::Ref_t createLayeredCone(DD4hep::Geometry::LCDD& lcdd,
- DD4hep::XML::Handle_t xmlElement,
- DD4hep::Geometry::SensitiveDetector /*sensDet*/) {
- DD4hep::XML::DetElement xmlDet = static_cast(xmlElement);
+static dd4hep::Ref_t createLayeredCone(dd4hep::Detector& lcdd,
+ dd4hep::xml::Handle_t xmlElement,
+ dd4hep::SensitiveDetector /*sensDet*/) {
+ dd4hep::xml::DetElement xmlDet = static_cast(xmlElement);
std::string name = xmlDet.nameStr();
- DD4hep::Geometry::DetElement detElement(name, xmlDet.id());
- DD4hep::Geometry::Volume experimentalHall = lcdd.pickMotherVolume(detElement);
+ dd4hep::DetElement detElement(name, xmlDet.id());
+ dd4hep::Volume experimentalHall = lcdd.pickMotherVolume(detElement);
xml_comp_t dimensions(xmlDet.dimensions());
- DD4hep::Geometry::Cone envelope(
+ dd4hep::Cone envelope(
dimensions.dz(), dimensions.rmin1(), dimensions.rmax1(), dimensions.rmin2(), dimensions.rmax2());
- DD4hep::Geometry::Volume envVolume(name, envelope, lcdd.material(dimensions.materialStr()));
+ dd4hep::Volume envVolume(name, envelope, lcdd.material(dimensions.materialStr()));
envVolume.setVisAttributes(lcdd.invisible());
// Create layer cylinders with their respective material, etc
auto layers = xmlElement.children(_Unicode(layer));
auto numLayers = xmlElement.numChildren(_Unicode(layer), true);
// Joschka: Although this is awkward, it was the only way to loop through children I could find
- DD4hep::XML::Handle_t layer(layers.reset());
+ dd4hep::xml::Handle_t layer(layers.reset());
for (unsigned layerIdx = 0; layerIdx < numLayers; ++layerIdx) {
- DD4hep::XML::DetElement layerDet = static_cast(layer);
- DD4hep::Geometry::Cone layerShape(
+ dd4hep::xml::DetElement layerDet = static_cast(layer);
+ dd4hep::Cone layerShape(
layerDet.dz(), layerDet.rmin1(), layerDet.rmax1(), layerDet.rmin2(), layerDet.rmax2());
- std::string layerName = DD4hep::XML::_toString(layerIdx, "layer%d");
- DD4hep::Geometry::Volume layerVolume(layerName, layerShape, lcdd.material(layer.attr("material")));
- DD4hep::Geometry::Position transLayer(0., 0., layerDet.z_offset());
- envVolume.placeVolume(layerVolume, DD4hep::Geometry::Transform3D(DD4hep::Geometry::RotationZ(0.), transLayer));
+ std::string layerName = dd4hep::xml::_toString(layerIdx, "layer%d");
+ dd4hep::Volume layerVolume(layerName, layerShape, lcdd.material(layer.attr("material")));
+ dd4hep::Position transLayer(0., 0., layerDet.z_offset());
+ envVolume.placeVolume(layerVolume, dd4hep::Transform3D(dd4hep::RotationZ(0.), transLayer));
if (layer.hasAttr("vis")) {
layerVolume.setVisAttributes(lcdd, layerDet.visStr());
}
layer.m_node = layers.next();
}
- DD4hep::Geometry::Position trans(0., 0., dimensions.z_offset());
- DD4hep::Geometry::PlacedVolume envPhys =
- experimentalHall.placeVolume(envVolume, DD4hep::Geometry::Transform3D(DD4hep::Geometry::RotationZ(0.), trans));
+ dd4hep::Position trans(0., 0., dimensions.z_offset());
+ dd4hep::PlacedVolume envPhys =
+ experimentalHall.placeVolume(envVolume, dd4hep::Transform3D(dd4hep::RotationZ(0.), trans));
envPhys.addPhysVolID("system", xmlDet.id());
detElement.setPlacement(envPhys);
detElement.setVisAttributes(lcdd, xmlDet.visStr(), envVolume);
diff --git a/Detector/DetCommon/src/SimpleBox.cpp b/Detector/DetCommon/src/SimpleBox.cpp
index 2b3041dd7..a89bb113e 100644
--- a/Detector/DetCommon/src/SimpleBox.cpp
+++ b/Detector/DetCommon/src/SimpleBox.cpp
@@ -1,29 +1,29 @@
#include "DD4hep/DetFactoryHelper.h"
namespace det {
-static DD4hep::Geometry::Ref_t createSimpleBox(DD4hep::Geometry::LCDD& aLcdd,
- DD4hep::XML::Handle_t aXmlElement,
- DD4hep::Geometry::SensitiveDetector aSensDet) {
- DD4hep::XML::DetElement x_det = aXmlElement;
+static dd4hep::Ref_t createSimpleBox(dd4hep::Detector& aLcdd,
+ dd4hep::xml::Handle_t aXmlElement,
+ dd4hep::SensitiveDetector aSensDet) {
+ dd4hep::xml::DetElement x_det = aXmlElement;
std::string name = x_det.nameStr();
- DD4hep::XML::Dimension dim(x_det.dimensions());
- DD4hep::XML::Dimension pos(x_det.position());
- DD4hep::XML::Dimension rot(x_det.rotation());
- DD4hep::Geometry::Material mat(aLcdd.material(x_det.materialStr()));
- DD4hep::Geometry::DetElement det(name, x_det.id());
- DD4hep::Geometry::Volume det_vol(name + "_vol", DD4hep::Geometry::Box(dim.x(), dim.y(), dim.z()), mat);
- DD4hep::Geometry::Volume mother = aLcdd.pickMotherVolume(det);
- DD4hep::Geometry::Transform3D transform(
- DD4hep::Geometry::Rotation3D(DD4hep::Geometry::RotationZYX(rot.z(), rot.y(), rot.x())),
- DD4hep::Geometry::Position(pos.x(), pos.y(), pos.z()));
- DD4hep::Geometry::PlacedVolume phv = mother.placeVolume(det_vol, transform);
+ dd4hep::xml::Dimension dim(x_det.dimensions());
+ dd4hep::xml::Dimension pos(x_det.position());
+ dd4hep::xml::Dimension rot(x_det.rotation());
+ dd4hep::Material mat(aLcdd.material(x_det.materialStr()));
+ dd4hep::DetElement det(name, x_det.id());
+ dd4hep::Volume det_vol(name + "_vol", dd4hep::Box(dim.x(), dim.y(), dim.z()), mat);
+ dd4hep::Volume mother = aLcdd.pickMotherVolume(det);
+ dd4hep::Transform3D transform(
+ dd4hep::Rotation3D(dd4hep::RotationZYX(rot.z(), rot.y(), rot.x())),
+ dd4hep::Position(pos.x(), pos.y(), pos.z()));
+ dd4hep::PlacedVolume phv = mother.placeVolume(det_vol, transform);
det_vol.setVisAttributes(aLcdd, x_det.visStr());
det_vol.setLimitSet(aLcdd, x_det.limitsStr());
det_vol.setRegion(aLcdd, x_det.regionStr());
if (x_det.isSensitive()) {
- DD4hep::Geometry::SensitiveDetector sd = aSensDet;
- DD4hep::XML::Dimension sd_typ = x_det.child(_U(sensitive));
+ dd4hep::SensitiveDetector sd = aSensDet;
+ dd4hep::xml::Dimension sd_typ = x_det.child(_U(sensitive));
det_vol.setSensitiveDetector(aSensDet);
sd.setType(sd_typ.typeStr());
}
diff --git a/Detector/DetCommon/src/SimpleCone_geo.cpp b/Detector/DetCommon/src/SimpleCone_geo.cpp
index 6bb9520a2..5c7b43266 100644
--- a/Detector/DetCommon/src/SimpleCone_geo.cpp
+++ b/Detector/DetCommon/src/SimpleCone_geo.cpp
@@ -7,26 +7,26 @@ namespace det {
Simple cone using dimensions to be used to define cone composed of 1 single material
@author Clement Helsens
**/
-static DD4hep::Geometry::Ref_t
-createSimpleCone(DD4hep::Geometry::LCDD& lcdd, xml_h e, DD4hep::Geometry::SensitiveDetector sensDet) {
+static dd4hep::Ref_t
+createSimpleCone(dd4hep::Detector& lcdd, xml_h e, dd4hep::SensitiveDetector sensDet) {
xml_det_t x_det = e;
std::string name = x_det.nameStr();
- DD4hep::Geometry::DetElement coneDet(name, x_det.id());
+ dd4hep::DetElement coneDet(name, x_det.id());
- DD4hep::Geometry::Volume experimentalHall = lcdd.pickMotherVolume(coneDet);
+ dd4hep::Volume experimentalHall = lcdd.pickMotherVolume(coneDet);
xml_comp_t coneDim(x_det.child(_U(dimensions)));
- DD4hep::Geometry::Cone cone(coneDim.dz(), coneDim.rmin1(), coneDim.rmax1(), coneDim.rmin2(), coneDim.rmax2());
+ dd4hep::Cone cone(coneDim.dz(), coneDim.rmin1(), coneDim.rmax1(), coneDim.rmin2(), coneDim.rmax2());
- DD4hep::Geometry::Volume coneVol(x_det.nameStr() + "_SimpleCone", cone, lcdd.material(coneDim.materialStr()));
+ dd4hep::Volume coneVol(x_det.nameStr() + "_SimpleCone", cone, lcdd.material(coneDim.materialStr()));
if (x_det.isSensitive()) {
- DD4hep::XML::Dimension sdType(x_det.child(_U(sensitive)));
+ dd4hep::xml::Dimension sdType(x_det.child(_U(sensitive)));
coneVol.setSensitiveDetector(sensDet);
sensDet.setType(sdType.typeStr());
}
- DD4hep::Geometry::PlacedVolume conePhys;
+ dd4hep::PlacedVolume conePhys;
double zoff = coneDim.z_offset();
if (fabs(zoff) > 0.000000000001) {
@@ -36,9 +36,9 @@ createSimpleCone(DD4hep::Geometry::LCDD& lcdd, xml_h e, DD4hep::Geometry::Sensit
reflectionAngle = M_PI;
}
}
- DD4hep::Geometry::Position trans(0., 0., zoff);
+ dd4hep::Position trans(0., 0., zoff);
conePhys =
- experimentalHall.placeVolume(coneVol, DD4hep::Geometry::Transform3D(DD4hep::Geometry::RotationX(reflectionAngle), trans));
+ experimentalHall.placeVolume(coneVol, dd4hep::Transform3D(dd4hep::RotationX(reflectionAngle), trans));
} else
conePhys = experimentalHall.placeVolume(coneVol);
diff --git a/Detector/DetCommon/src/SimpleCylinder_geo.cpp b/Detector/DetCommon/src/SimpleCylinder_geo.cpp
index 706281221..5ed79294e 100644
--- a/Detector/DetCommon/src/SimpleCylinder_geo.cpp
+++ b/Detector/DetCommon/src/SimpleCylinder_geo.cpp
@@ -5,35 +5,35 @@ namespace det {
Simple cylinder using Tube to be used to define cylinder composed of 1 single material
@author Clement Helsens
**/
-static DD4hep::Geometry::Ref_t
-createSimpleCylinder(DD4hep::Geometry::LCDD& lcdd, xml_h e, DD4hep::Geometry::SensitiveDetector sensDet) {
+static dd4hep::Ref_t
+createSimpleCylinder(dd4hep::Detector& lcdd, xml_h e, dd4hep::SensitiveDetector sensDet) {
xml_det_t x_det = e;
std::string name = x_det.nameStr();
- DD4hep::Geometry::DetElement cylinderDet(name, x_det.id());
+ dd4hep::DetElement cylinderDet(name, x_det.id());
- DD4hep::Geometry::Volume experimentalHall = lcdd.pickMotherVolume(cylinderDet);
+ dd4hep::Volume experimentalHall = lcdd.pickMotherVolume(cylinderDet);
xml_comp_t cylinderDim(x_det.child(_U(dimensions)));
- DD4hep::Geometry::Tube cylinder(
+ dd4hep::Tube cylinder(
cylinderDim.rmin(), cylinderDim.rmax(), cylinderDim.dz(), cylinderDim.phi0(), cylinderDim.deltaphi());
- DD4hep::Geometry::Volume cylinderVol(
+ dd4hep::Volume cylinderVol(
x_det.nameStr() + "_SimpleCylinder", cylinder, lcdd.material(cylinderDim.materialStr()));
if (x_det.isSensitive()) {
- DD4hep::XML::Dimension sdType(x_det.child(_U(sensitive)));
+ dd4hep::xml::Dimension sdType(x_det.child(_U(sensitive)));
cylinderVol.setSensitiveDetector(sensDet);
sensDet.setType(sdType.typeStr());
}
- DD4hep::Geometry::PlacedVolume cylinderPhys;
+ dd4hep::PlacedVolume cylinderPhys;
double zoff = cylinderDim.z_offset();
if (fabs(zoff) > 0.000000000001) {
- DD4hep::Geometry::Position trans(0., 0., zoff);
+ dd4hep::Position trans(0., 0., zoff);
cylinderPhys = experimentalHall.placeVolume(cylinderVol,
- DD4hep::Geometry::Transform3D(DD4hep::Geometry::RotationZ(0.), trans));
+ dd4hep::Transform3D(dd4hep::RotationZ(0.), trans));
} else
cylinderPhys = experimentalHall.placeVolume(cylinderVol);
diff --git a/Detector/DetCommon/src/SimpleLayeredCylinder_geo.cpp b/Detector/DetCommon/src/SimpleLayeredCylinder_geo.cpp
index adf4ee5cf..f6f85b9bd 100644
--- a/Detector/DetCommon/src/SimpleLayeredCylinder_geo.cpp
+++ b/Detector/DetCommon/src/SimpleLayeredCylinder_geo.cpp
@@ -13,38 +13,38 @@ Expected xml structure:
@author: Joschka Lingemann
*/
-static DD4hep::Geometry::Ref_t createSimpleLayeredCylinder(DD4hep::Geometry::LCDD& lcdd,
- DD4hep::XML::Handle_t xmlElement,
- DD4hep::Geometry::SensitiveDetector /*sensDet*/) {
- DD4hep::XML::DetElement xmlDet = static_cast(xmlElement);
+static dd4hep::Ref_t createSimpleLayeredCylinder(dd4hep::Detector& lcdd,
+ dd4hep::xml::Handle_t xmlElement,
+ dd4hep::SensitiveDetector /*sensDet*/) {
+ dd4hep::xml::DetElement xmlDet = static_cast(xmlElement);
std::string name = xmlDet.nameStr();
- DD4hep::Geometry::DetElement detElement(name, xmlDet.id());
- DD4hep::Geometry::Volume experimentalHall = lcdd.pickMotherVolume(detElement);
+ dd4hep::DetElement detElement(name, xmlDet.id());
+ dd4hep::Volume experimentalHall = lcdd.pickMotherVolume(detElement);
xml_comp_t dimensions(xmlDet.dimensions());
- DD4hep::Geometry::Tube envelope(dimensions.rmin(), dimensions.rmax(), dimensions.dz());
- DD4hep::Geometry::Volume envVolume(name, envelope, lcdd.material(dimensions.materialStr()));
+ dd4hep::Tube envelope(dimensions.rmin(), dimensions.rmax(), dimensions.dz());
+ dd4hep::Volume envVolume(name, envelope, lcdd.material(dimensions.materialStr()));
// Create layer cylinders with their respective material, etc
auto layers = xmlElement.children(_Unicode(layer));
auto numLayers = xmlElement.numChildren(_Unicode(layer), true);
// Joschka: Although this is awkward, it was the only way to loop through children I could find
- DD4hep::XML::Handle_t layer(layers.reset());
+ dd4hep::xml::Handle_t layer(layers.reset());
for (unsigned layerIdx = 0; layerIdx < numLayers; ++layerIdx) {
- DD4hep::XML::DetElement layerDet = static_cast(layer);
- DD4hep::Geometry::Tube layerShape(layerDet.rmin(), layerDet.rmax(), layerDet.dz());
- std::string layerName = DD4hep::XML::_toString(layerIdx, "layer%d");
- DD4hep::Geometry::Volume layerVolume(layerName, layerShape, lcdd.material(layer.attr("material")));
- DD4hep::Geometry::Position transLayer(0., 0., layerDet.z_offset());
- envVolume.placeVolume(layerVolume, DD4hep::Geometry::Transform3D(DD4hep::Geometry::RotationZ(0.), transLayer));
+ dd4hep::xml::DetElement layerDet = static_cast(layer);
+ dd4hep::Tube layerShape(layerDet.rmin(), layerDet.rmax(), layerDet.dz());
+ std::string layerName = dd4hep::xml::_toString(layerIdx, "layer%d");
+ dd4hep::Volume layerVolume(layerName, layerShape, lcdd.material(layer.attr("material")));
+ dd4hep::Position transLayer(0., 0., layerDet.z_offset());
+ envVolume.placeVolume(layerVolume, dd4hep::Transform3D(dd4hep::RotationZ(0.), transLayer));
if (layer.hasAttr("vis")) {
layerVolume.setVisAttributes(lcdd, layerDet.visStr());
}
layer.m_node = layers.next();
}
- DD4hep::Geometry::Position trans(0., 0., dimensions.z_offset());
- DD4hep::Geometry::PlacedVolume envPhys =
- experimentalHall.placeVolume(envVolume, DD4hep::Geometry::Transform3D(DD4hep::Geometry::RotationZ(0.), trans));
+ dd4hep::Position trans(0., 0., dimensions.z_offset());
+ dd4hep::PlacedVolume envPhys =
+ experimentalHall.placeVolume(envVolume, dd4hep::Transform3D(dd4hep::RotationZ(0.), trans));
envPhys.addPhysVolID("system", xmlDet.id());
detElement.setPlacement(envPhys);
detElement.setVisAttributes(lcdd, xmlDet.visStr(), envVolume);
diff --git a/Detector/DetCommon/src/SimpleParallelogram_geo.cpp b/Detector/DetCommon/src/SimpleParallelogram_geo.cpp
index f4d18c2e0..937b4fc71 100644
--- a/Detector/DetCommon/src/SimpleParallelogram_geo.cpp
+++ b/Detector/DetCommon/src/SimpleParallelogram_geo.cpp
@@ -5,13 +5,13 @@ namespace det {
Simple parallelogram using dimensions to be used to define cone composed of 1 single material
@author Clement Helsens
**/
-static DD4hep::Geometry::Ref_t
-createSimpleParallelogram(DD4hep::Geometry::LCDD& lcdd, xml_h e, DD4hep::Geometry::SensitiveDetector) {
+static dd4hep::Ref_t
+createSimpleParallelogram(dd4hep::Detector& lcdd, xml_h e, dd4hep::SensitiveDetector) {
xml_det_t x_det = e;
std::string name = x_det.nameStr();
- DD4hep::Geometry::DetElement parallelogramDet(name, x_det.id());
+ dd4hep::DetElement parallelogramDet(name, x_det.id());
- DD4hep::Geometry::Volume experimentalHall = lcdd.pickMotherVolume(parallelogramDet);
+ dd4hep::Volume experimentalHall = lcdd.pickMotherVolume(parallelogramDet);
xml_comp_t parallelogramDim(x_det.child(_U(dimensions)));
/// correct implementation but bug in the xml parser??
@@ -33,19 +33,19 @@ createSimpleParallelogram(DD4hep::Geometry::LCDD& lcdd, xml_h e, DD4hep::Geometr
parallelogramDim.x1() + parallelogramDim.dx(),
parallelogramDim.y1()};
- DD4hep::Geometry::EightPointSolid parallelogram(parallelogramDim.dz(), parallelogramPoints.data());
+ dd4hep::EightPointSolid parallelogram(parallelogramDim.dz(), parallelogramPoints.data());
- DD4hep::Geometry::Volume parallelogramVol(
+ dd4hep::Volume parallelogramVol(
x_det.nameStr() + "_SimpleParallelogram", parallelogram, lcdd.material(parallelogramDim.materialStr()));
- DD4hep::Geometry::PlacedVolume parallelogramPhys;
+ dd4hep::PlacedVolume parallelogramPhys;
double zoff = parallelogramDim.z_offset();
if (fabs(zoff) > 0.000000000001) {
- DD4hep::Geometry::Position trans(0., 0., zoff);
+ dd4hep::Position trans(0., 0., zoff);
parallelogramPhys = experimentalHall.placeVolume(
- parallelogramVol, DD4hep::Geometry::Transform3D(DD4hep::Geometry::RotationZ(0.), trans));
+ parallelogramVol, dd4hep::Transform3D(dd4hep::RotationZ(0.), trans));
} else
parallelogramPhys = experimentalHall.placeVolume(parallelogramVol);
diff --git a/Detector/DetCommon/src/SubtractedCylinder_geo.cpp b/Detector/DetCommon/src/SubtractedCylinder_geo.cpp
index 5b43b7b63..63ce30243 100644
--- a/Detector/DetCommon/src/SubtractedCylinder_geo.cpp
+++ b/Detector/DetCommon/src/SubtractedCylinder_geo.cpp
@@ -7,24 +7,24 @@ rmin1, rmax1, z1 dimensions of the enveloping cylinder
rmin2, rmax2, z2 dimensions of the cylinder to be subtracted
@author: Joschka Lingemann
*/
-static DD4hep::Geometry::Ref_t createSubtractedCylinder(DD4hep::Geometry::LCDD& lcdd,
- DD4hep::XML::Handle_t xmlElement,
- DD4hep::Geometry::SensitiveDetector /*sensDet*/) {
- DD4hep::XML::DetElement xmlDet = static_cast(xmlElement);
+static dd4hep::Ref_t createSubtractedCylinder(dd4hep::Detector& lcdd,
+ dd4hep::xml::Handle_t xmlElement,
+ dd4hep::SensitiveDetector /*sensDet*/) {
+ dd4hep::xml::DetElement xmlDet = static_cast(xmlElement);
std::string name = xmlDet.nameStr();
- DD4hep::Geometry::DetElement detElement(name, xmlDet.id());
- DD4hep::Geometry::Volume experimentalHall = lcdd.pickMotherVolume(detElement);
+ dd4hep::DetElement detElement(name, xmlDet.id());
+ dd4hep::Volume experimentalHall = lcdd.pickMotherVolume(detElement);
xml_comp_t dimensions(xmlDet.dimensions());
- DD4hep::Geometry::Tube envelope(dimensions.rmin1(), dimensions.rmax1(), dimensions.z1());
- DD4hep::Geometry::Tube negative(dimensions.rmin2(), dimensions.rmax2(), dimensions.z2());
+ dd4hep::Tube envelope(dimensions.rmin1(), dimensions.rmax1(), dimensions.z1());
+ dd4hep::Tube negative(dimensions.rmin2(), dimensions.rmax2(), dimensions.z2());
- DD4hep::Geometry::SubtractionSolid finalShape(envelope, negative);
- DD4hep::Geometry::Volume cylVolume(name, finalShape, lcdd.material(dimensions.materialStr()));
+ dd4hep::SubtractionSolid finalShape(envelope, negative);
+ dd4hep::Volume cylVolume(name, finalShape, lcdd.material(dimensions.materialStr()));
- DD4hep::Geometry::Position trans(0., 0., dimensions.z_offset());
- DD4hep::Geometry::PlacedVolume conePhys =
- experimentalHall.placeVolume(cylVolume, DD4hep::Geometry::Transform3D(DD4hep::Geometry::RotationZ(0.), trans));
+ dd4hep::Position trans(0., 0., dimensions.z_offset());
+ dd4hep::PlacedVolume conePhys =
+ experimentalHall.placeVolume(cylVolume, dd4hep::Transform3D(dd4hep::RotationZ(0.), trans));
conePhys.addPhysVolID("system", xmlDet.id());
detElement.setPlacement(conePhys);
diff --git a/Detector/DetCommon/src/TestBox1_geo.cpp b/Detector/DetCommon/src/TestBox1_geo.cpp
index 4c678dd01..c08e0cbb0 100644
--- a/Detector/DetCommon/src/TestBox1_geo.cpp
+++ b/Detector/DetCommon/src/TestBox1_geo.cpp
@@ -10,10 +10,9 @@
#include "XML/Layering.h"
using namespace std;
-using namespace DD4hep;
-using namespace DD4hep::Geometry;
+using namespace dd4hep;
-static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector /*sens*/) {
+static Ref_t create_detector(Detector& lcdd, xml_h e, SensitiveDetector /*sens*/) {
xml_det_t x_det = e;
string det_name = x_det.nameStr();
string det_type = x_det.typeStr();
diff --git a/Detector/DetComponents/src/CreateVolumePositions.cpp b/Detector/DetComponents/src/CreateVolumePositions.cpp
index 7118a5123..691a69e59 100644
--- a/Detector/DetComponents/src/CreateVolumePositions.cpp
+++ b/Detector/DetComponents/src/CreateVolumePositions.cpp
@@ -5,7 +5,7 @@
#include "DetInterface/IGeoSvc.h"
// DD4hep
-#include "DD4hep/LCDD.h"
+#include "DD4hep/Detector.h"
#include "DD4hep/Volumes.h"
#include "TGeoManager.h"
@@ -45,13 +45,13 @@ StatusCode CreateVolumePositions::execute() {
auto edmPositionedHitCollection = m_positionedHits.createAndPut();
uint64_t cellid = 0;
- DD4hep::Geometry::VolumeManager volman = m_geoSvc->lcdd()->volumeManager();
+ dd4hep::VolumeManager volman = m_geoSvc->lcdd()->volumeManager();
// Loop though hits, retrieve volume position from cellID
for (const auto& cell : *hits) {
cellid = cell.core().cellId;
auto detelement = volman.lookupDetElement(cellid);
- const auto& transformMatrix = detelement.worldTransformation();
+ const auto& transformMatrix = detelement.nominal().worldTransformation();
double outGlobal[3];
double inLocal[] = {0, 0, 0};
transformMatrix.LocalToMaster(inLocal, outGlobal);
diff --git a/Detector/DetComponents/src/CreateVolumePositions.h b/Detector/DetComponents/src/CreateVolumePositions.h
index ea2b2dbf1..da449564c 100644
--- a/Detector/DetComponents/src/CreateVolumePositions.h
+++ b/Detector/DetComponents/src/CreateVolumePositions.h
@@ -13,7 +13,7 @@ class IGeoSvc;
*
* Retrieve positions of the volumes from cell ID.
* This algorithm saves the centre position of the volume. No segmentation of volume is taken into account.
- * Transformation matrix from global coordinates to local is taken from DD4hep::Geometry::DetElement.
+ * Transformation matrix from global coordinates to local is taken from dd4hep::DetElement.
* Full hierarchy of DetElements (for each sensitive volume) is required.
*
* @author Anna Zaborowska
diff --git a/Detector/DetComponents/src/GeoConstruction.cpp b/Detector/DetComponents/src/GeoConstruction.cpp
index 92367ad19..04c104679 100644
--- a/Detector/DetComponents/src/GeoConstruction.cpp
+++ b/Detector/DetComponents/src/GeoConstruction.cpp
@@ -3,7 +3,7 @@
#include
// DD4hep
-#include "DD4hep/LCDD.h"
+#include "DD4hep/Detector.h"
#include "DD4hep/Plugins.h"
#include "DDG4/Geant4Converter.h"
#include "TGeoManager.h"
@@ -14,31 +14,32 @@
#include "G4VSensitiveDetector.hh"
namespace det {
-GeoConstruction::GeoConstruction(DD4hep::Geometry::LCDD& lcdd) : m_lcdd(lcdd) {}
+
+GeoConstruction::GeoConstruction(dd4hep::Detector& lcdd) : m_lcdd(lcdd) {}
GeoConstruction::~GeoConstruction() {}
-// method borrowed from DD4hep::Simulation::Geant4DetectorSensitivesConstruction
+// method borrowed from dd4hep::sim::Geant4DetectorSensitivesConstruction
// ::constructSensitives(Geant4DetectorConstructionContext* ctxt)
void GeoConstruction::ConstructSDandField() {
- typedef DD4hep::Geometry::GeoHandlerTypes::SensitiveVolumes _SV;
- typedef DD4hep::Geometry::GeoHandlerTypes::ConstVolumeSet VolSet;
- DD4hep::Simulation::Geant4GeometryInfo* p = DD4hep::Simulation::Geant4Mapping::instance().ptr();
+ typedef std::set VolSet;
+ typedef std::map _SV;
+ dd4hep::sim::Geant4GeometryInfo* p = dd4hep::sim::Geant4Mapping::instance().ptr();
_SV& vols = p->sensitives;
for (_SV::const_iterator iv = vols.begin(); iv != vols.end(); ++iv) {
- DD4hep::Geometry::SensitiveDetector sd = (*iv).first;
+ dd4hep::SensitiveDetector sd = (*iv).first;
std::string typ = sd.type(), nam = sd.name();
// Sensitive detectors are deleted in ~G4SDManager
- G4VSensitiveDetector* g4sd = DD4hep::PluginService::Create(typ, nam, &m_lcdd);
+ G4VSensitiveDetector* g4sd = dd4hep::PluginService::Create(typ, nam, &m_lcdd);
if (g4sd == nullptr) {
std::string tmp = typ;
tmp[0] = ::toupper(tmp[0]);
typ = "Geant4" + tmp;
- g4sd = DD4hep::PluginService::Create(typ, nam, &m_lcdd);
+ g4sd = dd4hep::PluginService::Create(typ, nam, &m_lcdd);
if (g4sd == nullptr) {
- DD4hep::PluginDebug dbg;
- g4sd = DD4hep::PluginService::Create(typ, nam, &m_lcdd);
+ dd4hep::PluginDebug dbg;
+ g4sd = dd4hep::PluginService::Create(typ, nam, &m_lcdd);
if (g4sd == nullptr) {
throw std::runtime_error("ConstructSDandField: FATAL Failed to "
"create Geant4 sensitive detector " +
@@ -62,12 +63,12 @@ void GeoConstruction::ConstructSDandField() {
}
}
-// method borrowed from DD4hep::Simulation::Geant4DetectorConstruction::Construct()
+// method borrowed from dd4hep::sim::Geant4DetectorConstruction::Construct()
G4VPhysicalVolume* GeoConstruction::Construct() {
- DD4hep::Simulation::Geant4Mapping& g4map = DD4hep::Simulation::Geant4Mapping::instance();
- DD4hep::Geometry::DetElement world = m_lcdd.world();
- DD4hep::Simulation::Geant4Converter conv(m_lcdd, DD4hep::DEBUG);
- DD4hep::Simulation::Geant4GeometryInfo* geo_info = conv.create(world).detach();
+ dd4hep::sim::Geant4Mapping& g4map = dd4hep::sim::Geant4Mapping::instance();
+ dd4hep::DetElement world = m_lcdd.world();
+ dd4hep::sim::Geant4Converter conv(m_lcdd, dd4hep::DEBUG);
+ dd4hep::sim::Geant4GeometryInfo* geo_info = conv.create(world).detach();
g4map.attach(geo_info);
// All volumes are deleted in ~G4PhysicalVolumeStore()
G4VPhysicalVolume* m_world = geo_info->world();
diff --git a/Detector/DetComponents/src/GeoConstruction.h b/Detector/DetComponents/src/GeoConstruction.h
index 9f67efa84..def876238 100644
--- a/Detector/DetComponents/src/GeoConstruction.h
+++ b/Detector/DetComponents/src/GeoConstruction.h
@@ -7,10 +7,8 @@
// Geant4
#include "G4VUserDetectorConstruction.hh"
-namespace DD4hep {
-namespace Geometry {
-class LCDD;
-}
+namespace dd4hep {
+class Detector;
}
/** @class GeoConstruction DetectorDescription/DetDesServices/src/GeoConstruction.h GeoConstruction.h
*
@@ -26,7 +24,7 @@ namespace det {
class GeoConstruction : public G4VUserDetectorConstruction {
public:
/// Constructor
- GeoConstruction(DD4hep::Geometry::LCDD& lcdd);
+ GeoConstruction(dd4hep::Detector& lcdd);
/// Default destructor
virtual ~GeoConstruction();
/// Geometry construction callback: Invoke the conversion to Geant4
@@ -37,7 +35,7 @@ class GeoConstruction : public G4VUserDetectorConstruction {
private:
/// Reference to geometry object
- DD4hep::Geometry::LCDD& m_lcdd;
+ dd4hep::Detector& m_lcdd;
};
}
#endif /* DETDESSERVICES_GEOCONSTRUCTION_H */
diff --git a/Detector/DetComponents/src/GeoSvc.cpp b/Detector/DetComponents/src/GeoSvc.cpp
index aefc279ca..88c11ecfb 100644
--- a/Detector/DetComponents/src/GeoSvc.cpp
+++ b/Detector/DetComponents/src/GeoSvc.cpp
@@ -30,7 +30,7 @@ StatusCode GeoSvc::initialize() {
TGeoManager::SetVerboseLevel(0);
}
uint printoutLevel = msgLevel();
- DD4hep::setPrintLevel(DD4hep::PrintLevel(printoutLevel));
+ dd4hep::setPrintLevel(dd4hep::PrintLevel(printoutLevel));
m_incidentSvc->addListener(this, "GeometryFailure");
if (buildDD4HepGeo().isFailure())
m_log << MSG::ERROR << "Could not build DD4Hep geometry" << endmsg;
@@ -51,7 +51,7 @@ StatusCode GeoSvc::finalize() { return StatusCode::SUCCESS; }
StatusCode GeoSvc::buildDD4HepGeo() {
// we retrieve the the static instance of the DD4HEP::Geometry
- m_dd4hepgeo = &(DD4hep::Geometry::LCDD::getInstance());
+ m_dd4hepgeo = &(dd4hep::Detector::getInstance());
m_dd4hepgeo->addExtension(this);
// load geometry
@@ -65,9 +65,9 @@ StatusCode GeoSvc::buildDD4HepGeo() {
return StatusCode::SUCCESS;
}
-DD4hep::Geometry::LCDD* GeoSvc::lcdd() { return (m_dd4hepgeo); }
+dd4hep::Detector* GeoSvc::lcdd() { return (m_dd4hepgeo); }
-DD4hep::Geometry::DetElement GeoSvc::getDD4HepGeo() { return (lcdd()->world()); }
+dd4hep::DetElement GeoSvc::getDD4HepGeo() { return (lcdd()->world()); }
StatusCode GeoSvc::buildGeant4Geo() {
std::shared_ptr detector(new det::GeoConstruction(*lcdd()));
diff --git a/Detector/DetComponents/src/GeoSvc.h b/Detector/DetComponents/src/GeoSvc.h
index 1e3d74f5f..5303889df 100644
--- a/Detector/DetComponents/src/GeoSvc.h
+++ b/Detector/DetComponents/src/GeoSvc.h
@@ -21,7 +21,7 @@
#include "GaudiKernel/ServiceHandle.h"
// DD4Hep
-#include "DD4hep/LCDD.h"
+#include "DD4hep/Detector.h"
// Geant4
#include "G4RunManager.hh"
@@ -44,8 +44,8 @@ class GeoSvc : public extends2 {
/// This function generates the Geant4 geometry
StatusCode buildGeant4Geo();
// receive DD4hep Geometry
- virtual DD4hep::Geometry::DetElement getDD4HepGeo() override;
- virtual DD4hep::Geometry::LCDD* lcdd() override;
+ virtual dd4hep::DetElement getDD4HepGeo() override;
+ virtual dd4hep::Detector* lcdd() override;
// receive Geant4 Geometry
virtual G4VUserDetectorConstruction* getGeant4Geo() override;
/// Inform that a new incident has occurred
@@ -55,7 +55,7 @@ class GeoSvc : public extends2 {
/// Pointer to the incident service
ServiceHandle m_incidentSvc;
/// Pointer to the interface to the DD4hep geometry
- DD4hep::Geometry::LCDD* m_dd4hepgeo;
+ dd4hep::Detector* m_dd4hepgeo;
/// Pointer to the detector construction of DDG4
std::shared_ptr m_geant4geo;
/// XML-files with the detector description
diff --git a/Detector/DetComponents/src/MaterialScan.cpp b/Detector/DetComponents/src/MaterialScan.cpp
index 5895ad998..b0498d274 100644
--- a/Detector/DetComponents/src/MaterialScan.cpp
+++ b/Detector/DetComponents/src/MaterialScan.cpp
@@ -6,9 +6,10 @@
#include "GaudiKernel/RndmGenerators.h"
#include "GaudiKernel/Service.h"
-#include "DD4hep/LCDD.h"
+#include "DD4hep/Detector.h"
#include "DD4hep/Printout.h"
#include "DDRec/MaterialManager.h"
+#include "DDSurfaces/Vector3D.h"
#include "TFile.h"
#include "TMath.h"
@@ -58,7 +59,7 @@ StatusCode MaterialScan::initialize() {
tree->Branch("material", &materialPtr);
auto lcdd = m_geoSvc->lcdd();
- DD4hep::DDRec::MaterialManager matMgr;
+ dd4hep::rec::MaterialManager matMgr;
DDSurfaces::Vector3D beginning(0, 0, 0);
auto boundaryVol = lcdd->detector(m_envelopeName).volume()->GetShape();
std::array pos = {0, 0, 0};
@@ -72,7 +73,7 @@ StatusCode MaterialScan::initialize() {
matDepth->clear();
material->clear();
- std::map phiAveragedMaterialsBetween;
+ std::map phiAveragedMaterialsBetween;
for (int iPhi = 0; iPhi < m_nPhiTrials; ++iPhi) {
phi = m_flatPhiDist();
vec.SetPtEtaPhi(1, eta, phi);
@@ -87,7 +88,7 @@ StatusCode MaterialScan::initialize() {
DDSurfaces::Vector3D end(dir[0] * distance, dir[1] * distance, dir[2] * distance);
debug() << "Calculating material between 0 and (" << end.x() << ", " << end.y() << ", " << end.z()
<< ") <=> eta = " << eta << ", phi = " << phi << endmsg;
- const DD4hep::DDRec::MaterialVec& materials = matMgr.materialsBetween(beginning, end);
+ const dd4hep::rec::MaterialVec& materials = matMgr.materialsBetween(beginning, end);
for (unsigned i = 0, n = materials.size(); i < n; ++i) {
phiAveragedMaterialsBetween[materials[i].first] += materials[i].second / static_cast(m_nPhiTrials);
}
diff --git a/Detector/DetComponents/src/MergeCells.cpp b/Detector/DetComponents/src/MergeCells.cpp
index 438c8e068..f0c471113 100644
--- a/Detector/DetComponents/src/MergeCells.cpp
+++ b/Detector/DetComponents/src/MergeCells.cpp
@@ -7,7 +7,7 @@
#include "datamodel/CaloHitCollection.h"
// DD4hep
-#include "DD4hep/LCDD.h"
+#include "DD4hep/Detector.h"
DECLARE_ALGORITHM_FACTORY(MergeCells)
@@ -40,7 +40,7 @@ StatusCode MergeCells::initialize() {
// check if identifier exists in the decoder
auto itIdentifier = std::find_if(m_descriptor.fields().begin(),
m_descriptor.fields().end(),
- [this](const std::pair& field) {
+ [this](const std::pair& field) {
return bool(field.first.compare(m_idToMerge) == 0);
});
if (itIdentifier == m_descriptor.fields().end()) {
diff --git a/Detector/DetComponents/src/MergeCells.h b/Detector/DetComponents/src/MergeCells.h
index e8ee59e15..ac75d2a0c 100644
--- a/Detector/DetComponents/src/MergeCells.h
+++ b/Detector/DetComponents/src/MergeCells.h
@@ -56,7 +56,7 @@ class MergeCells : public GaudiAlgorithm {
/// Handle for the EDM Hits to be written
DataHandle m_outHits{"hits/caloOutHits", Gaudi::DataHandle::Writer, this};
// Handle to the detector ID descriptor
- DD4hep::Geometry::IDDescriptor m_descriptor;
+ dd4hep::IDDescriptor m_descriptor;
/// Name of the detector readout
Gaudi::Property m_readoutName{this, "readout", "", "Name of the detector readout"};
/// Identifier to be merged
diff --git a/Detector/DetComponents/src/MergeLayers.cpp b/Detector/DetComponents/src/MergeLayers.cpp
index f0f1c5c03..e78c48059 100644
--- a/Detector/DetComponents/src/MergeLayers.cpp
+++ b/Detector/DetComponents/src/MergeLayers.cpp
@@ -8,7 +8,7 @@
#include "datamodel/CaloHitCollection.h"
// DD4hep
-#include "DD4hep/LCDD.h"
+#include "DD4hep/Detector.h"
// ROOT
#include "TGeoManager.h"
@@ -47,7 +47,7 @@ StatusCode MergeLayers::initialize() {
// check if identifier exists in the decoder
auto itIdentifier = std::find_if(m_descriptor.fields().begin(),
m_descriptor.fields().end(),
- [this](const std::pair& field) {
+ [this](const std::pair& field) {
return bool(field.first.compare(m_idToMerge) == 0);
});
if (itIdentifier == m_descriptor.fields().end()) {
diff --git a/Detector/DetComponents/src/MergeLayers.h b/Detector/DetComponents/src/MergeLayers.h
index 62493488f..e54dd8a94 100644
--- a/Detector/DetComponents/src/MergeLayers.h
+++ b/Detector/DetComponents/src/MergeLayers.h
@@ -60,7 +60,7 @@ class MergeLayers : public GaudiAlgorithm {
/// Handle for the EDM Hits to be written
DataHandle m_outHits{"hits/caloOutHits", Gaudi::DataHandle::Writer, this};
// Handle to the detector ID descriptor
- DD4hep::Geometry::IDDescriptor m_descriptor;
+ dd4hep::IDDescriptor m_descriptor;
/// Name of the detector readout
Gaudi::Property m_readoutName{this, "readout", "", "Name of the detector readout"};
/// Identifier to be merged
diff --git a/Detector/DetComponents/src/RedoSegmentation.cpp b/Detector/DetComponents/src/RedoSegmentation.cpp
index 62714f28a..b22163226 100644
--- a/Detector/DetComponents/src/RedoSegmentation.cpp
+++ b/Detector/DetComponents/src/RedoSegmentation.cpp
@@ -9,7 +9,7 @@
#include "datamodel/PositionedCaloHitCollection.h"
// DD4hep
-#include "DD4hep/LCDD.h"
+#include "DD4hep/Detector.h"
#include "DDSegmentation/Segmentation.h"
DECLARE_ALGORITHM_FACTORY(RedoSegmentation)
@@ -39,8 +39,7 @@ StatusCode RedoSegmentation::initialize() {
return StatusCode::FAILURE;
}
// Take readout, bitfield from GeoSvc
- m_oldDecoder = std::shared_ptr(
- m_geoSvc->lcdd()->readout(m_oldReadoutName).idSpec().decoder());
+ m_oldDecoder = m_geoSvc->lcdd()->readout(m_oldReadoutName).idSpec().decoder();
// segmentation identifiers to be overwritten
if (m_oldIdentifiers.size() == 0) {
// it is not an error, maybe no segmentation was used previously
@@ -93,7 +92,7 @@ StatusCode RedoSegmentation::execute() {
debug() << "OLD: " << m_oldDecoder->valueString() << endmsg;
}
// factor 10 to convert mm to cm
- DD4hep::DDSegmentation::Vector3D position(hit.position().x / 10, hit.position().y / 10, hit.position().z / 10);
+ dd4hep::DDSegmentation::Vector3D position(hit.position().x / 10, hit.position().y / 10, hit.position().z / 10);
// first calculate proper segmentation fields
uint64_t newcellId = m_segmentation->cellID(position, position, volumeID(hit.cellId()));
m_segmentation->decoder()->setValue(newcellId);
@@ -111,7 +110,9 @@ StatusCode RedoSegmentation::execute() {
return StatusCode::SUCCESS;
}
-StatusCode RedoSegmentation::finalize() { return GaudiAlgorithm::finalize(); }
+StatusCode RedoSegmentation::finalize() {
+ info() << "RedoSegmentation finalize! " << endmsg;
+ return GaudiAlgorithm::finalize(); }
uint64_t RedoSegmentation::volumeID(uint64_t aCellId) const {
m_oldDecoder->setValue(aCellId);
diff --git a/Detector/DetComponents/src/RedoSegmentation.h b/Detector/DetComponents/src/RedoSegmentation.h
index 7fada6737..cf1238ba1 100644
--- a/Detector/DetComponents/src/RedoSegmentation.h
+++ b/Detector/DetComponents/src/RedoSegmentation.h
@@ -11,7 +11,7 @@ class IGeoSvc;
// DD4hep
#include "DD4hep/Readout.h"
-namespace DD4hep {
+namespace dd4hep {
namespace DDSegmentation {
class Segmentation;
}
@@ -68,14 +68,14 @@ class RedoSegmentation : public GaudiAlgorithm {
/// Handle for the EDM hits to be written
DataHandle m_outHits{"hits/caloOutHits", Gaudi::DataHandle::Writer, this};
/// New segmentation
- DD4hep::DDSegmentation::Segmentation* m_segmentation;
+ dd4hep::DDSegmentation::Segmentation* m_segmentation;
/// Name of the detector readout used in simulation
Gaudi::Property m_oldReadoutName{this, "oldReadoutName", "",
"Name of the detector readout used in simulation"};
/// Name of the new detector readout
Gaudi::Property m_newReadoutName{this, "newReadoutName", "", "Name of the new detector readout"};
/// Old bitfield decoder
- std::shared_ptr m_oldDecoder;
+ dd4hep::DDSegmentation::BitField64* m_oldDecoder;
/// Segmentation fields that are going to be replaced by the new segmentation
Gaudi::Property> m_oldIdentifiers{
this, "oldSegmentationIds", {}, "Segmentation fields that are going to be replaced by the new segmentation"};
diff --git a/Detector/DetComponents/src/TrackingGeoSvc.h b/Detector/DetComponents/src/TrackingGeoSvc.h
index e66a5c0c6..40b68e085 100644
--- a/Detector/DetComponents/src/TrackingGeoSvc.h
+++ b/Detector/DetComponents/src/TrackingGeoSvc.h
@@ -8,7 +8,7 @@
#include "GaudiKernel/Service.h"
// DD4Hep
-#include "DD4hep/LCDD.h"
+#include "DD4hep/Detector.h"
// DetectorDescription
#include "DetInterface/IGeoSvc.h"
@@ -20,11 +20,9 @@
* @author julia.hrdinka@cern.ch
*/
-namespace DD4hep {
-namespace Geometry {
+namespace dd4hep {
class DetElement;
}
-}
namespace Acts {
class TrackingGeometry;
@@ -42,15 +40,15 @@ class TrackingGeoSvc : public extends1 {
/// Finalize function
virtual StatusCode finalize() override final;
// receive DD4hep Geometry
- virtual std::shared_ptr trackingGeometry() const;
+ virtual std::shared_ptr trackingGeometry() const;
private:
// Tracking Geometry
- std::shared_ptr m_trackingGeo;
+ std::shared_ptr m_trackingGeo;
/// Handle to the FCC geometry service
ServiceHandle m_geoSvc;
};
-inline std::shared_ptr TrackingGeoSvc::trackingGeometry() const { return m_trackingGeo; }
+inline std::shared_ptr TrackingGeoSvc::trackingGeometry() const { return m_trackingGeo; }
#endif // TRACKINGSVC_TRACKINGSVC_H
diff --git a/Detector/DetComponents/tests/options/redoSegmentationXYZ.py b/Detector/DetComponents/tests/options/redoSegmentationXYZ.py
index c3b6d32ee..13aff4df3 100644
--- a/Detector/DetComponents/tests/options/redoSegmentationXYZ.py
+++ b/Detector/DetComponents/tests/options/redoSegmentationXYZ.py
@@ -16,7 +16,7 @@
dumper.hepmc.Path="hepmc"
from Configurables import GeoSvc
-geoservice = GeoSvc("GeoSvc", detectors=['file:Test/TestGeometry/data/TestBoxCaloSD_3readouts.xml'], OutputLevel = DEBUG)
+geoservice = GeoSvc("GeoSvc", detectors=['file:Test/TestGeometry/data/TestBoxCaloSD_3readouts.xml'], OutputLevel = INFO)
from Configurables import SimG4Svc
geantservice = SimG4Svc("SimG4Svc", physicslist='SimG4TestPhysicsList')
@@ -48,6 +48,7 @@
ApplicationMgr(EvtSel='NONE',
EvtMax=30,
- TopAlg=[reader, hepmc_converter, geantsim, resegment, out],
+ TopAlg=[reader, hepmc_converter, geantsim, resegment,
+ out],
ExtSvc = [podiosvc, geoservice, geantservice],
OutputLevel=DEBUG)
diff --git a/Detector/DetExtensions/CMakeLists.txt b/Detector/DetExtensions/CMakeLists.txt
deleted file mode 100644
index 0bcddfc4d..000000000
--- a/Detector/DetExtensions/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-################################################################################
-# Package: DetExtensions
-################################################################################
-gaudi_subdir(DetExtensions v1r0)
-
-gaudi_install_headers(DetExtensions)
-
-
diff --git a/Detector/DetExtensions/DetExtensions/DetCylinderLayer.h b/Detector/DetExtensions/DetExtensions/DetCylinderLayer.h
deleted file mode 100644
index 28b3e8a8f..000000000
--- a/Detector/DetExtensions/DetExtensions/DetCylinderLayer.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// DetCylinderLayer.h
-//
-//
-// Created by Julia Hrdinka on 12/12/14.
-//
-//
-
-#ifndef DET_DETCYLINDERLAYER_H
-#define DET_DETCYLINDERLAYER_H
-
-#include "DetExtensions/IDetExtension.h"
-
-namespace DD4hep {
-namespace Geometry {
-class DetElement;
-}
-}
-
-namespace Det {
-
-class DetCylinderLayer : public IDetExtension {
-
-public:
- DetCylinderLayer() {}
-
- DetCylinderLayer(const DetCylinderLayer&, const DD4hep::Geometry::DetElement&) {}
-
- virtual ~DetCylinderLayer() {}
-
- virtual ExtensionType type() { return ExtensionType::CylinderLayer; }
-};
-}
-
-#endif // DET_DETCYLINDERLAYER_H
diff --git a/Detector/DetExtensions/DetExtensions/DetCylinderVolume.h b/Detector/DetExtensions/DetExtensions/DetCylinderVolume.h
deleted file mode 100644
index 49d5b65b5..000000000
--- a/Detector/DetExtensions/DetExtensions/DetCylinderVolume.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// DetCylinderVolume.h
-//
-//
-// Created by Julia Hrdinka on 19/01/15.
-//
-//
-
-#ifndef DET_DETCYLINDERVOLUME_H
-#define DET_DETCYLINDERVOLUME_H
-
-#include "DetExtensions/IDetExtension.h"
-
-namespace DD4hep {
-namespace Geometry {
-class DetElement;
-}
-}
-
-namespace Det {
-
-class DetCylinderVolume : public IDetExtension {
-
-public:
- explicit DetCylinderVolume(int status) : m_status(status) {}
- DetCylinderVolume(const DetCylinderVolume& volume, const DD4hep::Geometry::DetElement&) {
- m_status = volume.m_status;
- }
- virtual ~DetCylinderVolume() {}
- int status() { return m_status; }
- virtual ExtensionType type() { return ExtensionType::CylinderVolume; }
-
-private:
- int m_status;
-};
-}
-
-#endif // DET_DETCYLINDERVOLUME_H
diff --git a/Detector/DetExtensions/DetExtensions/DetDiscLayer.h b/Detector/DetExtensions/DetExtensions/DetDiscLayer.h
deleted file mode 100644
index e4548a418..000000000
--- a/Detector/DetExtensions/DetExtensions/DetDiscLayer.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// DetDiscLayer.h
-//
-//
-// Created by Julia Hrdinka on 07/01/15.
-//
-//
-
-#ifndef DET_DETDISCLAYER
-#define DET_DETDISCLAYER
-
-#include "DetExtensions/IDetExtension.h"
-
-namespace DD4hep {
-namespace Geometry {
-class DetElement;
-}
-}
-
-namespace Det {
-
-class DetDiscLayer : public IDetExtension {
-
-public:
- DetDiscLayer() {}
-
- DetDiscLayer(const DetDiscLayer&, const DD4hep::Geometry::DetElement&) {}
-
- virtual ~DetDiscLayer() {}
-
- virtual ExtensionType type() { return ExtensionType::DiscLayer; }
-};
-}
-
-#endif // DET_DETDISCLAYER
diff --git a/Detector/DetExtensions/DetExtensions/DetDiscVolume.h b/Detector/DetExtensions/DetExtensions/DetDiscVolume.h
deleted file mode 100644
index 2326e3eda..000000000
--- a/Detector/DetExtensions/DetExtensions/DetDiscVolume.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// DetDiscVolume.h
-//
-//
-// Created by Julia Hrdinka on 19/01/15.
-//
-//
-
-#ifndef DET_DETDISCVOLUME_H
-#define DET_DETDISCVOLUME_H
-
-#include "DetExtensions/IDetExtension.h"
-
-namespace DD4hep {
-namespace Geometry {
-class DetElement;
-}
-}
-
-namespace Det {
-
-class DetDiscVolume : public IDetExtension {
-
-public:
- explicit DetDiscVolume(int status) : m_status(status) {}
- DetDiscVolume(const DetDiscVolume& volume, const DD4hep::Geometry::DetElement&) { m_status = volume.m_status; }
- virtual ~DetDiscVolume() {}
- int status() { return m_status; }
- virtual ExtensionType type() { return ExtensionType::DiscVolume; }
-
-private:
- int m_status;
-};
-}
-
-#endif // DET_DETDISCVOLUME_H
diff --git a/Detector/DetExtensions/DetExtensions/DetExtension.h b/Detector/DetExtensions/DetExtensions/DetExtension.h
deleted file mode 100644
index 402d57796..000000000
--- a/Detector/DetExtensions/DetExtensions/DetExtension.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// DetExtension.h
-//
-//
-// Created by Julia Hrdinka on 12/12/14.
-//
-//
-
-#ifndef DET_DETEXTENSION_H
-#define DET_DETEXTENSION_H
-
-#include "DetExtensions/IDetExtension.h"
-
-namespace DD4hep {
-namespace Geometry {
-class DetElement;
-}
-}
-
-namespace Det {
-
-class DetExtension : public IDetExtension {
-
-public:
- DetExtension() {}
- DetExtension(const DetExtension&, const DD4hep::Geometry::DetElement&) {}
- virtual ~DetExtension() {}
- virtual ExtensionType type() { return ExtensionType::None; }
-};
-}
-#endif // DET_DETEXTENSION_H
diff --git a/Detector/DetExtensions/DetExtensions/DetModule.h b/Detector/DetExtensions/DetExtensions/DetModule.h
deleted file mode 100644
index 002a7ebc3..000000000
--- a/Detector/DetExtensions/DetExtensions/DetModule.h
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// DetModule.h
-//
-//
-// Created by Julia Hrdinka on 16/12/14.
-//
-//
-
-#ifndef DET_DETMODULE_H
-#define DET_DETMODULE_H
-
-#include "DetExtensions/IDetExtension.h"
-
-namespace DD4hep {
-namespace Geometry {
-class DetElement;
-}
-}
-
-namespace Det {
-
-class DetModule : public IDetExtension {
-
-public:
- DetModule() {}
-
- DetModule(const DetModule&, const DD4hep::Geometry::DetElement&) {}
-
- virtual ~DetModule() {}
-
- virtual ExtensionType type() { return ExtensionType::Module; }
-};
-}
-#endif // DET_MODULE_H
diff --git a/Detector/DetExtensions/DetExtensions/DetSensComponent.h b/Detector/DetExtensions/DetExtensions/DetSensComponent.h
deleted file mode 100644
index 30e27c8ac..000000000
--- a/Detector/DetExtensions/DetExtensions/DetSensComponent.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// DetSensComponent.h
-//
-//
-// Created by Julia Hrdinka on 15/06/15.
-//
-//
-
-#ifndef DET_DETSENSCOMPONENT_H
-#define DET_DETSENSCOMPONENT_H
-
-#include "DetExtensions/IDetExtension.h"
-#include
-
-namespace DD4hep {
-namespace Geometry {
-class DetElement;
-class Segmentation;
-}
-}
-
-namespace Det {
-
-class DetSensComponent : public IDetExtension {
-
-public:
- explicit DetSensComponent(const DD4hep::Geometry::Segmentation segmentation) : m_segmentation(segmentation) {}
- DetSensComponent(const DetSensComponent&, const DD4hep::Geometry::DetElement&) {}
- virtual ~DetSensComponent() {}
- const DD4hep::Geometry::Segmentation segmentation() { return (m_segmentation); }
- virtual ExtensionType type() { return ExtensionType::SensComponent; }
-
-private:
- const DD4hep::Geometry::Segmentation m_segmentation;
-};
-}
-
-#endif // DET_DETSENSCOMPONENT_H
diff --git a/Detector/DetExtensions/DetExtensions/DiscLayer.h b/Detector/DetExtensions/DetExtensions/DiscLayer.h
deleted file mode 100644
index 94ef962b3..000000000
--- a/Detector/DetExtensions/DetExtensions/DiscLayer.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// DetDiscLayer.h
-//
-//
-// Created by Julia Hrdinka on 07/01/15.
-//
-//
-
-#ifndef DET_DETDISCLAYER
-#define DET_DETDISCLAYER
-
-#include "DetExtensions/IDetExtension.h"
-
-namespace DD4hep {
-namespace Geometry {
-class DetElement;
-}
-}
-
-namespace Det {
-
-class DetDiscLayer : public IDetExtension {
-
-public:
- DetDiscLayer() {}
-
- DetDiscLayer(const DetDiscLayer&, const DD4hep::Geometry::DetElement&) {}
-
- virtual ~DetDiscLayer() {}
-};
-}
-
-#endif // DET_DETDISCLAYER
diff --git a/Detector/DetExtensions/DetExtensions/Extension.h b/Detector/DetExtensions/DetExtensions/Extension.h
deleted file mode 100644
index 2c954e6ea..000000000
--- a/Detector/DetExtensions/DetExtensions/Extension.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-// Extension.h
-//
-//
-// Created by Julia Hrdinka on 12/12/14.
-//
-//
-
-#ifndef DET_DETEXTENSION_H
-#define DET_DETEXTENSION_H
-
-#include "DetExtensions/IDetExtension.h"
-
-namespace DD4hep {
-namespace Geometry {
-class DetElement;
-}
-}
-
-namespace Det {
-
-class DetExtension : public IDetExtension {
-
-public:
- DetExtension() {}
- DetExtension(const DetExtension&, const DD4hep::Geometry::DetElement&) {}
- virtual ~DetExtension() {}
-};
-}
-#endif // DET_DETEXTENSION_H
diff --git a/Detector/DetExtensions/DetExtensions/IDetExtension.h b/Detector/DetExtensions/DetExtensions/IDetExtension.h
deleted file mode 100644
index 7fdd70917..000000000
--- a/Detector/DetExtensions/DetExtensions/IDetExtension.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// IExtension.h
-//
-//
-// Created by Julia Hrdinka on 12/12/14.
-//
-//
-
-#ifndef DET_IDETEXTENSION_H
-#define DET_IDETEXTENSION_H
-
-namespace Det {
-
-enum ExtensionType {
-
- None = 0,
- CylinderVolume = 1,
- DiscVolume = 2,
- CylinderLayer = 3,
- DiscLayer = 4,
- Module = 5,
- SensComponent = 6
-};
-
-class IDetExtension {
-
-public:
- virtual ~IDetExtension() {}
- virtual ExtensionType type() = 0;
-
-protected:
- IDetExtension() {}
-};
-}
-
-#endif // DET_IDETEXTENSION_H
diff --git a/Detector/DetExtensions/DetExtensions/Module.h b/Detector/DetExtensions/DetExtensions/Module.h
deleted file mode 100644
index df67ecde0..000000000
--- a/Detector/DetExtensions/DetExtensions/Module.h
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// DetModule.h
-//
-//
-// Created by Julia Hrdinka on 16/12/14.
-//
-//
-
-#ifndef DET_DETMODULE_H
-#define DET_DETMODULE_H
-
-#include "DetExtensions/IDetExtension.h"
-
-namespace DD4hep {
-namespace Geometry {
-class DetElement;
-}
-}
-
-namespace Det {
-
-class DetModule : public IDetExtension {
-
-public:
- DetModule() {}
-
- DetModule(const DetModule&, const DD4hep::Geometry::DetElement&) {}
-
- virtual ~DetModule() {}
-};
-}
-#endif // DET_MODULE_H
diff --git a/Detector/DetFCChhCalDiscs/compact/Endcaps_coneCryo.xml b/Detector/DetFCChhCalDiscs/compact/Endcaps_coneCryo.xml
index 14b386473..f7b0b841a 100644
--- a/Detector/DetFCChhCalDiscs/compact/Endcaps_coneCryo.xml
+++ b/Detector/DetFCChhCalDiscs/compact/Endcaps_coneCryo.xml
@@ -60,11 +60,11 @@
-
+
system:4,subsystem:1,type:3,subtype:3,layer:8,eta:10,phi:10
-
+
system:4,subsystem:1,type:3,subtype:3,layer:8,eta:10,phi:10
diff --git a/Detector/DetFCChhCalDiscs/compact/Endcaps_coneCryo_calibration.xml b/Detector/DetFCChhCalDiscs/compact/Endcaps_coneCryo_calibration.xml
index 993045b1b..6fd62dce8 100644
--- a/Detector/DetFCChhCalDiscs/compact/Endcaps_coneCryo_calibration.xml
+++ b/Detector/DetFCChhCalDiscs/compact/Endcaps_coneCryo_calibration.xml
@@ -60,11 +60,11 @@
-
+
system:4,subsystem:1,type:3,subtype:3,layer:8,eta:10,phi:10
-
+
system:4,subsystem:1,type:3,subtype:3,layer:8,eta:10,phi:10
diff --git a/Detector/DetFCChhCalDiscs/compact/Forward_coneCryo.xml b/Detector/DetFCChhCalDiscs/compact/Forward_coneCryo.xml
index 151a959cf..4a898b528 100644
--- a/Detector/DetFCChhCalDiscs/compact/Forward_coneCryo.xml
+++ b/Detector/DetFCChhCalDiscs/compact/Forward_coneCryo.xml
@@ -57,11 +57,11 @@
-
+
system:4,subsystem:1,type:3,subtype:3,layer:8,eta:11,phi:10
-
+
system:4,subsystem:1,type:3,subtype:3,layer:8,eta:11,phi:10
diff --git a/Detector/DetFCChhCalDiscs/compact/Forward_coneCryo_calibration.xml b/Detector/DetFCChhCalDiscs/compact/Forward_coneCryo_calibration.xml
index 4ec2fd0d8..0d4574ca6 100644
--- a/Detector/DetFCChhCalDiscs/compact/Forward_coneCryo_calibration.xml
+++ b/Detector/DetFCChhCalDiscs/compact/Forward_coneCryo_calibration.xml
@@ -57,11 +57,11 @@
-
+
system:4,subsystem:1,type:3,subtype:3,layer:8,eta:11,phi:10
-
+
system:4,subsystem:1,type:3,subtype:3,layer:8,eta:11,phi:10
diff --git a/Detector/DetFCChhCalDiscs/src/CaloEndcapDiscs_geo.cpp b/Detector/DetFCChhCalDiscs/src/CaloEndcapDiscs_geo.cpp
index 0300be5eb..55276de8e 100644
--- a/Detector/DetFCChhCalDiscs/src/CaloEndcapDiscs_geo.cpp
+++ b/Detector/DetFCChhCalDiscs/src/CaloEndcapDiscs_geo.cpp
@@ -6,23 +6,23 @@
#include "GaudiKernel/ServiceHandle.h"
namespace det {
-void buildOneSide(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geometry::SensitiveDetector& aSensDet,
- DD4hep::Geometry::Volume& aEnvelope, DD4hep::XML::Handle_t& aXmlElement, int sign) {
+void buildOneSide(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet,
+ dd4hep::Volume& aEnvelope, dd4hep::xml::Handle_t& aXmlElement, int sign) {
- DD4hep::XML::Dimension dim(aXmlElement.child(_Unicode(dimensions)));
+ dd4hep::xml::Dimension dim(aXmlElement.child(_Unicode(dimensions)));
- DD4hep::XML::DetElement active = aXmlElement.child(_Unicode(active));
+ dd4hep::xml::DetElement active = aXmlElement.child(_Unicode(active));
std::string activeMaterial = active.materialStr();
double activeThickness = active.thickness();
- DD4hep::XML::DetElement readout = aXmlElement.child(_Unicode(readout));
+ dd4hep::xml::DetElement readout = aXmlElement.child(_Unicode(readout));
std::string readoutMaterial = readout.materialStr();
double readoutThickness = readout.thickness();
- DD4hep::XML::DetElement passive = aXmlElement.child(_Unicode(passive));
- DD4hep::XML::DetElement passiveInner = passive.child(_Unicode(inner));
- DD4hep::XML::DetElement passiveOuter = passive.child(_Unicode(outer));
- DD4hep::XML::DetElement passiveGlue = passive.child(_Unicode(glue));
+ dd4hep::xml::DetElement passive = aXmlElement.child(_Unicode(passive));
+ dd4hep::xml::DetElement passiveInner = passive.child(_Unicode(inner));
+ dd4hep::xml::DetElement passiveOuter = passive.child(_Unicode(outer));
+ dd4hep::xml::DetElement passiveGlue = passive.child(_Unicode(glue));
double passiveInnerThickness = passiveInner.thickness();
double passiveOuterThickness = passiveOuter.thickness();
double passiveGlueThickness = passiveGlue.thickness();
@@ -37,8 +37,8 @@ void buildOneSide(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geomet
passiveMaterial = passiveInnerMaterial;
}
- DD4hep::Geometry::SensitiveDetector sensDet = aSensDet;
- DD4hep::XML::Dimension sensDetType = aXmlElement.child(_U(sensitive));
+ dd4hep::SensitiveDetector sensDet = aSensDet;
+ dd4hep::xml::Dimension sensDetType = aXmlElement.child(_U(sensitive));
sensDet.setType(sensDetType.typeStr());
lLog << MSG::INFO << " rmin (cm) = " << dim.rmin1() << " rmin (cm) = " << dim.rmin2() << " rmax (cm) = " << dim.rmax()
<< " length (cm) = " << dim.dz() << " Sensitive volume of type: " << sensDetType.typeStr() << endmsg;
@@ -70,23 +70,23 @@ void buildOneSide(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geomet
(marginOutside + readoutThickness + activeThickness / 2.) * tanTheta; // for first readout position
double dR1 = passiveThickness * tanTheta; // between readout and passive
double dR2 = (activeThickness + readoutThickness + passiveThickness) * tanTheta; // between two readout discs
- DD4hep::Geometry::Tube readoutShapePre(nonAbsorberRmin, rMax, readoutThickness / 2.);
- DD4hep::Geometry::Tube activeShapePre(nonAbsorberRmin, rMax, activeThickness / 4.);
- DD4hep::Geometry::Volume readoutVolPre("readoutPre", readoutShapePre, aLcdd.material(readoutMaterial));
+ dd4hep::Tube readoutShapePre(nonAbsorberRmin, rMax, readoutThickness / 2.);
+ dd4hep::Tube activeShapePre(nonAbsorberRmin, rMax, activeThickness / 4.);
+ dd4hep::Volume readoutVolPre("readoutPre", readoutShapePre, aLcdd.material(readoutMaterial));
if (readout.isSensitive()) {
lLog << MSG::INFO << "Readout volume set as sensitive" << endmsg;
readoutVolPre.setSensitiveDetector(aSensDet);
}
- DD4hep::Geometry::Volume activeVolPre("activePre", activeShapePre, aLcdd.material(activeMaterial));
+ dd4hep::Volume activeVolPre("activePre", activeShapePre, aLcdd.material(activeMaterial));
activeVolPre.setSensitiveDetector(sensDet);
- DD4hep::Geometry::PlacedVolume readoutPhysVolPre =
- aEnvelope.placeVolume(readoutVolPre, DD4hep::Geometry::Position(0, 0, zOffset));
+ dd4hep::PlacedVolume readoutPhysVolPre =
+ aEnvelope.placeVolume(readoutVolPre, dd4hep::Position(0, 0, zOffset));
readoutPhysVolPre.addPhysVolID("layer", 0);
readoutPhysVolPre.addPhysVolID("type", 2); // 0 = active, 1 = passive, 2 = readout
- std::vector activePhysVols;
+ std::vector activePhysVols;
activePhysVols.reserve(numDiscs * 2);
activePhysVols.push_back(aEnvelope.placeVolume(
- activeVolPre, DD4hep::Geometry::Position(0, 0, zOffset + sign * (readoutThickness / 2. + activeThickness / 4.))));
+ activeVolPre, dd4hep::Position(0, 0, zOffset + sign * (readoutThickness / 2. + activeThickness / 4.))));
lLog << MSG::DEBUG << "Placing first readout at " << zOffset
<< " and active at z= " << zOffset + sign * (activeThickness / 4. + readoutThickness / 2.) << endmsg;
// Now place complete sets of discs: absorber|active|readout|active
@@ -95,14 +95,14 @@ void buildOneSide(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geomet
for (uint iDiscs = 0; iDiscs < numDiscs - 1; iDiscs++) {
nonAbsorberRmin += dR2;
// readout and active discs have the same radius, but different thickness
- DD4hep::Geometry::Tube activeShapeBeforeSubtraction(nonAbsorberRmin, rMax,
+ dd4hep::Tube activeShapeBeforeSubtraction(nonAbsorberRmin, rMax,
activeThickness / 2. + readoutThickness / 2.);
- DD4hep::Geometry::Tube readoutShape(nonAbsorberRmin, rMax, readoutThickness / 2.);
- DD4hep::Geometry::SubtractionSolid activeShape(activeShapeBeforeSubtraction, readoutShape);
- DD4hep::Geometry::Tube passiveShape(nonAbsorberRmin + dR1, rMax, passiveThickness / 2.);
- DD4hep::Geometry::Volume activeVol("active", activeShape, aLcdd.material(activeMaterial));
- DD4hep::Geometry::Volume readoutVol("readout", readoutShape, aLcdd.material(readoutMaterial));
- DD4hep::Geometry::Volume passiveVol("passive", passiveShape, aLcdd.material(passiveMaterial));
+ dd4hep::Tube readoutShape(nonAbsorberRmin, rMax, readoutThickness / 2.);
+ dd4hep::SubtractionSolid activeShape(activeShapeBeforeSubtraction, readoutShape);
+ dd4hep::Tube passiveShape(nonAbsorberRmin + dR1, rMax, passiveThickness / 2.);
+ dd4hep::Volume activeVol("active", activeShape, aLcdd.material(activeMaterial));
+ dd4hep::Volume readoutVol("readout", readoutShape, aLcdd.material(readoutMaterial));
+ dd4hep::Volume passiveVol("passive", passiveShape, aLcdd.material(passiveMaterial));
activeVol.setSensitiveDetector(sensDet);
if (readout.isSensitive()) {
lLog << MSG::DEBUG << "Readout volume set as sensitive" << endmsg;
@@ -111,15 +111,15 @@ void buildOneSide(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geomet
// absorber may consist of inner and outer material
if (passiveInnerThickness < passiveThickness) {
// create shapes
- DD4hep::Geometry::Tube passiveInnerShape(nonAbsorberRmin + dR1, rMax, passiveInnerThickness / 2.);
- DD4hep::Geometry::Tube passiveGlueShape(nonAbsorberRmin + dR1, rMax, passiveGlueThickness / 4.);
- DD4hep::Geometry::Tube passiveOuterShape(nonAbsorberRmin + dR1, rMax, passiveOuterThickness / 4.);
+ dd4hep::Tube passiveInnerShape(nonAbsorberRmin + dR1, rMax, passiveInnerThickness / 2.);
+ dd4hep::Tube passiveGlueShape(nonAbsorberRmin + dR1, rMax, passiveGlueThickness / 4.);
+ dd4hep::Tube passiveOuterShape(nonAbsorberRmin + dR1, rMax, passiveOuterThickness / 4.);
// create volumes
- DD4hep::Geometry::Volume passiveInnerVol(passiveInnerMaterial + "_passive", passiveInnerShape,
+ dd4hep::Volume passiveInnerVol(passiveInnerMaterial + "_passive", passiveInnerShape,
aLcdd.material(passiveInnerMaterial));
- DD4hep::Geometry::Volume passiveOuterVol(passiveOuterMaterial + "_passive", passiveOuterShape,
+ dd4hep::Volume passiveOuterVol(passiveOuterMaterial + "_passive", passiveOuterShape,
aLcdd.material(passiveOuterMaterial));
- DD4hep::Geometry::Volume passiveGlueVol(passiveGlueMaterial + "_passive", passiveGlueShape,
+ dd4hep::Volume passiveGlueVol(passiveGlueMaterial + "_passive", passiveGlueShape,
aLcdd.material(passiveGlueMaterial));
if (passive.isSensitive()) {
lLog << MSG::INFO << "Passive volumes (inner, outer, glue) set as sensitive" << endmsg;
@@ -128,20 +128,20 @@ void buildOneSide(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geomet
passiveGlueVol.setSensitiveDetector(aSensDet);
}
// place volumes
- DD4hep::Geometry::PlacedVolume passiveInnerPhysVol =
- passiveVol.placeVolume(passiveInnerVol, DD4hep::Geometry::Position(0, 0, 0));
- DD4hep::Geometry::PlacedVolume passiveOuterPhysVolBelow = passiveVol.placeVolume(
+ dd4hep::PlacedVolume passiveInnerPhysVol =
+ passiveVol.placeVolume(passiveInnerVol, dd4hep::Position(0, 0, 0));
+ dd4hep::PlacedVolume passiveOuterPhysVolBelow = passiveVol.placeVolume(
passiveOuterVol,
- DD4hep::Geometry::Position(0, 0, passiveInnerThickness / 2. + passiveGlueThickness / 2. +
+ dd4hep::Position(0, 0, passiveInnerThickness / 2. + passiveGlueThickness / 2. +
passiveOuterThickness / 4.));
- DD4hep::Geometry::PlacedVolume passiveOuterPhysVolAbove = passiveVol.placeVolume(
+ dd4hep::PlacedVolume passiveOuterPhysVolAbove = passiveVol.placeVolume(
passiveOuterVol,
- DD4hep::Geometry::Position(0, 0, -passiveInnerThickness / 2. - passiveGlueThickness / 2. -
+ dd4hep::Position(0, 0, -passiveInnerThickness / 2. - passiveGlueThickness / 2. -
passiveOuterThickness / 4.));
- DD4hep::Geometry::PlacedVolume passiveGluePhysVolBelow = passiveVol.placeVolume(
- passiveGlueVol, DD4hep::Geometry::Position(0, 0, -passiveInnerThickness / 2. - passiveGlueThickness / 4.));
- DD4hep::Geometry::PlacedVolume passiveGluePhysVolAbove = passiveVol.placeVolume(
- passiveGlueVol, DD4hep::Geometry::Position(0, 0, passiveInnerThickness / 2. + passiveGlueThickness / 4.));
+ dd4hep::PlacedVolume passiveGluePhysVolBelow = passiveVol.placeVolume(
+ passiveGlueVol, dd4hep::Position(0, 0, -passiveInnerThickness / 2. - passiveGlueThickness / 4.));
+ dd4hep::PlacedVolume passiveGluePhysVolAbove = passiveVol.placeVolume(
+ passiveGlueVol, dd4hep::Position(0, 0, passiveInnerThickness / 2. + passiveGlueThickness / 4.));
passiveInnerPhysVol.addPhysVolID("subtype", 0);
passiveOuterPhysVolBelow.addPhysVolID("subtype", 1);
passiveOuterPhysVolAbove.addPhysVolID("subtype", 2);
@@ -151,19 +151,19 @@ void buildOneSide(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geomet
lLog << MSG::INFO << "Passive volume set as sensitive" << endmsg;
passiveVol.setSensitiveDetector(aSensDet);
}
- DD4hep::Geometry::PlacedVolume passivePhysVol =
- aEnvelope.placeVolume(passiveVol, DD4hep::Geometry::Position(0, 0, zOffset));
+ dd4hep::PlacedVolume passivePhysVol =
+ aEnvelope.placeVolume(passiveVol, dd4hep::Position(0, 0, zOffset));
passivePhysVol.addPhysVolID("layer", iDiscs);
passivePhysVol.addPhysVolID("type", 1); // 0 = active, 1 = passive, 2 = readout
- DD4hep::Geometry::PlacedVolume readoutPhysVol = aEnvelope.placeVolume(
+ dd4hep::PlacedVolume readoutPhysVol = aEnvelope.placeVolume(
readoutVol,
- DD4hep::Geometry::Position(0, 0, zOffset +
+ dd4hep::Position(0, 0, zOffset +
sign * (passiveThickness / 2. + activeThickness / 2. + readoutThickness / 2.)));
readoutPhysVol.addPhysVolID("layer", iDiscs + 1); // +1 because first readout is placed before that loop
readoutPhysVol.addPhysVolID("type", 2); // 0 = active, 1 = passive, 2 = readout
activePhysVols.push_back(aEnvelope.placeVolume(
activeVol,
- DD4hep::Geometry::Position(0, 0, zOffset +
+ dd4hep::Position(0, 0, zOffset +
sign * (passiveThickness / 2. + activeThickness / 2. + readoutThickness / 2.))));
lLog << MSG::DEBUG << "Placing passive at z= " << zOffset
<< " readout at z= " << zOffset + sign * (passiveThickness / 2. + activeThickness / 2. + readoutThickness / 2.)
@@ -172,8 +172,8 @@ void buildOneSide(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geomet
zOffset += sign * (readoutThickness + activeThickness + passiveThickness);
if (iDiscs == numDiscs - 2) {
// finish detector with the last disc of abosrber (for GND layer)
- DD4hep::Geometry::PlacedVolume passivePhysVolPost =
- aEnvelope.placeVolume(passiveVol, DD4hep::Geometry::Position(0, 0, zOffset));
+ dd4hep::PlacedVolume passivePhysVolPost =
+ aEnvelope.placeVolume(passiveVol, dd4hep::Position(0, 0, zOffset));
passivePhysVolPost.addPhysVolID("layer", iDiscs + 1);
passivePhysVolPost.addPhysVolID("type", 1); // 0 = active, 1 = passive, 2 = readout
lLog << MSG::DEBUG << "Placing last passive disc at z= " << zOffset << endmsg;
@@ -186,26 +186,26 @@ void buildOneSide(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geomet
return;
}
-static DD4hep::Geometry::Ref_t createCaloDiscs(DD4hep::Geometry::LCDD& aLcdd,
- DD4hep::XML::Handle_t aXmlElement,
- DD4hep::Geometry::SensitiveDetector aSensDet) {
+static dd4hep::Ref_t createCaloDiscs(dd4hep::Detector& aLcdd,
+ dd4hep::xml::Handle_t aXmlElement,
+ dd4hep::SensitiveDetector aSensDet) {
ServiceHandle msgSvc("MessageSvc", "CalDiscsConstruction");
MsgStream lLog(&(*msgSvc), "CalDiscsConstruction");
- DD4hep::XML::DetElement xmlDetElem = aXmlElement;
+ dd4hep::xml::DetElement xmlDetElem = aXmlElement;
std::string nameDet = xmlDetElem.nameStr();
int idDet = xmlDetElem.id();
- DD4hep::XML::Dimension dim(xmlDetElem.dimensions());
- DD4hep::Geometry::DetElement caloDetElem(nameDet, idDet);
+ dd4hep::xml::Dimension dim(xmlDetElem.dimensions());
+ dd4hep::DetElement caloDetElem(nameDet, idDet);
// Create air envelope for the whole endcap
- DD4hep::Geometry::Cone envelopePositive(dim.dz(), dim.rmin1(), dim.rmax(), dim.rmin2(), dim.rmax());
- DD4hep::Geometry::Cone envelopeNegative(dim.dz(), dim.rmin2(), dim.rmax(), dim.rmin1(), dim.rmax());
- DD4hep::Geometry::UnionSolid envelopeShape(envelopePositive, envelopeNegative,
- DD4hep::Geometry::Position(0, 0, -2 * dim.z_offset()));
- DD4hep::Geometry::Volume envelopeVol(nameDet + "_vol", envelopeShape, aLcdd.material("Air"));
- DD4hep::Geometry::Volume envelopePositiveVol(nameDet + "_positive_vol", envelopePositive, aLcdd.material("Air"));
- DD4hep::Geometry::Volume envelopeNegativeVol(nameDet + "_negative_vol", envelopeNegative, aLcdd.material("Air"));
+ dd4hep::Cone envelopePositive(dim.dz(), dim.rmin1(), dim.rmax(), dim.rmin2(), dim.rmax());
+ dd4hep::Cone envelopeNegative(dim.dz(), dim.rmin2(), dim.rmax(), dim.rmin1(), dim.rmax());
+ dd4hep::UnionSolid envelopeShape(envelopePositive, envelopeNegative,
+ dd4hep::Position(0, 0, -2 * dim.z_offset()));
+ dd4hep::Volume envelopeVol(nameDet + "_vol", envelopeShape, aLcdd.material("Air"));
+ dd4hep::Volume envelopePositiveVol(nameDet + "_positive_vol", envelopePositive, aLcdd.material("Air"));
+ dd4hep::Volume envelopeNegativeVol(nameDet + "_negative_vol", envelopeNegative, aLcdd.material("Air"));
lLog << MSG::DEBUG << "Placing dector on the positive side: (cm) " << dim.z_offset() << endmsg;
buildOneSide(lLog, aLcdd, aSensDet, envelopePositiveVol, aXmlElement, 1);
@@ -213,18 +213,18 @@ static DD4hep::Geometry::Ref_t createCaloDiscs(DD4hep::Geometry::LCDD& aLcdd,
buildOneSide(lLog, aLcdd, aSensDet, envelopeNegativeVol, aXmlElement, -1);
// Place the envelope
- DD4hep::Geometry::PlacedVolume envelopePositivePhysVol = envelopeVol.placeVolume(envelopePositiveVol);
+ dd4hep::PlacedVolume envelopePositivePhysVol = envelopeVol.placeVolume(envelopePositiveVol);
envelopePositivePhysVol.addPhysVolID("subsystem", 0);
- DD4hep::Geometry::DetElement caloPositiveDetElem(caloDetElem, "positive", 0);
+ dd4hep::DetElement caloPositiveDetElem(caloDetElem, "positive", 0);
caloPositiveDetElem.setPlacement(envelopePositivePhysVol);
- DD4hep::Geometry::PlacedVolume envelopeNegativePhysVol =
- envelopeVol.placeVolume(envelopeNegativeVol, DD4hep::Geometry::Position(0, 0, -2 * dim.z_offset()));
+ dd4hep::PlacedVolume envelopeNegativePhysVol =
+ envelopeVol.placeVolume(envelopeNegativeVol, dd4hep::Position(0, 0, -2 * dim.z_offset()));
envelopeNegativePhysVol.addPhysVolID("subsystem", 1);
- DD4hep::Geometry::DetElement caloNegativeDetElem(caloDetElem, "negative", 0);
+ dd4hep::DetElement caloNegativeDetElem(caloDetElem, "negative", 0);
caloNegativeDetElem.setPlacement(envelopeNegativePhysVol);
- DD4hep::Geometry::Volume motherVol = aLcdd.pickMotherVolume(caloDetElem);
- DD4hep::Geometry::PlacedVolume envelopePhysVol =
- motherVol.placeVolume(envelopeVol, DD4hep::Geometry::Position(0., 0., dim.z_offset()));
+ dd4hep::Volume motherVol = aLcdd.pickMotherVolume(caloDetElem);
+ dd4hep::PlacedVolume envelopePhysVol =
+ motherVol.placeVolume(envelopeVol, dd4hep::Position(0., 0., dim.z_offset()));
caloDetElem.setPlacement(envelopePhysVol);
envelopePhysVol.addPhysVolID("system", idDet);
return caloDetElem;
diff --git a/Detector/DetFCChhECalInclined/CMakeLists.txt b/Detector/DetFCChhECalInclined/CMakeLists.txt
index 9940a2675..fe8598684 100644
--- a/Detector/DetFCChhECalInclined/CMakeLists.txt
+++ b/Detector/DetFCChhECalInclined/CMakeLists.txt
@@ -12,7 +12,7 @@ include( DD4hep )
find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED)
-include_directories(SYSTEM ${DD4hep_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS})
+#include_directories(BEFORE SYSTEM ${DD4hep_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS})
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION Detector/DetFCChhECalInclined)
diff --git a/Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_Common.xml b/Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_Common.xml
index 53d8f1e5f..1ee025233 100644
--- a/Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_Common.xml
+++ b/Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_Common.xml
@@ -59,7 +59,7 @@
-
+
system:4,cryo:1,type:3,subtype:3,layer:8,eta:9,phi:10
diff --git a/Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_Common_calibration.xml b/Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_Common_calibration.xml
index c4602351a..f51c38234 100644
--- a/Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_Common_calibration.xml
+++ b/Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_Common_calibration.xml
@@ -59,7 +59,7 @@
-
+
system:4,cryo:1,type:3,subtype:3,layer:8,eta:9,phi:10
diff --git a/Detector/DetFCChhECalInclined/src/ECalBarrelInclined_geo.cpp b/Detector/DetFCChhECalInclined/src/ECalBarrelInclined_geo.cpp
index c59c234aa..dd6e2f9e3 100644
--- a/Detector/DetFCChhECalInclined/src/ECalBarrelInclined_geo.cpp
+++ b/Detector/DetFCChhECalInclined/src/ECalBarrelInclined_geo.cpp
@@ -1,4 +1,5 @@
#include "DD4hep/DetFactoryHelper.h"
+#include "DD4hep/Handle.h"
// Gaudi
#include "GaudiKernel/IIncidentSvc.h"
@@ -8,48 +9,48 @@
#include "GaudiKernel/ServiceHandle.h"
namespace det {
-static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD& aLcdd,
- DD4hep::XML::Handle_t aXmlElement,
- DD4hep::Geometry::SensitiveDetector aSensDet) {
+static dd4hep::detail::Ref_t createECalBarrelInclined(dd4hep::Detector& aLcdd,
+ dd4hep::xml::Handle_t aXmlElement,
+ dd4hep::SensitiveDetector aSensDet) {
ServiceHandle msgSvc("MessageSvc", "ECalConstruction");
MsgStream lLog(&(*msgSvc), "ECalConstruction");
- DD4hep::XML::DetElement xmlDetElem = aXmlElement;
+ dd4hep::xml::DetElement xmlDetElem = aXmlElement;
std::string nameDet = xmlDetElem.nameStr();
- DD4hep::XML::Dimension dim(xmlDetElem.dimensions());
- DD4hep::Geometry::DetElement caloDetElem(nameDet, xmlDetElem.id());
+ dd4hep::xml::Dimension dim(xmlDetElem.dimensions());
+ dd4hep::DetElement caloDetElem(nameDet, xmlDetElem.id());
// Create air envelope for the whole barrel
- DD4hep::Geometry::Volume envelopeVol(nameDet + "_vol", DD4hep::Geometry::Tube(dim.rmin(), dim.rmax(), dim.dz()),
+ dd4hep::Volume envelopeVol(nameDet + "_vol", dd4hep::Tube(dim.rmin(), dim.rmax(), dim.dz()),
aLcdd.material("Air"));
envelopeVol.setVisAttributes(aLcdd, dim.visStr());
// Retrieve cryostat data
- DD4hep::XML::DetElement cryostat = aXmlElement.child(_Unicode(cryostat));
- DD4hep::XML::Dimension cryoDim(cryostat.dimensions());
+ dd4hep::xml::DetElement cryostat = aXmlElement.child(_Unicode(cryostat));
+ dd4hep::xml::Dimension cryoDim(cryostat.dimensions());
double cryoThicknessFront = cryoDim.rmin2() - cryoDim.rmin1();
double cryoThicknessBack = cryoDim.rmax2() - cryoDim.rmax1();
// Retrieve active and passive material data
- DD4hep::XML::DetElement calo = aXmlElement.child(_Unicode(calorimeter));
- DD4hep::XML::Dimension caloDim(calo.dimensions());
- DD4hep::XML::DetElement active = calo.child(_Unicode(active));
+ dd4hep::xml::DetElement calo = aXmlElement.child(_Unicode(calorimeter));
+ dd4hep::xml::Dimension caloDim(calo.dimensions());
+ dd4hep::xml::DetElement active = calo.child(_Unicode(active));
std::string activeMaterial = active.materialStr();
double activeThickness = active.thickness();
- DD4hep::XML::DetElement overlap = active.child(_Unicode(overlap));
+ dd4hep::xml::DetElement overlap = active.child(_Unicode(overlap));
double activePassiveOverlap = overlap.offset();
if (activePassiveOverlap < 0 || activePassiveOverlap > 0.5) {
ServiceHandle incidentSvc("IncidentSvc", "ECalConstruction");
lLog << MSG::ERROR << "Overlap between active and passive cannot be more than half of passive plane!" << endmsg;
incidentSvc->fireIncident(Incident("ECalConstruction", "GeometryFailure"));
}
- DD4hep::XML::DetElement layers = calo.child(_Unicode(layers));
+ dd4hep::xml::DetElement layers = calo.child(_Unicode(layers));
uint numLayers = 0;
std::vector layerHeight;
double layersTotalHeight = 0;
- for (DD4hep::XML::Collection_t layer_coll(layers, _Unicode(layer)); layer_coll; ++layer_coll) {
- DD4hep::XML::Component layer = layer_coll;
+ for (dd4hep::xml::Collection_t layer_coll(layers, _Unicode(layer)); layer_coll; ++layer_coll) {
+ dd4hep::xml::Component layer = layer_coll;
numLayers += layer.repeat();
for (int iLay = 0; iLay < layer.repeat(); iLay++) {
layerHeight.push_back(layer.thickness());
@@ -58,14 +59,14 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
}
lLog << MSG::DEBUG << "Number of layers: " << numLayers << " total thickness " << layersTotalHeight << endmsg;
- DD4hep::XML::DetElement readout = calo.child(_Unicode(readout));
+ dd4hep::xml::DetElement readout = calo.child(_Unicode(readout));
std::string readoutMaterial = readout.materialStr();
double readoutThickness = readout.thickness();
- DD4hep::XML::DetElement passive = calo.child(_Unicode(passive));
- DD4hep::XML::DetElement passiveInner = passive.child(_Unicode(inner));
- DD4hep::XML::DetElement passiveOuter = passive.child(_Unicode(outer));
- DD4hep::XML::DetElement passiveGlue = passive.child(_Unicode(glue));
+ dd4hep::xml::DetElement passive = calo.child(_Unicode(passive));
+ dd4hep::xml::DetElement passiveInner = passive.child(_Unicode(inner));
+ dd4hep::xml::DetElement passiveOuter = passive.child(_Unicode(outer));
+ dd4hep::xml::DetElement passiveGlue = passive.child(_Unicode(glue));
std::string passiveInnerMaterial = passiveInner.materialStr();
std::string passiveOuterMaterial = passiveOuter.materialStr();
std::string passiveGlueMaterial = passiveGlue.materialStr();
@@ -84,29 +85,29 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
bathRmin = caloDim.rmin();
bathRmax = caloDim.rmax();
}
- DD4hep::Geometry::Tube bathOuterShape(bathRmin, bathRmax, caloDim.dz());
+ dd4hep::Tube bathOuterShape(bathRmin, bathRmax, caloDim.dz());
if (cryoThicknessFront > 0) {
- DD4hep::Geometry::Tube cryoOuterShape(cryoDim.rmin1(), cryoDim.rmax2(), cryoDim.dz());
+ dd4hep::Tube cryoOuterShape(cryoDim.rmin1(), cryoDim.rmax2(), cryoDim.dz());
// Subtract volumes to get the actual shape of cryo
- DD4hep::Geometry::SubtractionSolid cryoShape(cryoOuterShape, bathOuterShape);
+ dd4hep::SubtractionSolid cryoShape(cryoOuterShape, bathOuterShape);
// 1. Create cryostat
lLog << MSG::INFO << "ECAL cryostat: rmin (cm) = " << cryoDim.rmin1() << " rmax (cm) = " << cryoDim.rmax2()
<< " thickness in front of ECal (cm) = " << cryoThicknessFront
<< " thickness behind ECal (cm) = " << cryoThicknessBack << endmsg;
- DD4hep::Geometry::Volume cryoVol(cryostat.nameStr(), cryoShape, aLcdd.material(cryostat.materialStr()));
- DD4hep::Geometry::PlacedVolume cryoPhysVol = envelopeVol.placeVolume(cryoVol);
+ dd4hep::Volume cryoVol(cryostat.nameStr(), cryoShape, aLcdd.material(cryostat.materialStr()));
+ dd4hep::PlacedVolume cryoPhysVol = envelopeVol.placeVolume(cryoVol);
if (cryostat.isSensitive()) {
cryoVol.setSensitiveDetector(aSensDet);
cryoPhysVol.addPhysVolID("cryo", 1);
lLog << MSG::INFO << "Cryostat volume set as sensitive" << endmsg;
}
- DD4hep::Geometry::DetElement cryoDetElem(caloDetElem, "cryo", 0);
+ dd4hep::DetElement cryoDetElem(caloDetElem, "cryo", 0);
cryoDetElem.setPlacement(cryoPhysVol);
}
// 2. Create bath that is inside the cryostat and surrounds the calorimeter
// Bath is filled with active material -> but not sensitive
- DD4hep::Geometry::Volume bathVol(activeMaterial + "_bath", bathOuterShape, aLcdd.material(activeMaterial));
+ dd4hep::Volume bathVol(activeMaterial + "_bath", bathOuterShape, aLcdd.material(activeMaterial));
lLog << MSG::INFO << "ECAL bath: material = " << activeMaterial << " rmin (cm) = " << bathRmin
<< " rmax (cm) = " << bathRmax << " thickness in front of ECal (cm) = " << caloDim.rmin() - cryoDim.rmin2()
<< " thickness behind ECal (cm) = " << cryoDim.rmax1() - caloDim.rmax() << endmsg;
@@ -114,8 +115,8 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
// 3. Create the calorimeter by placing the passive material, trapezoid active layers, readout and again trapezoid
// active layers in the bath.
// sensitive detector for the layers
- DD4hep::Geometry::SensitiveDetector sd = aSensDet;
- DD4hep::XML::Dimension sdType = xmlDetElem.child(_U(sensitive));
+ dd4hep::SensitiveDetector sd = aSensDet;
+ dd4hep::xml::Dimension sdType = xmlDetElem.child(_U(sensitive));
sd.setType(sdType.typeStr());
lLog << MSG::INFO << "ECAL calorimeter volume rmin (cm) = " << caloDim.rmin() << " rmax (cm) = " << caloDim.rmax()
<< endmsg;
@@ -159,36 +160,36 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
}
double layerFirstOffset = -planeLength / 2. + layerHeight[0] / 2.;
- DD4hep::Geometry::Box passiveShape(passiveThickness / 2., caloDim.dz(), planeLength / 2.);
+ dd4hep::Box passiveShape(passiveThickness / 2., caloDim.dz(), planeLength / 2.);
// inner layer is not in the first calo layer (to sample more uniformly in the layer where upstream correction is
// applied)
- DD4hep::Geometry::Box passiveInnerShape(passiveInnerThickness / 2., caloDim.dz(), planeLength / 2. - layerHeight[0] / 2.);
- DD4hep::Geometry::Box passiveInnerShapeFirstLayer(passiveInnerThickness / 2., caloDim.dz(), layerHeight[0] / 2.);
- DD4hep::Geometry::Box passiveOuterShape(passiveOuterThickness / 4., caloDim.dz(), planeLength / 2.);
- DD4hep::Geometry::Box passiveGlueShape(passiveGlueThickness / 4., caloDim.dz(), planeLength / 2.);
+ dd4hep::Box passiveInnerShape(passiveInnerThickness / 2., caloDim.dz(), planeLength / 2. - layerHeight[0] / 2.);
+ dd4hep::Box passiveInnerShapeFirstLayer(passiveInnerThickness / 2., caloDim.dz(), layerHeight[0] / 2.);
+ dd4hep::Box passiveOuterShape(passiveOuterThickness / 4., caloDim.dz(), planeLength / 2.);
+ dd4hep::Box passiveGlueShape(passiveGlueThickness / 4., caloDim.dz(), planeLength / 2.);
// passive volume consists of inner part and two outer, joind by glue
- DD4hep::Geometry::Volume passiveVol("passive", passiveShape, aLcdd.material("Air"));
- DD4hep::Geometry::Volume passiveInnerVol(passiveInnerMaterial + "_passive", passiveInnerShape,
+ dd4hep::Volume passiveVol("passive", passiveShape, aLcdd.material("Air"));
+ dd4hep::Volume passiveInnerVol(passiveInnerMaterial + "_passive", passiveInnerShape,
aLcdd.material(passiveInnerMaterial));
- DD4hep::Geometry::Volume passiveInnerVolFirstLayer(activeMaterial + "_passive", passiveInnerShapeFirstLayer,
+ dd4hep::Volume passiveInnerVolFirstLayer(activeMaterial + "_passive", passiveInnerShapeFirstLayer,
aLcdd.material(activeMaterial));
- DD4hep::Geometry::Volume passiveOuterVol(passiveOuterMaterial + "_passive", passiveOuterShape,
+ dd4hep::Volume passiveOuterVol(passiveOuterMaterial + "_passive", passiveOuterShape,
aLcdd.material(passiveOuterMaterial));
- DD4hep::Geometry::Volume passiveGlueVol(passiveGlueMaterial + "_passive", passiveGlueShape,
+ dd4hep::Volume passiveGlueVol(passiveGlueMaterial + "_passive", passiveGlueShape,
aLcdd.material(passiveGlueMaterial));
if (passiveInner.isSensitive()) {
lLog << MSG::DEBUG << "Passive inner volume set as sensitive" << endmsg;
double layerOffset = layerFirstOffset;
for (uint iLayer = 1; iLayer < numLayers; iLayer++) {
- DD4hep::Geometry::Box layerPassiveInnerShape(passiveInnerThickness / 2., caloDim.dz(), layerHeight[iLayer] / 2.);
- DD4hep::Geometry::Volume layerPassiveInnerVol(passiveInnerMaterial, layerPassiveInnerShape,
+ dd4hep::Box layerPassiveInnerShape(passiveInnerThickness / 2., caloDim.dz(), layerHeight[iLayer] / 2.);
+ dd4hep::Volume layerPassiveInnerVol(passiveInnerMaterial, layerPassiveInnerShape,
aLcdd.material(passiveInnerMaterial));
layerPassiveInnerVol.setSensitiveDetector(aSensDet);
- DD4hep::Geometry::PlacedVolume layerPassiveInnerPhysVol =
- passiveInnerVol.placeVolume(layerPassiveInnerVol, DD4hep::Geometry::Position(0, 0, layerOffset));
+ dd4hep::PlacedVolume layerPassiveInnerPhysVol =
+ passiveInnerVol.placeVolume(layerPassiveInnerVol, dd4hep::Position(0, 0, layerOffset));
layerPassiveInnerPhysVol.addPhysVolID("layer", iLayer);
- DD4hep::Geometry::DetElement layerPassiveInnerDetElem("layer", iLayer);
+ dd4hep::DetElement layerPassiveInnerDetElem("layer", iLayer);
layerPassiveInnerDetElem.setPlacement(layerPassiveInnerPhysVol);
if (iLayer != numLayers - 1) {
layerOffset += layerHeight[iLayer] / 2. + layerHeight[iLayer + 1] / 2.;
@@ -199,14 +200,14 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
lLog << MSG::DEBUG << "Passive outer volume set as sensitive" << endmsg;
double layerOffset = layerFirstOffset;
for (uint iLayer = 0; iLayer < numLayers; iLayer++) {
- DD4hep::Geometry::Box layerPassiveOuterShape(passiveOuterThickness / 4., caloDim.dz(), layerHeight[iLayer] / 2.);
- DD4hep::Geometry::Volume layerPassiveOuterVol(passiveOuterMaterial, layerPassiveOuterShape,
+ dd4hep::Box layerPassiveOuterShape(passiveOuterThickness / 4., caloDim.dz(), layerHeight[iLayer] / 2.);
+ dd4hep::Volume layerPassiveOuterVol(passiveOuterMaterial, layerPassiveOuterShape,
aLcdd.material(passiveOuterMaterial));
layerPassiveOuterVol.setSensitiveDetector(aSensDet);
- DD4hep::Geometry::PlacedVolume layerPassiveOuterPhysVol =
- passiveOuterVol.placeVolume(layerPassiveOuterVol, DD4hep::Geometry::Position(0, 0, layerOffset));
+ dd4hep::PlacedVolume layerPassiveOuterPhysVol =
+ passiveOuterVol.placeVolume(layerPassiveOuterVol, dd4hep::Position(0, 0, layerOffset));
layerPassiveOuterPhysVol.addPhysVolID("layer", iLayer);
- DD4hep::Geometry::DetElement layerPassiveOuterDetElem("layer", iLayer);
+ dd4hep::DetElement layerPassiveOuterDetElem("layer", iLayer);
layerPassiveOuterDetElem.setPlacement(layerPassiveOuterPhysVol);
if (iLayer != numLayers - 1) {
layerOffset += layerHeight[iLayer] / 2. + layerHeight[iLayer + 1] / 2.;
@@ -217,14 +218,14 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
lLog << MSG::DEBUG << "Passive glue volume set as sensitive" << endmsg;
double layerOffset = layerFirstOffset;
for (uint iLayer = 0; iLayer < numLayers; iLayer++) {
- DD4hep::Geometry::Box layerPassiveGlueShape(passiveGlueThickness / 4., caloDim.dz(), layerHeight[iLayer] / 2.);
- DD4hep::Geometry::Volume layerPassiveGlueVol(passiveGlueMaterial, layerPassiveGlueShape,
+ dd4hep::Box layerPassiveGlueShape(passiveGlueThickness / 4., caloDim.dz(), layerHeight[iLayer] / 2.);
+ dd4hep::Volume layerPassiveGlueVol(passiveGlueMaterial, layerPassiveGlueShape,
aLcdd.material(passiveGlueMaterial));
layerPassiveGlueVol.setSensitiveDetector(aSensDet);
- DD4hep::Geometry::PlacedVolume layerPassiveGluePhysVol =
- passiveGlueVol.placeVolume(layerPassiveGlueVol, DD4hep::Geometry::Position(0, 0, layerOffset));
+ dd4hep::PlacedVolume layerPassiveGluePhysVol =
+ passiveGlueVol.placeVolume(layerPassiveGlueVol, dd4hep::Position(0, 0, layerOffset));
layerPassiveGluePhysVol.addPhysVolID("layer", iLayer);
- DD4hep::Geometry::DetElement layerPassiveGlueDetElem("layer", iLayer);
+ dd4hep::DetElement layerPassiveGlueDetElem("layer", iLayer);
layerPassiveGlueDetElem.setPlacement(layerPassiveGluePhysVol);
if (iLayer != numLayers - 1) {
layerOffset += layerHeight[iLayer] / 2. + layerHeight[iLayer + 1] / 2.;
@@ -232,22 +233,22 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
}
}
- DD4hep::Geometry::PlacedVolume passiveInnerPhysVol =
- passiveVol.placeVolume(passiveInnerVol, DD4hep::Geometry::Position(0, 0, layerHeight[0] / 2.));
- DD4hep::Geometry::PlacedVolume passiveInnerPhysVolFirstLayer =
- passiveVol.placeVolume(passiveInnerVolFirstLayer, DD4hep::Geometry::Position(0, 0, layerFirstOffset));
- DD4hep::Geometry::PlacedVolume passiveOuterPhysVolBelow = passiveVol.placeVolume(
+ dd4hep::PlacedVolume passiveInnerPhysVol =
+ passiveVol.placeVolume(passiveInnerVol, dd4hep::Position(0, 0, layerHeight[0] / 2.));
+ dd4hep::PlacedVolume passiveInnerPhysVolFirstLayer =
+ passiveVol.placeVolume(passiveInnerVolFirstLayer, dd4hep::Position(0, 0, layerFirstOffset));
+ dd4hep::PlacedVolume passiveOuterPhysVolBelow = passiveVol.placeVolume(
passiveOuterVol,
- DD4hep::Geometry::Position(passiveInnerThickness / 2. + passiveGlueThickness / 2. + passiveOuterThickness / 4., 0,
+ dd4hep::Position(passiveInnerThickness / 2. + passiveGlueThickness / 2. + passiveOuterThickness / 4., 0,
0));
- DD4hep::Geometry::PlacedVolume passiveOuterPhysVolAbove = passiveVol.placeVolume(
+ dd4hep::PlacedVolume passiveOuterPhysVolAbove = passiveVol.placeVolume(
passiveOuterVol,
- DD4hep::Geometry::Position(-passiveInnerThickness / 2. - passiveGlueThickness / 2. - passiveOuterThickness / 4.,
+ dd4hep::Position(-passiveInnerThickness / 2. - passiveGlueThickness / 2. - passiveOuterThickness / 4.,
0, 0));
- DD4hep::Geometry::PlacedVolume passiveGluePhysVolBelow = passiveVol.placeVolume(
- passiveGlueVol, DD4hep::Geometry::Position(-passiveInnerThickness / 2. - passiveGlueThickness / 4., 0, 0));
- DD4hep::Geometry::PlacedVolume passiveGluePhysVolAbove = passiveVol.placeVolume(
- passiveGlueVol, DD4hep::Geometry::Position(passiveInnerThickness / 2. + passiveGlueThickness / 4., 0, 0));
+ dd4hep::PlacedVolume passiveGluePhysVolBelow = passiveVol.placeVolume(
+ passiveGlueVol, dd4hep::Position(-passiveInnerThickness / 2. - passiveGlueThickness / 4., 0, 0));
+ dd4hep::PlacedVolume passiveGluePhysVolAbove = passiveVol.placeVolume(
+ passiveGlueVol, dd4hep::Position(passiveInnerThickness / 2. + passiveGlueThickness / 4., 0, 0));
passiveInnerPhysVol.addPhysVolID("subtype", 0);
passiveInnerPhysVolFirstLayer.addPhysVolID("subtype", 0);
passiveOuterPhysVolBelow.addPhysVolID("subtype", 1);
@@ -257,26 +258,26 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
if (passiveInner.isSensitive()) {
passiveInnerVolFirstLayer.setSensitiveDetector(aSensDet);
passiveInnerPhysVolFirstLayer.addPhysVolID("layer", 0);
- DD4hep::Geometry::DetElement passiveInnerDetElemFirstLayer("layer", 0);
+ dd4hep::DetElement passiveInnerDetElemFirstLayer("layer", 0);
passiveInnerDetElemFirstLayer.setPlacement(passiveInnerPhysVolFirstLayer);
}
//////////////////////////////
// READOUT PLANES
//////////////////////////////
- DD4hep::Geometry::Box readoutShape(readoutThickness / 2., caloDim.dz(), planeLength / 2.);
- DD4hep::Geometry::Volume readoutVol(readoutMaterial, readoutShape, aLcdd.material(readoutMaterial));
+ dd4hep::Box readoutShape(readoutThickness / 2., caloDim.dz(), planeLength / 2.);
+ dd4hep::Volume readoutVol(readoutMaterial, readoutShape, aLcdd.material(readoutMaterial));
if (readout.isSensitive()) {
lLog << MSG::INFO << "Readout volume set as sensitive" << endmsg;
double layerOffset = layerFirstOffset;
for (uint iLayer = 0; iLayer < numLayers; iLayer++) {
- DD4hep::Geometry::Box layerReadoutShape(readoutThickness / 2., caloDim.dz(), layerHeight[iLayer] / 2.);
- DD4hep::Geometry::Volume layerReadoutVol(readoutMaterial, layerReadoutShape, aLcdd.material(readoutMaterial));
+ dd4hep::Box layerReadoutShape(readoutThickness / 2., caloDim.dz(), layerHeight[iLayer] / 2.);
+ dd4hep::Volume layerReadoutVol(readoutMaterial, layerReadoutShape, aLcdd.material(readoutMaterial));
layerReadoutVol.setSensitiveDetector(aSensDet);
- DD4hep::Geometry::PlacedVolume layerReadoutPhysVol =
- readoutVol.placeVolume(layerReadoutVol, DD4hep::Geometry::Position(0, 0, layerOffset));
+ dd4hep::PlacedVolume layerReadoutPhysVol =
+ readoutVol.placeVolume(layerReadoutVol, dd4hep::Position(0, 0, layerOffset));
layerReadoutPhysVol.addPhysVolID("layer", iLayer);
- DD4hep::Geometry::DetElement layerReadoutDetElem("layer", iLayer);
+ dd4hep::DetElement layerReadoutDetElem("layer", iLayer);
layerReadoutDetElem.setPlacement(layerReadoutPhysVol);
if (iLayer != numLayers - 1) {
layerOffset += layerHeight[iLayer] / 2. + layerHeight[iLayer + 1] / 2.;
@@ -321,10 +322,10 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
// creating shape for rows of layers (active material between two passive planes, with readout in the middle)
// first define area between two passive planes, area can reach up to the symmetry axis of passive plane
- DD4hep::Geometry::Trapezoid activeOuterShape(activeInThickness, activeOutThickness, caloDim.dz(), caloDim.dz(),
+ dd4hep::Trapezoid activeOuterShape(activeInThickness, activeOutThickness, caloDim.dz(), caloDim.dz(),
planeLength / 2.);
// subtract readout shape from the middle
- DD4hep::Geometry::SubtractionSolid activeShapeNoReadout(activeOuterShape, readoutShape);
+ dd4hep::SubtractionSolid activeShapeNoReadout(activeOuterShape, readoutShape);
// make calculation for active plane that is inclined with 0 deg (= offset + angle)
double Cx = Rmin * cos(-angle) + planeLength / 2.;
@@ -346,18 +347,18 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
xprimB = CBy;
// subtract passive volume above
- DD4hep::Geometry::SubtractionSolid activeShapeNoPassiveAbove(
+ dd4hep::SubtractionSolid activeShapeNoPassiveAbove(
activeShapeNoReadout, passiveShape,
- DD4hep::Geometry::Transform3D(DD4hep::Geometry::RotationY(-dPhi / 2.),
- DD4hep::Geometry::Position(-fabs(xprim), 0, fabs(zprim))));
+ dd4hep::Transform3D(dd4hep::RotationY(-dPhi / 2.),
+ dd4hep::Position(-fabs(xprim), 0, fabs(zprim))));
// subtract passive volume below
- DD4hep::Geometry::SubtractionSolid activeShape(
+ dd4hep::SubtractionSolid activeShape(
activeShapeNoPassiveAbove, passiveShape,
- DD4hep::Geometry::Transform3D(DD4hep::Geometry::RotationY(dPhi / 2.),
- DD4hep::Geometry::Position(fabs(xprimB), 0, -fabs(zprimB))));
- DD4hep::Geometry::Volume activeVol("active", activeShape, aLcdd.material("Air"));
+ dd4hep::Transform3D(dd4hep::RotationY(dPhi / 2.),
+ dd4hep::Position(fabs(xprimB), 0, -fabs(zprimB))));
+ dd4hep::Volume activeVol("active", activeShape, aLcdd.material("Air"));
- std::vector layerPhysVols;
+ std::vector layerPhysVols;
// place layers within active volume
std::vector layerInThickness;
std::vector layerOutThickness;
@@ -372,29 +373,29 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
}
double layerOffset = layerFirstOffset;
for (uint iLayer = 0; iLayer < numLayers; iLayer++) {
- DD4hep::Geometry::Trapezoid layerOuterShape(layerInThickness[iLayer], layerOutThickness[iLayer], caloDim.dz(),
+ dd4hep::Trapezoid layerOuterShape(layerInThickness[iLayer], layerOutThickness[iLayer], caloDim.dz(),
caloDim.dz(), layerHeight[iLayer] / 2.);
- DD4hep::Geometry::SubtractionSolid layerShapeNoReadout(layerOuterShape, readoutShape);
- DD4hep::Geometry::SubtractionSolid layerShapeNoPassiveAbove(
+ dd4hep::SubtractionSolid layerShapeNoReadout(layerOuterShape, readoutShape);
+ dd4hep::SubtractionSolid layerShapeNoPassiveAbove(
layerShapeNoReadout, passiveShape,
- DD4hep::Geometry::Transform3D(DD4hep::Geometry::RotationY(-dPhi / 2.),
- DD4hep::Geometry::Position(-fabs(xprim), 0, fabs(zprim) - layerOffset)));
+ dd4hep::Transform3D(dd4hep::RotationY(-dPhi / 2.),
+ dd4hep::Position(-fabs(xprim), 0, fabs(zprim) - layerOffset)));
// subtract passive volume below
- DD4hep::Geometry::SubtractionSolid layerShape(
+ dd4hep::SubtractionSolid layerShape(
layerShapeNoPassiveAbove, passiveShape,
- DD4hep::Geometry::Transform3D(DD4hep::Geometry::RotationY(dPhi / 2.),
- DD4hep::Geometry::Position(fabs(xprimB), 0, -fabs(zprimB) - layerOffset)));
- DD4hep::Geometry::Volume layerVol("layer", layerShape, aLcdd.material(activeMaterial));
+ dd4hep::Transform3D(dd4hep::RotationY(dPhi / 2.),
+ dd4hep::Position(fabs(xprimB), 0, -fabs(zprimB) - layerOffset)));
+ dd4hep::Volume layerVol("layer", layerShape, aLcdd.material(activeMaterial));
layerVol.setSensitiveDetector(aSensDet);
- layerPhysVols.push_back(activeVol.placeVolume(layerVol, DD4hep::Geometry::Position(0, 0, layerOffset)));
+ layerPhysVols.push_back(activeVol.placeVolume(layerVol, dd4hep::Position(0, 0, layerOffset)));
layerPhysVols.back().addPhysVolID("layer", iLayer);
if (iLayer != numLayers - 1) {
layerOffset += layerHeight[iLayer] / 2. + layerHeight[iLayer + 1] / 2.;
}
}
- DD4hep::Geometry::DetElement bathDetElem(caloDetElem, "bath", 1);
- std::vector activePhysVols;
+ dd4hep::DetElement bathDetElem(caloDetElem, "bath", 1);
+ std::vector activePhysVols;
// Next place elements: passive planes, readout planes and rows of layers
for (uint iPlane = 0; iPlane < numPlanes; iPlane++) {
// first calculate positions of passive and readout planes
@@ -409,16 +410,16 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
// rotate centre by angle wrt beginning of plane
double xRotated = xRmin + (xRadial - xRmin) * cos(angle) - (yRadial - yRmin) * sin(angle);
double yRotated = yRmin + (xRadial - xRmin) * sin(angle) + (yRadial - yRmin) * cos(angle);
- DD4hep::Geometry::Transform3D transform(DD4hep::Geometry::RotationX(-M_PI / 2.) // to get in XY plane
+ dd4hep::Transform3D transform(dd4hep::RotationX(-M_PI / 2.) // to get in XY plane
*
- DD4hep::Geometry::RotationY(M_PI / 2. // to get pointed towards centre
+ dd4hep::RotationY(M_PI / 2. // to get pointed towards centre
-
phi - angle),
- DD4hep::Geometry::Position(xRotated, yRotated, 0));
- DD4hep::Geometry::PlacedVolume passivePhysVol = bathVol.placeVolume(passiveVol, transform);
+ dd4hep::Position(xRotated, yRotated, 0));
+ dd4hep::PlacedVolume passivePhysVol = bathVol.placeVolume(passiveVol, transform);
passivePhysVol.addPhysVolID("module", iPlane);
passivePhysVol.addPhysVolID("type", 1); // 0 = active, 1 = passive, 2 = readout
- DD4hep::Geometry::DetElement passiveDetElem(bathDetElem, "passive" + std::to_string(iPlane), iPlane);
+ dd4hep::DetElement passiveDetElem(bathDetElem, "passive" + std::to_string(iPlane), iPlane);
passiveDetElem.setPlacement(passivePhysVol);
// READOUT
@@ -432,29 +433,29 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
// rotate centre by angle wrt beginning of plane
double xRotatedRead = xRminRead + (xRadialRead - xRminRead) * cos(angle) - (yRadialRead - yRminRead) * sin(angle);
double yRotatedRead = yRminRead + (xRadialRead - xRminRead) * sin(angle) + (yRadialRead - yRminRead) * cos(angle);
- DD4hep::Geometry::Transform3D transformRead(
- DD4hep::Geometry::RotationX(-M_PI / 2.) // to get in XY plane
+ dd4hep::Transform3D transformRead(
+ dd4hep::RotationX(-M_PI / 2.) // to get in XY plane
*
- DD4hep::Geometry::RotationY(M_PI / 2. // to get pointed towards centre
+ dd4hep::RotationY(M_PI / 2. // to get pointed towards centre
-
phiRead - angle),
- DD4hep::Geometry::Position(xRotatedRead, yRotatedRead, 0));
- DD4hep::Geometry::PlacedVolume readoutPhysVol = bathVol.placeVolume(readoutVol, transformRead);
+ dd4hep::Position(xRotatedRead, yRotatedRead, 0));
+ dd4hep::PlacedVolume readoutPhysVol = bathVol.placeVolume(readoutVol, transformRead);
readoutPhysVol.addPhysVolID("module", iPlane);
readoutPhysVol.addPhysVolID("type", 2); // 0 = active, 1 = passive, 2 = readout
- DD4hep::Geometry::DetElement readoutDetElem(bathDetElem, "readout" + std::to_string(iPlane), iPlane);
+ dd4hep::DetElement readoutDetElem(bathDetElem, "readout" + std::to_string(iPlane), iPlane);
readoutDetElem.setPlacement(readoutPhysVol);
// ACTIVE
- DD4hep::Geometry::Rotation3D rotationActive(DD4hep::Geometry::RotationX(-M_PI / 2) *
- DD4hep::Geometry::RotationY(M_PI / 2 - phiRead - angle));
+ dd4hep::Rotation3D rotationActive(dd4hep::RotationX(-M_PI / 2) *
+ dd4hep::RotationY(M_PI / 2 - phiRead - angle));
activePhysVols.push_back(bathVol.placeVolume(
activeVol,
- DD4hep::Geometry::Transform3D(rotationActive, DD4hep::Geometry::Position(xRotatedRead, yRotatedRead, 0))));
+ dd4hep::Transform3D(rotationActive, dd4hep::Position(xRotatedRead, yRotatedRead, 0))));
activePhysVols.back().addPhysVolID("module", iPlane);
activePhysVols.back().addPhysVolID("type", 0); // 0 = active, 1 = passive, 2 = readout
}
- DD4hep::Geometry::PlacedVolume bathPhysVol = envelopeVol.placeVolume(bathVol);
+ dd4hep::PlacedVolume bathPhysVol = envelopeVol.placeVolume(bathVol);
if (cryostat.isSensitive()) {
bathVol.setSensitiveDetector(aSensDet);
bathPhysVol.addPhysVolID("cryo", 0);
@@ -463,17 +464,17 @@ static DD4hep::Geometry::Ref_t createECalBarrelInclined(DD4hep::Geometry::LCDD&
bathDetElem.setPlacement(bathPhysVol);
for (uint iPlane = 0; iPlane < numPlanes; iPlane++) {
- DD4hep::Geometry::DetElement activeDetElem(bathDetElem, "active" + std::to_string(iPlane), iPlane);
+ dd4hep::DetElement activeDetElem(bathDetElem, "active" + std::to_string(iPlane), iPlane);
activeDetElem.setPlacement(activePhysVols[iPlane]);
for (uint iLayer = 0; iLayer < numLayers; iLayer++) {
- DD4hep::Geometry::DetElement layerDetElem(activeDetElem, "layer" + std::to_string(iLayer), iLayer);
+ dd4hep::DetElement layerDetElem(activeDetElem, "layer" + std::to_string(iLayer), iLayer);
layerDetElem.setPlacement(layerPhysVols[iLayer]);
}
}
// Place the envelope
- DD4hep::Geometry::Volume motherVol = aLcdd.pickMotherVolume(caloDetElem);
- DD4hep::Geometry::PlacedVolume envelopePhysVol = motherVol.placeVolume(envelopeVol);
+ dd4hep::Volume motherVol = aLcdd.pickMotherVolume(caloDetElem);
+ dd4hep::PlacedVolume envelopePhysVol = motherVol.placeVolume(envelopeVol);
envelopePhysVol.addPhysVolID("system", xmlDetElem.id());
caloDetElem.setPlacement(envelopePhysVol);
return caloDetElem;
diff --git a/Detector/DetFCChhECalSimple/CMakeLists.txt b/Detector/DetFCChhECalSimple/CMakeLists.txt
index 67c8682a2..c9db736e9 100644
--- a/Detector/DetFCChhECalSimple/CMakeLists.txt
+++ b/Detector/DetFCChhECalSimple/CMakeLists.txt
@@ -14,7 +14,7 @@ find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED)
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION Detector/DetFCChhECalSimple)
-include_directories(SYSTEM ${DD4hep_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS})
+#include_directories(SYSTEM ${DD4hep_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS})
gaudi_add_module(DetFCChhECalSimple
src/*.cpp
diff --git a/Detector/DetFCChhECalSimple/compact/FCChh_ECalBarrel_Common.xml b/Detector/DetFCChhECalSimple/compact/FCChh_ECalBarrel_Common.xml
index b63e0823d..c44ae267d 100644
--- a/Detector/DetFCChhECalSimple/compact/FCChh_ECalBarrel_Common.xml
+++ b/Detector/DetFCChhECalSimple/compact/FCChh_ECalBarrel_Common.xml
@@ -34,7 +34,7 @@
-
+
system:4,ECAL_Cryo:1,bath:1,EM_barrel:1,active_layer:9,eta:9,phi:10
diff --git a/Detector/DetFCChhECalSimple/compact/FCChh_ECalBarrel_Gflash.xml b/Detector/DetFCChhECalSimple/compact/FCChh_ECalBarrel_Gflash.xml
index 21b089cc4..7e677ef40 100644
--- a/Detector/DetFCChhECalSimple/compact/FCChh_ECalBarrel_Gflash.xml
+++ b/Detector/DetFCChhECalSimple/compact/FCChh_ECalBarrel_Gflash.xml
@@ -37,7 +37,7 @@
-
+
system:4,ECAL_Cryo:1,bath:1,EM_barrel:1,active_layer:9,eta:-9,phi:-10
diff --git a/Detector/DetFCChhECalSimple/src/ECalBarrel_geo.cpp b/Detector/DetFCChhECalSimple/src/ECalBarrel_geo.cpp
index d4e0543cd..7cb3a2586 100644
--- a/Detector/DetFCChhECalSimple/src/ECalBarrel_geo.cpp
+++ b/Detector/DetFCChhECalSimple/src/ECalBarrel_geo.cpp
@@ -1,4 +1,6 @@
// DD4hep includes
+#include "DD4hep/Detector.h"
+#include "DD4hep/DetElement.h"
#include "DD4hep/DetFactoryHelper.h"
// Gaudi
@@ -6,15 +8,15 @@
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/ServiceHandle.h"
-using DD4hep::Geometry::Volume;
-using DD4hep::Geometry::DetElement;
-using DD4hep::XML::Dimension;
-using DD4hep::Geometry::PlacedVolume;
+using dd4hep::Volume;
+using dd4hep::DetElement;
+using dd4hep::xml::Dimension;
+using dd4hep::PlacedVolume;
namespace det {
-static DD4hep::Geometry::Ref_t createECal(DD4hep::Geometry::LCDD& lcdd, xml_h xmlElement,
- DD4hep::Geometry::SensitiveDetector sensDet) {
+static dd4hep::Ref_t createECal(dd4hep::Detector& lcdd, xml_h xmlElement,
+ dd4hep::SensitiveDetector sensDet) {
ServiceHandle msgSvc("MessageSvc", "ECalConstruction");
MsgStream lLog(&(*msgSvc), "ECalConstruction");
@@ -25,7 +27,7 @@ static DD4hep::Geometry::Ref_t createECal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
// Make volume that envelopes the whole barrel; set material to air
Dimension dimensions(xmlDet.dimensions());
- DD4hep::Geometry::Tube envelopeShape(dimensions.rmin(), dimensions.rmax(), dimensions.dz());
+ dd4hep::Tube envelopeShape(dimensions.rmin(), dimensions.rmax(), dimensions.dz());
Volume envelopeVolume(detName, envelopeShape, lcdd.air());
// Invisibility seems to be broken in visualisation tags, have to hardcode that
envelopeVolume.setVisAttributes(lcdd, dimensions.visStr());
@@ -42,9 +44,9 @@ static DD4hep::Geometry::Ref_t createECal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
double activeThickness = active.thickness();
xml_comp_t passive = calo.child(_Unicode(passive_layers));
- DD4hep::XML::DetElement passiveInner = passive.child(_Unicode(inner));
- DD4hep::XML::DetElement passiveOuter = passive.child(_Unicode(outer));
- DD4hep::XML::DetElement passiveGlue = passive.child(_Unicode(glue));
+ dd4hep::xml::DetElement passiveInner = passive.child(_Unicode(inner));
+ dd4hep::xml::DetElement passiveOuter = passive.child(_Unicode(outer));
+ dd4hep::xml::DetElement passiveGlue = passive.child(_Unicode(glue));
std::string passiveInnerMaterial = passiveInner.materialStr();
std::string passiveOuterMaterial = passiveOuter.materialStr();
std::string passiveGlueMaterial = passiveGlue.materialStr();
@@ -58,7 +60,7 @@ static DD4hep::Geometry::Ref_t createECal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
DetElement caloBath(eCal, activeMaterial + "_notSensitive", 0);
if (cryoThickness > 0) {
// Step 1 : cryostat
- DD4hep::Geometry::Tube cryoShape(cryoDim.rmin(), cryoDim.rmax(), cryoDim.dz());
+ dd4hep::Tube cryoShape(cryoDim.rmin(), cryoDim.rmax(), cryoDim.dz());
lLog << MSG::DEBUG << "ECAL cryostat: rmin " << cryoDim.rmin() << " rmax " << cryoDim.rmax() << endmsg;
Volume cryoVol(cryostat.nameStr(), cryoShape, lcdd.material(cryostat.materialStr()));
PlacedVolume placedCryo = envelopeVolume.placeVolume(cryoVol);
@@ -66,7 +68,7 @@ static DD4hep::Geometry::Ref_t createECal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
DetElement cryo(eCal, cryostat.nameStr(), 0);
cryo.setPlacement(placedCryo);
// Step 2 : fill cryostat with active medium
- DD4hep::Geometry::Tube bathShape(cryoDim.rmin() + cryoThickness, cryoDim.rmax() - cryoThickness,
+ dd4hep::Tube bathShape(cryoDim.rmin() + cryoThickness, cryoDim.rmax() - cryoThickness,
cryoDim.dz() - cryoThickness);
lLog << MSG::DEBUG << "ECAL " << activeMaterial << " bath: rmin " << cryoDim.rmin() + cryoThickness << " rmax "
<< cryoDim.rmax() - cryoThickness << endmsg;
@@ -83,8 +85,8 @@ static DD4hep::Geometry::Ref_t createECal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
<< endmsg;
// set the sensitive detector type to the DD4hep calorimeter
- DD4hep::Geometry::SensitiveDetector sd = sensDet;
- DD4hep::XML::Dimension sdType = xmlDet.child(_U(sensitive));
+ dd4hep::SensitiveDetector sd = sensDet;
+ dd4hep::xml::Dimension sdType = xmlDet.child(_U(sensitive));
sd.setType(sdType.typeStr());
double glueThickness = passiveGlueThickness / 2.;
@@ -95,16 +97,16 @@ static DD4hep::Geometry::Ref_t createECal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
// loop on the sensitive layers
for (int i = 0; i < activeSamples; i++) {
double layerRadius = caloDim.rmin() + passiveThickness + i * (passiveThickness + activeThickness);
- DD4hep::Geometry::Tube outerShape1(layerRadius - passiveThickness, layerRadius - passiveThickness + outerThickness,
+ dd4hep::Tube outerShape1(layerRadius - passiveThickness, layerRadius - passiveThickness + outerThickness,
caloDim.dz());
- DD4hep::Geometry::Tube glueShape1(layerRadius - passiveThickness + outerThickness,
+ dd4hep::Tube glueShape1(layerRadius - passiveThickness + outerThickness,
layerRadius - passiveThickness + outerThickness + glueThickness, caloDim.dz());
- DD4hep::Geometry::Tube innerShape(layerRadius - passiveThickness + outerThickness + glueThickness,
+ dd4hep::Tube innerShape(layerRadius - passiveThickness + outerThickness + glueThickness,
layerRadius - outerThickness - glueThickness, caloDim.dz());
- DD4hep::Geometry::Tube glueShape2(layerRadius - outerThickness - glueThickness, layerRadius - outerThickness,
+ dd4hep::Tube glueShape2(layerRadius - outerThickness - glueThickness, layerRadius - outerThickness,
caloDim.dz());
- DD4hep::Geometry::Tube outerShape2(layerRadius - outerThickness, layerRadius, caloDim.dz());
- DD4hep::Geometry::Tube layerShape(layerRadius, layerRadius + activeThickness, caloDim.dz());
+ dd4hep::Tube outerShape2(layerRadius - outerThickness, layerRadius, caloDim.dz());
+ dd4hep::Tube layerShape(layerRadius, layerRadius + activeThickness, caloDim.dz());
Volume layerVol(activeMaterial + "_sensitive", layerShape, lcdd.material(activeMaterial));
Volume outerVol1(passiveOuterMaterial + "_below", outerShape1, lcdd.material(passiveOuterMaterial));
Volume outerVol2(passiveOuterMaterial + "_above", outerShape2, lcdd.material(passiveOuterMaterial));
diff --git a/Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml b/Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml
index da90ce741..d91d461fb 100644
--- a/Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml
+++ b/Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml
@@ -52,11 +52,11 @@
-
+
system:4,module:7,row:9,layer:5,tile:2,eta:1,phi:10
-
+
system:4,module:7,row:9,layer:5,tile:2,eta:9,phi:10
diff --git a/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml b/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml
index 112525e6f..61e4ca647 100644
--- a/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml
+++ b/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml
@@ -53,11 +53,11 @@
-
+
system:4,type:2,module:9,row:8,layer:4,tile:2,eta:1,phi:10
-
+
system:4,type:2,module:9,row:8,layer:4,tile:2,eta:10,phi:10
diff --git a/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp b/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp
index 1b47ba9ca..0bd78408f 100644
--- a/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp
+++ b/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp
@@ -6,15 +6,14 @@
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/ServiceHandle.h"
-using DD4hep::Geometry::Volume;
-using DD4hep::Geometry::DetElement;
-using DD4hep::XML::Dimension;
-using DD4hep::Geometry::PlacedVolume;
+using dd4hep::Volume;
+using dd4hep::DetElement;
+using dd4hep::xml::Dimension;
+using dd4hep::PlacedVolume;
namespace det {
-static DD4hep::Geometry::Ref_t createHCal(DD4hep::Geometry::LCDD& lcdd, xml_h xmlElement,
- DD4hep::Geometry::SensitiveDetector sensDet) {
+static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_h xmlElement, dd4hep::SensitiveDetector sensDet) {
// Get the Gaudi message service and message stream:
ServiceHandle msgSvc("MessageSvc", "HCalConstruction");
MsgStream lLog(&(*msgSvc), "HCalConstruction");
@@ -82,30 +81,30 @@ static DD4hep::Geometry::Ref_t createHCal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
double dzDetector = (numSequencesZ * dzSequence) / 2 + dZEndPlate + space;
lLog << MSG::INFO << "correction of dz (negative = size reduced):" << dzDetector - dimensions.dz() << endmsg;
- DD4hep::Geometry::Tube envelopeShape(dimensions.rmin(), dimensions.rmax(), dzDetector);
+ dd4hep::Tube envelopeShape(dimensions.rmin(), dimensions.rmax(), dzDetector);
Volume envelopeVolume("envelopeVolume", envelopeShape, lcdd.air());
envelopeVolume.setVisAttributes(lcdd, dimensions.visStr());
// Add structural support made of steel inside of HCal
DetElement facePlate(hCal, "FacePlate", 0);
- DD4hep::Geometry::Tube facePlateShape(dimensions.rmin(), sensitiveBarrelRmin, (dzDetector - dZEndPlate - space));
+ dd4hep::Tube facePlateShape(dimensions.rmin(), sensitiveBarrelRmin, (dzDetector - dZEndPlate - space));
Volume facePlateVol("facePlate", facePlateShape, lcdd.material(xFacePlate.materialStr()));
facePlateVol.setVisAttributes(lcdd, xFacePlate.visStr());
PlacedVolume placedFacePlate = envelopeVolume.placeVolume(facePlateVol);
facePlate.setPlacement(placedFacePlate);
// Add structural support made of steel at both ends of HCal
- DD4hep::Geometry::Tube endPlateShape(dimensions.rmin(), (dimensions.rmax() - dSteelSupport), dZEndPlate / 2);
+ dd4hep::Tube endPlateShape(dimensions.rmin(), (dimensions.rmax() - dSteelSupport), dZEndPlate / 2);
Volume endPlateVol("endPlate", endPlateShape, lcdd.material(xEndPlate.materialStr()));
endPlateVol.setVisAttributes(lcdd, xEndPlate.visStr());
DetElement endPlatePos(hCal, "endPlatePos", 0);
- DD4hep::Geometry::Position posOffset(0, 0, dzDetector - (dZEndPlate / 2));
+ dd4hep::Position posOffset(0, 0, dzDetector - (dZEndPlate / 2));
PlacedVolume placedEndPlatePos = envelopeVolume.placeVolume(endPlateVol, posOffset);
endPlatePos.setPlacement(placedEndPlatePos);
DetElement endPlateNeg(hCal, "endPlateNeg", 1);
- DD4hep::Geometry::Position negOffset(0, 0, -dzDetector + (dZEndPlate / 2));
+ dd4hep::Position negOffset(0, 0, -dzDetector + (dZEndPlate / 2));
PlacedVolume placedEndPlateNeg = envelopeVolume.placeVolume(endPlateVol, negOffset);
endPlateNeg.setPlacement(placedEndPlateNeg);
@@ -129,25 +128,24 @@ static DD4hep::Geometry::Ref_t createHCal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
double dzSupport = dSteelSupport / 2;
// DetElement vectors for placement in loop at the end
- std::vector supports;
+ std::vector supports;
supports.reserve(numSequencesPhi);
- std::vector modules;
+ std::vector modules;
modules.reserve(numSequencesPhi);
- std::vector rows;
+ std::vector rows;
rows.reserve(numSequencesZ);
- std::vector layers;
+ std::vector layers;
layers.reserve(layerDepths.size());
- std::vector> tilesInLayers;
+ std::vector> tilesInLayers;
tilesInLayers.reserve(layerDepths.size());
// First we construct one wedge:
- Volume wedgeVolume("wedgeVolume", DD4hep::Geometry::Trapezoid(dx1Module, dx2Module, dy0, dy0, dzModule),
- lcdd.material("Air"));
+ Volume wedgeVolume("wedgeVolume", dd4hep::Trapezoid(dx1Module, dx2Module, dy0, dy0, dzModule), lcdd.material("Air"));
double layerR = 0.;
// Placement of subWedges in Wedge
for (unsigned int idxLayer = 0; idxLayer < layerDepths.size(); ++idxLayer) {
- auto layerName = DD4hep::XML::_toString(idxLayer, "layer%d");
+ auto layerName = dd4hep::xml::_toString(idxLayer, "layer%d");
unsigned int sequenceIdx = idxLayer % 2;
// get length of layer in rho
@@ -162,7 +160,7 @@ static DD4hep::Geometry::Ref_t createHCal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
layerR += layerDepths.at(idxLayer);
- Volume layerVolume("layerVolume", DD4hep::Geometry::Trapezoid(dx1, dx2, dy0, dy0, dz0), lcdd.material("Air"));
+ Volume layerVolume("layerVolume", dd4hep::Trapezoid(dx1, dx2, dy0, dy0, dz0), lcdd.material("Air"));
layerVolume.setVisAttributes(lcdd.invisible());
unsigned int idxSubMod = 0;
unsigned int idxActMod = 0;
@@ -175,23 +173,23 @@ static DD4hep::Geometry::Ref_t createHCal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
sequenceIdx = 0;
}
// layer middle offset
- DD4hep::Geometry::Position modOffset(0, 0, rMiddle);
+ dd4hep::Position modOffset(0, 0, rMiddle);
layers.push_back(wedgeVolume.placeVolume(layerVolume, modOffset));
layers.back().addPhysVolID("layer", idxLayer);
- std::vector tiles;
+ std::vector tiles;
// Filling of the subWedge with coponents (submodules)
for (xml_coll_t xCompColl(sequences[sequenceIdx], _Unicode(module_component)); xCompColl;
++xCompColl, ++idxSubMod) {
xml_comp_t xComp = xCompColl;
double dyComp = xComp.thickness() * 0.5;
- Volume modCompVol("modCompVolume", DD4hep::Geometry::Trapezoid(dx1, dx2, dyComp, dyComp, dz0),
+ Volume modCompVol("modCompVolume", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0),
lcdd.material(xComp.materialStr()));
modCompVol.setVisAttributes(lcdd, xComp.visStr());
- DD4hep::Geometry::Position offset(0, modCompZOffset + dyComp + xComp.y_offset() / 2, 0);
+ dd4hep::Position offset(0, modCompZOffset + dyComp + xComp.y_offset() / 2, 0);
if (xComp.isSensitive()) {
- Volume tileVol("tileVolume", DD4hep::Geometry::Trapezoid(dx1, dx2, dyComp, dyComp, dz0),
+ Volume tileVol("tileVolume", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0),
lcdd.material(xComp.materialStr()));
tileVol.setSensitiveDetector(sensDet);
tiles.push_back(layerVolume.placeVolume(tileVol, offset));
@@ -207,14 +205,14 @@ static DD4hep::Geometry::Ref_t createHCal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
}
Volume moduleVolume("moduleVolume",
- DD4hep::Geometry::Trapezoid(dx1Module, dx2Module, (dzDetector - dZEndPlate - space),
- (dzDetector - dZEndPlate - space), dzModule),
+ dd4hep::Trapezoid(dx1Module, dx2Module, (dzDetector - dZEndPlate - space),
+ (dzDetector - dZEndPlate - space), dzModule),
lcdd.material("Air"));
moduleVolume.setVisAttributes(lcdd.invisible());
Volume steelSupportVolume("steelSupportVolume",
- DD4hep::Geometry::Trapezoid(dx1Support, dx2Support, (dzDetector - dZEndPlate - space),
- (dzDetector - dZEndPlate - space), dzSupport),
+ dd4hep::Trapezoid(dx1Support, dx2Support, (dzDetector - dZEndPlate - space),
+ (dzDetector - dZEndPlate - space), dzSupport),
lcdd.material(xSteelSupport.materialStr()));
for (unsigned int idxZRow = 0; idxZRow < numSequencesZ; ++idxZRow) {
@@ -224,7 +222,7 @@ static DD4hep::Geometry::Ref_t createHCal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
if ((-dzDetector + zOffset) >= dzDetector) {
lLog << MSG::WARNING << " WARNING!!!! Module position outside of detector envelope" << std::endl;
}
- DD4hep::Geometry::Position wedgeOffset(0, zOffset, 0);
+ dd4hep::Position wedgeOffset(0, zOffset, 0);
// Fill vector for DetElements
rows.push_back(moduleVolume.placeVolume(wedgeVolume, wedgeOffset));
rows.back().addPhysVolID("row", idxZRow);
@@ -237,14 +235,12 @@ static DD4hep::Geometry::Ref_t createHCal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
double yPosSupport = (sensitiveBarrelRmin + 2 * dzModule + dzSupport) * cos(phi);
double xPosSupport = (sensitiveBarrelRmin + 2 * dzModule + dzSupport) * sin(phi);
- DD4hep::Geometry::Position moduleOffset(xPosModule, yPosModule, 0);
- DD4hep::Geometry::Position supportOffset(xPosSupport, yPosSupport, 0);
+ dd4hep::Position moduleOffset(xPosModule, yPosModule, 0);
+ dd4hep::Position supportOffset(xPosSupport, yPosSupport, 0);
- DD4hep::Geometry::Transform3D trans(
- DD4hep::Geometry::RotationX(-0.5 * dd4hep::pi) * DD4hep::Geometry::RotationY(phi), moduleOffset);
+ dd4hep::Transform3D trans(dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), moduleOffset);
- DD4hep::Geometry::Transform3D transS(
- DD4hep::Geometry::RotationX(-0.5 * dd4hep::pi) * DD4hep::Geometry::RotationY(phi), supportOffset);
+ dd4hep::Transform3D transS(dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), supportOffset);
// Fill the vectors of DetElements
modules.push_back(envelopeVolume.placeVolume(moduleVolume, trans));
modules.back().addPhysVolID("module", idxPhi);
@@ -259,21 +255,21 @@ static DD4hep::Geometry::Ref_t createHCal(DD4hep::Geometry::LCDD& lcdd, xml_h xm
lLog << MSG::DEBUG << "Tiles in layers :" << tilesInLayers[1].size() << std::endl;
for (uint iPhi = 0; iPhi < numSequencesPhi; iPhi++) {
- DetElement moduleDet(hCal, DD4hep::XML::_toString(iPhi, "module%d"), iPhi);
+ DetElement moduleDet(hCal, dd4hep::xml::_toString(iPhi, "module%d"), iPhi);
moduleDet.setPlacement(modules[iPhi]);
- DetElement support(hCal, DD4hep::XML::_toString(iPhi, "support%d"), iPhi);
+ DetElement support(hCal, dd4hep::xml::_toString(iPhi, "support%d"), iPhi);
support.setPlacement(supports[iPhi]);
for (uint iZ = 0; iZ < numSequencesZ; iZ++) {
- DetElement wedgeDet(moduleDet, DD4hep::XML::_toString(iZ, "row%d"), iZ);
+ DetElement wedgeDet(moduleDet, dd4hep::xml::_toString(iZ, "row%d"), iZ);
wedgeDet.setPlacement(rows[iZ]);
for (uint iLayer = 0; iLayer < numSequencesR; iLayer++) {
- DetElement layerDet(wedgeDet, DD4hep::XML::_toString(iLayer, "layer%d"), iLayer);
+ DetElement layerDet(wedgeDet, dd4hep::xml::_toString(iLayer, "layer%d"), iLayer);
layerDet.setPlacement(layers[iLayer]);
for (uint iTile = 0; iTile < tilesInLayers[iLayer].size(); iTile++) {
- DetElement tileDet(layerDet, DD4hep::XML::_toString(iTile, "tile%d"), iTile);
+ DetElement tileDet(layerDet, dd4hep::xml::_toString(iTile, "tile%d"), iTile);
tileDet.setPlacement(tilesInLayers[iLayer][iTile]);
}
}
diff --git a/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp b/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp
index cfa14b9b6..46eda271d 100644
--- a/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp
+++ b/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp
@@ -6,17 +6,17 @@
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/ServiceHandle.h"
-using DD4hep::Geometry::Volume;
-using DD4hep::Geometry::DetElement;
-using DD4hep::XML::Dimension;
-using DD4hep::Geometry::PlacedVolume;
+using dd4hep::Volume;
+using dd4hep::DetElement;
+using dd4hep::xml::Dimension;
+using dd4hep::PlacedVolume;
namespace det {
-void buildEB(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geometry::SensitiveDetector& aSensDet,
- DD4hep::Geometry::Volume& aEnvelope, DD4hep::Geometry::DetElement& aHCal,
- DD4hep::XML::Handle_t& aXmlElement, int sign) {
+void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet,
+ dd4hep::Volume& aEnvelope, dd4hep::DetElement& aHCal,
+ dd4hep::xml::Handle_t& aXmlElement, int sign) {
- DD4hep::Geometry::SensitiveDetector sensDet = aSensDet;
+ dd4hep::SensitiveDetector sensDet = aSensDet;
Dimension sensDetType = aXmlElement.child(_Unicode(sensitive));
sensDet.setType(sensDetType.typeStr());
@@ -108,19 +108,19 @@ void buildEB(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geometry::S
// Add structural support made of steel inside of HCal
DetElement facePlate1(aHCal, "FacePlate_" + std::to_string(1 * sign), 0);
- DD4hep::Geometry::Tube facePlateShape1(dimensions.rmin1(), (sensitiveBarrel1Rmin - space),
+ dd4hep::Tube facePlateShape1(dimensions.rmin1(), (sensitiveBarrel1Rmin - space),
(dzDetector1 - 2 * dZEndPlate - space));
Volume facePlateVol1("facePlateVol1", facePlateShape1, aLcdd.material(xFacePlate.materialStr()));
facePlateVol1.setVisAttributes(aLcdd, xFacePlate.visStr());
- DD4hep::Geometry::Position offsetFace1(0, 0, sign * extBarrelOffset1);
+ dd4hep::Position offsetFace1(0, 0, sign * extBarrelOffset1);
// Faceplate for 2nd part of extended Barrel
DetElement facePlate2(aHCal, "FacePlate_" + std::to_string(2 * sign), 0);
- DD4hep::Geometry::Tube facePlateShape2(dimensions.rmin2(), (sensitiveBarrel2Rmin - space),
+ dd4hep::Tube facePlateShape2(dimensions.rmin2(), (sensitiveBarrel2Rmin - space),
(dzDetector2 - 2 * dZEndPlate - space));
Volume facePlateVol2("facePlateVol2", facePlateShape2, aLcdd.material(xFacePlate.materialStr()));
facePlateVol2.setVisAttributes(aLcdd, xFacePlate.visStr());
- DD4hep::Geometry::Position offsetFace2(0, 0, sign * extBarrelOffset2);
+ dd4hep::Position offsetFace2(0, 0, sign * extBarrelOffset2);
PlacedVolume placedFacePlate1 = aEnvelope.placeVolume(facePlateVol1, offsetFace1);
facePlate1.setPlacement(placedFacePlate1);
@@ -128,21 +128,21 @@ void buildEB(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geometry::S
facePlate2.setPlacement(placedFacePlate2);
// Add structural support made of steel at both ends of extHCal
- DD4hep::Geometry::Tube endPlateShape1(dimensions.rmin1(), (dimensions.rmax1() - dSteelSupport), dZEndPlate);
+ dd4hep::Tube endPlateShape1(dimensions.rmin1(), (dimensions.rmax1() - dSteelSupport), dZEndPlate);
Volume endPlateVol1("endPlateVol1", endPlateShape1, aLcdd.material(xEndPlate.materialStr()));
endPlateVol1.setVisAttributes(aLcdd, xEndPlate.visStr());
- DD4hep::Geometry::Tube endPlateShape2(dimensions.rmin2(), (dimensions.rmax2() - dSteelSupport), dZEndPlate);
+ dd4hep::Tube endPlateShape2(dimensions.rmin2(), (dimensions.rmax2() - dSteelSupport), dZEndPlate);
Volume endPlateVol2("endPlateVol2", endPlateShape2, aLcdd.material(xEndPlate.materialStr()));
endPlateVol2.setVisAttributes(aLcdd, xEndPlate.visStr());
// Endplates placed for the extended Barrels in front and in the back to the central Barrel
DetElement endPlatePos(aHCal, "endPlate_" + std::to_string(1 * sign), 0);
- DD4hep::Geometry::Position posOffset(0, 0, sign * (extBarrelOffset2 + dzDetector2 - dZEndPlate));
+ dd4hep::Position posOffset(0, 0, sign * (extBarrelOffset2 + dzDetector2 - dZEndPlate));
PlacedVolume placedEndPlatePos = aEnvelope.placeVolume(endPlateVol2, posOffset);
endPlatePos.setPlacement(placedEndPlatePos);
DetElement endPlateNeg(aHCal, "endPlate_" + std::to_string(2 * sign), 0);
- DD4hep::Geometry::Position negOffset(0, 0, sign * (extBarrelOffset1 - dzDetector1 + dZEndPlate));
+ dd4hep::Position negOffset(0, 0, sign * (extBarrelOffset1 - dzDetector1 + dZEndPlate));
PlacedVolume placedEndPlateNeg = aEnvelope.placeVolume(endPlateVol1, negOffset);
endPlateNeg.setPlacement(placedEndPlateNeg);
@@ -175,25 +175,25 @@ void buildEB(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geometry::S
double dzSupport = dSteelSupport / 2.;
// DetElement vectors for placement in loop at the end
- std::vector supports1;
+ std::vector supports1;
supports1.reserve(numSequencesPhi);
- std::vector modules1;
+ std::vector modules1;
modules1.reserve(numSequencesPhi);
- std::vector supports2;
+ std::vector supports2;
supports2.reserve(numSequencesPhi);
- std::vector modules2;
+ std::vector modules2;
modules2.reserve(numSequencesPhi);
- std::vector rows;
+ std::vector rows;
rows.reserve(numSequencesZ1 + numSequencesZ2);
- std::vector layers;
+ std::vector layers;
layers.reserve(layerDepths1.size() + layerDepths2.size());
- std::vector> tilesInLayers;
+ std::vector> tilesInLayers;
tilesInLayers.reserve(layerDepths1.size() + layerDepths2.size());
// First we construct base wedges:
- Volume WedgeVolume1("WedgeVolume1", DD4hep::Geometry::Trapezoid(dx1Module1, dx2Module1, dy0, dy0, dzModule1),
+ Volume WedgeVolume1("WedgeVolume1", dd4hep::Trapezoid(dx1Module1, dx2Module1, dy0, dy0, dzModule1),
aLcdd.material("Air"));
- Volume WedgeVolume2("WedgeVolume2", DD4hep::Geometry::Trapezoid(dx1Module2, dx2Module2, dy0, dy0, dzModule2),
+ Volume WedgeVolume2("WedgeVolume2", dd4hep::Trapezoid(dx1Module2, dx2Module2, dy0, dy0, dzModule2),
aLcdd.material("Air"));
double layerR = 0.;
// Placement of subWedges in Wedge
@@ -212,30 +212,30 @@ void buildEB(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geometry::S
layerR += layerDepths1.at(idxLayer);
- Volume layerVolume("layerVolume", DD4hep::Geometry::Trapezoid(dx1, dx2, dy0, dy0, dz0), aLcdd.material("Air"));
+ Volume layerVolume("layerVolume", dd4hep::Trapezoid(dx1, dx2, dy0, dy0, dz0), aLcdd.material("Air"));
layerVolume.setVisAttributes(aLcdd.invisible());
unsigned int idxSubMod = 0;
unsigned int idxActMod = 0;
double modCompZOffset = -sequenceDimensions.dz() * 0.5;
// layer middle offset
- DD4hep::Geometry::Position modOffset(0, 0, rMiddle);
+ dd4hep::Position modOffset(0, 0, rMiddle);
layers.push_back(WedgeVolume1.placeVolume(layerVolume, modOffset));
layers.back().addPhysVolID("layer", idxLayer);
- std::vector tiles;
+ std::vector tiles;
// Filling of the subWedge with coponents (submodules)
for (xml_coll_t xCompColl(sequences[sequenceIdx], _Unicode(module_component)); xCompColl;
++xCompColl, ++idxSubMod) {
xml_comp_t xComp = xCompColl;
double dyComp = xComp.thickness() * 0.5;
- Volume modCompVol("modCompVolume", DD4hep::Geometry::Trapezoid(dx1, dx2, dyComp, dyComp, dz0),
+ Volume modCompVol("modCompVolume", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0),
aLcdd.material(xComp.materialStr()));
modCompVol.setVisAttributes(aLcdd, xComp.visStr());
- DD4hep::Geometry::Position offset(0, modCompZOffset + dyComp + xComp.y_offset() / 2, 0);
+ dd4hep::Position offset(0, modCompZOffset + dyComp + xComp.y_offset() / 2, 0);
if (xComp.isSensitive()) {
- Volume tileVol("tileVolume", DD4hep::Geometry::Trapezoid(dx1, dx2, dyComp, dyComp, dz0),
+ Volume tileVol("tileVolume", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0),
aLcdd.material(xComp.materialStr()));
tileVol.setVisAttributes(aLcdd, xComp.visStr());
tileVol.setSensitiveDetector(sensDet);
@@ -268,30 +268,30 @@ void buildEB(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geometry::S
layerR += layerDepths2.at(idxLayer);
- Volume layerVolume("layerVolume", DD4hep::Geometry::Trapezoid(dx1, dx2, dy0, dy0, dz0), aLcdd.material("Air"));
+ Volume layerVolume("layerVolume", dd4hep::Trapezoid(dx1, dx2, dy0, dy0, dz0), aLcdd.material("Air"));
layerVolume.setVisAttributes(aLcdd.invisible());
unsigned int idxSubMod = 0;
unsigned int idxActMod = 0;
double modCompZOffset = -sequenceDimensions.dz() * 0.5;
// layer middle offset
- DD4hep::Geometry::Position modOffset(0, 0, rMiddle);
+ dd4hep::Position modOffset(0, 0, rMiddle);
layers.push_back(WedgeVolume2.placeVolume(layerVolume, modOffset));
layers.back().addPhysVolID("layer", idxLayer);
- std::vector tiles;
+ std::vector tiles;
// Filling of the subWedge with coponents (submodules)
for (xml_coll_t xCompColl(sequences[sequenceIdx], _Unicode(module_component)); xCompColl;
++xCompColl, ++idxSubMod) {
xml_comp_t xComp = xCompColl;
double dyComp = xComp.thickness() * 0.5;
- Volume modCompVol("modCompVolume", DD4hep::Geometry::Trapezoid(dx1, dx2, dyComp, dyComp, dz0),
+ Volume modCompVol("modCompVolume", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0),
aLcdd.material(xComp.materialStr()));
modCompVol.setVisAttributes(aLcdd, xComp.visStr());
- DD4hep::Geometry::Position offset(0, modCompZOffset + dyComp + xComp.y_offset() / 2, 0);
+ dd4hep::Position offset(0, modCompZOffset + dyComp + xComp.y_offset() / 2, 0);
if (xComp.isSensitive()) {
- Volume tileVol("tileVolume", DD4hep::Geometry::Trapezoid(dx1, dx2, dyComp, dyComp, dz0),
+ Volume tileVol("tileVolume", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0),
aLcdd.material(xComp.materialStr()));
tileVol.setVisAttributes(aLcdd, xComp.visStr());
tileVol.setSensitiveDetector(sensDet);
@@ -308,23 +308,23 @@ void buildEB(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geometry::S
}
Volume ModuleVolume1("ModuleVolume1",
- DD4hep::Geometry::Trapezoid(dx1Module1, dx2Module1, (dzDetector1 - 2 * dZEndPlate - space),
+ dd4hep::Trapezoid(dx1Module1, dx2Module1, (dzDetector1 - 2 * dZEndPlate - space),
(dzDetector1 - 2 * dZEndPlate - space), dzModule1),
aLcdd.material("Air"));
Volume ModuleVolume2("ModuleVolume2",
- DD4hep::Geometry::Trapezoid(dx1Module2, dx2Module2, (dzDetector2 - 2 * dZEndPlate - space),
+ dd4hep::Trapezoid(dx1Module2, dx2Module2, (dzDetector2 - 2 * dZEndPlate - space),
(dzDetector2 - 2 * dZEndPlate - space), dzModule2),
aLcdd.material("Air"));
Volume SteelSupportVolume1("SteelSupportVolume1",
- DD4hep::Geometry::Trapezoid(dx1Support1, dx2Support1,
+ dd4hep::Trapezoid(dx1Support1, dx2Support1,
(dzDetector1 - 2 * dZEndPlate - space),
(dzDetector1 - 2 * dZEndPlate - space), dzSupport),
aLcdd.material(xSteelSupport.materialStr()));
Volume SteelSupportVolume2("SteelSupportVolume2",
- DD4hep::Geometry::Trapezoid(dx1Support2, dx2Support2,
+ dd4hep::Trapezoid(dx1Support2, dx2Support2,
(dzDetector2 - 2 * dZEndPlate - space),
(dzDetector2 - 2 * dZEndPlate - space), dzSupport),
aLcdd.material(xSteelSupport.materialStr()));
@@ -334,7 +334,7 @@ void buildEB(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geometry::S
double zOffset = -dzDetector1 + 2 * dZEndPlate + space + (2 * idxZRow + 1) * (dzSequence * 0.5);
lLog << MSG::DEBUG << "z offset of wedges = " << zOffset << std::endl;
- DD4hep::Geometry::Position wedgeOffset(0, zOffset, 0);
+ dd4hep::Position wedgeOffset(0, zOffset, 0);
// Fill vector for DetElements
rows.push_back(ModuleVolume1.placeVolume(WedgeVolume1, wedgeOffset));
rows.back().addPhysVolID("row", idxZRow);
@@ -343,7 +343,7 @@ void buildEB(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geometry::S
double zOffset = -dzDetector2 + 2 * dZEndPlate + space + (2 * idxZRow + 1) * (dzSequence * 0.5);
lLog << MSG::DEBUG << "z offset of wedges = " << zOffset << std::endl;
- DD4hep::Geometry::Position wedgeOffset(0, zOffset, 0);
+ dd4hep::Position wedgeOffset(0, zOffset, 0);
// Fill vector for DetElements
rows.push_back(ModuleVolume2.placeVolume(WedgeVolume2, wedgeOffset));
rows.back().addPhysVolID("row", (numSequencesZ1 + idxZRow));
@@ -364,23 +364,23 @@ void buildEB(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geometry::S
// endplates
// Placement within envelopeVolumeNeg and Pos (--> total offset in z later)
// --> Offsets calculated relative to middle of envelope in z
- DD4hep::Geometry::Position moduleOffset1(xPosModule1, yPosModule1, sign * extBarrelOffset1);
- DD4hep::Geometry::Position supportOffset1(xPosSupport1, yPosSupport1, sign * extBarrelOffset1);
- DD4hep::Geometry::Position moduleOffset2(xPosModule2, yPosModule2, sign * extBarrelOffset2);
- DD4hep::Geometry::Position supportOffset2(xPosSupport2, yPosSupport2, sign * extBarrelOffset2);
+ dd4hep::Position moduleOffset1(xPosModule1, yPosModule1, sign * extBarrelOffset1);
+ dd4hep::Position supportOffset1(xPosSupport1, yPosSupport1, sign * extBarrelOffset1);
+ dd4hep::Position moduleOffset2(xPosModule2, yPosModule2, sign * extBarrelOffset2);
+ dd4hep::Position supportOffset2(xPosSupport2, yPosSupport2, sign * extBarrelOffset2);
// Placement around central Barrel
- DD4hep::Geometry::Transform3D trans1(
- DD4hep::Geometry::RotationX(-0.5 * dd4hep::pi) * DD4hep::Geometry::RotationY(phi), moduleOffset1);
+ dd4hep::Transform3D trans1(
+ dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), moduleOffset1);
- DD4hep::Geometry::Transform3D trans1S(
- DD4hep::Geometry::RotationX(-0.5 * dd4hep::pi) * DD4hep::Geometry::RotationY(phi), supportOffset1);
+ dd4hep::Transform3D trans1S(
+ dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), supportOffset1);
- DD4hep::Geometry::Transform3D trans2(
- DD4hep::Geometry::RotationX(-0.5 * dd4hep::pi) * DD4hep::Geometry::RotationY(phi), moduleOffset2);
+ dd4hep::Transform3D trans2(
+ dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), moduleOffset2);
- DD4hep::Geometry::Transform3D trans2S(
- DD4hep::Geometry::RotationX(-0.5 * dd4hep::pi) * DD4hep::Geometry::RotationY(phi), supportOffset2);
+ dd4hep::Transform3D trans2S(
+ dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), supportOffset2);
// Fill the vectors of DetElements
modules1.push_back(aEnvelope.placeVolume(ModuleVolume1, trans1));
@@ -402,39 +402,39 @@ void buildEB(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geometry::S
for (uint iPhi = 0; iPhi < numSequencesPhi; iPhi++) {
int signedPhi = numSequencesPhi - sign * (iPhi + 1);
- DetElement moduleDet1(aHCal, DD4hep::XML::_toString(signedPhi, "module1_%d"), signedPhi);
+ DetElement moduleDet1(aHCal, dd4hep::xml::_toString(signedPhi, "module1_%d"), signedPhi);
moduleDet1.setPlacement(modules1[iPhi]);
- DetElement support1(aHCal, DD4hep::XML::_toString(signedPhi, "support1_%d"), signedPhi);
+ DetElement support1(aHCal, dd4hep::xml::_toString(signedPhi, "support1_%d"), signedPhi);
support1.setPlacement(supports1[iPhi]);
- DetElement moduleDet2(aHCal, DD4hep::XML::_toString(signedPhi, "module2_%d"), signedPhi);
+ DetElement moduleDet2(aHCal, dd4hep::xml::_toString(signedPhi, "module2_%d"), signedPhi);
moduleDet2.setPlacement(modules2[iPhi]);
- DetElement support2(aHCal, DD4hep::XML::_toString(signedPhi, "support2_%d"), signedPhi);
+ DetElement support2(aHCal, dd4hep::xml::_toString(signedPhi, "support2_%d"), signedPhi);
support2.setPlacement(supports2[iPhi]);
for (uint iZ = 0; iZ < numSequencesZ1; iZ++) {
- DetElement wedgeDet(moduleDet1, DD4hep::XML::_toString(iZ, "row%d"), iZ);
+ DetElement wedgeDet(moduleDet1, dd4hep::xml::_toString(iZ, "row%d"), iZ);
wedgeDet.setPlacement(rows[iZ]);
for (uint iLayer = 0; iLayer < numSequencesR1; iLayer++) {
- DetElement layerDet(wedgeDet, DD4hep::XML::_toString(iLayer, "layer%d"), iLayer);
+ DetElement layerDet(wedgeDet, dd4hep::xml::_toString(iLayer, "layer%d"), iLayer);
layerDet.setPlacement(layers[iLayer]);
for (uint iTile = 0; iTile < tilesInLayers[iLayer].size(); iTile++) {
- DetElement tileDet(layerDet, DD4hep::XML::_toString(iTile, "tile%d"), iTile);
+ DetElement tileDet(layerDet, dd4hep::xml::_toString(iTile, "tile%d"), iTile);
tileDet.setPlacement(tilesInLayers[iLayer][iTile]);
}
}
}
for (uint iZ = numSequencesZ1; iZ < (numSequencesZ1 + numSequencesZ2); iZ++) {
- DetElement wedgeDet(moduleDet2, DD4hep::XML::_toString(iZ, "row%d"), iZ);
+ DetElement wedgeDet(moduleDet2, dd4hep::xml::_toString(iZ, "row%d"), iZ);
wedgeDet.setPlacement(rows[iZ]);
for (uint iLayer = numSequencesR1; iLayer < (numSequencesR1 + numSequencesR2); iLayer++) {
- DetElement layerDet(wedgeDet, DD4hep::XML::_toString(iLayer, "layer%d"), iLayer);
+ DetElement layerDet(wedgeDet, dd4hep::xml::_toString(iLayer, "layer%d"), iLayer);
layerDet.setPlacement(layers[iLayer]);
for (uint iTile = 0; iTile < tilesInLayers[iLayer].size(); iTile++) {
- DetElement tileDet(layerDet, DD4hep::XML::_toString(iTile, "tile%d"), iTile);
+ DetElement tileDet(layerDet, dd4hep::xml::_toString(iTile, "tile%d"), iTile);
tileDet.setPlacement(tilesInLayers[iLayer][iTile]);
}
}
@@ -443,8 +443,8 @@ void buildEB(MsgStream& lLog, DD4hep::Geometry::LCDD& aLcdd, DD4hep::Geometry::S
return;
}
-static DD4hep::Geometry::Ref_t createHCalEB(DD4hep::Geometry::LCDD& lcdd, xml_h xmlElement,
- DD4hep::Geometry::SensitiveDetector sensDet) {
+static dd4hep::Ref_t createHCalEB(dd4hep::Detector& lcdd, xml_h xmlElement,
+ dd4hep::SensitiveDetector sensDet) {
// Get the Gaudi message service and message stream:
ServiceHandle msgSvc("MessageSvc", "ExtHCalConstruction");
@@ -454,14 +454,14 @@ static DD4hep::Geometry::Ref_t createHCalEB(DD4hep::Geometry::LCDD& lcdd, xml_h
std::string detName = xmlDet.nameStr();
// Make DetElement
- DD4hep::Geometry::DetElement hCalEB(detName, xmlDet.id());
+ dd4hep::DetElement hCalEB(detName, xmlDet.id());
// Make volume that envelopes the whole barrel; set material to air
Dimension dimensions(xmlDet.dimensions());
- DD4hep::Geometry::Tube envelope(dimensions.rmin2(), dimensions.rmax1(), (dimensions.z_offset() + dimensions.dz()));
- DD4hep::Geometry::Tube negative(dimensions.rmin2(), dimensions.rmax1(), (dimensions.offset() - dimensions.width()));
- DD4hep::Geometry::SubtractionSolid envelopeShape(envelope, negative);
+ dd4hep::Tube envelope(dimensions.rmin2(), dimensions.rmax1(), (dimensions.z_offset() + dimensions.dz()));
+ dd4hep::Tube negative(dimensions.rmin2(), dimensions.rmax1(), (dimensions.offset() - dimensions.width()));
+ dd4hep::SubtractionSolid envelopeShape(envelope, negative);
Volume envelopeVolume(detName + "_volume", envelopeShape, lcdd.air());
envelopeVolume.setVisAttributes(lcdd, dimensions.visStr());
diff --git a/Detector/DetFCChhTailCatcher/compact/FCChh_TailCatcher.xml b/Detector/DetFCChhTailCatcher/compact/FCChh_TailCatcher.xml
index 8e721a94b..ee4b6e2cb 100644
--- a/Detector/DetFCChhTailCatcher/compact/FCChh_TailCatcher.xml
+++ b/Detector/DetFCChhTailCatcher/compact/FCChh_TailCatcher.xml
@@ -23,7 +23,7 @@
-
+
system:7,eta:11,phi:8
diff --git a/Detector/DetFCChhTrackerTkLayout/src/BeamTube_geo.cpp b/Detector/DetFCChhTrackerTkLayout/src/BeamTube_geo.cpp
index ffa871552..02083490a 100644
--- a/Detector/DetFCChhTrackerTkLayout/src/BeamTube_geo.cpp
+++ b/Detector/DetFCChhTrackerTkLayout/src/BeamTube_geo.cpp
@@ -3,12 +3,12 @@
#include "ACTS/Plugins/DD4hepPlugins/ActsExtension.hpp"
#include "DD4hep/DetFactoryHelper.h"
-using DD4hep::Geometry::Volume;
-using DD4hep::Geometry::PlacedVolume;
-using DD4hep::Geometry::Tube;
-using DD4hep::Geometry::DetElement;
+using dd4hep::Volume;
+using dd4hep::PlacedVolume;
+using dd4hep::Tube;
+using dd4hep::DetElement;
-static DD4hep::Ref_t create_element(DD4hep::Geometry::LCDD& lcdd, xml_h e, DD4hep::Geometry::SensitiveDetector) {
+static dd4hep::Ref_t create_element(dd4hep::Detector& lcdd, xml_h e, dd4hep::SensitiveDetector ) {
xml_det_t x_det = e;
std::string det_name = x_det.nameStr();
// Make DetElement
@@ -17,7 +17,7 @@ static DD4hep::Ref_t create_element(DD4hep::Geometry::LCDD& lcdd, xml_h e, DD4he
volConfig.isBeampipe = true;
Acts::ActsExtension* detvolume = new Acts::ActsExtension(volConfig);
beamtube.addExtension(detvolume);
- DD4hep::XML::Dimension x_det_dim(x_det.dimensions());
+ dd4hep::xml::Dimension x_det_dim(x_det.dimensions());
Tube tube_shape(x_det_dim.rmin(), x_det_dim.rmax(), x_det_dim.z());
Volume tube_vol(det_name, tube_shape, lcdd.material(x_det_dim.attr("material")));
tube_vol.setVisAttributes(lcdd, x_det_dim.visStr());
diff --git a/Detector/DetFCChhTrackerTkLayout/src/TkLayoutBarrel_Geo.cpp b/Detector/DetFCChhTrackerTkLayout/src/TkLayoutBarrel_Geo.cpp
index 6cd6c034e..03b7f1a82 100644
--- a/Detector/DetFCChhTrackerTkLayout/src/TkLayoutBarrel_Geo.cpp
+++ b/Detector/DetFCChhTrackerTkLayout/src/TkLayoutBarrel_Geo.cpp
@@ -8,20 +8,20 @@
#include "DD4hep/DetFactoryHelper.h"
-using DD4hep::Geometry::Volume;
-using DD4hep::Geometry::DetElement;
-using DD4hep::XML::Dimension;
-using DD4hep::Geometry::PlacedVolume;
+using dd4hep::Volume;
+using dd4hep::DetElement;
+using dd4hep::xml::Dimension;
+using dd4hep::PlacedVolume;
namespace det {
-static DD4hep::Geometry::Ref_t createTkLayoutTrackerBarrel(DD4hep::Geometry::LCDD& lcdd,
- DD4hep::XML::Handle_t xmlElement,
- DD4hep::Geometry::SensitiveDetector sensDet) {
+static dd4hep::Ref_t createTkLayoutTrackerBarrel(dd4hep::Detector& lcdd,
+ dd4hep::xml::Handle_t xmlElement,
+ dd4hep::SensitiveDetector sensDet) {
// shorthands
- DD4hep::XML::DetElement xmlDet = static_cast(xmlElement);
+ dd4hep::xml::DetElement xmlDet = static_cast(xmlElement);
Dimension dimensions(xmlDet.dimensions());
// get sensitive detector type from xml
- DD4hep::XML::Dimension sdTyp = xmlElement.child(_Unicode(sensitive));
+ dd4hep::xml::Dimension sdTyp = xmlElement.child(_Unicode(sensitive));
// sensitive detector used for all sensitive parts of this detector
sensDet.setType(sdTyp.typeStr());
@@ -34,7 +34,7 @@ static DD4hep::Geometry::Ref_t createTkLayoutTrackerBarrel(DD4hep::Geometry::LCD
// detElement owns extension
Acts::ActsExtension* detWorldExt = new Acts::ActsExtension(barrelConfig);
topDetElement.addExtension(detWorldExt);
- DD4hep::Geometry::Tube topVolumeShape(
+ dd4hep::Tube topVolumeShape(
dimensions.rmin(), dimensions.rmax(), (dimensions.zmax() - dimensions.zmin()) * 0.5);
Volume topVolume(detectorName, topVolumeShape, lcdd.air());
topVolume.setVisAttributes(lcdd.invisible());
@@ -44,16 +44,16 @@ static DD4hep::Geometry::Ref_t createTkLayoutTrackerBarrel(DD4hep::Geometry::LCD
double integratedModuleComponentThickness = 0;
double phi = 0;
// loop over 'layer' nodes in xml
- DD4hep::XML::Component xLayers = xmlElement.child(_Unicode(layers));
- for (DD4hep::XML::Collection_t xLayerColl(xLayers, _U(layer)); nullptr != xLayerColl; ++xLayerColl) {
- DD4hep::XML::Component xLayer = static_cast(xLayerColl);
- DD4hep::XML::Component xRods = xLayer.child("rods");
- DD4hep::XML::Component xRodEven = xRods.child("rodOdd");
- DD4hep::XML::Component xRodOdd = xRods.child("rodEven");
- DD4hep::XML::Component xModulesEven = xRodEven.child("modules");
- DD4hep::XML::Component xModulePropertiesOdd = xRodOdd.child("moduleProperties");
- DD4hep::XML::Component xModulesOdd = xRodOdd.child("modules");
- DD4hep::Geometry::Tube layerShape(xLayer.rmin(), xLayer.rmax(), dimensions.zmax());
+ dd4hep::xml::Component xLayers = xmlElement.child(_Unicode(layers));
+ for (dd4hep::xml::Collection_t xLayerColl(xLayers, _U(layer)); nullptr != xLayerColl; ++xLayerColl) {
+ dd4hep::xml::Component xLayer = static_cast(xLayerColl);
+ dd4hep::xml::Component xRods = xLayer.child("rods");
+ dd4hep::xml::Component xRodEven = xRods.child("rodOdd");
+ dd4hep::xml::Component xRodOdd = xRods.child("rodEven");
+ dd4hep::xml::Component xModulesEven = xRodEven.child("modules");
+ dd4hep::xml::Component xModulePropertiesOdd = xRodOdd.child("moduleProperties");
+ dd4hep::xml::Component xModulesOdd = xRodOdd.child("modules");
+ dd4hep::Tube layerShape(xLayer.rmin(), xLayer.rmax(), dimensions.zmax());
Volume layerVolume("layer", layerShape, lcdd.material("Air"));
//layerVolume.setVisAttributes(lcdd.invisible());
PlacedVolume placedLayerVolume = topVolume.placeVolume(layerVolume);
@@ -68,22 +68,22 @@ static DD4hep::Geometry::Ref_t createTkLayoutTrackerBarrel(DD4hep::Geometry::LCD
Acts::ActsExtension* layerExtension = new Acts::ActsExtension(layConfig);
lay_det.addExtension(layerExtension);
lay_det.setPlacement(placedLayerVolume);
- DD4hep::XML::Component xModuleComponentsOdd = xModulePropertiesOdd.child("components");
+ dd4hep::xml::Component xModuleComponentsOdd = xModulePropertiesOdd.child("components");
integratedModuleComponentThickness = 0;
int moduleCounter = 0;
Volume moduleVolume;
- for (DD4hep::XML::Collection_t xModuleComponentOddColl(xModuleComponentsOdd, _U(component));
+ for (dd4hep::xml::Collection_t xModuleComponentOddColl(xModuleComponentsOdd, _U(component));
nullptr != xModuleComponentOddColl;
++xModuleComponentOddColl) {
- DD4hep::XML::Component xModuleComponentOdd = static_cast(xModuleComponentOddColl);
+ dd4hep::xml::Component xModuleComponentOdd = static_cast(xModuleComponentOddColl);
moduleVolume = Volume("module",
- DD4hep::Geometry::Box(0.5 * xModulePropertiesOdd.attr("modWidth"),
+ dd4hep::Box(0.5 * xModulePropertiesOdd.attr("modWidth"),
0.5 * xModuleComponentOdd.thickness(),
0.5 * xModulePropertiesOdd.attr("modLength")),
lcdd.material(xModuleComponentOdd.materialStr()));
moduleVolume.setVisAttributes(lcdd.invisible());
unsigned int nPhi = xRods.repeat();
- DD4hep::XML::Handle_t currentComp;
+ dd4hep::xml::Handle_t currentComp;
for (unsigned int phiIndex = 0; phiIndex < nPhi; ++phiIndex) {
double lX = 0;
double lY = 0;
@@ -94,16 +94,16 @@ static DD4hep::Geometry::Ref_t createTkLayoutTrackerBarrel(DD4hep::Geometry::LCD
} else {
currentComp = xModulesOdd;
}
- for (DD4hep::XML::Collection_t xModuleColl(currentComp, _U(module)); nullptr != xModuleColl; ++xModuleColl) {
- DD4hep::XML::Component xModule = static_cast(xModuleColl);
+ for (dd4hep::xml::Collection_t xModuleColl(currentComp, _U(module)); nullptr != xModuleColl; ++xModuleColl) {
+ dd4hep::xml::Component xModule = static_cast(xModuleColl);
double currentPhi = atan2(xModule.Y(), xModule.X());
double componentOffset = integratedModuleComponentThickness - 0.5 * xModulePropertiesOdd.attr("modThickness") + 0.5 * xModuleComponentOdd.thickness();
lX = xModule.X() + cos(currentPhi) * componentOffset;
lY = xModule.Y() + sin(currentPhi) * componentOffset;
lZ = xModule.Z();
- DD4hep::Geometry::Translation3D moduleOffset(lX, lY, lZ);
- DD4hep::Geometry::Transform3D lTrafo(DD4hep::Geometry::RotationZ(atan2(lY, lX) + 0.5 * M_PI), moduleOffset);
- DD4hep::Geometry::RotationZ lRotation(phi);
+ dd4hep::Translation3D moduleOffset(lX, lY, lZ);
+ dd4hep::Transform3D lTrafo(dd4hep::RotationZ(atan2(lY, lX) + 0.5 * M_PI), moduleOffset);
+ dd4hep::RotationZ lRotation(phi);
PlacedVolume placedModuleVolume = layerVolume.placeVolume(moduleVolume, lRotation * lTrafo);
if (xModuleComponentOdd.isSensitive()) {
placedModuleVolume.addPhysVolID("module", moduleCounter);
diff --git a/Detector/DetFCChhTrackerTkLayout/src/TkLayoutEndcap_Geo.cpp b/Detector/DetFCChhTrackerTkLayout/src/TkLayoutEndcap_Geo.cpp
index 6fd4ed03e..6e334a4bf 100644
--- a/Detector/DetFCChhTrackerTkLayout/src/TkLayoutEndcap_Geo.cpp
+++ b/Detector/DetFCChhTrackerTkLayout/src/TkLayoutEndcap_Geo.cpp
@@ -5,24 +5,25 @@
#include "ACTS/Plugins/DD4hepPlugins/ActsExtension.hpp"
#include "ACTS/Plugins/DD4hepPlugins/IActsExtension.hpp"
-using DD4hep::Geometry::Volume;
-using DD4hep::Geometry::DetElement;
-using DD4hep::XML::Dimension;
-using DD4hep::XML::Component;
-using DD4hep::Geometry::PlacedVolume;
+
+using dd4hep::Volume;
+using dd4hep::DetElement;
+using dd4hep::xml::Dimension;
+using dd4hep::xml::Component;
+using dd4hep::PlacedVolume;
namespace det {
-static DD4hep::Geometry::Ref_t createTkLayoutTrackerEndcap(DD4hep::Geometry::LCDD& lcdd,
- DD4hep::XML::Handle_t xmlElement,
- DD4hep::Geometry::SensitiveDetector sensDet) {
+static dd4hep::Ref_t createTkLayoutTrackerEndcap(dd4hep::Detector& lcdd,
+ dd4hep::xml::Handle_t xmlElement,
+ dd4hep::SensitiveDetector sensDet) {
// shorthands
- DD4hep::XML::DetElement xmlDet = static_cast(xmlElement);
+ dd4hep::xml::DetElement xmlDet = static_cast(xmlElement);
Dimension dimensions(xmlDet.dimensions());
double l_overlapMargin = 0.01;
// get sensitive detector type from xml
- DD4hep::XML::Dimension sdTyp = xmlElement.child(_Unicode(sensitive)); // retrieve the type
- sensDet.setType(sdTyp.typeStr()); // set for the whole detector
+ dd4hep::xml::Dimension sdTyp = xmlElement.child(_Unicode(sensitive)); // retrieve the type
+ sensDet.setType(sdTyp.typeStr()); // set for the whole detector
// definition of top volume
std::string detName = xmlDet.nameStr();
@@ -34,8 +35,7 @@ static DD4hep::Geometry::Ref_t createTkLayoutTrackerEndcap(DD4hep::Geometry::LCD
Acts::ActsExtension* ecapDetExt = new Acts::ActsExtension(actsEcapConfig);
posEcapDetElement.addExtension(ecapDetExt);
-
- DD4hep::Geometry::Assembly envelopeVolume("endcapEnvelope");
+ dd4hep::Assembly envelopeVolume("endcapEnvelope");
envelopeVolume.setVisAttributes(lcdd.invisible());
Component xDiscs = xmlElement.child(_Unicode(discs));
@@ -50,14 +50,14 @@ static DD4hep::Geometry::Ref_t createTkLayoutTrackerEndcap(DD4hep::Geometry::LCD
std::vector discVolumeVec;
std::vector discDetElementVec;
/// iterate over discs
- for (DD4hep::XML::Collection_t xDiscColl(xDiscs, _Unicode(discZPls)); nullptr != xDiscColl; ++xDiscColl) {
+ for (dd4hep::xml::Collection_t xDiscColl(xDiscs, _Unicode(discZPls)); nullptr != xDiscColl; ++xDiscColl) {
Component xDisc = static_cast(xDiscColl);
Component xCurrentRings = xDisc.child(_Unicode(rings));
// create disc volume
double discThickness = 0.5 * (xDisc.zmax() - xDisc.zmin());
currentZ = xDisc.z() - dimensions.zmin() - envelopeThickness;
if(xCurrentRings.hasChild(_Unicode(ring))) { // we have information to construct a new volume
- DD4hep::Geometry::Tube discShape(
+ dd4hep::Tube discShape(
xDisc.rmin() - l_overlapMargin, xDisc.rmax() + l_overlapMargin, discThickness + l_overlapMargin);
discVolumeVec.emplace_back("disc", discShape, lcdd.air());
@@ -70,7 +70,7 @@ static DD4hep::Geometry::Ref_t createTkLayoutTrackerEndcap(DD4hep::Geometry::LCD
Acts::ActsExtension* detlayer = new Acts::ActsExtension(layConfig);
discDetElementVec.back().addExtension(detlayer);
// iterate over rings
- for (DD4hep::XML::Collection_t xRingColl(xCurrentRings, _U(ring)); (nullptr != xRingColl); ++xRingColl) {
+ for (dd4hep::xml::Collection_t xRingColl(xCurrentRings, _U(ring)); (nullptr != xRingColl); ++xRingColl) {
Component xRing = static_cast(xRingColl);
Component xRingModules = xRing.child(_Unicode(modules));
Component xModuleOdd = xRingModules.child(_Unicode(moduleOdd));
@@ -81,11 +81,11 @@ static DD4hep::Geometry::Ref_t createTkLayoutTrackerEndcap(DD4hep::Geometry::LCD
// place components in module
double integratedCompThickness = 0.;
- for (DD4hep::XML::Collection_t xCompColl(xModulePropertiesComp, _U(component)); nullptr != xCompColl;
+ for (dd4hep::xml::Collection_t xCompColl(xModulePropertiesComp, _U(component)); nullptr != xCompColl;
++xCompColl) {
Component xComp = static_cast(xCompColl);
Volume componentVolume("component",
- DD4hep::Geometry::Trapezoid(0.5 * xModuleProperties.attr("modWidthMin"),
+ dd4hep::Trapezoid(0.5 * xModuleProperties.attr("modWidthMin"),
0.5 * xModuleProperties.attr("modWidthMax"),
0.5 * xComp.thickness(),
0.5 * xComp.thickness(),
@@ -118,19 +118,19 @@ static DD4hep::Geometry::Ref_t createTkLayoutTrackerEndcap(DD4hep::Geometry::LCD
}
// position module in the x-y plane, smaller end inward
// and incorporate phi tilt if any
- DD4hep::Geometry::RotationY lRotation1(M_PI * 0.5);
- DD4hep::Geometry::RotationX lRotation2(M_PI * 0.5 + phiTilt);
+ dd4hep::RotationY lRotation1(M_PI * 0.5);
+ dd4hep::RotationX lRotation2(M_PI * 0.5 + phiTilt);
// align radially
double componentOffset =
integratedCompThickness - 0.5 * xModuleProperties.attr("modThickness") + 0.5 * xComp.thickness();
- DD4hep::Geometry::RotationZ lRotation3(atan2(lY, lX));
+ dd4hep::RotationZ lRotation3(atan2(lY, lX));
// theta tilt, if any -- note the different convention between
// tklayout and here, thus the subtraction of pi / 2
- DD4hep::Geometry::RotationY lRotation4(thetaTilt - M_PI * 0.5);
- DD4hep::Geometry::RotationZ lRotation_PhiPos(phi);
+ dd4hep::RotationY lRotation4(thetaTilt - M_PI * 0.5);
+ dd4hep::RotationZ lRotation_PhiPos(phi);
// position in disk
- DD4hep::Geometry::Translation3D lTranslation(lX, lY, lZ + componentOffset);
- DD4hep::Geometry::Transform3D myTrafo(lRotation4 * lRotation3 * lRotation2 * lRotation1, lTranslation);
+ dd4hep::Translation3D lTranslation(lX, lY, lZ + componentOffset);
+ dd4hep::Transform3D myTrafo(lRotation4 * lRotation3 * lRotation2 * lRotation1, lTranslation);
PlacedVolume placedComponentVolume = discVolumeVec.back().placeVolume(componentVolume, lRotation_PhiPos * myTrafo);
if (xComp.isSensitive()) {
placedComponentVolume.addPhysVolID("component", compCounter);
@@ -148,19 +148,19 @@ static DD4hep::Geometry::Ref_t createTkLayoutTrackerEndcap(DD4hep::Geometry::LCD
posEcapDetElement.add(discDetElementVec.back());
}
- PlacedVolume placedDiscVolume = envelopeVolume.placeVolume(discVolumeVec.back(), DD4hep::Geometry::Position(0, 0, currentZ));
+ PlacedVolume placedDiscVolume = envelopeVolume.placeVolume(discVolumeVec.back(), dd4hep::Position(0, 0, currentZ));
placedDiscVolume.addPhysVolID("disc", discCounter);
++discCounter;
discDetElementVec.back().setPlacement(placedDiscVolume);
}
- DD4hep::Geometry::Assembly bothEndcaps("bothEndcapsEnvelope");
+ dd4hep::Assembly bothEndcaps("bothEndcapsEnvelope");
- DD4hep::Geometry::Translation3D envelopeTranslation(0, 0, dimensions.zmin() + envelopeThickness);
+ dd4hep::Translation3D envelopeTranslation(0, 0, dimensions.zmin() + envelopeThickness);
- DD4hep::Geometry::RotationX envelopeNegRotation(dd4hep::pi);
- DD4hep::Geometry::RotationX envelopePosRotation(0.);
+ dd4hep::RotationX envelopeNegRotation(dd4hep::pi);
+ dd4hep::RotationX envelopePosRotation(0.);
PlacedVolume placedEnvelopeVolume =
bothEndcaps.placeVolume(envelopeVolume, envelopePosRotation * envelopeTranslation);
PlacedVolume placedNegEnvelopeVolume =
diff --git a/Detector/DetInterface/DetInterface/IGeoSvc.h b/Detector/DetInterface/DetInterface/IGeoSvc.h
index d0d906f8a..4aa7c04fb 100644
--- a/Detector/DetInterface/DetInterface/IGeoSvc.h
+++ b/Detector/DetInterface/DetInterface/IGeoSvc.h
@@ -11,12 +11,10 @@
#include "GaudiKernel/IService.h"
-namespace DD4hep {
-namespace Geometry {
-class LCDD;
+namespace dd4hep {
+class Detector;
class DetElement;
}
-}
class G4VUserDetectorConstruction;
@@ -26,8 +24,8 @@ class GAUDI_API IGeoSvc : virtual public IService {
/// InterfaceID
DeclareInterfaceID(IGeoSvc, 1, 0);
// receive DD4hep Geometry
- virtual DD4hep::Geometry::DetElement getDD4HepGeo() = 0;
- virtual DD4hep::Geometry::LCDD* lcdd() = 0;
+ virtual dd4hep::DetElement getDD4HepGeo() = 0;
+ virtual dd4hep::Detector* lcdd() = 0;
// receive Geant4 Geometry
virtual G4VUserDetectorConstruction* getGeant4Geo() = 0;
diff --git a/Detector/DetInterface/DetInterface/ITrackingGeoSvc.h b/Detector/DetInterface/DetInterface/ITrackingGeoSvc.h
index dc6a1b9bc..e0171fdd3 100644
--- a/Detector/DetInterface/DetInterface/ITrackingGeoSvc.h
+++ b/Detector/DetInterface/DetInterface/ITrackingGeoSvc.h
@@ -18,7 +18,7 @@ class ITrackingGeoSvc : virtual public IService {
// InterfaceID
DeclareInterfaceID(ITrackingGeoSvc, 1, 0);
// receive Reconstruction geometry
- virtual std::shared_ptr trackingGeometry() const = 0;
+ virtual std::shared_ptr trackingGeometry() const = 0;
};
#endif // ITRACKINGGEOSVC_H
diff --git a/Detector/DetSegmentation/CMakeLists.txt b/Detector/DetSegmentation/CMakeLists.txt
index 69c847518..271599e69 100644
--- a/Detector/DetSegmentation/CMakeLists.txt
+++ b/Detector/DetSegmentation/CMakeLists.txt
@@ -1,6 +1,6 @@
-################################################################################
-#Package : DetSegmentation
-################################################################################
+#################################################################################
+##Package : DetSegmentation
+#################################################################################
gaudi_subdir(DetSegmentation v1r0)
gaudi_depends_on_subdirs(GaudiKernel)
diff --git a/Detector/DetSegmentation/DetSegmentation/GridPhiEta.h b/Detector/DetSegmentation/DetSegmentation/FCCSWGridPhiEta.h
similarity index 90%
rename from Detector/DetSegmentation/DetSegmentation/GridPhiEta.h
rename to Detector/DetSegmentation/DetSegmentation/FCCSWGridPhiEta.h
index 8160c47ff..21acaafb3 100644
--- a/Detector/DetSegmentation/DetSegmentation/GridPhiEta.h
+++ b/Detector/DetSegmentation/DetSegmentation/FCCSWGridPhiEta.h
@@ -4,7 +4,7 @@
// FCCSW
#include "DetSegmentation/GridEta.h"
-/** GridPhiEta Detector/DetSegmentation/DetSegmentation/GridPhiEta.h GridPhiEta.h
+/** FCCSWGridPhiEta Detector/DetSegmentation/DetSegmentation/FCCSWGridPhiEta.h FCCSWGridPhiEta.h
*
* Segmentation in eta and phi.
* Based on GridEta, addition of azimuthal angle coordinate.
@@ -12,17 +12,17 @@
* @author Anna Zaborowska
*/
-namespace DD4hep {
+namespace dd4hep {
namespace DDSegmentation {
-class GridPhiEta : public GridEta {
+class FCCSWGridPhiEta : public GridEta {
public:
/// default constructor using an arbitrary type
- GridPhiEta(const std::string& aCellEncoding);
+ FCCSWGridPhiEta(const std::string& aCellEncoding);
/// Default constructor used by derived classes passing an existing decoder
- GridPhiEta(BitField64* decoder);
+ FCCSWGridPhiEta(BitField64* decoder);
/// destructor
- virtual ~GridPhiEta() = default;
+ virtual ~FCCSWGridPhiEta() = default;
/** Determine the global position based on the cell ID.
* @warning This segmentation has no knowledge of radius, so radius = 1 is taken into calculations.
diff --git a/Detector/DetSegmentation/DetSegmentation/GridPhiEtaHandle.h b/Detector/DetSegmentation/DetSegmentation/FCCSWGridPhiEtaHandle.h
similarity index 79%
rename from Detector/DetSegmentation/DetSegmentation/GridPhiEtaHandle.h
rename to Detector/DetSegmentation/DetSegmentation/FCCSWGridPhiEtaHandle.h
index 250a4a1f6..c1745ff99 100644
--- a/Detector/DetSegmentation/DetSegmentation/GridPhiEtaHandle.h
+++ b/Detector/DetSegmentation/DetSegmentation/FCCSWGridPhiEtaHandle.h
@@ -2,19 +2,17 @@
#define DD4HEP_DDCORE_GRIDPHIETA_H 1
// FCCSW
-#include "DetSegmentation/GridPhiEta.h"
+#include "DetSegmentation/FCCSWGridPhiEta.h"
// DD4hep
#include "DD4hep/Segmentations.h"
-#include "DD4hep/objects/SegmentationsInterna.h"
+#include "DD4hep/detail/SegmentationsInterna.h"
/// Namespace for the AIDA detector description toolkit
-namespace DD4hep {
+namespace dd4hep {
/// Namespace for base segmentations
-/// Namespace for the geometry part of the AIDA detector description toolkit
-namespace Geometry {
// Forward declarations
class Segmentation;
@@ -22,7 +20,7 @@ template
class SegmentationWrapper;
/// We need some abbreviation to make the code more readable.
-typedef Handle> GridPhiEtaHandle;
+typedef Handle> FCCSWGridPhiEtaHandle;
/// Implementation class for the grid phi-eta segmentation.
/**
@@ -44,32 +42,32 @@ typedef Handle> GridPhiEtaHandle
* \author A. Zaborowska
* \version 1.0
*/
-class GridPhiEta : public GridPhiEtaHandle {
+class FCCSWGridPhiEta : public FCCSWGridPhiEtaHandle {
public:
/// Defintiion of the basic handled object
- typedef GridPhiEtaHandle::Implementation Object;
+ typedef FCCSWGridPhiEtaHandle::Object Object;
public:
/// Default constructor
- GridPhiEta() = default;
+ FCCSWGridPhiEta() = default;
/// Copy constructor
- GridPhiEta(const GridPhiEta& e) = default;
+ FCCSWGridPhiEta(const FCCSWGridPhiEta& e) = default;
/// Copy Constructor from segmentation base object
- GridPhiEta(const Segmentation& e) : Handle