Skip to content
Snippets Groups Projects
Commit c10f3b27 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

WIP: allow to associate a fastsim model with multiple regions

parent 29738fe8
No related branches found
No related tags found
No related merge requests found
......@@ -27,14 +27,15 @@ bool DummyFastSimG4Tool::CreateFastSimulationModel() {
// * Associate model and region
G4String model_name = "DummyFastSimG4Model";
G4String region_name = "DriftChamberRegion";
G4Region* aEnvelope = G4RegionStore::GetInstance()->GetRegion(region_name);
if (!aEnvelope) {
error() << "Failed to find G4Region '" << region_name << "'" << endmsg;
return false;
for (auto region_name: m_regions.value()) {
G4Region* aEnvelope = G4RegionStore::GetInstance()->GetRegion(region_name);
if (!aEnvelope) {
error() << "Failed to find G4Region '" << region_name << "'" << endmsg;
return false;
}
DummyFastSimG4Model* model = new DummyFastSimG4Model(model_name+region_name, aEnvelope);
info() << "Create Model " << model_name << " for G4Region " << region_name << endmsg;
}
DummyFastSimG4Model* model = new DummyFastSimG4Model(model_name, aEnvelope);
info() << "Create Model " << model_name << " for G4Region " << region_name << endmsg;
return true;
}
......@@ -14,7 +14,8 @@ public:
bool CreateFastSimulationModel() override;
private:
// the regions will be associated with the fast sim model
Gaudi::Property<std::vector<std::string>> m_regions{this, "Regions"};
};
#endif
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