9 #include "G4RegionStore.hh"
10 #include "G4FastSimulationManager.hh"
27 return G4RegionStore::GetInstance()->GetRegion(
m_regionName.value());
37 ATH_MSG_ERROR(
"Trying to create a Fast Simulation Model which already exists!");
38 return StatusCode::FAILURE;
42 auto* fastsimmodel = makeFastSimModel();
49 return StatusCode::SUCCESS;
54 #ifdef G4MULTITHREADED
56 const auto tid = std::this_thread::get_id();
58 auto fastsimmodelPair = m_fastsimmodelThreadMap.find(tid);
59 if(fastsimmodelPair == m_fastsimmodelThreadMap.end())
return nullptr;
60 return fastsimmodelPair->second;
68 #ifdef G4MULTITHREADED
70 const auto tid = std::this_thread::get_id();
71 ATH_MSG_DEBUG(
"Creating and registering FastSimModel " << fastsimmodel <<
" in thread " << tid);
72 m_fastsimmodelThreadMap.insert( std::make_pair(tid, fastsimmodel) );
80 #ifdef G4MULTITHREADED
81 for(
auto& threadMapPair : m_fastsimmodelThreadMap)
83 auto fastSimModel = threadMapPair.second;
87 m_fastsimmodelThreadMap.clear();