ATLAS Offline Software
Loading...
Searching...
No Matches
PFCfg Namespace Reference

Functions

 PFTrackSelectorAlgCfg (inputFlags, algName, useCaching=True)
 getPFClusterSelectorTool (inputFlags, clustersin, calclustersin, algName)
 getPFTrackClusterMatchingTool (inputFlags, matchCut, distanceType, clusterPositionType, name)
 getPFCellLevelSubtractionTool (inputFlags, toolName)
 getPFUnifiedCellLevelMatchingTool (inputFlags, toolName)
 getPFUnifiedCellLevelSubtractionOnlyTool (inputFlags, toolName)
 getPFRecoverSplitShowersTool (inputFlags, toolName)
 getPFUnifiedRecoverSplitShowersMatchingTool (inputFlags, toolName)
 getPFUnifiedRecoverSplitShowersSubtractionOnlyTool (inputFlags, toolName)
 getPFMomentCalculatorTool (inputFlags, momentsToCalculateList, use_unified=False)
 getPFLCCalibTool (inputFlags, use_unified=False)
 getChargedFlowElementCreatorAlgorithm (inputFlags, chargedFlowElementOutputName, nameSuffix="", eflowCaloObjectContainerName="eflowCaloObjects")
 getNeutralFlowElementCreatorAlgorithm (inputFlags, neutralFlowElementOutputName, nameSuffix="", eflowCaloObjectContainerName="eflowCaloObjects")
 getLCNeutralFlowElementCreatorAlgorithm (inputFlags, neutralFlowElementOutputName)
 getPFOClusterMLCorrectionAlgorithmCfg (inputFlags, inputNameBase="JetETMiss", outputNameBase="JetETMissClusterMLCorrected")
 getNeutralPFOClusterMLCorrectionToolCfg (inputFlags, toolName="NeutralPFOClusterMLCorrectionTool", **kwargs)
 getEGamFlowElementAssocAlgorithm (inputFlags, algName="", **kwargs)
 getMuonFlowElementAssocAlgorithm (inputFlags, algName="", **kwargs)
 getTauFlowElementAssocAlgorithm (inputFlags, algName="", **kwargs)
 getOfflinePFAlgorithm (inputFlags, **kwargs)
 PFGlobalFlowElementLinkingCfg (inputFlags, **kwargs)

Function Documentation

◆ getChargedFlowElementCreatorAlgorithm()

getChargedFlowElementCreatorAlgorithm ( inputFlags,
chargedFlowElementOutputName,
nameSuffix = "",
eflowCaloObjectContainerName = "eflowCaloObjects" )

Definition at line 335 of file PFCfg.py.

335def getChargedFlowElementCreatorAlgorithm(inputFlags,chargedFlowElementOutputName,nameSuffix="",eflowCaloObjectContainerName="eflowCaloObjects"):
336 FlowElementChargedCreatorAlgorithmFactory = CompFactory.PFChargedFlowElementCreatorAlgorithm
337 FlowElementChargedCreatorAlgorithm = FlowElementChargedCreatorAlgorithmFactory("PFChargedFlowElementCreatorAlgorithm"+nameSuffix)
338 FlowElementChargedCreatorAlgorithm.eflowCaloObjectContainerName = eflowCaloObjectContainerName
339 if chargedFlowElementOutputName:
340 FlowElementChargedCreatorAlgorithm.FlowElementOutputName=chargedFlowElementOutputName
341 if(inputFlags.PF.EOverPMode):
342 FlowElementChargedCreatorAlgorithm.FlowElementOutputName="EOverPChargedParticleFlowObjects"
343 FlowElementChargedCreatorAlgorithm.EOverPMode = True
344 if inputFlags.PF.addCPData:
345 FlowElementChargedCreatorAlgorithm.addCPData = True
346
347 return FlowElementChargedCreatorAlgorithm
348
if(pathvar)

◆ getEGamFlowElementAssocAlgorithm()

getEGamFlowElementAssocAlgorithm ( inputFlags,
algName = "",
** kwargs )

Definition at line 399 of file PFCfg.py.

399def getEGamFlowElementAssocAlgorithm(inputFlags, algName="", **kwargs):
400
401 kwargs.setdefault("neutral_FE_cont_name", "")
402 kwargs.setdefault("charged_FE_cont_name", "")
403 kwargs.setdefault("doTCC", False)
404 kwargs.setdefault("useGlobal", False)
405
406 PFEGamFlowElementLinkerAlgorithmFactory=CompFactory.PFEGamFlowElementAssoc
407 if not algName:
408 algName = "PFEGamFlowElementAssoc"
409 PFEGamFlowElementLinkerAlgorithm=PFEGamFlowElementLinkerAlgorithmFactory(algName)
410
411 #set an an alternate name if needed
412 #this uses some gaudi core magic, namely that you can change the name of the handle as it is a callable attribute, despite the attribute not being explicitly listed in the header
413 #for a key of type SG::WriteDecorHandle<xAOD::SomeCont>someKey{this,"SpecificContainerName","myContainerName","other-labels"}
414 #setting algorithm.SpecificContainerName="myNewContainerName" changes parameter "myContainerName"
415 #(also applies to ReadHandles)
416 if kwargs['neutral_FE_cont_name']:
417 PFEGamFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer = kwargs['neutral_FE_cont_name']
418
419 if kwargs['charged_FE_cont_name']:
420 PFEGamFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer = kwargs['charged_FE_cont_name']
421
422 if kwargs['doTCC']:
423 # ReadHandles to change
424 PFEGamFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer="TrackCaloClustersNeutral"
425 PFEGamFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer="TrackCaloClustersCharged"
426
427 #Now to change the writeHandles
428 # first the Electron -> FE links
429 EL_NFE_Link=str(PFEGamFlowElementLinkerAlgorithm.ElectronNeutralFEDecorKey)
430 PFEGamFlowElementLinkerAlgorithm.ElectronNeutralFEDecorKey=EL_NFE_Link.replace("FELinks","TCCLinks")
431 EL_CFE_Link=str(PFEGamFlowElementLinkerAlgorithm.ElectronChargedFEDecorKey)
432 PFEGamFlowElementLinkerAlgorithm.ElectronChargedFEDecorKey=EL_CFE_Link.replace("FELinks","TCCLinks")
433 #then the converse case (FE -> Electron)
434
435 PFEGamFlowElementLinkerAlgorithm.ChargedFEElectronDecorKey="TCC_ElectronLinks"
436 PFEGamFlowElementLinkerAlgorithm.NeutralFEElectronDecorKey="TCC_ElectronLinks"
437
438
439 # first the Photon -> FE links
440 PH_NFE_Link=str(PFEGamFlowElementLinkerAlgorithm.PhotonNeutralFEDecorKey)
441 PFEGamFlowElementLinkerAlgorithm.PhotonNeutralFEDecorKey=PH_NFE_Link.replace("FELinks","TCCLinks")
442 PH_CFE_Link=str(PFEGamFlowElementLinkerAlgorithm.PhotonChargedFEDecorKey)
443 PFEGamFlowElementLinkerAlgorithm.PhotonChargedFEDecorKey=PH_CFE_Link.replace("FELinks","TCCLinks")
444 #then the converse case (FE -> Photons)
445
446 PFEGamFlowElementLinkerAlgorithm.ChargedFEPhotonDecorKey="TCC_PhotonLinks"
447 PFEGamFlowElementLinkerAlgorithm.NeutralFEPhotonDecorKey="TCC_PhotonLinks"
448
449 if kwargs['useGlobal']:
450 # ReadHandles to change
451 PFEGamFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer="GlobalNeutralParticleFlowObjects"
452 PFEGamFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer="GlobalChargedParticleFlowObjects"
453
454 #Now to change the writeHandles
455 # first the Electron -> FE links
456 EL_NFE_Link=str(PFEGamFlowElementLinkerAlgorithm.ElectronNeutralFEDecorKey)
457 PFEGamFlowElementLinkerAlgorithm.ElectronNeutralFEDecorKey=EL_NFE_Link.replace("FELinks","GlobalFELinks")
458 EL_CFE_Link=str(PFEGamFlowElementLinkerAlgorithm.ElectronChargedFEDecorKey)
459 PFEGamFlowElementLinkerAlgorithm.ElectronChargedFEDecorKey=EL_CFE_Link.replace("FELinks","GlobalFELinks")
460 #then the converse case (FE -> Electron)
461
462 PFEGamFlowElementLinkerAlgorithm.ChargedFEElectronDecorKey="GlobalFE_ElectronLinks"
463 PFEGamFlowElementLinkerAlgorithm.NeutralFEElectronDecorKey="GlobalFE_ElectronLinks"
464
465
466 # first the Photon -> FE links
467 PH_NFE_Link=str(PFEGamFlowElementLinkerAlgorithm.PhotonNeutralFEDecorKey)
468 PFEGamFlowElementLinkerAlgorithm.PhotonNeutralFEDecorKey=PH_NFE_Link.replace("FELinks","GlobalFELinks")
469 PH_CFE_Link=str(PFEGamFlowElementLinkerAlgorithm.PhotonChargedFEDecorKey)
470 PFEGamFlowElementLinkerAlgorithm.PhotonChargedFEDecorKey=PH_CFE_Link.replace("FELinks","GlobalFELinks")
471 #then the converse case (FE -> Photons)
472
473 PFEGamFlowElementLinkerAlgorithm.ChargedFEPhotonDecorKey="TCC_PhotonLinks"
474 PFEGamFlowElementLinkerAlgorithm.NeutralFEPhotonDecorKey="TCC_PhotonLinks"
475
476
477
478 return PFEGamFlowElementLinkerAlgorithm
479

