ATLAS Offline Software
Functions | Variables
PFRun3Config Namespace Reference

Functions

def PFFullCfg (inputFlags, runTauReco=False, **kwargs)
 
def PFCfg (inputFlags, **kwargs)
 
def PFTauFELinkCfg (inputFlags, **kwargs)
 

Variables

 cfgFlags = initConfigFlags()
 
 NumThreads
 
 isMC
 
 Files
 
 GlobalTag
 
 AODFileName
 
 doWriteAOD
 
 cfg = MainServicesCfg(cfgFlags)
 
 list_remaps = ListRemaps()
 

Function Documentation

◆ PFCfg()

def PFRun3Config.PFCfg (   inputFlags,
**  kwargs 
)

Definition at line 59 of file PFRun3Config.py.

59 def PFCfg(inputFlags,**kwargs):
60 
61  result=ComponentAccumulator()
62 
63  #Configure the pflow algorithms
64  PFLeptonSelectorFactory=CompFactory.PFLeptonSelector
65  PFLeptonSelector = PFLeptonSelectorFactory("PFLeptonSelector")
66  PFLeptonSelector.selectElectrons=False
67  PFLeptonSelector.selectMuons=False
68  result.addEventAlgo(PFLeptonSelector)
69 
70  from eflowRec.PFCfg import PFTrackSelectorAlgCfg
71  useCaching = True
72  #If reading ESD/AOD do not make use of caching of track extrapolations.
73  if inputFlags.Input.Format is Format.POOL and "StreamRDO" not in inputFlags.Input.ProcessingTags:
74  useCaching = False
75  result.merge(PFTrackSelectorAlgCfg(inputFlags,"PFTrackSelector",useCaching))
76 
77  from eflowRec.PFCfg import getOfflinePFAlgorithm
78  result.merge(getOfflinePFAlgorithm(inputFlags))
79 
80  from eflowRec.PFCfg import getChargedFlowElementCreatorAlgorithm,getNeutralFlowElementCreatorAlgorithm,getLCNeutralFlowElementCreatorAlgorithm
81  result.addEventAlgo(getChargedFlowElementCreatorAlgorithm(inputFlags,""))
82  result.addEventAlgo(getNeutralFlowElementCreatorAlgorithm(inputFlags,""))
83  result.addEventAlgo(getLCNeutralFlowElementCreatorAlgorithm(inputFlags,""))
84 
85  #Only do linking if not in eoverp mode
86  if not inputFlags.PF.EOverPMode:
87  if inputFlags.PF.useElPhotLinks:
88  from eflowRec.PFCfg import getEGamFlowElementAssocAlgorithm
89  result.addEventAlgo(getEGamFlowElementAssocAlgorithm(inputFlags))
90 
91  if inputFlags.PF.useMuLinks and inputFlags.Detector.GeometryMuon:
92  from eflowRec.PFCfg import getMuonFlowElementAssocAlgorithm
93  result.addEventAlgo(getMuonFlowElementAssocAlgorithm(inputFlags))
94 
95  from OutputStreamAthenaPool.OutputStreamConfig import addToAOD, addToESD
96  toESDAndAOD = ""
97  if(inputFlags.PF.EOverPMode):
98  toESDAndAOD = ["xAOD::FlowElementContainer#EOverPChargedParticleFlowObjects","xAOD::FlowElementAuxContainer#EOverPChargedParticleFlowObjectsAux."]
99  toESDAndAOD += ["xAOD::FlowElementContainer#EOverPNeutralParticleFlowObjects","xAOD::FlowElementAuxContainer#EOverPNeutralParticleFlowObjectsAux."]
100  else:
101  toESDAndAOD = ["xAOD::FlowElementContainer#JetETMissChargedParticleFlowObjects", "xAOD::FlowElementAuxContainer#JetETMissChargedParticleFlowObjectsAux."]
102  toESDAndAOD += ["xAOD::FlowElementContainer#JetETMissNeutralParticleFlowObjects","xAOD::FlowElementAuxContainer#JetETMissNeutralParticleFlowObjectsAux.-FEShowerSubtractedClusterLink"]
103  toESDAndAOD += ["xAOD::FlowElementContainer#JetETMissLCNeutralParticleFlowObjects","xAOD::ShallowAuxContainer#JetETMissLCNeutralParticleFlowObjectsAux."]
104 
105  if inputFlags.PF.addCPData:
106  #if CPData mode, then add PFCaloCluster to ESD and AOD
107  #PFCaloCluster are the clusters modified by the PFlow algorithm
108  toESDAndAOD += ["xAOD::CaloClusterContainer#PFCaloCluster","xAOD::CaloClusterAuxContainer#PFCaloClusterAux."]
109  #also schedule an algoroithm to decorate each calo cluster with the cluster width in eta and phi
110  #this allows clients of the AOD to calculate deltaRPrime for track-calocluster pairs.
111  PFClusterWidthDecorator = CompFactory.PFClusterWidthDecorator()
112  result.addEventAlgo(PFClusterWidthDecorator)
113 
114  result.merge(addToESD(inputFlags, toESDAndAOD))
115  result.merge(addToAOD(inputFlags, toESDAndAOD))
116 
117  #If we read an ESD then we cannot run the thinning because e.g electrons in the ESD
118  #have links to the neutral particle flow objects. If we run the thinning, then those
119  #links become invalid.
120  if "StreamESD" not in inputFlags.Input.ProcessingTags:
121  from ThinningUtils.ThinNegativeEnergyNeutralPFOCfg import ThinNegativeEnergyNeutralPFOCfg
122  result.merge(ThinNegativeEnergyNeutralPFOCfg(inputFlags))
123 
124  if inputFlags.PF.addCPData:
125  result.addEventAlgo(CompFactory.PFlowCellCPDataDecoratorAlgorithm())
126 
127  return result
128 
129 #Configure tau-FE link algorithm - this cannot be in PFCfg because
130 #pflow runs before taus in standard serial reco. Thus the links
131 #between taus and FE must happen after tau reco.

