diff --git a/DDG4/include/DDG4/Geant4AssemblyVolume.h b/DDG4/include/DDG4/Geant4AssemblyVolume.h index da18d7f33..8960b095a 100644 --- a/DDG4/include/DDG4/Geant4AssemblyVolume.h +++ b/DDG4/include/DDG4/Geant4AssemblyVolume.h @@ -71,7 +71,6 @@ namespace dd4hep { Geant4AssemblyVolume* pAssembly, G4LogicalVolume* pMotherLV, G4Transform3D& transformation, - G4int copyNumBase, G4bool surfCheck ); }; } diff --git a/DDG4/src/Geant4AssemblyVolume.cpp b/DDG4/src/Geant4AssemblyVolume.cpp index 331c6aeb0..4055636e7 100644 --- a/DDG4/src/Geant4AssemblyVolume.cpp +++ b/DDG4/src/Geant4AssemblyVolume.cpp @@ -71,7 +71,6 @@ void Geant4AssemblyVolume::imprint(const Geant4Converter& cnv, Geant4AssemblyVolume* pParentAssembly, G4LogicalVolume* pMotherLV, G4Transform3D& transformation, - G4int copyNumBase, G4bool surfCheck) { struct _Wrap : public G4AssemblyVolume { @@ -82,10 +81,7 @@ void Geant4AssemblyVolume::imprint(const Geant4Converter& cnv, TGeoVolume* vol = parent->GetVolume(); G4AssemblyVolume* par_ass = pParentAssembly->m_assembly; Geant4GeometryInfo& info = cnv.data(); - unsigned int numberOfDaughters = (copyNumBase == 0) ? pMotherLV->GetNoDaughters() : copyNumBase; - // We start from the first available index - numberOfDaughters++; _Wrap::imprintsCountPlus(par_ass); path = detail::tools::placementPath(chain); @@ -141,7 +137,7 @@ void Geant4AssemblyVolume::imprint(const Geant4Converter& cnv, triplet.GetVolume(), pMotherLV, false, - numberOfDaughters + i, + node->GetNumber(), surfCheck ); info.g4VolumeImprints[vol].emplace_back(new_chain,pvPlaced.first); @@ -159,7 +155,7 @@ void Geant4AssemblyVolume::imprint(const Geant4Converter& cnv, } else if ( triplet.GetAssembly() ) { // Place volumes in this assembly with composed transformation - imprint(cnv, parent, std::move(new_chain), avol, pMotherLV, Tfinal, i*100+copyNumBase, surfCheck ); + imprint(cnv, parent, std::move(new_chain), avol, pMotherLV, Tfinal, surfCheck ); } else { G4Exception("Geant4AssemblyVolume::imprint(..)", "GeomVol0003", FatalException, diff --git a/DDG4/src/Geant4Converter.cpp b/DDG4/src/Geant4Converter.cpp index 57531caf7..fd4686802 100644 --- a/DDG4/src/Geant4Converter.cpp +++ b/DDG4/src/Geant4Converter.cpp @@ -1000,7 +1000,7 @@ void* Geant4Converter::handlePlacement(const std::string& name, const TGeoNode* Geant4AssemblyVolume* ass = (Geant4AssemblyVolume*)info.g4AssemblyVolumes[node]; Geant4AssemblyVolume::Chain chain; chain.emplace_back(node); - ass->imprint(*this, node, chain, ass, (*volIt).second, transform, copy, checkOverlaps); + ass->imprint(*this, node, chain, ass, (*volIt).second, transform, checkOverlaps); return nullptr; } else if ( node != info.manager->GetTopNode() && volIt == info.g4Volumes.end() ) {