◆ getLCNeutralFlowElementCreatorAlgorithm()

getLCNeutralFlowElementCreatorAlgorithm ( inputFlags,
neutralFlowElementOutputName )

Definition at line 364 of file PFCfg.py.

364def getLCNeutralFlowElementCreatorAlgorithm(inputFlags,neutralFlowElementOutputName):
365 LCFlowElementNeutralCreatorAlgorithmFactory = CompFactory.PFLCNeutralFlowElementCreatorAlgorithm
366 LCFlowElementNeutralCreatorAlgorithm = LCFlowElementNeutralCreatorAlgorithmFactory("PFLCNeutralFlowElementCreatorAlgorithm")
367 if neutralFlowElementOutputName:
368 LCFlowElementNeutralCreatorAlgorithm.FELCOutputName=neutralFlowElementOutputName
369 if(inputFlags.PF.EOverPMode):
370 LCFlowElementNeutralCreatorAlgorithm.FEInputContainerName="EOverPNeutralParticleFlowObjects"
371 LCFlowElementNeutralCreatorAlgorithm.FELCOutputName="EOverPLCNeutralParticleFlowObjects"
372
373 return LCFlowElementNeutralCreatorAlgorithm
374
375# Factory function to create the ML-based neutral flow element creator algorithm

◆ getMuonFlowElementAssocAlgorithm()

getMuonFlowElementAssocAlgorithm ( inputFlags,
algName = "",
** kwargs )

Definition at line 480 of file PFCfg.py.

