Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate theta-module readout and related code to k4geo #56

Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ find_package(Gaudi)
find_package(k4FWCore) # implicit: Gaudi
find_package(EDM4HEP) # implicit: Podio
find_package(DD4hep)
find_package(FCCDetectors)
find_package(k4geo)
#find_package(FCCDetectors)
giovannimarchiori marked this conversation as resolved.
Show resolved Hide resolved
#---------------------------------------------------------------


Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh
* EDM4HEP
* k4FWCore
* DD4hep
* FCCDetectors
* FCC-EDM (will be replaced by EDM4HEP)
* k4geo

4 changes: 2 additions & 2 deletions RecCalorimeter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ gaudi_add_module(k4RecCalorimeterPlugins
EDM4HEP::edm4hep
ROOT::Core
ROOT::Hist
FCCDetectors::DetSegmentation
FCCDetectors::DetCommon
k4geo::detectorSegmentations
k4geo::detectorCommon
)

install(TARGETS k4RecCalorimeterPlugins
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/CaloTopoCluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "NoiseCaloCellsFromFileTool.h"

// FCCSW
#include "DetCommon/DetUtils.h"
#include "detectorCommon/DetUtils_k4geo.h"
#include "k4Interface/IGeoSvc.h"

// datamodel
Expand Down
16 changes: 8 additions & 8 deletions RecCalorimeter/src/components/CaloTowerTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ StatusCode CaloTowerTool::finalize() {
std::pair<double, double> CaloTowerTool::retrievePhiEtaExtrema(dd4hep::DDSegmentation::Segmentation* aSegmentation, SegmentationType aType) {
double phiMax = -1;
double etaMax = -1;
dd4hep::DDSegmentation::FCCSWGridPhiEta* segmentation = nullptr;
dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo* segmentation = nullptr;
if (aSegmentation != nullptr) {
switch (aType) {
case SegmentationType::kPhiEta: {
info() << "== Retrieving phi-eta segmentation " << aSegmentation->name() << endmsg;
segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(aSegmentation);
segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(aSegmentation);
phiMax = fabs(segmentation->offsetPhi()) + M_PI / (double)segmentation->phiBins();
etaMax = fabs(segmentation->offsetEta()) + segmentation->gridSizeEta() * 0.5;
break;
Expand All @@ -128,7 +128,7 @@ std::pair<double, double> CaloTowerTool::retrievePhiEtaExtrema(dd4hep::DDSegment
double eta = -1;
info() << "== Retrieving multi segmentation " << aSegmentation->name() << endmsg;
for (const auto& subSegm: dynamic_cast<dd4hep::DDSegmentation::MultiSegmentation*>(aSegmentation)->subSegmentations()) {
segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(subSegm.segmentation);
segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(subSegm.segmentation);
phi = fabs(segmentation->offsetPhi()) + M_PI / (double)segmentation->phiBins();
eta = fabs(segmentation->offsetEta()) + segmentation->gridSizeEta() * 0.5;
if (eta > etaMax) { etaMax = eta;}
Expand Down Expand Up @@ -320,10 +320,10 @@ void CaloTowerTool::CellsIntoTowers(std::vector<std::vector<float>>& aTowers,
float fracEtaMin = 1.0, fracEtaMax = 1.0, fracEtaMiddle = 1.0;
float fracPhiMin = 1.0, fracPhiMax = 1.0, fracPhiMiddle = 1.0;
float epsilon = 0.0001;
const dd4hep::DDSegmentation::FCCSWGridPhiEta* segmentation = nullptr;
const dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo* segmentation = nullptr;
const dd4hep::DDSegmentation::MultiSegmentation* multisegmentation = nullptr;
if( aType == SegmentationType::kPhiEta) {
segmentation = dynamic_cast<const dd4hep::DDSegmentation::FCCSWGridPhiEta*>(aSegmentation);
segmentation = dynamic_cast<const dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(aSegmentation);
} else if( aType == SegmentationType::kMulti) {
multisegmentation = dynamic_cast<const dd4hep::DDSegmentation::MultiSegmentation*>(aSegmentation);
}
Expand All @@ -332,7 +332,7 @@ void CaloTowerTool::CellsIntoTowers(std::vector<std::vector<float>>& aTowers,
pass = true;
// if multisegmentation is used - first find out which segmentation to use
if( aType == SegmentationType::kMulti) {
segmentation = dynamic_cast<const dd4hep::DDSegmentation::FCCSWGridPhiEta*>(&multisegmentation->subsegmentation(cell.getCellID()));
segmentation = dynamic_cast<const dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(&multisegmentation->subsegmentation(cell.getCellID()));
}
if (m_useHalfTower) {
uint layerId = m_decoder->get(cell.getCellID(), "layer");
Expand Down Expand Up @@ -416,7 +416,7 @@ std::pair<dd4hep::DDSegmentation::Segmentation*, CaloTowerTool::SegmentationType
info() << "Readout does not exist! Please check if it is correct. Processing without it." << endmsg;
} else {
info() << "Readout " << aReadoutName << " found." << endmsg;
segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(
segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(
m_geoSvc->getDetector()->readout(aReadoutName).segmentation().segmentation());
if (segmentation == nullptr) {
segmentation = dynamic_cast<dd4hep::DDSegmentation::MultiSegmentation*>(
Expand All @@ -427,7 +427,7 @@ std::pair<dd4hep::DDSegmentation::Segmentation*, CaloTowerTool::SegmentationType
// check if multisegmentation contains only phi-eta sub-segmentations
dd4hep::DDSegmentation::Segmentation* subsegmentation = nullptr;
for (const auto& subSegm: dynamic_cast<dd4hep::DDSegmentation::MultiSegmentation*>(segmentation)->subSegmentations()) {
subsegmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(subSegm.segmentation);
subsegmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(subSegm.segmentation);
if (subsegmentation == nullptr) {
error() << "At least one of the sub-segmentations in MultiSegmentation named " << aReadoutName << " is not a phi-eta grid." << endmsg;
return std::make_pair(nullptr, SegmentationType::kWrong);
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/CaloTowerTool.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "GaudiAlg/GaudiTool.h"

// FCCSW
#include "DetSegmentation/FCCSWGridPhiEta.h"
#include "detectorSegmentations/FCCSWGridPhiEta_k4geo.h"
#include "k4FWCore/DataHandle.h"
#include "k4Interface/ITowerTool.h"

Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/ConeSelection.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "ConeSelection.h"

// FCC Detectors
#include "DetCommon/DetUtils.h"
#include "detectorCommon/DetUtils_k4geo.h"

// DD4hep
#include "DD4hep/Detector.h"
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/ConstNoiseTool.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "ConstNoiseTool.h"

// FCCSW
#include "DetCommon/DetUtils.h"
#include "detectorCommon/DetUtils_k4geo.h"
#include "k4Interface/IGeoSvc.h"

// DD4hep
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/ConstNoiseTool.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class IRndmGenSvc;

// FCCSW
#include "DetSegmentation/FCCSWGridPhiEta.h"
#include "detectorSegmentations/FCCSWGridPhiEta_k4geo.h"
#include "k4Interface/INoiseConstTool.h"
class IGeoSvc;

Expand Down
4 changes: 2 additions & 2 deletions RecCalorimeter/src/components/CorrectCaloClusters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "k4Interface/IGeoSvc.h"

// FCC Detectors
#include "DetCommon/DetUtils.h"
#include "DetSegmentation/FCCSWGridPhiEta.h"
#include "detectorCommon/DetUtils_k4geo.h"
#include "detectorSegmentations/FCCSWGridPhiEta_k4geo.h"

// DD4hep
#include "DD4hep/Detector.h"
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/CorrectCaloClusters.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace edm4hep {
// DD4HEP
namespace dd4hep {
namespace DDSegmentation {
class FCCSWGridPhiEta;
class FCCSWGridPhiEta_k4geo;
class MultiSegmentation;
class BitFieldCoder;
}
Expand Down
12 changes: 6 additions & 6 deletions RecCalorimeter/src/components/CorrectECalBarrelSliWinCluster.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "CorrectECalBarrelSliWinCluster.h"

// FCCSW
#include "DetCommon/DetUtils.h"
#include "detectorCommon/DetUtils_k4geo.h"
#include "k4Interface/IGeoSvc.h"
#include "DetSegmentation/FCCSWGridPhiEta.h"
#include "detectorSegmentations/FCCSWGridPhiEta_k4geo.h"
#include "GaudiKernel/ITHistSvc.h"

// DD4hep
Expand Down Expand Up @@ -147,7 +147,7 @@ StatusCode CorrectECalBarrelSliWinCluster::initialize() {
return StatusCode::FAILURE;
}
// retrieve PhiEta segmentation
m_segmentationPhiEta[m_systemId[iSys]] = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(
m_segmentationPhiEta[m_systemId[iSys]] = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(
m_geoSvc->getDetector()->readout(m_readoutName[iSys]).segmentation().segmentation());
m_segmentationMulti[m_systemId[iSys]] = dynamic_cast<dd4hep::DDSegmentation::MultiSegmentation*>(
m_geoSvc->getDetector()->readout(m_readoutName[iSys]).segmentation().segmentation());
Expand Down Expand Up @@ -235,7 +235,7 @@ StatusCode CorrectECalBarrelSliWinCluster::execute() {

// TODO change that so all systems can be used
uint systemId = m_systemId[0];
const dd4hep::DDSegmentation::FCCSWGridPhiEta* segmentation = nullptr;
const dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo* segmentation = nullptr;
if (m_segmentationPhiEta[systemId] != nullptr) {
segmentation = m_segmentationPhiEta[systemId];
}
Expand Down Expand Up @@ -267,7 +267,7 @@ StatusCode CorrectECalBarrelSliWinCluster::execute() {
newCluster.setPosition(cluster.getPosition());
for (auto cell = cluster.hits_begin(); cell != cluster.hits_end(); cell++) {
if (m_segmentationMulti[systemId] != nullptr) {
segmentation = dynamic_cast<const dd4hep::DDSegmentation::FCCSWGridPhiEta*>(&m_segmentationMulti[systemId]->subsegmentation(cell->getCellID()));
segmentation = dynamic_cast<const dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(&m_segmentationMulti[systemId]->subsegmentation(cell->getCellID()));
oldEtaId = int(floor((oldEta + 0.5 * segmentation->gridSizeEta() - segmentation->offsetEta()) / segmentation->gridSizeEta()));
oldPhiId = int(floor((oldPhi + 0.5 * segmentation->gridSizePhi() - segmentation->offsetPhi()) / segmentation->gridSizePhi()));
}
Expand Down Expand Up @@ -319,7 +319,7 @@ StatusCode CorrectECalBarrelSliWinCluster::execute() {
// repeat but calculating eta barycentre in each layer
for (auto cell = newCluster.hits_begin(); cell != newCluster.hits_end(); cell++) {
if (m_segmentationMulti[systemId] != nullptr) {
segmentation = dynamic_cast<const dd4hep::DDSegmentation::FCCSWGridPhiEta*>(&m_segmentationMulti[systemId]->subsegmentation(cell->getCellID()));
segmentation = dynamic_cast<const dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(&m_segmentationMulti[systemId]->subsegmentation(cell->getCellID()));
}
dd4hep::DDSegmentation::CellID cID = cell->getCellID();
uint layer = m_decoder[systemId]->get(cID, m_layerFieldName) + m_firstLayerId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class VertexCollection;

namespace dd4hep {
namespace DDSegmentation {
class FCCSWGridPhiEta;
class FCCSWGridPhiEta_k4geo;
class MultiSegmentation;
class BitFieldCoder;
}
Expand Down Expand Up @@ -153,7 +153,7 @@ class CorrectECalBarrelSliWinCluster : public GaudiAlgorithm {
Gaudi::Property<std::vector<std::string>> m_readoutName{
this, "readoutName", {"ECalBarrelPhiEta"}, "Names of the detector readout, corresponding to systemId"};
/// map of system Id to segmentation, created based on m_readoutName and m_systemId
std::map<uint, dd4hep::DDSegmentation::FCCSWGridPhiEta*> m_segmentationPhiEta;
std::map<uint, dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*> m_segmentationPhiEta;
std::map<uint, dd4hep::DDSegmentation::MultiSegmentation*> m_segmentationMulti;
/// map of system Id to decoder, created based on m_readoutName and m_systemId
std::map<uint, dd4hep::DDSegmentation::BitFieldCoder*> m_decoder;
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/CreateCaloCells.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "CreateCaloCells.h"

// FCCSW
#include "DetCommon/DetUtils.h"
#include "detectorCommon/DetUtils_k4geo.h"
#include "k4Interface/IGeoSvc.h"

// DD4hep
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/CreateCaloCellsNoise.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "CreateCaloCellsNoise.h"

// FCCSW
#include "DetCommon/DetUtils.h"
#include "detectorCommon/DetUtils_k4geo.h"
#include "k4Interface/IGeoSvc.h"

// DD4hep
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/CreateCaloClusters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "k4Interface/IGeoSvc.h"

// FCC Detectors
#include "DetCommon/DetUtils.h"
#include "detectorCommon/DetUtils_k4geo.h"

// DD4hep
#include "DD4hep/Detector.h"
Expand Down
10 changes: 5 additions & 5 deletions RecCalorimeter/src/components/LayerPhiEtaCaloTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// segm
#include "DD4hep/Detector.h"
#include "DetCommon/DetUtils.h"
#include "detectorCommon/DetUtils_k4geo.h"
#include "k4Interface/IGeoSvc.h"

DECLARE_COMPONENT(LayerPhiEtaCaloTool)
Expand Down Expand Up @@ -48,16 +48,16 @@ StatusCode LayerPhiEtaCaloTool::prepareEmptyCells(std::unordered_map<uint64_t, d
info() << "Number of active layers " << numLayers << endmsg;

// get PhiEta segmentation
dd4hep::DDSegmentation::FCCSWGridPhiEta* segmentation;
segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(
dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo* segmentation;
segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(
m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());
if (segmentation == nullptr) {
error() << "There is no phi-eta segmentation!!!!" << endmsg;
return StatusCode::FAILURE;
}
info() << "FCCSWGridPhiEta: size in eta " << segmentation->gridSizeEta() << " , bins in phi " << segmentation->phiBins()
info() << "FCCSWGridPhiEta_k4geo: size in eta " << segmentation->gridSizeEta() << " , bins in phi " << segmentation->phiBins()
<< endmsg;
info() << "FCCSWGridPhiEta: offset in eta " << segmentation->offsetEta() << " , offset in phi "
info() << "FCCSWGridPhiEta_k4geo: offset in eta " << segmentation->offsetEta() << " , offset in phi "
<< segmentation->offsetPhi() << endmsg;

// Take readout bitfield decoder from GeoSvc
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/LayeredCaloTowerTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ StatusCode LayeredCaloTowerTool::initialize() {
return StatusCode::FAILURE;
}
// retrieve PhiEta segmentation
m_segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(
m_segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(
m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());
if (m_segmentation == nullptr) {
error() << "There is no phi-eta segmentation." << endmsg;
Expand Down
4 changes: 2 additions & 2 deletions RecCalorimeter/src/components/LayeredCaloTowerTool.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "GaudiAlg/GaudiTool.h"

// FCCSW
#include "DetSegmentation/FCCSWGridPhiEta.h"
#include "detectorSegmentations/FCCSWGridPhiEta_k4geo.h"
#include "k4FWCore/DataHandle.h"
#include "k4Interface/ITowerTool.h"
class IGeoSvc;
Expand Down Expand Up @@ -137,7 +137,7 @@ class LayeredCaloTowerTool : public GaudiTool, virtual public ITowerTool {
/// Name of the detector readout
Gaudi::Property<std::string> m_readoutName{this, "readoutName", "", "Name of the detector readout"};
/// PhiEta segmentation (owned by DD4hep)
dd4hep::DDSegmentation::FCCSWGridPhiEta* m_segmentation;
dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo* m_segmentation;
/// Radius used to calculate cluster position from eta and phi (in mm)
Gaudi::Property<double> m_radius{this, "radiusForPosition", 1.0,
"Radius used to calculate cluster position from eta and phi (in mm)"};
Expand Down
12 changes: 6 additions & 6 deletions RecCalorimeter/src/components/MassInv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "k4Interface/IGeoSvc.h"

// FCC Detectors
giovannimarchiori marked this conversation as resolved.
Show resolved Hide resolved
#include "DetCommon/DetUtils.h"
#include "DetSegmentation/FCCSWGridPhiEta.h"
#include "detectorCommon/DetUtils_k4geo.h"
#include "detectorSegmentations/FCCSWGridPhiEta_k4geo.h"

// DD4hep
#include "DD4hep/Detector.h"
Expand Down Expand Up @@ -308,7 +308,7 @@ StatusCode MassInv::initialize() {
return StatusCode::FAILURE;
}
// retrieve PhiEta segmentation
m_segmentationPhiEta[m_systemId[iSys]] = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(
m_segmentationPhiEta[m_systemId[iSys]] = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(
m_geoSvc->getDetector()->readout(m_readoutName[iSys]).segmentation().segmentation());
m_segmentationMulti[m_systemId[iSys]] = dynamic_cast<dd4hep::DDSegmentation::MultiSegmentation*>(
m_geoSvc->getDetector()->readout(m_readoutName[iSys]).segmentation().segmentation());
Expand Down Expand Up @@ -405,7 +405,7 @@ StatusCode MassInv::execute() {

// TODO change that so all systems can be used
uint systemId = m_systemId[0];
const dd4hep::DDSegmentation::FCCSWGridPhiEta* segmentation = nullptr;
const dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo* segmentation = nullptr;
if (m_segmentationPhiEta[systemId] != nullptr) {
segmentation = m_segmentationPhiEta[systemId];
}
Expand Down Expand Up @@ -441,7 +441,7 @@ StatusCode MassInv::execute() {
newCluster.setPosition(cluster.getPosition());
for (auto cell = cluster.hits_begin(); cell != cluster.hits_end(); cell++) {
if (m_segmentationMulti[systemId] != nullptr) {
segmentation = dynamic_cast<const dd4hep::DDSegmentation::FCCSWGridPhiEta*>(&m_segmentationMulti[systemId]->subsegmentation(cell->getCellID()));
segmentation = dynamic_cast<const dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(&m_segmentationMulti[systemId]->subsegmentation(cell->getCellID()));
oldEtaId = int(floor((oldEta + 0.5 * segmentation->gridSizeEta() - segmentation->offsetEta()) / segmentation->gridSizeEta()));
oldPhiId = int(floor((oldPhi + 0.5 * segmentation->gridSizePhi() - segmentation->offsetPhi()) / segmentation->gridSizePhi()));
}
Expand Down Expand Up @@ -488,7 +488,7 @@ StatusCode MassInv::execute() {
// repeat but calculating eta barycentre in each layer
for (auto cell = newCluster.hits_begin(); cell != newCluster.hits_end(); cell++) {
if (m_segmentationMulti[systemId] != nullptr) {
segmentation = dynamic_cast<const dd4hep::DDSegmentation::FCCSWGridPhiEta*>(&m_segmentationMulti[systemId]->subsegmentation(cell->getCellID()));
segmentation = dynamic_cast<const dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*>(&m_segmentationMulti[systemId]->subsegmentation(cell->getCellID()));
}
dd4hep::DDSegmentation::CellID cID = cell->getCellID();
uint layer = m_decoder[systemId]->get(cID, m_layerFieldName) + m_firstLayerId;
Expand Down
4 changes: 2 additions & 2 deletions RecCalorimeter/src/components/MassInv.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace edm4hep {

namespace dd4hep {
namespace DDSegmentation {
class FCCSWGridPhiEta;
class FCCSWGridPhiEta_k4geo;
class MultiSegmentation;
class BitFieldCoder;
}
Expand Down Expand Up @@ -186,7 +186,7 @@ class MassInv : public GaudiAlgorithm {
Gaudi::Property<std::vector<std::string>> m_readoutName{
this, "readoutName", {"ECalBarrelPhiEta"}, "Names of the detector readout, corresponding to systemId"};
/// map of system Id to segmentation, created based on m_readoutName and m_systemId
std::map<uint, dd4hep::DDSegmentation::FCCSWGridPhiEta*> m_segmentationPhiEta;
std::map<uint, dd4hep::DDSegmentation::FCCSWGridPhiEta_k4geo*> m_segmentationPhiEta;
std::map<uint, dd4hep::DDSegmentation::MultiSegmentation*> m_segmentationMulti;
/// map of system Id to decoder, created based on m_readoutName and m_systemId
std::map<uint, dd4hep::DDSegmentation::BitFieldCoder*> m_decoder;
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/NestedVolumesCaloTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// segm
#include "DD4hep/Detector.h"
#include "DetCommon/DetUtils.h"
#include "detectorCommon/DetUtils_k4geo.h"
#include "k4Interface/IGeoSvc.h"

DECLARE_COMPONENT(NestedVolumesCaloTool)
Expand Down
Loading
Loading