Beispiel #1
0
# Add neutral pflow builder.
# LC-scale neutral pflow.

from eflowRec.eflowRecFlags import jobproperties

if True == jobproperties.eflowRecFlags.useUpdated2015ChargedShowerSubtraction:
    useChargedWeights = True
else:
    useChargedWeights = False

from JetRecTools.JetRecToolsConf import PFlowPseudoJetGetter
jtm += PFlowPseudoJetGetter("lcnpflowget",
                            Label="LCPFlow",
                            OutputContainer="PseudoJetLCNPFlow",
                            RetrievePFOTool=jtm.pflowretriever,
                            InputIsEM=False,
                            CalibratePFO=False,
                            UseChargedWeights=useChargedWeights,
                            SkipNegativeEnergy=True,
                            UseNeutral=True,
                            UseCharged=False)

# Add neutral-only pflow jet definition.
# Note here we provide an explicit list of getter instead of
# the name of such a list in the jtm map. Either is allowed.
if doLCPFlowJets and findJets:
    jtm.addJetFinder("MyAntiKt4LCNPFlowJets",
                     "AntiKt",
                     0.4, [jtm.lcnpflowget], [jtm.width],
                     ghostArea=0.01,
                     ptmin=5000,
                     ptminFilter=7000)
Beispiel #2
0
if True == jobproperties.eflowRecFlags.useUpdated2015ChargedShowerSubtraction:
    useChargedWeights = True
else:
    useChargedWeights = False

useTrackVertexTool = False
if True == jetFlags.useTrackVertexTool:
    useTrackVertexTool = True

# EM-scale pflow.
jtm += PFlowPseudoJetGetter("empflowget",
                            Label="EMPFlow",
                            OutputContainer="PseudoJetEMPFlow",
                            RetrievePFOTool=jtm.pflowretriever,
                            WeightPFOTool=jtm.pflowweighter,
                            InputIsEM=True,
                            CalibratePFO=False,
                            SkipNegativeEnergy=True,
                            UseChargedWeights=useChargedWeights,
                            UseVertices=useVertices,
                            UseTrackToVertexTool=useTrackVertexTool)

# Calibrated EM-scale pflow.
jtm += PFlowPseudoJetGetter("emcpflowget",
                            Label="EMCPFlow",
                            OutputContainer="PseudoJetEMCPFlow",
                            RetrievePFOTool=jtm.pflowretriever,
                            WeightPFOTool=jtm.pflowweighter,
                            InputIsEM=True,
                            CalibratePFO=True,
                            SkipNegativeEnergy=True,
Beispiel #3
0
    PFlowObjectsInConeTool = ToolFactory(xAOD__PFlowObjectsInConeTool,
                                         name="PFlowObjectsInConeTool",
                                         RetrievePFOTool=pfoTool)

    from AthenaCommon.BeamFlags import jobproperties
    useVertices = True
    if jobproperties.Beam.beamType == 'cosmics':
        useVertices = False

    from JetRec.JetRecStandard import jtm
    from JetRecTools.JetRecToolsConf import PFlowPseudoJetGetter
    jtm += PFlowPseudoJetGetter(name="emnpflowget",
                                Label="EMNPFlow",
                                OutputContainer="PseudoJetEMNPFlow",
                                RetrievePFOTool=jtm.pflowretriever,
                                InputIsEM=True,
                                CalibratePFO=False,
                                SkipNegativeEnergy=True,
                                UseNeutral=True,
                                UseCharged=False,
                                UseVertices=useVertices)

# tool to collect topo clusters in cone
from ParticlesInConeTools.ParticlesInConeToolsConf import xAOD__CaloClustersInConeTool
CaloClustersInConeTool = ToolFactory(xAOD__CaloClustersInConeTool,
                                     CaloClusterLocation="CaloCalTopoClusters")


# configuration for ED computation
# For the time being, it uses all pflow objects (neutral@EM + charged) for pflow
def configureEDCorrection(tool):
    """Configure tools and algorithm for energy density correction 
def declareDefaultTools():

    from JetRecConfig.JetRecFlags import jetFlags
    from JetRecConfig.JetRecStandardToolManager import jtm
    from JetRecTools.JetRecToolsConf import PFlowPseudoJetGetter
    from eflowRec.eflowRecFlags import jobproperties

    # Retriever for pflow objects.
    jtm += RetrievePFOTool("pflowretriever")

    # Weight tool for charged pflow objects.
    jtm += WeightPFOTool("pflowweighter")
    jtm += WeightPFOTool("pflowweighter_LC", NeutralPFOScale="LC")

    useVertices = True
    if False == jetFlags.useVertices:
        useVertices = False

    if True == jobproperties.eflowRecFlags.useUpdated2015ChargedShowerSubtraction:
        useChargedWeights = True
    else:
        useChargedWeights = False

    useTrackVertexTool = False
    if True == jetFlags.useTrackVertexTool:
        useTrackVertexTool = True

    # EM-scale pflow.
    jtm += PFlowPseudoJetGetter("empflowget",
                                Label="EMPFlow",
                                OutputContainer="PseudoJetEMPFlow",
                                RetrievePFOTool=jtm.pflowretriever,
                                WeightPFOTool=jtm.pflowweighter,
                                InputIsEM=True,
                                CalibratePFO=False,
                                SkipNegativeEnergy=True,
                                UseChargedWeights=useChargedWeights,
                                UseVertices=useVertices,
                                UseTrackToVertexTool=useTrackVertexTool)

    # Calibrated EM-scale pflow.
    jtm += PFlowPseudoJetGetter("emcpflowget",
                                Label="EMCPFlow",
                                OutputContainer="PseudoJetEMCPFlow",
                                RetrievePFOTool=jtm.pflowretriever,
                                WeightPFOTool=jtm.pflowweighter_LC,
                                InputIsEM=True,
                                CalibratePFO=True,
                                SkipNegativeEnergy=True,
                                UseChargedWeights=useChargedWeights,
                                UseVertices=useVertices,
                                UseTrackToVertexTool=useTrackVertexTool)

    # LC-scale pflow.
    jtm += PFlowPseudoJetGetter("lcpflowget",
                                Label="LCPFlow",
                                OutputContainer="PseudoJetLCPFlow",
                                RetrievePFOTool=jtm.pflowretriever,
                                WeightPFOTool=jtm.pflowweighter_LC,
                                InputIsEM=False,
                                CalibratePFO=False,
                                SkipNegativeEnergy=True,
                                UseChargedWeights=useChargedWeights,
                                UseVertices=useVertices,
                                UseTrackToVertexTool=useTrackVertexTool)