9 #include "G4Version.hh"
10 #include "G4LogicalVolumeStore.hh"
16 const std::string&
name,
26 return StatusCode::SUCCESS;
31 ATH_MSG_INFO(
"VoxelDensityTool::postGeometryConfigure()");
33 G4LogicalVolumeStore *logicalVolumeStore = G4LogicalVolumeStore::GetInstance();
34 if (logicalVolumeStore->size() == 0) {
37 const G4String muonSys(
"Muon::MuonSys");
38 const G4String embSTAC(
"LArMgr::LAr::EMB::STAC");
39 bool ilvMuonSys =
false, ilvEmbSTAC =
false;
40 for (
auto* ilv : *logicalVolumeStore ) {
41 if ( ilv->GetName() == muonSys ) {
42 ilv->SetSmartless( 0.1 );
43 ATH_MSG_INFO(
"Set VoxelDensity for Muon::MuonSys to 0.1" );
46 else if ( ilv->GetName() == embSTAC ) {
47 ilv->SetSmartless( 0.5 );
48 ATH_MSG_INFO(
"Set VoxelDensity for LArMgr::LAr::EMB::STAC to 0.5" );
54 #if G4VERSION_NUMBER < 1100
55 if (ilv->GetName().contains(volToSet.first)) {
59 ilv->SetSmartless(volToSet.second);
60 ATH_MSG_INFO(
"Set VoxelDensity for "<<ilv->GetName()<<
" to "<<volToSet.second);
65 if (ilvMuonSys ==
false) {
66 ATH_MSG_INFO(
"Muon::MuonSys not in G4 logical volume store. VoxelDensity not set." );
68 if (ilvEmbSTAC ==
false) {
69 ATH_MSG_INFO(
"LArMgr::LAr::EMB::STAC not in G4 logical volume store. VoxelDensity not set." );
72 return StatusCode::SUCCESS;