480def getMuonFlowElementAssocAlgorithm(inputFlags, algName="", **kwargs):
481
482 kwargs.setdefault("neutral_FE_cont_name", "")
483 kwargs.setdefault("charged_FE_cont_name", "")
484 kwargs.setdefault("LinkNeutralFEClusters", True)
485 kwargs.setdefault("doTCC", False)
486 kwargs.setdefault("useGlobal", False)
487
488 useMuonTopoClusters = False
489 from AthenaConfiguration.Enums import ProductionStep
490 # set 'useMuonTopoClusters=True' if running on AOD, as do not have calorimeter cells for CaloCalTopoCluster
491 # Assumes that in production workflows this only happens in "Derivation" or if DQ environment is AOD
492 if inputFlags.Common.ProductionStep in [ProductionStep.Derivation] or inputFlags.DQ.Environment == "AOD":
493 useMuonTopoClusters = True
494
495
496 PFMuonFlowElementLinkerAlgorithmFactory=CompFactory.PFMuonFlowElementAssoc
497 if not algName:
498 algName="PFMuonFlowElementAssoc"
499 PFMuonFlowElementLinkerAlgorithm=PFMuonFlowElementLinkerAlgorithmFactory(algName)
500
501 #set an an alternate name if needed
502 #this uses some gaudi core magic, namely that you can change the name of the handle as it is a callable attribute, despite the attribute not being explicitly listed in the header as such
503 #for a key of type SG::WriteDecorHandle<xAOD::SomeCont>someKey{this,"SpecificContainerName","myContainerName","other-labels"}
504 #setting algorithm.SpecificContainerName="myNewContainerName" changes parameter "myContainerName" to "myNewContainerName"
505 if kwargs['neutral_FE_cont_name']:
506 #update the readhandle
507 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer = kwargs['neutral_FE_cont_name']
508 #update the write handle for the link
509
510 if kwargs['charged_FE_cont_name']:
511 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer = kwargs['charged_FE_cont_name']
512
513 PFMuonFlowElementLinkerAlgorithm.LinkNeutralFEClusters = kwargs['LinkNeutralFEClusters']
514 PFMuonFlowElementLinkerAlgorithm.useMuonTopoClusters = useMuonTopoClusters
515
516 #prototype on AOD with the linkers already defined - so need to rename the output links to something besides their default name.
517
518 #Track Calo cluster (TCC) specific configuration. Input is differently named FE container, and in the AOD step specifically
519 if kwargs['doTCC']:
520 #input containers are TrackCaloClustersCharged and TrackCaloClustersNeutral, so rename them
521 #service_key="StoreGateSvc+"
522 service_key=""
523 PFMuonFlowElementLinkerAlgorithm.MuonContainer=service_key+"Muons"
524 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer=service_key+"TrackCaloClustersCharged"
525 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer=service_key+"TrackCaloClustersNeutral"
526
527 #Output
528 #rename the FE_MuonLinks as TCC_MuonLinks
529 #rename output containers
530 PFMuonFlowElementLinkerAlgorithm.MuonContainer_chargedFELinks="chargedTCCLinks"
531 PFMuonFlowElementLinkerAlgorithm.MuonContainer_neutralFELinks="neutralTCCLinks"
532 PFMuonFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer_FE_MuonLinks="TCC_MuonLinks"
533 PFMuonFlowElementLinkerAlgorithm.JetETMissChargedFlowElements_FE_MuonLinks="TCC_MuonLinks"
534 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_ChargedFE_ennergy_matched_muon="TCC_efrac_matched_muon"
535 # several variables relating to Neutral Flow Elements/TCCs to Muons for debug. perhaps at some point these should be removed by default
536 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_nMatchedMuons="TCC_nMatchedMuons"
537 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_FE_efrac_matched_muon="TCC_efrac_matched_muon"
538
539 PFMuonFlowElementLinkerAlgorithm.MuonContainer_muon_efrac_matched_FE="muon_efrac_matched_TCC"
540 # this is because the algorithm adds this debug container which we don't need
541 PFMuonFlowElementLinkerAlgorithm.MuonContainer_ClusterInfo_deltaR="deltaR_muon_clus_TCCalg"
542
543 if kwargs['useGlobal']:
544 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer="GlobalChargedParticleFlowObjects"
545 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer="GlobalNeutralParticleFlowObjects"
546
547 PFMuonFlowElementLinkerAlgorithm.MuonContainer_chargedFELinks="chargedGlobalFELinks"
548 PFMuonFlowElementLinkerAlgorithm.MuonContainer_neutralFELinks="neutralGlobalFELinks"
549
550 PFMuonFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer_FE_MuonLinks="GlobalFE_MuonLinks"
551 PFMuonFlowElementLinkerAlgorithm.JetETMissChargedFlowElements_FE_MuonLinks="GlobalFE_MuonLinks"
552 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_ChargedFE_ennergy_matched_muon="GlobalFE_efrac_matched_muon"
553
554 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_nMatchedMuons="GlobalFE_nMatchedMuons"
555 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_FE_efrac_matched_muon="GlobalFE_efrac_matched_muon"
556
557 PFMuonFlowElementLinkerAlgorithm.MuonContainer_muon_efrac_matched_FE="muon_efrac_matched_GlobalFE"
558 # this is because the algorithm adds this debug container which we don't need
559 PFMuonFlowElementLinkerAlgorithm.MuonContainer_ClusterInfo_deltaR="deltaR_muon_clus_GlobalFEalg"
560
561 if kwargs['LinkNeutralFEClusters'] and not useMuonTopoClusters:
562 # We dereference links to cells, so make sure we have the
563 # dependency.
564 PFMuonFlowElementLinkerAlgorithm.ExtraInputs.add(('CaloCellContainer', inputFlags.Egamma.Keys.Input.CaloCells))
565
566 if kwargs['LinkNeutralFEClusters']:
567 if kwargs['doTCC']:
568 # since the cells are deleted on AOD, if you try to run the link between NFE and Muon on AOD, it will crash. Terminate to catch this.
569 # This is a known bug to rectify soon
570 from AthenaCommon.Logging import logging
571 msg=logging.getLogger("PFCfg.py::getMuonFlowElementAssocAlgorithm")
572 msg.error("Neutral FE from AOD configured to be linked with Muon. This link will fail due to missing CaloCells in the AOD")
573 msg.info("Terminating job")
574 exit(0)
575
576
577 return PFMuonFlowElementLinkerAlgorithm
578

◆ getNeutralFlowElementCreatorAlgorithm()

getNeutralFlowElementCreatorAlgorithm ( inputFlags,
neutralFlowElementOutputName,
nameSuffix = "",
eflowCaloObjectContainerName = "eflowCaloObjects" )

Definition at line 349 of file PFCfg.py.

349def getNeutralFlowElementCreatorAlgorithm(inputFlags,neutralFlowElementOutputName,nameSuffix="",eflowCaloObjectContainerName="eflowCaloObjects"):
350 FlowElementNeutralCreatorAlgorithmFactory = CompFactory.PFNeutralFlowElementCreatorAlgorithm
351 FlowElementNeutralCreatorAlgorithm = FlowElementNeutralCreatorAlgorithmFactory("PFNeutralFlowElementCreatorAlgorithm"+nameSuffix)
352 FlowElementNeutralCreatorAlgorithm.eflowCaloObjectContainerName = eflowCaloObjectContainerName
353 if neutralFlowElementOutputName:
354 FlowElementNeutralCreatorAlgorithm.FlowElementOutputName=neutralFlowElementOutputName
355 if(inputFlags.PF.EOverPMode):
356 FlowElementNeutralCreatorAlgorithm.FlowElementOutputName="EOverPNeutralParticleFlowObjects"
357 if(inputFlags.PF.useCalibHitTruthClusterMoments and inputFlags.PF.addClusterMoments):
358 FlowElementNeutralCreatorAlgorithm.UseCalibHitTruth=True
359 if inputFlags.PF.addCPData:
360 FlowElementNeutralCreatorAlgorithm.addCPData = True
361
362 return FlowElementNeutralCreatorAlgorithm
363

◆ getNeutralPFOClusterMLCorrectionToolCfg()

getNeutralPFOClusterMLCorrectionToolCfg ( inputFlags,
toolName = "NeutralPFOClusterMLCorrectionTool",
** kwargs )

Definition at line 386 of file PFCfg.py.

386def getNeutralPFOClusterMLCorrectionToolCfg(inputFlags, toolName="NeutralPFOClusterMLCorrectionTool", **kwargs):
387 if toolName == "NeutralPFOClusterMLCorrectionTool":
388 tool = CompFactory.NeutralPFOClusterMLCorrectionTool(toolName, **kwargs)
389 else:
390 raise ValueError(f"Unknown tool name: {toolName}")
391
392 ca = ComponentAccumulator()
393 ca.setPrivateTools(tool)
394 return ca
395
396
397
398

◆ getOfflinePFAlgorithm()

getOfflinePFAlgorithm ( inputFlags,
** kwargs )

Definition at line 626 of file PFCfg.py.

