Skip to content
Snippets Groups Projects
Commit 3d00b74d authored by Markus FRANK's avatar Markus FRANK Committed by MarkusFrankATcernch
Browse files

Propagate shape tags to shapes resulting from volume divisions. See issue...

Propagate shape tags to shapes resulting from volume divisions. See issue https://github.com/AIDASoft/DD4hep/issues/833
parent c486b853
No related branches found
No related tags found
No related merge requests found
...@@ -91,14 +91,16 @@ void Geant4AssemblyVolume::imprint(const Geant4Converter& cnv, ...@@ -91,14 +91,16 @@ void Geant4AssemblyVolume::imprint(const Geant4Converter& cnv,
"Geant4Converter","++ Assembly: %s", detail::tools::placementPath(chain).c_str()); "Geant4Converter","++ Assembly: %s", detail::tools::placementPath(chain).c_str());
std::vector<G4AssemblyTriplet>::iterator iter = par_ass->GetTripletsIterator(); std::vector<G4AssemblyTriplet>::iterator iter = par_ass->GetTripletsIterator();
for( unsigned int i = 0, n = par_ass->TotalTriplets(); i < n; i++, iter++ ) { for( unsigned int i = 0, n = par_ass->TotalTriplets(); i < n; i++, iter++ ) {
Chain new_chain = chain; Chain new_chain = chain;
const auto& triplet = *iter; const auto& triplet = *iter;
const TGeoNode* node = pParentAssembly->m_entries[i]; const TGeoNode* node = pParentAssembly->m_entries[i];
Geant4AssemblyVolume* avol = pParentAssembly->m_places[i]; Geant4AssemblyVolume* avol = pParentAssembly->m_places[i];
std::string path;
new_chain.emplace_back(node); new_chain.emplace_back(node);
printout(cnv.debugPlacements ? ALWAYS : DEBUG,
" Assembly: Entry: %s",detail::tools::placementPath(new_chain).c_str()); path = detail::tools::placementPath(new_chain);
printout(cnv.debugPlacements ? ALWAYS : DEBUG, " Assembly: Entry: %s", path.c_str());
G4Transform3D Ta( *(triplet.GetRotation()), triplet.GetTranslation() ); G4Transform3D Ta( *(triplet.GetRotation()), triplet.GetTranslation() );
if ( triplet.IsReflection() ) { if ( triplet.IsReflection() ) {
...@@ -141,22 +143,17 @@ void Geant4AssemblyVolume::imprint(const Geant4Converter& cnv, ...@@ -141,22 +143,17 @@ void Geant4AssemblyVolume::imprint(const Geant4Converter& cnv,
numberOfDaughters + i, numberOfDaughters + i,
surfCheck ); surfCheck );
// Register the physical volume created by us so we can delete it later
//
//fPVStore.emplace_back( pvPlaced.first );
info.g4VolumeImprints[vol].emplace_back(new_chain,pvPlaced.first); info.g4VolumeImprints[vol].emplace_back(new_chain,pvPlaced.first);
printout(cnv.debugPlacements ? ALWAYS : DEBUG, printout(cnv.debugPlacements ? ALWAYS : DEBUG,
"Geant4Converter","++ Place %svolume %s in assembly.", "Geant4Converter", "++ Place %svolume %s in assembly.",
triplet.IsReflection() ? "REFLECTED " : "", triplet.IsReflection() ? "REFLECTED " : "", path.c_str());
detail::tools::placementPath(new_chain).c_str());
printout(cnv.debugPlacements ? ALWAYS : DEBUG, printout(cnv.debugPlacements ? ALWAYS : DEBUG,
"Geant4Converter"," Assembly:Parent: %s %s %p G4:%s Daughter: %s", "Geant4Converter", " Assembly:Parent: %s %s %p G4:%s",
parent->GetName(), node->GetName(), (void*)node, pvName.str().c_str(), parent->GetName(), node->GetName(),
detail::tools::placementPath(new_chain).c_str()); (void*)node, pvName.str().c_str());
if ( pvPlaced.second ) { if ( pvPlaced.second ) {
G4Exception("Geant4AssemblyVolume::imprint(..)", "GeomVol0003", FatalException, G4Exception("Geant4AssemblyVolume::imprint(..)", "GeomVol0003", FatalException,
"Fancy construct popping new mother from the stack!"); "Fancy construct popping new mother from the stack!");
//fPVStore.emplace_back( pvPlaced.second );
} }
} }
else if ( triplet.GetAssembly() ) { else if ( triplet.GetAssembly() ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment