diff --git a/DDCore/src/plugins/GeometryWalk.cpp b/DDCore/src/plugins/GeometryWalk.cpp index 43920cfe8f107918461a04d17dc70a30dc0a1ed0..d6d38d72ad0e883b2399f3ac0e04d5b6a3ea7a7d 100644 --- a/DDCore/src/plugins/GeometryWalk.cpp +++ b/DDCore/src/plugins/GeometryWalk.cpp @@ -115,19 +115,20 @@ void GeometryWalk::walk(DetElement e, PlacedVolume::VolIDs ids) const { /// Action routine to execute the test long GeometryWalk::run(Detector& description,int argc,char** argv) { cout << "++ Processing plugin....GeometryWalker.." << endl; + DetElement world = description.world(); for(int in=1; in < argc; ++in) { string name = argv[in]+1; if ( name == "all" || name == "All" || name == "ALL" ) { - const _C& children = description.world().children(); + const _C& children = world.children(); for (_C::const_iterator i=children.begin(); i!=children.end(); ++i) { DetElement sdet = (*i).second; cout << "++ Processing subdetector: " << sdet.name() << endl; - GeometryWalk test(description,sdet); + GeometryWalk test(description, sdet); } return 1; } cout << "++ Processing subdetector: " << name << endl; - GeometryWalk test(description,description.detector(name)); + GeometryWalk test(description, description.detector(name)); } return 1; } diff --git a/DDDetectors/src/PolyhedraEndcapCalorimeter2_surfaces.cpp b/DDDetectors/src/PolyhedraEndcapCalorimeter2_surfaces.cpp index ec5a7d20f8a9b3e4d559c14a43f97b73fe482257..55bcd7fbdd0dae47f09ddd2b0e3a1a86e40e2f8f 100644 --- a/DDDetectors/src/PolyhedraEndcapCalorimeter2_surfaces.cpp +++ b/DDDetectors/src/PolyhedraEndcapCalorimeter2_surfaces.cpp @@ -31,7 +31,8 @@ void Installer<UserData>::install(dd4hep::DetElement component, dd4hep::PlacedVo } else if ( !handleUsingCache(component,comp_vol) ) { dd4hep::DetElement par = component.parent(); - const TGeoHMatrix& m = par.nominal().worldTransformation(); + dd4hep::Alignment nom = par.nominal(); + const TGeoHMatrix& m = nom.worldTransformation(); double dz = m.GetTranslation()[2]; const double* trans = placementTranslation(component); double half_mod_thickness = (mod_shape->GetZ(1)-mod_shape->GetZ(0))/2.0; diff --git a/DDDigi/src/DigiSegmentationTool.cpp b/DDDigi/src/DigiSegmentationTool.cpp index b25be527bbc0849258a9755f546e38f82ddd6683..b71d4ae4f36bd90101c470270d3f21347f30559a 100644 --- a/DDDigi/src/DigiSegmentationTool.cpp +++ b/DDDigi/src/DigiSegmentationTool.cpp @@ -26,9 +26,10 @@ namespace { const string& split_by, map<dd4hep::VolumeID, pair<dd4hep::DetElement, dd4hep::VolumeID> >& splits, dd4hep::DetElement de, dd4hep::VolumeID vid, dd4hep::VolumeID mask) { - const auto& new_ids = de.placement().volIDs(); - dd4hep::VolumeID new_vid = vid; - dd4hep::VolumeID new_msk = mask; + dd4hep::PlacedVolume plc = de.placement(); + const auto& new_ids = plc.volIDs(); + dd4hep::VolumeID new_vid = vid; + dd4hep::VolumeID new_msk = mask; if ( !new_ids.empty() ) { new_vid |= tool.iddescriptor.encode(new_ids); new_msk |= tool.iddescriptor.get_mask(new_ids); @@ -185,7 +186,8 @@ DigiSegmentationTool::split_context(const string& split_by) const { /// Create full set of detector segments which can be split according to the context set<uint32_t> DigiSegmentationTool::split_segmentation(const string& split_by) const { map<VolumeID, pair<DetElement, VolumeID> > segmentation_splits; - const auto& ids = this->detector.placement().volIDs(); + PlacedVolume place = this->detector.placement(); + const auto& ids = place.volIDs(); VolumeID vid = this->iddescriptor.encode(ids); VolumeID msk = this->iddescriptor.get_mask(ids); const auto* fld = this->iddescriptor.field(split_by); diff --git a/DDDigi/src/noise/DigiSubdetectorSequence.cpp b/DDDigi/src/noise/DigiSubdetectorSequence.cpp index 9d9fc3ab59e373d16e67fee990204bd819d19ab6..2120f8a62eb38ec6879189bef3ce840b7d9bf3d2 100644 --- a/DDDigi/src/noise/DigiSubdetectorSequence.cpp +++ b/DDDigi/src/noise/DigiSubdetectorSequence.cpp @@ -57,7 +57,8 @@ void DigiSubdetectorSequence::initialize() { if ( m_detector.isValid() && m_sensDet.isValid() ) { m_idDesc = m_sensDet.readout().idSpec(); m_segmentation = m_sensDet.readout().segmentation(); - const VolIDs& ids = m_detector.placement().volIDs(); + PlacedVolume plc = m_detector.placement(); + const VolIDs& ids = plc.volIDs(); VolumeID vid = m_idDesc.encode(ids); VolumeID msk = m_idDesc.get_mask(ids); scan_detector(m_detector, vid, msk); @@ -88,7 +89,8 @@ void DigiSubdetectorSequence::scan_sensitive(PlacedVolume pv, VolumeID vid, Volu } void DigiSubdetectorSequence::scan_detector(DetElement de, VolumeID vid, VolumeID mask) { - const VolIDs& new_ids = de.placement().volIDs(); + PlacedVolume place = m_detector.placement(); + const VolIDs& new_ids = place.volIDs(); VolumeID new_vid = vid; VolumeID new_msk = mask; if ( !new_ids.empty() ) { diff --git a/DDEve/src/View.cpp b/DDEve/src/View.cpp index b2828f4b072ce6b01392dc932a425b3414a6f692..dd5de569e0a55b205a306a57f6d8e742823d41c1 100644 --- a/DDEve/src/View.cpp +++ b/DDEve/src/View.cpp @@ -160,7 +160,8 @@ void View::ConfigureGeometry(const DisplayConfiguration::ViewConfig& config) string dets; DisplayConfiguration::Configurations::const_iterator ic; float legend_y = Annotation::DefaultTextSize()+Annotation::DefaultMargin(); - const DetElement::Children& c = m_eve->detectorDescription().world().children(); + DetElement world = m_eve->detectorDescription().world(); + const DetElement::Children& c = world.children(); for( ic=config.subdetectors.begin(); ic != config.subdetectors.end(); ++ic) { const DisplayConfiguration::Config& cfg = *ic; string nam = cfg.name; diff --git a/DDG4/src/Geant4Converter.cpp b/DDG4/src/Geant4Converter.cpp index 2614e9990b0eb4567cfb747d044a7ba8f129a0fa..5766b7e49446246606cefbab7f2d8e30a2d8214d 100644 --- a/DDG4/src/Geant4Converter.cpp +++ b/DDG4/src/Geant4Converter.cpp @@ -983,8 +983,8 @@ void* Geant4Converter::handlePlacement(const string& name, const TGeoNode* node) double width = 0e0, offset = 0e0; auto flags = pv_data->params->flags; auto count = pv_data->params->trafo1D.second; - const auto& start = pv_data->params->start.Translation().Vect(); - const auto& delta = pv_data->params->trafo1D.first.Translation().Vect(); + auto start = pv_data->params->start.Translation().Vect(); + auto delta = pv_data->params->trafo1D.first.Translation().Vect(); if ( flags&Volume::X_axis ) { axis = kXAxis; width = delta.X(); offset = start.X(); } diff --git a/DDRec/src/Surface.cpp b/DDRec/src/Surface.cpp index 0936cf00042e885605012699953f5361c59a8c62..604fd33c6287b146993c9f5b964a9571ad0561dd 100644 --- a/DDRec/src/Surface.cpp +++ b/DDRec/src/Surface.cpp @@ -721,7 +721,7 @@ namespace dd4hep { // first we need to find the right volume for the local surface in the DetElement's volumes std::list< PlacedVolume > pVList ; PlacedVolume pv = _det.placement() ; - Volume theVol = _volSurf.volume() ; + Volume theVol = _volSurf.volume() ; if( ! findVolume( pv, theVol , pVList ) ){ theVol = _volSurf.volume() ; @@ -730,8 +730,8 @@ namespace dd4hep { } //=========== compute and cache world transform for surface ========== - - const TGeoHMatrix& wm = _det.nominal().worldTransformation() ; + Alignment nominal = _det.nominal(); + const TGeoHMatrix& wm = nominal.worldTransformation() ; #if 0 // debug wm.Print() ; diff --git a/examples/DDCMS/src/DDCMS.cpp b/examples/DDCMS/src/DDCMS.cpp index 61c3e10c21bfad1ae39752920c62a9a0a8b25127..107579b41061ba6ca06d10383c518a42c86c7c79 100644 --- a/examples/DDCMS/src/DDCMS.cpp +++ b/examples/DDCMS/src/DDCMS.cpp @@ -335,7 +335,7 @@ xml_h AlgoArguments::raw_arg(const string& nam) const { for(xml_coll_t p(element,_U(star)); p; ++p) { string n = p.attr<string>(_U(name)); if ( n == nam ) { - return std::move(p); + return p; } } except("DDCMS","+++ Attempt to access non-existing algorithm option %s[%s]",name.c_str(),nam.c_str());