626def getOfflinePFAlgorithm(inputFlags, **kwargs):
627 result=ComponentAccumulator()
628
629 PFAlgorithm=CompFactory.PFAlgorithm
630 PFAlgorithm = PFAlgorithm("PFAlgorithm")
631
632 if inputFlags.HeavyIon.Egamma.doSubtractedClusters:
633 PFAlgorithm.PFClusterSelectorTool = getPFClusterSelectorTool(inputFlags,inputFlags.HeavyIon.Egamma.UncalibCaloTopoCluster,inputFlags.HeavyIon.Egamma.CaloTopoCluster,"PFClusterSelectorTool")
634 else:
635 topoClustersName="CaloTopoClusters"
636 PFAlgorithm.PFClusterSelectorTool = getPFClusterSelectorTool(inputFlags,topoClustersName,"CaloCalTopoClusters","PFClusterSelectorTool")
637
638 if inputFlags.PF.useUnified:
639 PFAlgorithm.useUnified = True
640 PFAlgorithm.UnifiedBaseTools = [getPFUnifiedCellLevelMatchingTool(inputFlags, "PFUnifiedCellLevelMatchingTool")]
641 PFAlgorithm.UnifiedBaseTools += [getPFUnifiedCellLevelSubtractionOnlyTool(inputFlags, "PFUnifiedCellLevelSubtractionOnlyTool")]
642 if not inputFlags.PF.EOverPMode and not inputFlags.PF.useTruthCheating:
643 PFAlgorithm.UnifiedBaseTools += [getPFUnifiedRecoverSplitShowersMatchingTool(inputFlags, "PFUnifiedRecoverSplitShowersMatchingTool")]
644 PFAlgorithm.UnifiedBaseTools += [getPFUnifiedRecoverSplitShowersSubtractionOnlyTool(inputFlags, "PFUnifiedRecoverSplitShowersSubtractionOnlyTool")]
645
646 PFUnifiedMomentCalculatorTools=result.popToolsAndMerge(getPFMomentCalculatorTool(inputFlags,[], use_unified = True))
647 PFAlgorithm.UnifiedBaseTools += [PFUnifiedMomentCalculatorTools]
648 PFAlgorithm.UnifiedBaseTools += [getPFLCCalibTool(inputFlags, use_unified = True)]
649 if inputFlags.PF.EOverPMode:
650 PFAlgorithm.UnifiedBaseTools += [CompFactory.PFUnifiedRadialEnergyCalculatorTool()]
651
652 else:
653 PFAlgorithm.SubtractionToolList = [getPFCellLevelSubtractionTool(inputFlags,"PFCellLevelSubtractionTool")]
654
655 if not inputFlags.PF.EOverPMode and not inputFlags.PF.useTruthCheating:
656 PFAlgorithm.SubtractionToolList += [getPFRecoverSplitShowersTool(inputFlags,"PFRecoverSplitShowersTool")]
657
658 PFMomentCalculatorTools=result.popToolsAndMerge(getPFMomentCalculatorTool(inputFlags,[]))
659 PFAlgorithm.BaseToolList = [PFMomentCalculatorTools]
660 PFAlgorithm.BaseToolList += [getPFLCCalibTool(inputFlags)]
661 if inputFlags.PF.EOverPMode:
662 PFAlgorithm.BaseToolList += [CompFactory.PFRadialEnergyCalculatorTool()]
663
664 result.addEventAlgo(PFAlgorithm)
665 return result
666
667
668

◆ getPFCellLevelSubtractionTool()

getPFCellLevelSubtractionTool ( inputFlags,
toolName )

Definition at line 80 of file PFCfg.py.

80def getPFCellLevelSubtractionTool(inputFlags,toolName):
81 PFCellLevelSubtractionToolFactory = CompFactory.PFSubtractionTool
82 PFCellLevelSubtractionTool = PFCellLevelSubtractionToolFactory(toolName,useNNEnergy = inputFlags.PF.useMLEOverP)
83
84 if inputFlags.GeoModel.Run <= LHCPeriod.Run3:
85 eflowCellEOverPTool_Run2_mc20_JetETMiss = CompFactory.eflowCellEOverPTool_Run2_mc20_JetETMiss
86 PFCellLevelSubtractionTool.eflowCellEOverPTool = eflowCellEOverPTool_Run2_mc20_JetETMiss()
87 else:
88 if inputFlags.PF.useLegacyEOverPRun4:
89 eflowCellEOverPTool_mc12_HLLHC = CompFactory.eflowCellEOverPTool_mc12_HLLHC
90 PFCellLevelSubtractionTool.eflowCellEOverPTool = eflowCellEOverPTool_mc12_HLLHC ()
91 else:
92 PFCellEOverPTool = CompFactory.PFCellEOverPTool
93 PFCellLevelSubtractionTool.eflowCellEOverPTool = PFCellEOverPTool("PFCellEOverPTool", referenceFileLocation = inputFlags.PF.EOverP_CellOrdering_ReferenceLocation)
94 #this should always be false for any reference derived, except eflowCellEOverPTool_mc12_HLLHC.h or eflowCellEOverPTool_Run2_mc20_JetETMiss.h
95 PFCellLevelSubtractionTool.useLegacyEBinIndex=False
96
97 if(inputFlags.PF.EOverPMode):
98 PFCellLevelSubtractionTool.CalcEOverP = True
99 PFCellLevelSubtractionTool.nClusterMatchesToUse = -1
100 else:
101 PFCellLevelSubtractionTool.nClusterMatchesToUse = 1
102
103 if(inputFlags.PF.EOverPMode):
104 PFCellLevelSubtractionTool.PFTrackClusterMatchingTool = getPFTrackClusterMatchingTool(inputFlags,0.2,"EtaPhiSquareDistance","PlainEtaPhi","CalObjBldMatchingTool")
105 else:
106 PFCellLevelSubtractionTool.PFTrackClusterMatchingTool = getPFTrackClusterMatchingTool(inputFlags,1.64,"EtaPhiSquareSignificance","GeomCenterEtaPhi","CalObjBldMatchingTool")
107
108 PFCellLevelSubtractionTool.PFTrackClusterMatchingTool_015 = getPFTrackClusterMatchingTool(inputFlags,0.15,"EtaPhiSquareDistance","PlainEtaPhi","MatchingTool_Pull_015")
109 PFCellLevelSubtractionTool.PFTrackClusterMatchingTool_02 = getPFTrackClusterMatchingTool(inputFlags,0.2,"EtaPhiSquareDistance","PlainEtaPhi","MatchingTool_Pull_02")
110
111 if inputFlags.PF.useMLEOverP:
112 PFEnergyPredictorTool = CompFactory.PFEnergyPredictorTool("PFCellLevelEnergyPredcictorTool",ModelPath = inputFlags.PF.EOverP_NN_Model)
113 PFCellLevelSubtractionTool.NNEnergyPredictorTool = PFEnergyPredictorTool
114 PFCellLevelSubtractionTool.addCPData = inputFlags.PF.addCPData
115
116 if inputFlags.PF.useTruthCheating:
117 if inputFlags.PF.useTrackClusterTruthMatching:
118 PFCellLevelSubtractionTool.CaloClusterReadDecorHandleKey_NLeadingTruthParticles = "CaloTopoClusters." + inputFlags.Calo.TopoCluster.CalibrationHitDecorationName
119 PFCellLevelSubtractionTool.useTrackClusterTruthMatching=True
120
121 if inputFlags.PF.useTruthForChargedShowerSubtraction:
122 PFCellLevelSubtractionTool.useTruthForChargedShowerSubtraction = True
123 PFCellLevelSubtractionTool.PFSimulateTruthShowerTool = CompFactory.PFSimulateTruthShowerTool("PFSimulateTruthShowerTool")
124
125 return PFCellLevelSubtractionTool
126
127
128
Class to store reference e/p mean and widths, as well as reference energy density radial profile fit ...
Class to store reference e/p mean and widths, as well as reference energy density radial profile fit ...

◆ getPFClusterSelectorTool()

getPFClusterSelectorTool ( inputFlags,
clustersin,
calclustersin,
algName )

Definition at line 52 of file PFCfg.py.

