def FastShowerCellBuilderToolBaseCfg(flags, name, **kwargs): acc = RNG(flags.Random.Engine) acc.merge( addFolders(flags, "/GLOBAL/AtlfastII/FastCaloSimParam", "GLOBAL_OFL", tag="FastCaloSim_v2")) localFileNameList = AdditionalParticleParametrizationFileNames() localFileNameList.insert(0, "L1_L2_egamma_corr.config20.root") kwargs.setdefault("AdditionalParticleParametrizationFileNames", localFileNameList) kwargs.setdefault("RandomService", acc.getService("AthRNGSvc")) kwargs.setdefault("RandomStreamName", "AthRNGSvc") kwargs.setdefault("DoSimulWithInnerDetectorTruthOnly", True) kwargs.setdefault("ID_cut_off_r", [1150]) kwargs.setdefault("ID_cut_off_z", [3490]) kwargs.setdefault("DoSimulWithInnerDetectorV14TruthCuts", True) kwargs.setdefault("DoNewEnergyEtaSelection", True) kwargs.setdefault("DoEnergyInterpolation", True) kwargs.setdefault("use_Ekin_for_depositions", True) kwargs.setdefault("McLocation", flags.Sim.FastShower.InputCollection) kwargs.setdefault("ParticleParametrizationFileName", "") kwargs.setdefault("Extrapolator", NITimedExtrapolatorCfg(flags)) # New kwarg from old FastCaloSimFactory kwargs.setdefault("CaloEntrance", TrkDetFlags.InDetContainerName()) ####################################################################################################### #theFastShowerCellBuilderTool.Invisibles=[12, 14, 16, 1000022] ######################################################################################################### acc.setPrivateTools(CompFactory.FastShowerCellBuilderTool(name, **kwargs)) return acc
def PunchThroughToolCfg(flags, name="ISF_PunchThroughTool", **kwargs): from BarcodeServices.BarcodeServicesConfigNew import BarcodeSvcCfg from SubDetectorEnvelopes.SubDetectorEnvelopesConfigNew import EnvelopeDefSvcCfg acc = RNG(flags.Random.Engine) kwargs.setdefault("RandomNumberService", acc.getService("AthRNGSvc")) kwargs.setdefault("RandomStreamName", "AthRNGSvc") # TODO check kwargs.setdefault("FilenameLookupTable", "CaloPunchThroughParametrisation.root") kwargs.setdefault("PunchThroughInitiators", [211]) kwargs.setdefault("PunchThroughParticles", [2212, 211, 22, 11, 13]) kwargs.setdefault("DoAntiParticles", [False, True, False, True, True]) kwargs.setdefault("CorrelatedParticle", [211, 2212, 11, 22, 0]) kwargs.setdefault("FullCorrelationEnergy", [100000., 100000., 100000., 100000., 0.]) kwargs.setdefault("MinEnergy", [938.3, 135.6, 50., 50., 105.7]) kwargs.setdefault("MaxNumParticles", [-1, -1, -1, -1, -1]) kwargs.setdefault("EnergyFactor", [1., 1., 1., 1., 1.]) acc_bar = BarcodeSvcCfg(flags) kwargs.setdefault("BarcodeSvc", acc_bar.getPrimary()) acc.merge(acc_bar) acc.merge(EnvelopeDefSvcCfg(flags)) kwargs.setdefault("EnvelopeDefSvc", acc.getService("AtlasGeometry_EnvelopeDefSvc")) kwargs.setdefault("BeamPipeRadius", 500.) acc.setPrivateTools(CompFactory.ISF.PunchThroughTool(name, **kwargs)) return acc
def Geant4ToolCfg(flags, name="ISF_Geant4Tool", **kwargs): acc = RNG(flags.Random.Engine) kwargs.setdefault("RandomNumberService", acc.getService("AthRNGSvc")) acc.merge(DetectorGeometrySvcCfg(flags)) kwargs.setdefault("DetGeoSvc", acc.getService("DetectorGeometrySvc")) acc.merge(InputConverterCfg(flags)) kwargs.setdefault("InputConverter", acc.getService("ISF_InputConverter")) acc.merge(ISFUserActionSvcCfg(flags)) kwargs.setdefault("UserActionSvc", acc.getService("G4UA::ISFUserActionSvc")) kwargs.setdefault("RecordFlux", flags.Sim.RecordFlux) kwargs.setdefault("MultiThreading", flags.Concurrency.NumThreads > 0) # Set commands for the G4AtlasAlg kwargs.setdefault("G4Commands", flags.Sim.G4Commands) kwargs.setdefault("PrintTimingInfo", flags.Sim.ISF.DoTimeMonitoring) tool = acc.popToolsAndMerge(SensitiveDetectorMasterToolCfg(flags)) kwargs.setdefault("SenDetMasterTool", tool) tool = acc.popToolsAndMerge(FastSimulationMasterToolCfg(flags)) kwargs.setdefault("FastSimMasterTool", tool) # Workaround to keep other simulation flavours working while we migrate everything to be AthenaMT-compatible. if flags.Sim.ISF.Simulator in [ "FullG4", "FullG4MT", "PassBackG4", "PassBackG4MT", "G4FastCalo", "G4FastCaloMT" ]: acc.setPrivateTools(CompFactory.iGeant4.G4TransportTool( name, **kwargs)) else: from ISF_FatrasServices.ISF_FatrasConfig import G4RunManagerHelperCfg acc.merge(G4RunManagerHelperCfg(flags)) kwargs.setdefault("G4RunManagerHelper", acc.getPublicTool("ISF_G4RunManagerHelper")) acc.setPrivateTools( CompFactory.iGeant4.G4LegacyTransportTool(name, **kwargs)) return acc