106def getDefaultActions(flags):
107 result = ComponentAccumulator()
108
109 actions = []
110
111
112
113 if flags.Sim.UseG4Workers:
114 actions += [result.popToolsAndMerge(SyncPrimaryGeneratorActionToolCfg(flags)),
115 result.popToolsAndMerge(SyncRunActionToolCfg(flags)),
116 result.popToolsAndMerge(SyncEventActionToolCfg(flags))]
117
118
119 actions += [result.popToolsAndMerge(AthenaStackingActionToolCfg(flags))]
120
121
122 if not flags.Sim.ISFRun:
123 actions += [result.popToolsAndMerge(MCTruthSteppingActionToolCfg(flags)),
124 result.popToolsAndMerge(G4SimTimerToolCfg(flags))]
125
126 actions += [result.popToolsAndMerge(G4TrackCounterToolCfg(flags))]
127
128
129 if flags.Beam.Type is BeamType.Cosmics and flags.Sim.CavernBackground is CavernBackground.Off:
130 actions += [CompFactory.G4UA.CosmicPerigeeActionTool()]
131
132 if flags.Beam.Type is BeamType.Cosmics and not flags.Sim.ISFRun:
133 actions += [result.popToolsAndMerge(CosmicFilterToolCfg(flags))]
134 if flags.Sim.StoppedParticleFile:
135 actions += [result.popToolsAndMerge(StoppedParticleFilterToolCfg(flags)),
136 result.popToolsAndMerge(StoppedParticleActionToolCfg(flags))]
137
138 if flags.Sim.CavernBackground is CavernBackground.Read:
139 actions += [result.popToolsAndMerge(HitWrapperToolCfg(flags))]
140
141 if flags.Sim.PhysicsList == "QGSP_BERT_HP":
142 actions += [CompFactory.G4UA.PhotonKillerTool()]
143
144 if flags.Sim.CalibrationRun in [CalibrationRun.LArTile, CalibrationRun.LArTileZDC]:
145 actions += [result.popToolsAndMerge(CalibrationDefaultProcessingToolCfg(flags))]
146 if 'G4UserActions.G4UserActionsConfig.MonopoleLooperKillerToolCfg' not in flags.Sim.OptionalUserActionList:
147 actions += [result.popToolsAndMerge(LooperKillerToolCfg(flags))]
148
149 result.setPrivateTools(actions)
150 return result
151
152