52def getPFClusterSelectorTool(inputFlags,clustersin,calclustersin,algName):
53
54 PFClusterSelectorToolFactory = CompFactory.PFClusterSelectorTool
55 PFClusterSelectorTool = PFClusterSelectorToolFactory(algName)
56 if clustersin is not None:
57 PFClusterSelectorTool.clustersName = clustersin
58 if calclustersin is not None:
59 PFClusterSelectorTool.calClustersName = calclustersin
60
61 if inputFlags.PF.useTruthCheating:
62 if inputFlags.PF.useTrackClusterTruthMatching:
63 PFClusterSelectorTool.CaloClusterReadDecorHandleKey_NLeadingTruthParticles = "CaloTopoClusters." + inputFlags.Calo.TopoCluster.CalibrationHitDecorationName
64
65 if inputFlags.PF.useTopoTowers:
66 PFClusterSelectorTool.clustersName="CaloTopoSignal"
67 PFClusterSelectorTool.calClustersName="CaloCalTopoSignal"
68
69 return PFClusterSelectorTool
70

◆ getPFLCCalibTool()

getPFLCCalibTool ( inputFlags,
use_unified = False )

Definition at line 312 of file PFCfg.py.

312def getPFLCCalibTool(inputFlags,use_unified = False):
313
314 if use_unified:
315 PFLCCalibTool = CompFactory.PFUnifiedLCCalibTool
316 else:
317 PFLCCalibTool = CompFactory.PFLCCalibTool
318
319 PFLCCalibTool = PFLCCalibTool("PFLCCalibTool")
320
321 PFClusterCollectionTool = CompFactory.PFClusterCollectionTool
322 PFLCCalibTool.eflowRecClusterCollectionTool = PFClusterCollectionTool("PFClusterCollectionTool_LCCalib")
323 PFLCCalibTool.UseLocalWeight = False
324
325 from CaloRec.CaloTopoClusterConfig import getTopoClusterLocalCalibTools
326 lcCalibToolList = getTopoClusterLocalCalibTools(inputFlags)
327
328 PFLCCalibTool.CaloClusterLocalCalib=lcCalibToolList[0]
329 PFLCCalibTool.CaloClusterLocalCalibOOCC=lcCalibToolList[1]
330 PFLCCalibTool.CaloClusterLocalCalibOOCCPi0=lcCalibToolList[2]
331 PFLCCalibTool.CaloClusterLocalCalibDM=lcCalibToolList[3]
332
333 return PFLCCalibTool
334
Inherits from IPFClusterCollectionTool and AthAlgTool.
This tool can either use a series of CaloClusterProcessor to calibrate the modified xAOD::CaloCluster...

◆ getPFMomentCalculatorTool()

getPFMomentCalculatorTool ( inputFlags,
momentsToCalculateList,
use_unified = False )

Definition at line 286 of file PFCfg.py.

286def getPFMomentCalculatorTool(inputFlags, momentsToCalculateList, use_unified = False):
287 result=ComponentAccumulator()
288 if use_unified:
289 PFMomentCalculatorToolFactory = CompFactory.PFUnifiedMomentCalculatorTool
290 else:
291 PFMomentCalculatorToolFactory = CompFactory.PFMomentCalculatorTool
292
293 PFMomentCalculatorTool = PFMomentCalculatorToolFactory("PFMomentCalculatorTool")
294
295 from CaloRec.CaloTopoClusterConfig import getTopoMoments
296 PFClusterMomentsMaker = result.popToolsAndMerge(getTopoMoments(inputFlags))
297 if (len(momentsToCalculateList) > 0):
298 PFClusterMomentsMaker.MomentsNames = momentsToCalculateList
299 PFMomentCalculatorTool.CaloClusterMomentsMaker = PFClusterMomentsMaker
300
301 PFClusterCollectionTool = CompFactory.PFClusterCollectionTool
302 PFMomentCalculatorTool.PFClusterCollectionTool = PFClusterCollectionTool("PFClusterCollectionTool")
303
304 if(inputFlags.PF.useCalibHitTruthClusterMoments):
305 PFMomentCalculatorTool.UseCalibHitTruth=True
306 from CaloRec.CaloTopoClusterConfig import getTopoCalibMoments
307 PFMomentCalculatorTool.CaloCalibClusterMomentsMaker2 = getTopoCalibMoments(inputFlags)
308
309 result.setPrivateTools(PFMomentCalculatorTool)
310 return result
311

◆ getPFOClusterMLCorrectionAlgorithmCfg()

getPFOClusterMLCorrectionAlgorithmCfg ( inputFlags,
inputNameBase = "JetETMiss",
outputNameBase = "JetETMissClusterMLCorrected" )

Definition at line 376 of file PFCfg.py.

376def getPFOClusterMLCorrectionAlgorithmCfg(inputFlags, inputNameBase = "JetETMiss", outputNameBase = "JetETMissClusterMLCorrected"):
377 alg = CompFactory.PFOClusterMLCorrectionAlgorithm("PFOClusterMLCorrectionAlgorithm")
378 suffix = "ParticleFlowObjects"
379 alg.NeutralPFlowInputContainer = inputNameBase + "Neutral" + suffix
380 alg.ChargedPFlowInputContainer = inputNameBase + "Charged" + suffix
381 alg.NeutralPFlowOutputContainer = outputNameBase + "Neutral" + suffix
382 alg.ChargedPFlowOutputContainer = outputNameBase + "Charged" + suffix
383
384 return alg
385

◆ getPFRecoverSplitShowersTool()

getPFRecoverSplitShowersTool ( inputFlags,
toolName )

Definition at line 206 of file PFCfg.py.

206def getPFRecoverSplitShowersTool(inputFlags,toolName):
207 PFRecoverSplitShowersToolFactory = CompFactory.PFSubtractionTool
208 PFRecoverSplitShowersTool = PFRecoverSplitShowersToolFactory(toolName,useNNEnergy = inputFlags.PF.useMLEOverP)
209
210 if inputFlags.GeoModel.Run <= LHCPeriod.Run3:
211 eflowCellEOverPTool_Run2_mc20_JetETMiss = CompFactory.eflowCellEOverPTool_Run2_mc20_JetETMiss
212 PFRecoverSplitShowersTool.eflowCellEOverPTool = eflowCellEOverPTool_Run2_mc20_JetETMiss("eflowCellEOverPTool_Run2_mc20_JetETMiss_Recover")
213 else:
214 if inputFlags.PF.useLegacyEOverPRun4:
215 eflowCellEOverPTool_mc12_HLLHC = CompFactory.eflowCellEOverPTool_mc12_HLLHC
216 PFRecoverSplitShowersTool.eflowCellEOverPTool = eflowCellEOverPTool_mc12_HLLHC ()
217 else:
218 PFCellEOverPTool = CompFactory.PFCellEOverPTool
219 PFRecoverSplitShowersTool.eflowCellEOverPTool = PFCellEOverPTool("PFCellEOverPTool_Recover", referenceFileLocation = inputFlags.PF.EOverP_CellOrdering_ReferenceLocation)
220 #this should always be false for any reference derived, except eflowCellEOverPTool_mc12_HLLHC.h or eflowCellEOverPTool_Run2_mc20_JetETMiss.h
221 PFRecoverSplitShowersTool.useLegacyEBinIndex=False
222
223 PFRecoverSplitShowersTool.RecoverSplitShowers = True
224
225 if inputFlags.PF.useMLEOverP:
226 PFEnergyPredictorTool = CompFactory.PFEnergyPredictorTool("PFRecoverSplitShowersEnergyPredcictorTool",ModelPath = inputFlags.PF.EOverP_NN_Model)
227 PFRecoverSplitShowersTool.NNEnergyPredictorTool = PFEnergyPredictorTool
228
229 return PFRecoverSplitShowersTool
230
231

