7 PFTrackSelectorFactory=CompFactory.PFTrackSelector
8 PFTrackSelector=PFTrackSelectorFactory(algName)
10 result = ComponentAccumulator()
12 from TrackToCalo.TrackToCaloConfig
import ParticleCaloExtensionToolCfg
13 pcExtensionTool = result.popToolsAndMerge(ParticleCaloExtensionToolCfg(inputFlags))
15 eflowTrackCaloExtensionTool=CompFactory.eflowTrackCaloExtensionTool
18 TrackCaloExtensionTool.PFParticleCache =
""
20 PFTrackSelector.trackExtrapolatorTool = TrackCaloExtensionTool
22 from InDetTrackSelectionTool.InDetTrackSelectionToolConfig
import (
23 PFTrackSelectionToolCfg)
24 PFTrackSelector.trackSelectionTool = result.popToolsAndMerge(PFTrackSelectionToolCfg(inputFlags))
27 if inputFlags.Detector.GeometryITk:
28 PFTrackSelector.ExtraInputs = {
29 (
"InDetDD::SiDetectorElementCollection",
"ConditionStore+ITkPixelDetectorElementCollection"),
30 (
"InDetDD::SiDetectorElementCollection",
"ConditionStore+ITkStripDetectorElementCollection"),
33 PFTrackSelector.ExtraInputs = {
34 (
"InDetDD::SiDetectorElementCollection",
"ConditionStore+PixelDetectorElementCollection"),
35 (
"InDetDD::SiDetectorElementCollection",
"ConditionStore+SCT_DetectorElementCollection"),
36 (
"InDetDD::TRT_DetElementContainer",
"ConditionStore+TRT_DetElementContainer"),
39 result.addEventAlgo (PFTrackSelector, primary=
True)
45 PFClusterSelectorToolFactory = CompFactory.PFClusterSelectorTool
46 PFClusterSelectorTool = PFClusterSelectorToolFactory(algName)
47 if clustersin
is not None:
48 PFClusterSelectorTool.clustersName = clustersin
49 if calclustersin
is not None:
50 PFClusterSelectorTool.calClustersName = calclustersin
52 if inputFlags.PF.useTruthCheating:
53 if inputFlags.PF.useTrackClusterTruthMatching:
54 PFClusterSelectorTool.CaloClusterReadDecorHandleKey_NLeadingTruthParticles =
"CaloTopoClusters." + inputFlags.Calo.TopoCluster.CalibrationHitDecorationName
56 if inputFlags.PF.useTopoTowers:
57 PFClusterSelectorTool.clustersName=
"CaloTopoSignal"
58 PFClusterSelectorTool.calClustersName=
"CaloCalTopoSignal"
60 return PFClusterSelectorTool
63 PFTrackClusterMatchingTool = CompFactory.PFTrackClusterMatchingTool
65 MatchingTool.ClusterPositionType = clusterPositionType
66 MatchingTool.DistanceType = distanceType
67 MatchingTool.MatchCut = matchCut*matchCut
72 PFCellLevelSubtractionToolFactory = CompFactory.PFSubtractionTool
73 PFCellLevelSubtractionTool = PFCellLevelSubtractionToolFactory(toolName,useNNEnergy = inputFlags.PF.useMLEOverP)
75 if inputFlags.GeoModel.Run <= LHCPeriod.Run3:
76 eflowCellEOverPTool_Run2_mc20_JetETMiss = CompFactory.eflowCellEOverPTool_Run2_mc20_JetETMiss
79 if inputFlags.PF.useLegacyEOverPRun4:
80 eflowCellEOverPTool_mc12_HLLHC = CompFactory.eflowCellEOverPTool_mc12_HLLHC
81 PFCellLevelSubtractionTool.eflowCellEOverPTool = eflowCellEOverPTool_mc12_HLLHC ()
83 PFCellEOverPTool = CompFactory.PFCellEOverPTool
84 PFCellLevelSubtractionTool.eflowCellEOverPTool =
PFCellEOverPTool(
"PFCellEOverPTool", referenceFileLocation = inputFlags.PF.EOverP_CellOrdering_ReferenceLocation)
86 PFCellLevelSubtractionTool.useLegacyEBinIndex=
False
88 if(inputFlags.PF.EOverPMode):
89 PFCellLevelSubtractionTool.CalcEOverP =
True
90 PFCellLevelSubtractionTool.nClusterMatchesToUse = -1
92 PFCellLevelSubtractionTool.nClusterMatchesToUse = 1
94 if(inputFlags.PF.EOverPMode):
95 PFCellLevelSubtractionTool.PFTrackClusterMatchingTool =
getPFTrackClusterMatchingTool(inputFlags,0.2,
"EtaPhiSquareDistance",
"PlainEtaPhi",
"CalObjBldMatchingTool")
97 PFCellLevelSubtractionTool.PFTrackClusterMatchingTool =
getPFTrackClusterMatchingTool(inputFlags,1.64,
"EtaPhiSquareSignificance",
"GeomCenterEtaPhi",
"CalObjBldMatchingTool")
99 PFCellLevelSubtractionTool.PFTrackClusterMatchingTool_015 =
getPFTrackClusterMatchingTool(inputFlags,0.15,
"EtaPhiSquareDistance",
"PlainEtaPhi",
"MatchingTool_Pull_015")
100 PFCellLevelSubtractionTool.PFTrackClusterMatchingTool_02 =
getPFTrackClusterMatchingTool(inputFlags,0.2,
"EtaPhiSquareDistance",
"PlainEtaPhi",
"MatchingTool_Pull_02")
102 if inputFlags.PF.useMLEOverP:
103 PFEnergyPredictorTool = CompFactory.PFEnergyPredictorTool(
"PFCellLevelEnergyPredcictorTool",ModelPath = inputFlags.PF.EOverP_NN_Model)
104 PFCellLevelSubtractionTool.NNEnergyPredictorTool = PFEnergyPredictorTool
105 PFCellLevelSubtractionTool.addCPData = inputFlags.PF.addCPData
107 if inputFlags.PF.useTruthCheating:
108 if inputFlags.PF.useTrackClusterTruthMatching:
109 PFCellLevelSubtractionTool.CaloClusterReadDecorHandleKey_NLeadingTruthParticles =
"CaloTopoClusters." + inputFlags.Calo.TopoCluster.CalibrationHitDecorationName
110 PFCellLevelSubtractionTool.useTrackClusterTruthMatching=
True
112 if inputFlags.PF.useTruthForChargedShowerSubtraction:
113 PFCellLevelSubtractionTool.useTruthForChargedShowerSubtraction =
True
114 PFCellLevelSubtractionTool.PFSimulateTruthShowerTool = CompFactory.PFSimulateTruthShowerTool(
"PFSimulateTruthShowerTool")
116 return PFCellLevelSubtractionTool
119 PFRecoverSplitShowersToolFactory = CompFactory.PFSubtractionTool
120 PFRecoverSplitShowersTool = PFRecoverSplitShowersToolFactory(toolName,useNNEnergy = inputFlags.PF.useMLEOverP)
122 if inputFlags.GeoModel.Run <= LHCPeriod.Run3:
123 eflowCellEOverPTool_Run2_mc20_JetETMiss = CompFactory.eflowCellEOverPTool_Run2_mc20_JetETMiss
126 if inputFlags.PF.useLegacyEOverPRun4:
127 eflowCellEOverPTool_mc12_HLLHC = CompFactory.eflowCellEOverPTool_mc12_HLLHC
128 PFRecoverSplitShowersTool.eflowCellEOverPTool = eflowCellEOverPTool_mc12_HLLHC ()
130 PFCellEOverPTool = CompFactory.PFCellEOverPTool
131 PFRecoverSplitShowersTool.eflowCellEOverPTool =
PFCellEOverPTool(
"PFCellEOverPTool_Recover", referenceFileLocation = inputFlags.PF.EOverP_CellOrdering_ReferenceLocation)
133 PFRecoverSplitShowersTool.useLegacyEBinIndex=
False
135 PFRecoverSplitShowersTool.RecoverSplitShowers =
True
137 if inputFlags.PF.useMLEOverP:
138 PFEnergyPredictorTool = CompFactory.PFEnergyPredictorTool(
"PFRecoverSplitShowersEnergyPredcictorTool",ModelPath = inputFlags.PF.EOverP_NN_Model)
139 PFRecoverSplitShowersTool.NNEnergyPredictorTool = PFEnergyPredictorTool
141 return PFRecoverSplitShowersTool
144 result=ComponentAccumulator()
145 PFMomentCalculatorToolFactory = CompFactory.PFMomentCalculatorTool
146 PFMomentCalculatorTool = PFMomentCalculatorToolFactory(
"PFMomentCalculatorTool")
148 from CaloRec.CaloTopoClusterConfig
import getTopoMoments
149 PFClusterMomentsMaker = result.popToolsAndMerge(getTopoMoments(inputFlags))
150 if (len(momentsToCalculateList) > 0):
151 PFClusterMomentsMaker.MomentsNames = momentsToCalculateList
152 PFMomentCalculatorTool.CaloClusterMomentsMaker = PFClusterMomentsMaker
154 PFClusterCollectionTool = CompFactory.PFClusterCollectionTool
157 if(inputFlags.PF.useCalibHitTruthClusterMoments):
158 PFMomentCalculatorTool.UseCalibHitTruth=
True
159 from CaloRec.CaloTopoClusterConfig
import getTopoCalibMoments
160 PFMomentCalculatorTool.CaloCalibClusterMomentsMaker2 = getTopoCalibMoments(inputFlags)
162 result.setPrivateTools(PFMomentCalculatorTool)
166 PFLCCalibTool = CompFactory.PFLCCalibTool
169 PFClusterCollectionTool = CompFactory.PFClusterCollectionTool
171 PFLCCalibTool.UseLocalWeight =
False
173 from CaloRec.CaloTopoClusterConfig
import getTopoClusterLocalCalibTools
174 lcCalibToolList = getTopoClusterLocalCalibTools(inputFlags)
176 PFLCCalibTool.CaloClusterLocalCalib=lcCalibToolList[0]
177 PFLCCalibTool.CaloClusterLocalCalibOOCC=lcCalibToolList[1]
178 PFLCCalibTool.CaloClusterLocalCalibOOCCPi0=lcCalibToolList[2]
179 PFLCCalibTool.CaloClusterLocalCalibDM=lcCalibToolList[3]
184 FlowElementChargedCreatorAlgorithmFactory = CompFactory.PFChargedFlowElementCreatorAlgorithm
185 FlowElementChargedCreatorAlgorithm = FlowElementChargedCreatorAlgorithmFactory(
"PFChargedFlowElementCreatorAlgorithm"+nameSuffix)
186 FlowElementChargedCreatorAlgorithm.eflowCaloObjectContainerName = eflowCaloObjectContainerName
187 if chargedFlowElementOutputName:
188 FlowElementChargedCreatorAlgorithm.FlowElementOutputName=chargedFlowElementOutputName
189 if(inputFlags.PF.EOverPMode):
190 FlowElementChargedCreatorAlgorithm.FlowElementOutputName=
"EOverPChargedParticleFlowObjects"
191 FlowElementChargedCreatorAlgorithm.EOverPMode =
True
192 if inputFlags.PF.addCPData:
193 FlowElementChargedCreatorAlgorithm.addCPData =
True
195 return FlowElementChargedCreatorAlgorithm
198 FlowElementNeutralCreatorAlgorithmFactory = CompFactory.PFNeutralFlowElementCreatorAlgorithm
199 FlowElementNeutralCreatorAlgorithm = FlowElementNeutralCreatorAlgorithmFactory(
"PFNeutralFlowElementCreatorAlgorithm"+nameSuffix)
200 FlowElementNeutralCreatorAlgorithm.eflowCaloObjectContainerName = eflowCaloObjectContainerName
201 if neutralFlowElementOutputName:
202 FlowElementNeutralCreatorAlgorithm.FlowElementOutputName=neutralFlowElementOutputName
203 if(inputFlags.PF.EOverPMode):
204 FlowElementNeutralCreatorAlgorithm.FlowElementOutputName=
"EOverPNeutralParticleFlowObjects"
205 if(inputFlags.PF.useCalibHitTruthClusterMoments
and inputFlags.PF.addClusterMoments):
206 FlowElementNeutralCreatorAlgorithm.UseCalibHitTruth=
True
207 if inputFlags.PF.addCPData:
208 FlowElementNeutralCreatorAlgorithm.addCPData =
True
210 return FlowElementNeutralCreatorAlgorithm
213 LCFlowElementNeutralCreatorAlgorithmFactory = CompFactory.PFLCNeutralFlowElementCreatorAlgorithm
214 LCFlowElementNeutralCreatorAlgorithm = LCFlowElementNeutralCreatorAlgorithmFactory(
"PFLCNeutralFlowElementCreatorAlgorithm")
215 if neutralFlowElementOutputName:
216 LCFlowElementNeutralCreatorAlgorithm.FELCOutputName=neutralFlowElementOutputName
217 if(inputFlags.PF.EOverPMode):
218 LCFlowElementNeutralCreatorAlgorithm.FEInputContainerName=
"EOverPNeutralParticleFlowObjects"
219 LCFlowElementNeutralCreatorAlgorithm.FELCOutputName=
"EOverPLCNeutralParticleFlowObjects"
221 return LCFlowElementNeutralCreatorAlgorithm
225 alg = CompFactory.PFOClusterMLCorrectionAlgorithm(
"PFOClusterMLCorrectionAlgorithm")
226 suffix =
"ParticleFlowObjects"
227 alg.NeutralPFlowInputContainer = inputNameBase +
"Neutral" + suffix
228 alg.ChargedPFlowInputContainer = inputNameBase +
"Charged" + suffix
229 alg.NeutralPFlowOutputContainer = outputNameBase +
"Neutral" + suffix
230 alg.ChargedPFlowOutputContainer = outputNameBase +
"Charged" + suffix
249 kwargs.setdefault(
"neutral_FE_cont_name",
"")
250 kwargs.setdefault(
"charged_FE_cont_name",
"")
251 kwargs.setdefault(
"doTCC",
False)
252 kwargs.setdefault(
"useGlobal",
False)
254 PFEGamFlowElementLinkerAlgorithmFactory=CompFactory.PFEGamFlowElementAssoc
256 algName =
"PFEGamFlowElementAssoc"
257 PFEGamFlowElementLinkerAlgorithm=PFEGamFlowElementLinkerAlgorithmFactory(algName)
264 if kwargs[
'neutral_FE_cont_name']:
265 PFEGamFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer = kwargs[
'neutral_FE_cont_name']
267 if kwargs[
'charged_FE_cont_name']:
268 PFEGamFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer = kwargs[
'charged_FE_cont_name']
272 PFEGamFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer=
"TrackCaloClustersNeutral"
273 PFEGamFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer=
"TrackCaloClustersCharged"
277 EL_NFE_Link=str(PFEGamFlowElementLinkerAlgorithm.ElectronNeutralFEDecorKey)
278 PFEGamFlowElementLinkerAlgorithm.ElectronNeutralFEDecorKey=EL_NFE_Link.replace(
"FELinks",
"TCCLinks")
279 EL_CFE_Link=str(PFEGamFlowElementLinkerAlgorithm.ElectronChargedFEDecorKey)
280 PFEGamFlowElementLinkerAlgorithm.ElectronChargedFEDecorKey=EL_CFE_Link.replace(
"FELinks",
"TCCLinks")
283 PFEGamFlowElementLinkerAlgorithm.ChargedFEElectronDecorKey=
"TCC_ElectronLinks"
284 PFEGamFlowElementLinkerAlgorithm.NeutralFEElectronDecorKey=
"TCC_ElectronLinks"
288 PH_NFE_Link=str(PFEGamFlowElementLinkerAlgorithm.PhotonNeutralFEDecorKey)
289 PFEGamFlowElementLinkerAlgorithm.PhotonNeutralFEDecorKey=PH_NFE_Link.replace(
"FELinks",
"TCCLinks")
290 PH_CFE_Link=str(PFEGamFlowElementLinkerAlgorithm.PhotonChargedFEDecorKey)
291 PFEGamFlowElementLinkerAlgorithm.PhotonChargedFEDecorKey=PH_CFE_Link.replace(
"FELinks",
"TCCLinks")
294 PFEGamFlowElementLinkerAlgorithm.ChargedFEPhotonDecorKey=
"TCC_PhotonLinks"
295 PFEGamFlowElementLinkerAlgorithm.NeutralFEPhotonDecorKey=
"TCC_PhotonLinks"
297 if kwargs[
'useGlobal']:
299 PFEGamFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer=
"GlobalNeutralParticleFlowObjects"
300 PFEGamFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer=
"GlobalChargedParticleFlowObjects"
304 EL_NFE_Link=str(PFEGamFlowElementLinkerAlgorithm.ElectronNeutralFEDecorKey)
305 PFEGamFlowElementLinkerAlgorithm.ElectronNeutralFEDecorKey=EL_NFE_Link.replace(
"FELinks",
"GlobalFELinks")
306 EL_CFE_Link=str(PFEGamFlowElementLinkerAlgorithm.ElectronChargedFEDecorKey)
307 PFEGamFlowElementLinkerAlgorithm.ElectronChargedFEDecorKey=EL_CFE_Link.replace(
"FELinks",
"GlobalFELinks")
310 PFEGamFlowElementLinkerAlgorithm.ChargedFEElectronDecorKey=
"GlobalFE_ElectronLinks"
311 PFEGamFlowElementLinkerAlgorithm.NeutralFEElectronDecorKey=
"GlobalFE_ElectronLinks"
315 PH_NFE_Link=str(PFEGamFlowElementLinkerAlgorithm.PhotonNeutralFEDecorKey)
316 PFEGamFlowElementLinkerAlgorithm.PhotonNeutralFEDecorKey=PH_NFE_Link.replace(
"FELinks",
"GlobalFELinks")
317 PH_CFE_Link=str(PFEGamFlowElementLinkerAlgorithm.PhotonChargedFEDecorKey)
318 PFEGamFlowElementLinkerAlgorithm.PhotonChargedFEDecorKey=PH_CFE_Link.replace(
"FELinks",
"GlobalFELinks")
321 PFEGamFlowElementLinkerAlgorithm.ChargedFEPhotonDecorKey=
"TCC_PhotonLinks"
322 PFEGamFlowElementLinkerAlgorithm.NeutralFEPhotonDecorKey=
"TCC_PhotonLinks"
326 return PFEGamFlowElementLinkerAlgorithm
330 kwargs.setdefault(
"neutral_FE_cont_name",
"")
331 kwargs.setdefault(
"charged_FE_cont_name",
"")
332 kwargs.setdefault(
"LinkNeutralFEClusters",
True)
333 kwargs.setdefault(
"doTCC",
False)
334 kwargs.setdefault(
"useGlobal",
False)
336 useMuonTopoClusters =
False
337 from AthenaConfiguration.Enums
import ProductionStep
340 if inputFlags.Common.ProductionStep
in [ProductionStep.Derivation]
or inputFlags.DQ.Environment ==
"AOD":
341 useMuonTopoClusters =
True
344 PFMuonFlowElementLinkerAlgorithmFactory=CompFactory.PFMuonFlowElementAssoc
346 algName=
"PFMuonFlowElementAssoc"
347 PFMuonFlowElementLinkerAlgorithm=PFMuonFlowElementLinkerAlgorithmFactory(algName)
353 if kwargs[
'neutral_FE_cont_name']:
355 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer = kwargs[
'neutral_FE_cont_name']
358 if kwargs[
'charged_FE_cont_name']:
359 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer = kwargs[
'charged_FE_cont_name']
361 PFMuonFlowElementLinkerAlgorithm.LinkNeutralFEClusters = kwargs[
'LinkNeutralFEClusters']
362 PFMuonFlowElementLinkerAlgorithm.useMuonTopoClusters = useMuonTopoClusters
371 PFMuonFlowElementLinkerAlgorithm.MuonContainer=service_key+
"Muons"
372 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer=service_key+
"TrackCaloClustersCharged"
373 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer=service_key+
"TrackCaloClustersNeutral"
378 PFMuonFlowElementLinkerAlgorithm.MuonContainer_chargedFELinks=
"chargedTCCLinks"
379 PFMuonFlowElementLinkerAlgorithm.MuonContainer_neutralFELinks=
"neutralTCCLinks"
380 PFMuonFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer_FE_MuonLinks=
"TCC_MuonLinks"
381 PFMuonFlowElementLinkerAlgorithm.JetETMissChargedFlowElements_FE_MuonLinks=
"TCC_MuonLinks"
382 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_ChargedFE_ennergy_matched_muon=
"TCC_efrac_matched_muon"
384 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_nMatchedMuons=
"TCC_nMatchedMuons"
385 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_FE_efrac_matched_muon=
"TCC_efrac_matched_muon"
387 PFMuonFlowElementLinkerAlgorithm.MuonContainer_muon_efrac_matched_FE=
"muon_efrac_matched_TCC"
389 PFMuonFlowElementLinkerAlgorithm.MuonContainer_ClusterInfo_deltaR=
"deltaR_muon_clus_TCCalg"
391 if kwargs[
'useGlobal']:
392 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer=
"GlobalChargedParticleFlowObjects"
393 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer=
"GlobalNeutralParticleFlowObjects"
395 PFMuonFlowElementLinkerAlgorithm.MuonContainer_chargedFELinks=
"chargedGlobalFELinks"
396 PFMuonFlowElementLinkerAlgorithm.MuonContainer_neutralFELinks=
"neutralGlobalFELinks"
398 PFMuonFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer_FE_MuonLinks=
"GlobalFE_MuonLinks"
399 PFMuonFlowElementLinkerAlgorithm.JetETMissChargedFlowElements_FE_MuonLinks=
"GlobalFE_MuonLinks"
400 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_ChargedFE_ennergy_matched_muon=
"GlobalFE_efrac_matched_muon"
402 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_nMatchedMuons=
"GlobalFE_nMatchedMuons"
403 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_FE_efrac_matched_muon=
"GlobalFE_efrac_matched_muon"
405 PFMuonFlowElementLinkerAlgorithm.MuonContainer_muon_efrac_matched_FE=
"muon_efrac_matched_GlobalFE"
407 PFMuonFlowElementLinkerAlgorithm.MuonContainer_ClusterInfo_deltaR=
"deltaR_muon_clus_GlobalFEalg"
409 if kwargs[
'LinkNeutralFEClusters']
and not useMuonTopoClusters:
412 PFMuonFlowElementLinkerAlgorithm.ExtraInputs.add((
'CaloCellContainer', inputFlags.Egamma.Keys.Input.CaloCells))
414 if kwargs[
'LinkNeutralFEClusters']:
418 from AthenaCommon.Logging
import logging
419 msg=logging.getLogger(
"PFCfg.py::getMuonFlowElementAssocAlgorithm")
420 msg.error(
"Neutral FE from AOD configured to be linked with Muon. This link will fail due to missing CaloCells in the AOD")
421 msg.info(
"Terminating job")
425 return PFMuonFlowElementLinkerAlgorithm
429 kwargs.setdefault(
"neutral_FE_cont_name",
"")
430 kwargs.setdefault(
"charged_FE_cont_name",
"")
431 kwargs.setdefault(
"doTCC",
False)
432 kwargs.setdefault(
"useGlobal",
False)
434 PFTauFlowElementLinkerAlgorithmFactory=CompFactory.PFTauFlowElementAssoc
436 algName =
"PFTauFlowElementAssoc"
438 PFTauFlowElementLinkerAlgorithm=PFTauFlowElementLinkerAlgorithmFactory(algName)
445 if kwargs[
'neutral_FE_cont_name']:
446 PFTauFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer = kwargs[
'neutral_FE_cont_name']
448 if kwargs[
'charged_FE_cont_name']:
449 PFTauFlowElementLinkerAlgorithm.JetETMissChargedFlowElementContainer = kwargs[
'charged_FE_cont_name']
452 PFTauFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer=
"TrackCaloClustersNeutral"
453 PFTauFlowElementLinkerAlgorithm.JetETMissChargedFlowElementContainer=
"TrackCaloClustersCharged"
455 PFTauFlowElementLinkerAlgorithm.TauNeutralFEDecorKey=
"neutralTCCLinks"
456 PFTauFlowElementLinkerAlgorithm.TauChargedFEDecorKey=
"chargedTCCLinks"
458 PFTauFlowElementLinkerAlgorithm.NeutralFETauDecorKey=
"TCC_TauLinks"
459 PFTauFlowElementLinkerAlgorithm.ChargedFETauDecorKey=
"TCC_TauLinks"
462 if kwargs[
'useGlobal']:
463 PFTauFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer=
"GlobalNeutralParticleFlowObjects"
464 PFTauFlowElementLinkerAlgorithm.JetETMissChargedFlowElementContainer=
"GlobalChargedParticleFlowObjects"
466 PFTauFlowElementLinkerAlgorithm.TauNeutralFEDecorKey=
"neutralGlobalFELinks"
467 PFTauFlowElementLinkerAlgorithm.TauChargedFEDecorKey=
"chargedGlobalFELinks"
469 PFTauFlowElementLinkerAlgorithm.NeutralFETauDecorKey=
"GlobalFE_TauLinks"
470 PFTauFlowElementLinkerAlgorithm.ChargedFETauDecorKey=
"GlobalFE_TauLinks"
472 return PFTauFlowElementLinkerAlgorithm
475 result=ComponentAccumulator()
477 PFAlgorithm=CompFactory.PFAlgorithm
481 if inputFlags.HeavyIon.Egamma.doSubtractedClusters:
482 PFAlgorithm.PFClusterSelectorTool =
getPFClusterSelectorTool(inputFlags,inputFlags.HeavyIon.Egamma.UncalibCaloTopoCluster,inputFlags.HeavyIon.Egamma.CaloTopoCluster,
"PFClusterSelectorTool")
484 topoClustersName=
"CaloTopoClusters"
485 PFAlgorithm.PFClusterSelectorTool =
getPFClusterSelectorTool(inputFlags,topoClustersName,
"CaloCalTopoClusters",
"PFClusterSelectorTool")
489 if(
False is inputFlags.PF.EOverPMode
and False is inputFlags.PF.useTruthCheating):
493 PFAlgorithm.BaseToolList = [PFMomentCalculatorTools]
495 if inputFlags.PF.EOverPMode:
496 PFAlgorithm.BaseToolList += [CompFactory.PFRadialEnergyCalculatorTool()]
498 result.addEventAlgo(PFAlgorithm)