◆ PFFullCfg()

def PFRun3Config.PFFullCfg (   inputFlags,
  runTauReco = False,
**  kwargs 
)

Definition at line 8 of file PFRun3Config.py.

8 def PFFullCfg(inputFlags,runTauReco=False,**kwargs):
9 
10  result=ComponentAccumulator()
11 
12  StoreGateSvc=CompFactory.StoreGateSvc
13  result.addService(StoreGateSvc("DetectorStore"))
14 
15  #Alias calibrated topoclusters, if they exist already, such that overwrite won't fial
16  from SGComps.AddressRemappingConfig import InputRenameCfg
17  result.merge(InputRenameCfg("xAOD::CaloClusterContainer","CaloCalTopoClusters",""))
18 
19  #setup magnetic field service
20  from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
21  result.merge(AtlasFieldCacheCondAlgCfg(inputFlags))
22 
23  #Configure topocluster algorithmsm, and associated conditions
24  from CaloRec.CaloTopoClusterConfig import CaloTopoClusterCfg
25  result.merge(CaloTopoClusterCfg(inputFlags))
26 
27  from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
28  result.merge(CaloNoiseCondAlgCfg(inputFlags,"totalNoise"))
29  result.merge(CaloNoiseCondAlgCfg(inputFlags,"electronicNoise"))
30 
31  #Cache the track extrapolations
32  from TrackToCalo.CaloExtensionBuilderAlgCfg import CaloExtensionBuilderAlgCfg
33  # FIXME: This inversion to merge in CAs is a workaround, which can be removed once SiDetElementCondAlgs
34  # don't depend on Muons/TRT/alignment/otherSiSubdetectorAlignment anymore.
35  tempCA = CaloExtensionBuilderAlgCfg(inputFlags)
36  tempCA.merge(result)
37  result = tempCA
38 
39  from OutputStreamAthenaPool.OutputStreamConfig import addToAOD, addToESD
40  #PFlow requires tracks, electrons, photons, muons and taus in order to have valid links to them. So lets add these objects to the AOD and ESD
41  #PFlow also requires calo clusters for links to work, but these are added to output streams elsewhere already
42  toESDAndAOD = ["xAOD::TrackParticleContainer#InDetTrackParticles","xAOD::TrackParticleAuxContainer#InDetTrackParticlesAux."]
43  toESDAndAOD += ["xAOD::ElectronContainer#Electrons","xAOD::ElectronAuxContainer#ElectronsAux."]
44  toESDAndAOD += ["xAOD::PhotonContainer#Photons","xAOD::PhotonAuxContainer#PhotonsAux."]
45  toESDAndAOD += ["xAOD::MuonContainer#Muons","xAOD::MuonAuxContainer#MuonsAux."]
46  #If we rerun tau reco then it adds taus to the output itself, which results in an error message
47  #because you cannot mix +ve and -ve aux attributes (the below is considered +ve as a default).
48  if not runTauReco:
49  toESDAndAOD += ["xAOD::TauJetContainer#TauJets","xAOD::TauJetAuxContainer#TauJetsAux."]
50 
51  result.merge(addToESD(inputFlags, toESDAndAOD))
52  result.merge(addToAOD(inputFlags, toESDAndAOD))
53 
54  result.merge(PFCfg(inputFlags))
55  return result
56 
57 #Configures only the pflow algorithms and tools - to be used from RecExCommon to avoid
58 #conflicts or if you only want to configure just the pflow algorithms and tools

◆ PFTauFELinkCfg()

def PFRun3Config.PFTauFELinkCfg (   inputFlags,
**  kwargs 
)

Definition at line 132 of file PFRun3Config.py.