◆ getPFTrackClusterMatchingTool()

getPFTrackClusterMatchingTool ( inputFlags,
matchCut,
distanceType,
clusterPositionType,
name )

Definition at line 71 of file PFCfg.py.

71def getPFTrackClusterMatchingTool(inputFlags,matchCut,distanceType,clusterPositionType,name):
72 PFTrackClusterMatchingTool = CompFactory.PFTrackClusterMatchingTool
73 MatchingTool = PFTrackClusterMatchingTool(name)
74 MatchingTool.ClusterPositionType = clusterPositionType
75 MatchingTool.DistanceType = distanceType
76 MatchingTool.MatchCut = matchCut*matchCut
77 return MatchingTool
78
79
This is the tool, which inherits from AthAlgTool, which clients can use for track-cluster matching.

◆ getPFUnifiedCellLevelMatchingTool()

getPFUnifiedCellLevelMatchingTool ( inputFlags,
toolName )

Definition at line 129 of file PFCfg.py.

129def getPFUnifiedCellLevelMatchingTool(inputFlags,toolName):
130 if inputFlags.PF.useTruthCheating and inputFlags.PF.useTrackClusterTruthMatching:
131 PFUnifiedCellLevelMatchingToolFactory = CompFactory.PFUnifiedMatchingTruthTool
132 PFUnifiedCellLevelMatchingTool = PFUnifiedCellLevelMatchingToolFactory(toolName+"_truthCheating")
133 PFUnifiedCellLevelMatchingTool.CaloClusterReadDecorHandleKey_NLeadingTruthParticles = "CaloTopoClusters." + inputFlags.Calo.TopoCluster.CalibrationHitDecorationName
134 else:
135 PFUnifiedCellLevelMatchingToolFactory = CompFactory.PFUnifiedMatchingTool
136 PFUnifiedCellLevelMatchingTool = PFUnifiedCellLevelMatchingToolFactory(toolName)
137
138 if inputFlags.GeoModel.Run <= LHCPeriod.Run3:
139 eflowCellEOverPTool_Run2_mc20_JetETMiss = CompFactory.eflowCellEOverPTool_Run2_mc20_JetETMiss
140 PFUnifiedCellLevelMatchingTool.eflowCellEOverPTool = eflowCellEOverPTool_Run2_mc20_JetETMiss()
141 else:
142 if inputFlags.PF.useLegacyEOverPRun4:
143 eflowCellEOverPTool_mc12_HLLHC = CompFactory.eflowCellEOverPTool_mc12_HLLHC
144 PFUnifiedCellLevelMatchingTool.eflowCellEOverPTool = eflowCellEOverPTool_mc12_HLLHC ()
145 else:
146 PFCellEOverPTool = CompFactory.PFCellEOverPTool
147 PFUnifiedCellLevelMatchingTool.eflowCellEOverPTool = PFCellEOverPTool("PFCellEOverPTool", referenceFileLocation = inputFlags.PF.EOverP_CellOrdering_ReferenceLocation)
148 #this should always be false for any reference derived, except eflowCellEOverPTool_mc12_HLLHC.h or eflowCellEOverPTool_Run2_mc20_JetETMiss.h
149 PFUnifiedCellLevelMatchingTool.useLegacyEBinIndex=False
150
151 if(inputFlags.PF.EOverPMode):
152 PFUnifiedCellLevelMatchingTool.nClusterMatchesToUse = -1
153 else:
154 PFUnifiedCellLevelMatchingTool.nClusterMatchesToUse = 1
155
156 if(inputFlags.PF.EOverPMode):
157 PFUnifiedCellLevelMatchingTool.PFTrackClusterMatchingTool = getPFTrackClusterMatchingTool(inputFlags,0.2,"EtaPhiSquareDistance","PlainEtaPhi","CalObjBldMatchingTool")
158 else:
159 PFUnifiedCellLevelMatchingTool.PFTrackClusterMatchingTool = getPFTrackClusterMatchingTool(inputFlags,1.64,"EtaPhiSquareSignificance","GeomCenterEtaPhi","CalObjBldMatchingTool")
160
161 PFUnifiedCellLevelMatchingTool.PFTrackClusterMatchingTool_015 = getPFTrackClusterMatchingTool(inputFlags,0.15,"EtaPhiSquareDistance","PlainEtaPhi","MatchingTool_Pull_015")
162 PFUnifiedCellLevelMatchingTool.PFTrackClusterMatchingTool_02 = getPFTrackClusterMatchingTool(inputFlags,0.2,"EtaPhiSquareDistance","PlainEtaPhi","MatchingTool_Pull_02")
163
164 PFUnifiedCellLevelMatchingTool.addCPData = inputFlags.PF.addCPData
165
166 return PFUnifiedCellLevelMatchingTool
167
168

◆ getPFUnifiedCellLevelSubtractionOnlyTool()

getPFUnifiedCellLevelSubtractionOnlyTool ( inputFlags,
toolName )

Definition at line 169 of file PFCfg.py.

169def getPFUnifiedCellLevelSubtractionOnlyTool(inputFlags,toolName):
170 if inputFlags.PF.useTruthCheating and inputFlags.PF.useTruthForChargedShowerSubtraction:
171 PFUnifiedCellLevelSubtractionOnlyToolFactory = CompFactory.PFUnifiedSubtractionOnlyTruthTool
172 PFUnifiedCellLevelSubtractionOnlyTool = PFUnifiedCellLevelSubtractionOnlyToolFactory(toolName+"_truthCheating", useNNEnergy = inputFlags.PF.useMLEOverP)
173 PFUnifiedCellLevelSubtractionOnlyTool.PFSimulateTruthShowerTool = CompFactory.PFSimulateTruthShowerTool("PFSimulateTruthShowerTool")
174 else:
175 PFUnifiedCellLevelSubtractionOnlyToolFactory = CompFactory.PFUnifiedSubtractionOnlyTool
176 PFUnifiedCellLevelSubtractionOnlyTool = PFUnifiedCellLevelSubtractionOnlyToolFactory(toolName, useNNEnergy = inputFlags.PF.useMLEOverP)
177
178 if inputFlags.GeoModel.Run <= LHCPeriod.Run3:
179 eflowCellEOverPTool_Run2_mc20_JetETMiss = CompFactory.eflowCellEOverPTool_Run2_mc20_JetETMiss
180 PFUnifiedCellLevelSubtractionOnlyTool.eflowCellEOverPTool = eflowCellEOverPTool_Run2_mc20_JetETMiss()
181 else:
182 if inputFlags.PF.useLegacyEOverPRun4:
183 eflowCellEOverPTool_mc12_HLLHC = CompFactory.eflowCellEOverPTool_mc12_HLLHC
184 PFUnifiedCellLevelSubtractionOnlyTool.eflowCellEOverPTool = eflowCellEOverPTool_mc12_HLLHC ()
185 else:
186 PFCellEOverPTool = CompFactory.PFCellEOverPTool
187 PFUnifiedCellLevelSubtractionOnlyTool.eflowCellEOverPTool = PFCellEOverPTool("PFCellEOverPTool", referenceFileLocation = inputFlags.PF.EOverP_CellOrdering_ReferenceLocation)
188 #this should always be false for any reference derived, except eflowCellEOverPTool_mc12_HLLHC.h or eflowCellEOverPTool_Run2_mc20_JetETMiss.h
189 PFUnifiedCellLevelSubtractionOnlyTool.useLegacyEBinIndex=False
190
191 if(inputFlags.PF.EOverPMode):
192 PFUnifiedCellLevelSubtractionOnlyTool.CalcEOverP = True
193
194 PFUnifiedCellLevelSubtractionOnlyTool.addCPData = inputFlags.PF.addCPData
195
196 if inputFlags.PF.useMLEOverP:
197 PFEnergyPredictorTool = CompFactory.PFEnergyPredictorTool("PFCellLevelEnergyPredcictorTool",ModelPath = inputFlags.PF.EOverP_NN_Model)
198 PFUnifiedCellLevelSubtractionOnlyTool.NNEnergyPredictorTool = PFEnergyPredictorTool
199
200
201 return PFUnifiedCellLevelSubtractionOnlyTool
202
203
204
205

