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= [
"/Users/markhodgkinson/dataFiles/mc21_13p6TeV/ESDFiles/mc21_13p6TeV.601589.PhPy8EG_A14_ttbar_hdamp258p75_nonallhadron.recon.ESD.e8485_s3986_r14060/mc21_13p6TeV.601589.PhPy8EG_A14_ttbar_hdamp258p75_nonallhadron.recon.ESD.e8485_s3986_r14060.100Events.pool.root"]
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"
50 cfg.getEventAlgo(
"PFlowCellCPDataDecoratorAlgorithm").PFOWriteDecorHandleKey_CellCPData=
"GlobalChargedParticleFlowObjects.cellCPData"
51 cfg.getEventAlgo(
"PFlowCellCPDataDecoratorAlgorithm").NeutralPFOReadHandleKey=
"GlobalNeutralParticleFlowObjects"
53 from JetRecConfig.JetConfigFlags
import jetInternalFlags
54 jetInternalFlags.isRecoJob =
True
56 from JetRecConfig.StandardSmallRJets
import AntiKt4Truth
57 from JetRecConfig.JetRecConfig
import JetRecCfg
58 cfg.merge(
JetRecCfg(cfgFlags,AntiKt4Truth))
60 from OutputStreamAthenaPool.OutputStreamConfig
import addToAOD
61 toESDAndAOD = [
"xAOD::JetContainer#AntiKt4EMPFlowJets",
"xAOD::JetAuxContainer#AntiKt4EMPFlowJetsAux.-PseudoJet" ]
62 toESDAndAOD += [
"xAOD::JetContainer#AntiKt4EMTopoJets",
"xAOD::JetAuxContainer#AntiKt4EMTopoJetsAux.-PseudoJet" ]
63 toESDAndAOD += [
"xAOD::JetContainer#AntiKt4TruthJets",
"xAOD::JetAuxContainer#AntiKt4TruthJetsAux.-PseudoJet" ]
64 toESDAndAOD += [
"xAOD::TruthParticleContainer#TruthParticles",
"xAOD::TruthParticleAuxContainer#TruthParticlesAux." ]
65 toESDAndAOD += [
"xAOD::FlowElementContainer#GlobalChargedParticleFlowObjects",
"xAOD::FlowElementAuxContainer#GlobalChargedParticleFlowObjectsAux." ]
66 toESDAndAOD += [
"xAOD::FlowElementContainer#GlobalNeutralParticleFlowObjects",
"xAOD::FlowElementAuxContainer#GlobalNeutralParticleFlowObjectsAux." ]
67 toESDAndAOD += [
"xAOD::FlowElementContainer#CHSGChargedParticleFlowObjects",
"xAOD::ShallowAuxContainer#CHSGChargedParticleFlowObjectsAux." ]
68 toESDAndAOD += [
"xAOD::FlowElementContainer#CHSGNeutralParticleFlowObjects",
"xAOD::ShallowAuxContainer#CHSGNeutralParticleFlowObjectsAux." ]
69 toESDAndAOD += [
"xAOD::VertexContainer#PrimaryVertices",
"xAOD::VertexAuxContainer#PrimaryVerticesAux." ]
70 toESDAndAOD += [
"xAOD::EventShape#Kt4EMPFlowEventShape",
"xAOD::EventShapeAuxInfo#Kt4EMPFlowEventShapeAux." ]
71 toESDAndAOD += [
"xAOD::EventShape#Kt4EMTopoOriginEventShape",
"xAOD::EventShapeAuxInfo#Kt4EMTopoOriginEventShapeAux." ]
73 cfg.merge(
addToAOD(cfgFlags,toESDAndAOD))
77 from AthenaConfiguration.ComponentFactory
import CompFactory
78 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
80 result.addEventAlgo(CompFactory.ClusterMatching.CaloClusterMatchLinkAlg(
"MuonTCLinks", ClustersToDecorate=
"MuonClusterCollection"))