3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from GeneratorConfig.Sequences
import EvgenSequence, EvgenSequenceFactory
8 def TestHepMCCfg(flags, name="TestHepMC", streamName="TestHepMCname", fileName="TestHepMC.root", **kwargs):
9 kwargs.setdefault(
"CmEnergy", flags.Beam.Energy * 2)
12 acc.addService(CompFactory.THistSvc(name=
"THistSvc",
13 Output=[f
"{streamName} DATAFILE='{fileName}' OPT='RECREATE'"]))
15 acc.addEventAlgo(CompFactory.TestHepMC(name, **kwargs))
21 acc.addEventAlgo(CompFactory.FixHepMC(name, **kwargs))
26 kwargs.setdefault(
"InputEventInfo",
"TMPEvtInfo")
27 kwargs.setdefault(
"OutputEventInfo",
"EventInfo")
28 kwargs.setdefault(
"mcEventWeightsKey",
"TMPEvtInfo.mcEventWeights")
29 kwargs.setdefault(
"FirstEvent", flags.Exec.FirstEvent)
30 kwargs.setdefault(
"CorrectHepMC",
True)
31 kwargs.setdefault(
"CorrectEventID",
True)
34 acc.addEventAlgo(CompFactory.CountHepMC(name, **kwargs))
39 kwargs.setdefault(
"mcEventWeightsKey",
"TMPEvtInfo.mcEventWeights")
42 acc.addEventAlgo(CompFactory.CopyEventWeight(name, **kwargs))
47 kwargs.setdefault(
"mcFilterHTKey",
"TMPEvtInfo.mcFilterHT")
50 acc.addEventAlgo(CompFactory.FillFilterValues(name, **kwargs))
56 acc.addEventAlgo(CompFactory.SimTimeEstimate(name, **kwargs))