◆ getPFUnifiedRecoverSplitShowersMatchingTool()

getPFUnifiedRecoverSplitShowersMatchingTool ( inputFlags,
toolName )

Definition at line 232 of file PFCfg.py.

232def getPFUnifiedRecoverSplitShowersMatchingTool(inputFlags,toolName):
233 # RecoverSplitShowers is gated off when useTruthCheating is set (see getOfflinePFAlgorithm),
234 # so the truth-matching variant of this factory is unreachable by construction.
235 PFUnifiedRecoverSplitShowersMatchingToolFactory = CompFactory.PFUnifiedMatchingTool
236 PFUnifiedRecoverSplitShowersMatchingTool = PFUnifiedRecoverSplitShowersMatchingToolFactory(toolName)
237
238 if inputFlags.GeoModel.Run <= LHCPeriod.Run3:
239 eflowCellEOverPTool_Run2_mc20_JetETMiss = CompFactory.eflowCellEOverPTool_Run2_mc20_JetETMiss
240 PFUnifiedRecoverSplitShowersMatchingTool.eflowCellEOverPTool = eflowCellEOverPTool_Run2_mc20_JetETMiss("eflowCellEOverPTool_Run2_mc20_JetETMiss_Recover")
241 else:
242 if inputFlags.PF.useLegacyEOverPRun4:
243 eflowCellEOverPTool_mc12_HLLHC = CompFactory.eflowCellEOverPTool_mc12_HLLHC
244 PFUnifiedRecoverSplitShowersMatchingTool.eflowCellEOverPTool = eflowCellEOverPTool_mc12_HLLHC ()
245 else:
246 PFCellEOverPTool = CompFactory.PFCellEOverPTool
247 PFUnifiedRecoverSplitShowersMatchingTool.eflowCellEOverPTool = PFCellEOverPTool("PFCellEOverPTool_Recover", referenceFileLocation = inputFlags.PF.EOverP_CellOrdering_ReferenceLocation)
248 #this should always be false for any reference derived, except eflowCellEOverPTool_mc12_HLLHC.h or eflowCellEOverPTool_Run2_mc20_JetETMiss.h
249 PFUnifiedRecoverSplitShowersMatchingTool.useLegacyEBinIndex=False
250
251 PFUnifiedRecoverSplitShowersMatchingTool.RecoverSplitShowers = True
252
253 return PFUnifiedRecoverSplitShowersMatchingTool
254
255
256

◆ getPFUnifiedRecoverSplitShowersSubtractionOnlyTool()

getPFUnifiedRecoverSplitShowersSubtractionOnlyTool ( inputFlags,
toolName )

Definition at line 257 of file PFCfg.py.

257def getPFUnifiedRecoverSplitShowersSubtractionOnlyTool(inputFlags,toolName):
258 # RecoverSplitShowers is gated off when useTruthCheating is set (see getOfflinePFAlgorithm),
259 # so the truth-cheating variant of this factory is unreachable by construction.
260 PFUnifiedRecoverSplitShowersSubtractionOnlyToolFactory = CompFactory.PFUnifiedSubtractionOnlyTool
261 PFUnifiedRecoverSplitShowersSubtractionOnlyTool = PFUnifiedRecoverSplitShowersSubtractionOnlyToolFactory(toolName, useNNEnergy = inputFlags.PF.useMLEOverP)
262
263 if inputFlags.GeoModel.Run <= LHCPeriod.Run3:
264 eflowCellEOverPTool_Run2_mc20_JetETMiss = CompFactory.eflowCellEOverPTool_Run2_mc20_JetETMiss
265 PFUnifiedRecoverSplitShowersSubtractionOnlyTool.eflowCellEOverPTool = eflowCellEOverPTool_Run2_mc20_JetETMiss("eflowCellEOverPTool_Run2_mc20_JetETMiss_Recover")
266 else:
267 if inputFlags.PF.useLegacyEOverPRun4:
268 eflowCellEOverPTool_mc12_HLLHC = CompFactory.eflowCellEOverPTool_mc12_HLLHC
269 PFUnifiedRecoverSplitShowersSubtractionOnlyTool.eflowCellEOverPTool = eflowCellEOverPTool_mc12_HLLHC ()
270 else:
271 PFCellEOverPTool = CompFactory.PFCellEOverPTool
272 PFUnifiedRecoverSplitShowersSubtractionOnlyTool.eflowCellEOverPTool = PFCellEOverPTool("PFCellEOverPTool_Recover", referenceFileLocation = inputFlags.PF.EOverP_CellOrdering_ReferenceLocation)
273 #this should always be false for any reference derived, except eflowCellEOverPTool_mc12_HLLHC.h or eflowCellEOverPTool_Run2_mc20_JetETMiss.h
274 PFUnifiedRecoverSplitShowersSubtractionOnlyTool.useLegacyEBinIndex=False
275
276 PFUnifiedRecoverSplitShowersSubtractionOnlyTool.RecoverSplitShowers = True
277
278 if inputFlags.PF.useMLEOverP:
279 PFEnergyPredictorTool = CompFactory.PFEnergyPredictorTool("PFRecoverSplitShowersEnergyPredcictorTool",ModelPath = inputFlags.PF.EOverP_NN_Model)
280 PFUnifiedRecoverSplitShowersSubtractionOnlyTool.NNEnergyPredictorTool = PFEnergyPredictorTool
281
282 return PFUnifiedRecoverSplitShowersSubtractionOnlyTool
283
284
285

◆ getTauFlowElementAssocAlgorithm()

getTauFlowElementAssocAlgorithm ( inputFlags,
algName = "",
** kwargs )

