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

Using getDetector() instead of lcdd() #34

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ QMTest/
InstallArea/
patches/
test_results/
install/

*-slc[56]-*/
i686-winxp-vc9-dbg/
Expand Down
2 changes: 1 addition & 1 deletion DRreco/src/DRcalib2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ StatusCode DRcalib2D::initialize() {
return StatusCode::FAILURE;
}

pSeg = dynamic_cast<dd4hep::DDSegmentation::GridDRcalo*>(m_geoSvc->lcdd()->readout(m_readoutName).segmentation().segmentation());
pSeg = dynamic_cast<dd4hep::DDSegmentation::GridDRcalo*>(m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());

readCSV(m_calibPath);

Expand Down
2 changes: 1 addition & 1 deletion DRreco/src/DRcalib3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ StatusCode DRcalib3D::initialize() {
return StatusCode::FAILURE;
}

pSeg = dynamic_cast<dd4hep::DDSegmentation::GridDRcalo*>(m_geoSvc->lcdd()->readout(m_readoutName).segmentation().segmentation());
pSeg = dynamic_cast<dd4hep::DDSegmentation::GridDRcalo*>(m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());

auto veloFile = std::make_unique<TFile>(m_veloFile.value().c_str(),"READ");
m_veloC.reset( static_cast<TH1D*>(veloFile->Get(m_cherenProf.value().c_str())) );
Expand Down
4 changes: 2 additions & 2 deletions DRsim/DRsimG4Components/src/SimG4SaveDRcaloHits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ StatusCode SimG4SaveDRcaloHits::initialize() {
return StatusCode::FAILURE;
}

auto lcdd = m_geoSvc->lcdd();
auto allReadouts = lcdd->readouts();
auto det = m_geoSvc->getDetector();
auto allReadouts = det->readouts();
for (auto& readoutName : m_readoutNames) {
if (allReadouts.find(readoutName) == allReadouts.end()) {
error() << "Readout " << readoutName << " not found! Please check tool configuration." << endmsg;
Expand Down
2 changes: 1 addition & 1 deletion DRsim/DRsimG4Full/src/components/SimG4DRcaloActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ StatusCode SimG4DRcaloActions::initialize() {
return StatusCode::FAILURE;
}

pSeg = dynamic_cast<dd4hep::DDSegmentation::GridDRcalo*>(m_geoSvc->lcdd()->readout(m_readoutName).segmentation().segmentation());
pSeg = dynamic_cast<dd4hep::DDSegmentation::GridDRcalo*>(m_geoSvc->getDetector()->readout(m_readoutName).segmentation().segmentation());

return StatusCode::SUCCESS;
}
Expand Down
6 changes: 3 additions & 3 deletions Detector/DRsensitive/src/SDWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

namespace dd4hep {
namespace sim {
static G4VSensitiveDetector* create_DRcaloSiPM_sd(const std::string& aDetectorName, dd4hep::Detector& aLcdd) {
std::string readoutName = aLcdd.sensitiveDetector(aDetectorName).readout().name();
return new drc::DRcaloSiPMSD(aDetectorName,readoutName,aLcdd.sensitiveDetector(aDetectorName).readout().segmentation());
static G4VSensitiveDetector* create_DRcaloSiPM_sd(const std::string& aDetectorName, dd4hep::Detector& aDet) {
std::string readoutName = aDet.sensitiveDetector(aDetectorName).readout().name();
return new drc::DRcaloSiPMSD(aDetectorName,readoutName,aDet.sensitiveDetector(aDetectorName).readout().segmentation());
}
}
}
Expand Down
Loading