Skip to content

Commit

Permalink
Using GeoSvc getDetector (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjvbrt authored Sep 26, 2023
1 parent c71ffad commit e1f62eb
Show file tree
Hide file tree
Showing 27 changed files with 78 additions and 78 deletions.
6 changes: 3 additions & 3 deletions RecCalorimeter/src/components/CalibrateBenchmarkMethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ StatusCode CalibrateBenchmarkMethod::initialize() {
{
bool readoutMissing = false;
for (size_t i = 0; i < m_readoutNames.size(); ++i) {
auto readouts = m_geoSvc->lcdd()->readouts();
auto readouts = m_geoSvc->getDetector()->readouts();
if (readouts.find(m_readoutNames.value().at(i)) == readouts.end()) {
readoutMissing = true;
}
Expand Down Expand Up @@ -135,8 +135,8 @@ StatusCode CalibrateBenchmarkMethod::execute() {
}

// decoders for ECal and HCal
auto decoder_ECal = m_geoSvc->lcdd()->readout(m_readoutNames[ecal_index]).idSpec().decoder();
auto decoder_HCal = m_geoSvc->lcdd()->readout(m_readoutNames[hcal_index]).idSpec().decoder();
auto decoder_ECal = m_geoSvc->getDetector()->readout(m_readoutNames[ecal_index]).idSpec().decoder();
auto decoder_HCal = m_geoSvc->getDetector()->readout(m_readoutNames[hcal_index]).idSpec().decoder();

std::vector<size_t> cellIDs;

Expand Down
4 changes: 2 additions & 2 deletions RecCalorimeter/src/components/CalibrateInLayersTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ StatusCode CalibrateInLayersTool::initialize() {
return StatusCode::FAILURE;
}
// check if readout exists
if (m_geoSvc->lcdd()->readouts().find(m_readoutName) == m_geoSvc->lcdd()->readouts().end()) {
if (m_geoSvc->getDetector()->readouts().find(m_readoutName) == m_geoSvc->getDetector()->readouts().end()) {
error() << "Readout <<" << m_readoutName << ">> does not exist." << endmsg;
return StatusCode::FAILURE;
}
return StatusCode::SUCCESS;
}

void CalibrateInLayersTool::calibrate(std::unordered_map<uint64_t, double>& aHits) {
auto decoder = m_geoSvc->lcdd()->readout(m_readoutName).idSpec().decoder();
auto decoder = m_geoSvc->getDetector()->readout(m_readoutName).idSpec().decoder();
// Loop through energy deposits, multiply energy to get cell energy at electromagnetic scale
std::for_each(aHits.begin(), aHits.end(), [this, decoder](std::pair<const uint64_t, double>& p) {
dd4hep::DDSegmentation::CellID cID = p.first;
Expand Down
8 changes: 4 additions & 4 deletions RecCalorimeter/src/components/CaloTowerTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ StatusCode CaloTowerTool::initialize() {
return StatusCode::FAILURE;
}
if (m_useHalfTower) {
m_decoder = m_geoSvc->lcdd()->readout(m_ecalBarrelReadoutName).idSpec().decoder();
m_decoder = m_geoSvc->getDetector()->readout(m_ecalBarrelReadoutName).idSpec().decoder();
}
info() << "Retrieving Ecal endcap segmentation" << endmsg;
tmpPair = retrieveSegmentation(m_ecalEndcapReadoutName);
Expand Down Expand Up @@ -412,15 +412,15 @@ void CaloTowerTool::CellsIntoTowers(std::vector<std::vector<float>>& aTowers,

std::pair<dd4hep::DDSegmentation::Segmentation*, CaloTowerTool::SegmentationType> CaloTowerTool::retrieveSegmentation(std::string aReadoutName) {
dd4hep::DDSegmentation::Segmentation* segmentation = nullptr;
if (m_geoSvc->lcdd()->readouts().find(aReadoutName) == m_geoSvc->lcdd()->readouts().end()) {
if (m_geoSvc->getDetector()->readouts().find(aReadoutName) == m_geoSvc->getDetector()->readouts().end()) {
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*>(
m_geoSvc->lcdd()->readout(aReadoutName).segmentation().segmentation());
m_geoSvc->getDetector()->readout(aReadoutName).segmentation().segmentation());
if (segmentation == nullptr) {
segmentation = dynamic_cast<dd4hep::DDSegmentation::MultiSegmentation*>(
m_geoSvc->lcdd()->readout(aReadoutName).segmentation().segmentation());
m_geoSvc->getDetector()->readout(aReadoutName).segmentation().segmentation());
if (segmentation == nullptr) {
error() << "There is no phi-eta or multi- segmentation for the readout " << aReadoutName << " defined." << endmsg;
} else {
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 @@ -46,7 +46,7 @@ StatusCode CorrectCaloClusters::initialize() {
{
bool readoutMissing = false;
for (size_t i = 0; i < m_readoutNames.size(); ++i) {
auto readouts = m_geoSvc->lcdd()->readouts();
auto readouts = m_geoSvc->getDetector()->readouts();
if (readouts.find(m_readoutNames.value().at(i)) == readouts.end()) {
readoutMissing = true;
}
Expand Down Expand Up @@ -309,7 +309,7 @@ double CorrectCaloClusters::getEnergyInLayer(edm4hep::Cluster cluster,
const std::string& readoutName,
size_t systemID,
size_t layerID) {
dd4hep::DDSegmentation::BitFieldCoder* decoder = m_geoSvc->lcdd()->readout(readoutName).idSpec().decoder();
dd4hep::DDSegmentation::BitFieldCoder* decoder = m_geoSvc->getDetector()->readout(readoutName).idSpec().decoder();

double energy = 0;
for (auto cell = cluster.hits_begin(); cell != cluster.hits_end(); ++cell) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,20 +139,20 @@ StatusCode CorrectECalBarrelSliWinCluster::initialize() {
}
for (uint iSys = 0; iSys < m_systemId.size(); iSys++) {
// check if readouts exist
if (m_geoSvc->lcdd()->readouts().find(m_readoutName[iSys]) == m_geoSvc->lcdd()->readouts().end()) {
if (m_geoSvc->getDetector()->readouts().find(m_readoutName[iSys]) == m_geoSvc->getDetector()->readouts().end()) {
error() << "Readout <<" << m_readoutName[iSys] << ">> does not exist." << endmsg;
return StatusCode::FAILURE;
}
// retrieve PhiEta segmentation
m_segmentationPhiEta[m_systemId[iSys]] = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(
m_geoSvc->lcdd()->readout(m_readoutName[iSys]).segmentation().segmentation());
m_geoSvc->getDetector()->readout(m_readoutName[iSys]).segmentation().segmentation());
m_segmentationMulti[m_systemId[iSys]] = dynamic_cast<dd4hep::DDSegmentation::MultiSegmentation*>(
m_geoSvc->lcdd()->readout(m_readoutName[iSys]).segmentation().segmentation());
m_geoSvc->getDetector()->readout(m_readoutName[iSys]).segmentation().segmentation());
if (m_segmentationPhiEta[m_systemId[iSys]] == nullptr && m_segmentationMulti[m_systemId[iSys]] == nullptr) {
error() << "There is no phi-eta or multi- segmentation." << endmsg;
return StatusCode::FAILURE;
}
m_decoder.insert (std::make_pair(m_systemId[iSys], m_geoSvc->lcdd()->readout(m_readoutName[iSys]).idSpec().decoder()));
m_decoder.insert (std::make_pair(m_systemId[iSys], m_geoSvc->getDetector()->readout(m_readoutName[iSys]).idSpec().decoder()));
}
// Initialize random service
if (service("RndmGenSvc", m_randSvc).isFailure()) {
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/CreateCaloCells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ StatusCode CreateCaloCells::initialize() {
}
}
if (m_addPosition){
m_volman = m_geoSvc->lcdd()->volumeManager();
m_volman = m_geoSvc->getDetector()->volumeManager();
}

// Copy over the CellIDEncoding string from the input collection to the output collection
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/CreateCaloCellsNoise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ StatusCode CreateCaloCellsNoise::initialize() {
}
}
if (m_addPosition){
m_volman = m_geoSvc->lcdd()->volumeManager();
m_volman = m_geoSvc->getDetector()->volumeManager();
}
return StatusCode::SUCCESS;
}
Expand Down
4 changes: 2 additions & 2 deletions RecCalorimeter/src/components/CreateCaloClusters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ StatusCode CreateCaloClusters::initialize() {
return StatusCode::FAILURE;
}

m_decoderECal = m_geoSvc->lcdd()->readout(m_readoutECal).idSpec().decoder();
m_decoderHCal = m_geoSvc->lcdd()->readout(m_readoutHCal).idSpec().decoder();
m_decoderECal = m_geoSvc->getDetector()->readout(m_readoutECal).idSpec().decoder();
m_decoderHCal = m_geoSvc->getDetector()->readout(m_readoutHCal).idSpec().decoder();

info() << "CreateCaloClusters initialized" << endmsg;

Expand Down
6 changes: 3 additions & 3 deletions RecCalorimeter/src/components/LayerPhiEtaCaloTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ StatusCode LayerPhiEtaCaloTool::initialize() {
if (m_readoutName != "") {
// Check if readouts exist
info() << "Readout: " << m_readoutName << endmsg;
if (m_geoSvc->lcdd()->readouts().find(m_readoutName) == m_geoSvc->lcdd()->readouts().end()) {
if (m_geoSvc->getDetector()->readouts().find(m_readoutName) == m_geoSvc->getDetector()->readouts().end()) {
error() << "Readout <<" << m_readoutName << ">> does not exist." << endmsg;
return StatusCode::FAILURE;
}
Expand All @@ -50,7 +50,7 @@ StatusCode LayerPhiEtaCaloTool::prepareEmptyCells(std::unordered_map<uint64_t, d
// get PhiEta segmentation
dd4hep::DDSegmentation::FCCSWGridPhiEta* segmentation;
segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(
m_geoSvc->lcdd()->readout(m_readoutName).segmentation().segmentation());
m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());
if (segmentation == nullptr) {
error() << "There is no phi-eta segmentation!!!!" << endmsg;
return StatusCode::FAILURE;
Expand All @@ -61,7 +61,7 @@ StatusCode LayerPhiEtaCaloTool::prepareEmptyCells(std::unordered_map<uint64_t, d
<< segmentation->offsetPhi() << endmsg;

// Take readout bitfield decoder from GeoSvc
auto decoder = m_geoSvc->lcdd()->readout(m_readoutName).idSpec().decoder();
auto decoder = m_geoSvc->getDetector()->readout(m_readoutName).idSpec().decoder();
if (m_fieldNames.size() != m_fieldValues.size()) {
error() << "Volume readout field descriptors (names and values) have different size." << endmsg;
return StatusCode::FAILURE;
Expand Down
6 changes: 3 additions & 3 deletions RecCalorimeter/src/components/LayeredCaloTowerTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ StatusCode LayeredCaloTowerTool::initialize() {
return StatusCode::FAILURE;
}
// check if readouts exist
if (m_geoSvc->lcdd()->readouts().find(m_readoutName) == m_geoSvc->lcdd()->readouts().end()) {
if (m_geoSvc->getDetector()->readouts().find(m_readoutName) == m_geoSvc->getDetector()->readouts().end()) {
error() << "Readout <<" << m_readoutName << ">> does not exist." << endmsg;
return StatusCode::FAILURE;
}
// retrieve PhiEta segmentation
m_segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(
m_geoSvc->lcdd()->readout(m_readoutName).segmentation().segmentation());
m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());
if (m_segmentation == nullptr) {
error() << "There is no phi-eta segmentation." << endmsg;
return StatusCode::FAILURE;
}
// Take readout bitfield decoder from GeoSvc
m_decoder =
std::shared_ptr<dd4hep::DDSegmentation::BitFieldCoder>(m_geoSvc->lcdd()->readout(m_readoutName).idSpec().decoder());
std::shared_ptr<dd4hep::DDSegmentation::BitFieldCoder>(m_geoSvc->getDetector()->readout(m_readoutName).idSpec().decoder());
// check if decoder contains "layer"
std::vector<std::string> fields;
for (uint itField = 0; itField < m_decoder->size(); itField++) {
Expand Down
8 changes: 4 additions & 4 deletions RecCalorimeter/src/components/MassInv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,20 +301,20 @@ StatusCode MassInv::initialize() {
}
for (uint iSys = 0; iSys < m_systemId.size(); iSys++) {
// check if readouts exist
if (m_geoSvc->lcdd()->readouts().find(m_readoutName[iSys]) == m_geoSvc->lcdd()->readouts().end()) {
if (m_geoSvc->getDetector()->readouts().find(m_readoutName[iSys]) == m_geoSvc->getDetector()->readouts().end()) {
error() << "Readout <<" << m_readoutName[iSys] << ">> does not exist." << endmsg;
return StatusCode::FAILURE;
}
// retrieve PhiEta segmentation
m_segmentationPhiEta[m_systemId[iSys]] = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(
m_geoSvc->lcdd()->readout(m_readoutName[iSys]).segmentation().segmentation());
m_geoSvc->getDetector()->readout(m_readoutName[iSys]).segmentation().segmentation());
m_segmentationMulti[m_systemId[iSys]] = dynamic_cast<dd4hep::DDSegmentation::MultiSegmentation*>(
m_geoSvc->lcdd()->readout(m_readoutName[iSys]).segmentation().segmentation());
m_geoSvc->getDetector()->readout(m_readoutName[iSys]).segmentation().segmentation());
if (m_segmentationPhiEta[m_systemId[iSys]] == nullptr && m_segmentationMulti[m_systemId[iSys]] == nullptr) {
error() << "There is no phi-eta or multi- segmentation." << endmsg;
return StatusCode::FAILURE;
}
m_decoder.insert (std::make_pair(m_systemId[iSys], m_geoSvc->lcdd()->readout(m_readoutName[iSys]).idSpec().decoder()));
m_decoder.insert (std::make_pair(m_systemId[iSys], m_geoSvc->getDetector()->readout(m_readoutName[iSys]).idSpec().decoder()));
}
// Initialize random service
if (service("RndmGenSvc", m_randSvc).isFailure()) {
Expand Down
4 changes: 2 additions & 2 deletions RecCalorimeter/src/components/NestedVolumesCaloTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ StatusCode NestedVolumesCaloTool::initialize() {
}
// Check if readouts exist
info() << "Readout: " << m_readoutName << endmsg;
if (m_geoSvc->lcdd()->readouts().find(m_readoutName) == m_geoSvc->lcdd()->readouts().end()) {
if (m_geoSvc->getDetector()->readouts().find(m_readoutName) == m_geoSvc->getDetector()->readouts().end()) {
error() << "Readout <<" << m_readoutName << ">> does not exist." << endmsg;
return StatusCode::FAILURE;
}
Expand All @@ -34,7 +34,7 @@ StatusCode NestedVolumesCaloTool::finalize() { return GaudiTool::finalize(); }

StatusCode NestedVolumesCaloTool::prepareEmptyCells(std::unordered_map<uint64_t, double>& aCells) {
// Take readout bitfield decoder from GeoSvc
auto decoder = m_geoSvc->lcdd()->readout(m_readoutName).idSpec().decoder();
auto decoder = m_geoSvc->getDetector()->readout(m_readoutName).idSpec().decoder();
if (m_fieldNames.size() != m_fieldValues.size()) {
error() << "Volume readout field descriptors (names and values) have different size." << endmsg;
return StatusCode::FAILURE;
Expand Down
8 changes: 4 additions & 4 deletions RecCalorimeter/src/components/NoiseCaloCellsFromFileTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ StatusCode NoiseCaloCellsFromFileTool::initialize() {
info() << "Unable to retrieve cell positions tool, try eta-phi segmentation." << endmsg;
// Get PhiEta segmentation
m_segmentationPhiEta = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(
m_geoSvc->lcdd()->readout(m_readoutName).segmentation().segmentation());
m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());
if (m_segmentationPhiEta == nullptr) {
error() << "There is no phi-eta segmentation." << endmsg;
return StatusCode::FAILURE;
Expand All @@ -61,10 +61,10 @@ StatusCode NoiseCaloCellsFromFileTool::initialize() {
}
// Get PhiEta segmentation
m_segmentationPhiEta = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(
m_geoSvc->lcdd()->readout(m_readoutName).segmentation().segmentation());
m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());
if (m_segmentationPhiEta == nullptr) {
m_segmentationMulti = dynamic_cast<dd4hep::DDSegmentation::MultiSegmentation*>(
m_geoSvc->lcdd()->readout(m_readoutName).segmentation().segmentation());
m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());
if (m_segmentationMulti == nullptr) {
error() << "There is no phi-eta or multi- segmentation for the readout " << m_readoutName << " defined." << endmsg;
return StatusCode::FAILURE;
Expand All @@ -81,7 +81,7 @@ StatusCode NoiseCaloCellsFromFileTool::initialize() {
}
}

m_decoder = m_geoSvc->lcdd()->readout(m_readoutName).idSpec().decoder();
m_decoder = m_geoSvc->getDetector()->readout(m_readoutName).idSpec().decoder();
m_index_activeField = m_decoder->index(m_activeFieldName);

debug() << "Filter noise threshold: " << m_filterThreshold << "*sigma" << endmsg;
Expand Down
6 changes: 3 additions & 3 deletions RecCalorimeter/src/components/PreparePileup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ StatusCode PreparePileup::initialize() {
return StatusCode::FAILURE;
}
// check if readouts exist
if (m_geoSvc->lcdd()->readouts().find(m_readoutName) == m_geoSvc->lcdd()->readouts().end()) {
if (m_geoSvc->getDetector()->readouts().find(m_readoutName) == m_geoSvc->getDetector()->readouts().end()) {
error() << "Readout <<" << m_readoutName << ">> does not exist." << endmsg;
return StatusCode::FAILURE;
}
// retrieve PhiEta segmentation
m_segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(
m_geoSvc->lcdd()->readout(m_readoutName).segmentation().segmentation());
m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());
if (m_segmentation == nullptr) {
error() << "There is no phi-eta segmentation." << endmsg;
return StatusCode::FAILURE;
}
// Take readout bitfield decoder from GeoSvc
m_decoder = m_geoSvc->lcdd()->readout(m_readoutName).idSpec().decoder();
m_decoder = m_geoSvc->getDetector()->readout(m_readoutName).idSpec().decoder();
// Histogram service
m_histSvc = service("THistSvc");
if (!m_histSvc) {
Expand Down
4 changes: 2 additions & 2 deletions RecCalorimeter/src/components/ReadNoiseFromFileTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ StatusCode ReadNoiseFromFileTool::initialize() {
<< "Make sure you have GeoSvc and SimSvc in the right order in the configuration." << endmsg;
return StatusCode::FAILURE;
}
m_segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(m_geoSvc->lcdd()->readout(m_readoutName).segmentation().segmentation());
m_segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());
if (m_segmentation == nullptr) {
error() << "There is no phi-eta segmentation!!!!" << endmsg;
return StatusCode::FAILURE;
Expand All @@ -42,7 +42,7 @@ StatusCode ReadNoiseFromFileTool::initialize() {
}

// Take readout bitfield decoder from GeoSvc
m_decoder = m_geoSvc->lcdd()->readout(m_readoutName).idSpec().decoder();
m_decoder = m_geoSvc->getDetector()->readout(m_readoutName).idSpec().decoder();

StatusCode sc = GaudiTool::initialize();
if (sc.isFailure()) return sc;
Expand Down
4 changes: 2 additions & 2 deletions RecCalorimeter/src/components/SplitClusters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ StatusCode SplitClusters::initialize() {
return StatusCode::FAILURE;
}

m_decoderECal = m_geoSvc->lcdd()->readout(m_readoutECal).idSpec().decoder();
m_decoderHCal = m_geoSvc->lcdd()->readout(m_readoutHCal).idSpec().decoder();
m_decoderECal = m_geoSvc->getDetector()->readout(m_readoutECal).idSpec().decoder();
m_decoderHCal = m_geoSvc->getDetector()->readout(m_readoutHCal).idSpec().decoder();

// Read neighbours map
if (!m_neighboursTool.retrieve()) {
Expand Down
8 changes: 4 additions & 4 deletions RecCalorimeter/src/components/TubeLayerPhiEtaCaloTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ StatusCode TubeLayerPhiEtaCaloTool::initialize() {
if (m_readoutName != "") {
// Check if readouts exist
info() << "Readout: " << m_readoutName << endmsg;
if (m_geoSvc->lcdd()->readouts().find(m_readoutName) == m_geoSvc->lcdd()->readouts().end()) {
if (m_geoSvc->getDetector()->readouts().find(m_readoutName) == m_geoSvc->getDetector()->readouts().end()) {
error() << "Readout <<" << m_readoutName << ">> does not exist." << endmsg;
return StatusCode::FAILURE;
}
Expand All @@ -52,10 +52,10 @@ StatusCode TubeLayerPhiEtaCaloTool::prepareEmptyCells(std::unordered_map<uint64_
const dd4hep::DDSegmentation::FCCSWGridPhiEta* segmentation = nullptr;
const dd4hep::DDSegmentation::MultiSegmentation* segmentationMulti = nullptr;
segmentation = dynamic_cast<dd4hep::DDSegmentation::FCCSWGridPhiEta*>(
m_geoSvc->lcdd()->readout(m_readoutName).segmentation().segmentation());
m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());
if (segmentation == nullptr) {
segmentationMulti = dynamic_cast<dd4hep::DDSegmentation::MultiSegmentation*>(
m_geoSvc->lcdd()->readout(m_readoutName).segmentation().segmentation());
m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());
if (segmentationMulti == nullptr) {
error() << "There is no phi-eta or multi- segmentation for the readout " << m_readoutName << " defined." << endmsg;
return StatusCode::FAILURE;
Expand All @@ -81,7 +81,7 @@ StatusCode TubeLayerPhiEtaCaloTool::prepareEmptyCells(std::unordered_map<uint64_
<< segmentation->offsetPhi() << endmsg;
}
// Take readout bitfield decoder from GeoSvc
auto decoder = m_geoSvc->lcdd()->readout(m_readoutName).idSpec().decoder();
auto decoder = m_geoSvc->getDetector()->readout(m_readoutName).idSpec().decoder();
if (m_fieldNames.size() != m_fieldValues.size()) {
error() << "Volume readout field descriptors (names and values) have different size." << endmsg;
return StatusCode::FAILURE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ StatusCode CaloTopoClusterFCCee::initialize() {
}
}

m_decoder_ecal = m_geoSvc->lcdd()->readout(m_readoutName).idSpec().decoder();
m_decoder_ecal = m_geoSvc->getDetector()->readout(m_readoutName).idSpec().decoder();
m_index_layer_ecal = m_decoder_ecal->index("layer");

return StatusCode::SUCCESS;
Expand Down
Loading

0 comments on commit e1f62eb

Please sign in to comment.