4 Instantiate the TRT Standalone Thinning
7 from AthenaCommon.Logging
import logging
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
10 from AthenaConfiguration.Enums
import LHCPeriod
14 mlog = logging.getLogger(name)
15 mlog.info(
"Starting Geant4 Truth Thinning configuration")
17 kwargs.setdefault(
"StreamName",
"StreamAOD")
18 kwargs.setdefault(
"keepEGamma", flags.Reco.EnableEgamma)
19 kwargs.setdefault(
"keepMuons", flags.Reco.EnableCombinedMuon)
20 if flags.GeoModel.Run >= LHCPeriod.Run4:
21 kwargs.setdefault(
"EtaMaxEGammaTruth", 4.1)
22 kwargs.setdefault(
"FwdElectronsKey",
"ForwardElectrons")
24 acc.addEventAlgo(CompFactory.ThinGeantTruthAlg(name, **kwargs))
25 mlog.info(
"Geant4 Truth Thinning configured")
29 if __name__ ==
"__main__":
30 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
31 from AthenaConfiguration.TestDefaults
import defaultTestFiles
32 from AthenaConfiguration.ComponentAccumulator
import printProperties
33 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
35 flags.Input.Files = defaultTestFiles.RDO_RUN2
36 flags.Output.doWriteAOD =
True
40 mlog = logging.getLogger(
"ThinGeantTruthConfigTest")
43 acc.getEventAlgo(
"ThinGeantTruthAlg"),
48 with open(
"thingeanttruchcfg.pkl",
"wb")
as f: