14def Geant4SimCfg(flags, name="ISFG4SimSvc", **kwargs):
15 result = ComponentAccumulator()
16
17 G4_DDDBEnvelopeDefSvc = CompFactory.DetDescrDBEnvelopeSvc("G4EnvelopeDefSvc")
18 G4_DDDBEnvelopeDefSvc.DBBeamPipeNode = "BPipeEnvelopeG4"
19 G4_DDDBEnvelopeDefSvc.DBInDetNode = "InDetEnvelopeG4" if flags.GeoModel.Run < LHCPeriod.Run4 else "ITkEnvelopeG4"
20 G4_DDDBEnvelopeDefSvc.DBCaloNode = "CaloEnvelopeG4"
21 G4_DDDBEnvelopeDefSvc.DBMSNode = "MuonEnvelopeG4"
22 G4_DDDBEnvelopeDefSvc.DBCavernNode = "CavernEnvelopeG4"
23 result.addService(G4_DDDBEnvelopeDefSvc)
24
25 if "SimulatorTool" not in kwargs:
26 kwargs.setdefault("SimulatorTool", result.addPublicTool(result.popToolsAndMerge(Geant4ToolCfg(flags))))
27 kwargs.setdefault("Identifier", "Geant4")
28 result.addService(CompFactory.iGeant4.Geant4SimSvc(name, **kwargs), primary = True)
29 return result
30
31