3 if __name__==
"__main__":
5 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
8 cfgFlags.Concurrency.NumThreads=1
9 cfgFlags.Exec.MaxEvents=100
10 cfgFlags.Input.isMC=
True
11 cfgFlags.Input.Files= [
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/PFlowTests/mc21_13p6TeV/mc21_13p6TeV.601589.PhPy8EG_A14_ttbar_hdamp258p75_nonallhadron.recon.ESD.e8485_s3986_r14060/ESD.31373517._000035.pool.root.1"]
12 cfgFlags.IOVDb.GlobalTag =
"OFLCOND-MC21-SDR-RUN3-10"
13 cfgFlags.Output.AODFileName=
"output_AOD.root"
14 cfgFlags.Output.doWriteAOD=
True
15 cfgFlags.Calo.TopoCluster.addCPData=
True
16 cfgFlags.Calo.TopoCluster.doTopoClusterLocalCalib=
True
17 cfgFlags.Calo.TopoCluster.addCalibrationHitDecoration=
True
18 cfgFlags.PF.addCPData=
True
19 cfgFlags.PF.useTruthForChargedShowerSubtraction=
True
20 cfgFlags.PF.useTruthCheating=
True
21 cfgFlags.PF.useTrackClusterTruthMatching=
True
22 cfgFlags.Tau.doDiTauRec =
False
25 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
28 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
30 from eflowRec.PFRun3Config
import PFFullCfg
31 cfg.merge(
PFFullCfg(cfgFlags,runTauReco=
True))
33 from eflowRec.PFRun3Remaps
import ListRemaps
36 for mapping
in list_remaps:
39 from CaloCalibHitRec.CaloCalibHitDecoratorCfg
import CaloCalibHitDecoratorCfg
41 cfg.merge(
CaloCalibHitDecoratorCfg(cfgFlags,name=
"CaloCalibHitDecoratorEMAlgorithm",CaloClusterWriteDecorHandleKey_NLeadingTruthParticles=
"CaloTopoClusters.calclus_NLeadingTruthParticleBarcodeEnergyPairs"))
43 from PFlowUtils.configureRecoForPFlow
import configureRecoForPFlowCfg
46 from PFlowUtils.PFlowCalibHitDecoratorCfg
import PFlowCalibHitDecoratorCfg
49 cfg.getEventAlgo(
"PFlowCalibPFODecoratorAlgorithm").PFOWriteDecorHandleKey_NLeadingTruthParticles=
"GlobalNeutralParticleFlowObjects.calpfo_NLeadingTruthParticleBarcodeEnergyPairs"
51 from JetRecConfig.StandardSmallRJets
import AntiKt4Truth
52 from JetRecConfig.JetRecConfig
import JetRecCfg
53 cfg.merge(
JetRecCfg(cfgFlags,AntiKt4Truth))
55 from OutputStreamAthenaPool.OutputStreamConfig
import addToAOD
56 toESDAndAOD = [
"xAOD::JetContainer#AntiKt4EMPFlowJets",
"xAOD::JetAuxContainer#AntiKt4EMPFlowJetsAux.-PseudoJet" ]
57 toESDAndAOD += [
"xAOD::JetContainer#AntiKt4EMTopoJets",
"xAOD::JetAuxContainer#AntiKt4EMTopoJetsAux.-PseudoJet" ]
58 toESDAndAOD += [
"xAOD::JetContainer#AntiKt4TruthJets",
"xAOD::JetAuxContainer#AntiKt4TruthJetsAux.-PseudoJet" ]
59 toESDAndAOD += [
"xAOD::TruthParticleContainer#TruthParticles",
"xAOD::TruthParticleAuxContainer#TruthParticlesAux." ]
60 toESDAndAOD += [
"xAOD::FlowElementContainer#GlobalChargedParticleFlowObjects",
"xAOD::FlowElementAuxContainer#GlobalChargedParticleFlowObjectsAux." ]
61 toESDAndAOD += [
"xAOD::FlowElementContainer#GlobalNeutralParticleFlowObjects",
"xAOD::FlowElementAuxContainer#GlobalNeutralParticleFlowObjectsAux." ]
62 toESDAndAOD += [
"xAOD::FlowElementContainer#CHSGChargedParticleFlowObjects",
"xAOD::ShallowAuxContainer#CHSGChargedParticleFlowObjectsAux." ]
63 toESDAndAOD += [
"xAOD::FlowElementContainer#CHSGNeutralParticleFlowObjects",
"xAOD::ShallowAuxContainer#CHSGNeutralParticleFlowObjectsAux." ]
64 toESDAndAOD += [
"xAOD::VertexContainer#PrimaryVertices",
"xAOD::VertexAuxContainer#PrimaryVerticesAux." ]
65 toESDAndAOD += [
"xAOD::EventShape#Kt4EMPFlowEventShape",
"xAOD::EventShapeAuxInfo#Kt4EMPFlowEventShapeAux." ]
66 toESDAndAOD += [
"xAOD::EventShape#Kt4EMTopoOriginEventShape",
"xAOD::EventShapeAuxInfo#Kt4EMTopoOriginEventShapeAux." ]
68 cfg.merge(
addToAOD(cfgFlags,toESDAndAOD))
72 from AthenaConfiguration.ComponentFactory
import CompFactory
73 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
75 result.addEventAlgo(CompFactory.ClusterMatching.CaloClusterMatchLinkAlg(
"MuonTCLinks", ClustersToDecorate=
"MuonClusterCollection"))