132 def PFTauFELinkCfg(inputFlags,**kwargs):
133  result=ComponentAccumulator()
134  from eflowRec.PFCfg import getTauFlowElementAssocAlgorithm
135  result.addEventAlgo(getTauFlowElementAssocAlgorithm(inputFlags))
136  return result
137 

Variable Documentation

◆ AODFileName

PFRun3Config.AODFileName

Definition at line 147 of file PFRun3Config.py.

◆ cfg

PFRun3Config.cfg = MainServicesCfg(cfgFlags)

Definition at line 153 of file PFRun3Config.py.

◆ cfgFlags

PFRun3Config.cfgFlags = initConfigFlags()

Definition at line 141 of file PFRun3Config.py.

◆ doWriteAOD

PFRun3Config.doWriteAOD

Definition at line 148 of file PFRun3Config.py.

◆ Files

PFRun3Config.Files

Definition at line 144 of file PFRun3Config.py.

◆ GlobalTag

PFRun3Config.GlobalTag

Definition at line 146 of file PFRun3Config.py.

◆ isMC

PFRun3Config.isMC

Definition at line 143 of file PFRun3Config.py.

◆ list_remaps

PFRun3Config.list_remaps = ListRemaps()

Definition at line 161 of file PFRun3Config.py.

◆ NumThreads

PFRun3Config.NumThreads

Definition at line 142 of file PFRun3Config.py.

PFCfg.getOfflinePFAlgorithm
def getOfflinePFAlgorithm(inputFlags)
Definition: PFCfg.py:444
PFRun3Config.PFFullCfg
def PFFullCfg(inputFlags, runTauReco=False, **kwargs)
Definition: PFRun3Config.py:8
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
PFRun3Config.PFCfg
def PFCfg(inputFlags, **kwargs)
Definition: PFRun3Config.py:59
PFCfg.getNeutralFlowElementCreatorAlgorithm
def getNeutralFlowElementCreatorAlgorithm(inputFlags, neutralFlowElementOutputName, nameSuffix="", eflowCaloObjectContainerName="eflowCaloObjects")
Definition: PFCfg.py:192
PFCfg.PFTrackSelectorAlgCfg
def PFTrackSelectorAlgCfg(inputFlags, algName, useCaching=True)
Definition: PFCfg.py:6
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
PFRun3Config.PFTauFELinkCfg
def PFTauFELinkCfg(inputFlags, **kwargs)
Definition: PFRun3Config.py:132
python.CaloNoiseCondAlgConfig.CaloNoiseCondAlgCfg
def CaloNoiseCondAlgCfg(flags, noisetype="totalNoise")
Definition: CaloNoiseCondAlgConfig.py:11
PFCfg.getChargedFlowElementCreatorAlgorithm
def getChargedFlowElementCreatorAlgorithm(inputFlags, chargedFlowElementOutputName, nameSuffix="", eflowCaloObjectContainerName="eflowCaloObjects")
Definition: PFCfg.py:178
PFCfg.getEGamFlowElementAssocAlgorithm
def getEGamFlowElementAssocAlgorithm(inputFlags, algName="", **kwargs)
Definition: PFCfg.py:218
PFCfg.getMuonFlowElementAssocAlgorithm
def getMuonFlowElementAssocAlgorithm(inputFlags, algName="", **kwargs)
Definition: PFCfg.py:299
PFCfg.getLCNeutralFlowElementCreatorAlgorithm
def getLCNeutralFlowElementCreatorAlgorithm(inputFlags, neutralFlowElementOutputName)
Definition: PFCfg.py:207
python.OutputStreamConfig.addToESD
def addToESD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:127
PFCfg.getTauFlowElementAssocAlgorithm
def getTauFlowElementAssocAlgorithm(inputFlags, algName="", **kwargs)
Definition: PFCfg.py:397
python.CaloTopoClusterConfig.CaloTopoClusterCfg
def CaloTopoClusterCfg(flags, cellsname="AllCalo", clustersname=None, clustersnapname="CaloTopoClusters")
Definition: CaloTopoClusterConfig.py:318
CaloExtensionBuilderAlgCfg
Definition: CaloExtensionBuilderAlgCfg.py:1
python.OutputStreamConfig.addToAOD
def addToAOD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:142
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:569
python.MagFieldServicesConfig.AtlasFieldCacheCondAlgCfg
def AtlasFieldCacheCondAlgCfg(flags, **kwargs)
Definition: MagFieldServicesConfig.py:8
python.ThinNegativeEnergyNeutralPFOCfg.ThinNegativeEnergyNeutralPFOCfg
def ThinNegativeEnergyNeutralPFOCfg(flags, StreamName="StreamAOD")
Definition: ThinNegativeEnergyNeutralPFOCfg.py:7
PFCfg
Definition: PFCfg.py:1
AddressRemappingConfig.InputRenameCfg
def InputRenameCfg(type, from_name, to_name)
Definition: AddressRemappingConfig.py:28