Definition at line 579 of file PFCfg.py.

579def getTauFlowElementAssocAlgorithm(inputFlags, algName="", **kwargs):
580
581 kwargs.setdefault("neutral_FE_cont_name", "")
582 kwargs.setdefault("charged_FE_cont_name", "")
583 kwargs.setdefault("doTCC", False)
584 kwargs.setdefault("useGlobal", False)
585
586 PFTauFlowElementLinkerAlgorithmFactory=CompFactory.PFTauFlowElementAssoc
587 if not algName:
588 algName = "PFTauFlowElementAssoc"
589
590 PFTauFlowElementLinkerAlgorithm=PFTauFlowElementLinkerAlgorithmFactory(algName)
591
592 #set an an alternate name if needed
593 #this uses some gaudi core magic, namely that you can change the name of the handle as it is a callable attribute, despite the attribute not being explicitly listed in the header
594 #for a key of type SG::WriteDecorHandle<xAOD::SomeCont>someKey{this,"SpecificContainerName","myContainerName","other-labels"}
595 #setting algorithm.SpecificContainerName="myNewContainerName" changes parameter "myContainerName"
596 #(also applies to ReadHandles)
597 if kwargs['neutral_FE_cont_name']:
598 PFTauFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer = kwargs['neutral_FE_cont_name']
599
600 if kwargs['charged_FE_cont_name']:
601 PFTauFlowElementLinkerAlgorithm.JetETMissChargedFlowElementContainer = kwargs['charged_FE_cont_name']
602
603 if kwargs['doTCC']:
604 PFTauFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer="TrackCaloClustersNeutral"
605 PFTauFlowElementLinkerAlgorithm.JetETMissChargedFlowElementContainer="TrackCaloClustersCharged"
606
607 PFTauFlowElementLinkerAlgorithm.TauNeutralFEDecorKey="neutralTCCLinks"
608 PFTauFlowElementLinkerAlgorithm.TauChargedFEDecorKey="chargedTCCLinks"
609
610 PFTauFlowElementLinkerAlgorithm.NeutralFETauDecorKey="TCC_TauLinks"
611 PFTauFlowElementLinkerAlgorithm.ChargedFETauDecorKey="TCC_TauLinks"
612
613 #This allows to set the links on the global particle flow containers created by JetPFlowSelectionAlg in JetRecTools
614 if kwargs['useGlobal']:
615 PFTauFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer="GlobalNeutralParticleFlowObjects"
616 PFTauFlowElementLinkerAlgorithm.JetETMissChargedFlowElementContainer="GlobalChargedParticleFlowObjects"
617
618 PFTauFlowElementLinkerAlgorithm.TauNeutralFEDecorKey="neutralGlobalFELinks"
619 PFTauFlowElementLinkerAlgorithm.TauChargedFEDecorKey="chargedGlobalFELinks"
620
621 PFTauFlowElementLinkerAlgorithm.NeutralFETauDecorKey="GlobalFE_TauLinks"
622 PFTauFlowElementLinkerAlgorithm.ChargedFETauDecorKey="GlobalFE_TauLinks"
623
624 return PFTauFlowElementLinkerAlgorithm
625

◆ PFGlobalFlowElementLinkingCfg()

PFGlobalFlowElementLinkingCfg ( inputFlags,
** kwargs )

Definition at line 669 of file PFCfg.py.

669def PFGlobalFlowElementLinkingCfg(inputFlags, **kwargs):
670 result=ComponentAccumulator()
671
672 kwargs.setdefault("useGlobal", True)
673
674 result.addEventAlgo(getTauFlowElementAssocAlgorithm(inputFlags, algName="PFTauGlobalFlowElementAssoc", **kwargs))
675 result.addEventAlgo(getMuonFlowElementAssocAlgorithm(inputFlags, algName="PFMuonGlobalFlowElementAssoc", **kwargs))
676 result.addEventAlgo(getEGamFlowElementAssocAlgorithm(inputFlags, algName="PFEGamGlobalFlowElementAssoc", **kwargs))
677 return result

◆ PFTrackSelectorAlgCfg()

PFTrackSelectorAlgCfg ( inputFlags,
algName,
useCaching = True )

Definition at line 6 of file PFCfg.py.

6def PFTrackSelectorAlgCfg(inputFlags,algName,useCaching=True):
7 PFTrackSelectorFactory=CompFactory.PFTrackSelector
8 PFTrackSelector=PFTrackSelectorFactory(algName)
9
10 result = ComponentAccumulator()
11
12 if inputFlags.PF.useActsExtrapolation:
13 #do something
14 from ActsConfig.ActsGeometryConfig import ActsExtrapolationToolCfg
15 ActsExtrapolationTool = result.popToolsAndMerge(ActsExtrapolationToolCfg(inputFlags,MaxSteps=10000))
16 PFTrackCaloExtensionTool=CompFactory.PFTrackCaloExtensionTool
17 TrackCaloExtensionTool=PFTrackCaloExtensionTool("PFTrackCaloExtensionTool_ACTS",ExtrapolationTool=ActsExtrapolationTool)
18 PFTrackSelector.trackExtrapolatorTool = TrackCaloExtensionTool
19 else:
20
21 from TrackToCalo.TrackToCaloConfig import ParticleCaloExtensionToolCfg
22 pcExtensionTool = result.popToolsAndMerge(ParticleCaloExtensionToolCfg(inputFlags))
23
24 eflowTrackCaloExtensionTool=CompFactory.eflowTrackCaloExtensionTool
25 TrackCaloExtensionTool=eflowTrackCaloExtensionTool(TrackCaloExtensionTool=pcExtensionTool)
26 if (not useCaching):
27 TrackCaloExtensionTool.PFParticleCache = ""
28
29 PFTrackSelector.trackExtrapolatorTool = TrackCaloExtensionTool
30
31 from InDetTrackSelectionTool.InDetTrackSelectionToolConfig import (
32 PFTrackSelectionToolCfg)
33 PFTrackSelector.trackSelectionTool = result.popToolsAndMerge(PFTrackSelectionToolCfg(inputFlags))
34
35 # P->T conversion extra dependencies
36 if inputFlags.Detector.GeometryITk:
37 PFTrackSelector.ExtraInputs = {
38 ("InDetDD::SiDetectorElementCollection", "ConditionStore+ITkPixelDetectorElementCollection"),
39 ("InDetDD::SiDetectorElementCollection", "ConditionStore+ITkStripDetectorElementCollection"),
40 }
41 else:
42 PFTrackSelector.ExtraInputs = {
43 ("InDetDD::SiDetectorElementCollection", "ConditionStore+PixelDetectorElementCollection"),
44 ("InDetDD::SiDetectorElementCollection", "ConditionStore+SCT_DetectorElementCollection"),
45 ("InDetDD::TRT_DetElementContainer", "ConditionStore+TRT_DetElementContainer"),
46 }
47
48 result.addEventAlgo (PFTrackSelector, primary=True)
49
50 return result
51
Inherits from eflowTrackExtrapolatorBaseAlgTool and AthAlgTool.
Inherits from eflowTrackExtrapolatorBaseAlgTool and AthAlgTool.