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

Avoid potential use of dangling temporary objects. #418

Merged
merged 1 commit into from
Jan 22, 2025
Merged
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
4 changes: 2 additions & 2 deletions detectorCommon/src/DetUtils_k4geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ std::array<double, 2> tubeEtaExtremes(uint64_t aVolumeId) {
// check if it is a cylinder centred at z=0
dd4hep::VolumeManager volMgr = dd4hep::Detector::getInstance().volumeManager();
auto detelement = volMgr.lookupDetElement(aVolumeId);
const auto& transformMatrix = detelement.nominal().worldTransformation();
const auto transformMatrix = detelement.nominal().worldTransformation();
double outGlobal[3];
double inLocal[] = {0, 0, 0}; // to get middle of the volume
transformMatrix.LocalToMaster(inLocal, outGlobal);
Expand All @@ -477,7 +477,7 @@ std::array<double, 2> tubeEtaExtremes(uint64_t aVolumeId) {
std::array<double, 2> envelopeEtaExtremes (uint64_t aVolumeId) {
dd4hep::VolumeManager volMgr = dd4hep::Detector::getInstance().volumeManager();
auto detelement = volMgr.lookupDetElement(aVolumeId);
const auto& transformMatrix = detelement.nominal().worldTransformation();
const auto transformMatrix = detelement.nominal().worldTransformation();
// calculate values of eta in all possible corners of the envelope
auto dim = envelopeDimensions(aVolumeId);
double minEta = 0;
Expand Down
Loading