Пример #1
0
def AppendOutputList(HIAODItemList=[]):
    """Adds HIJetOutputList to the list passed in as an argument"""

    if HIJetFlags.WriteClusters():
        AddToOutputList(HIJetFlags.HIClusterKey(),
                        "xAOD::CaloClusterContainer")
    from RecExConfig.RecFlags import rec
    if not rec.doESD():
        for R in HIJetFlags.AntiKtRValues():
            AddToOutputList("AntiKt%dHIJets" % int(10 * R))
            if jetFlags.useTruth():
                AddToOutputList("AntiKt%dTruthJets" % int(10 * R))
        AddToOutputList(HIJetFlags.TrackJetContainerName())
    HIAODItemList += HIJetFlags.HIJetOutputList()
Пример #2
0
def AddPtAssociationTools(R, doTracks=True):
    tlist = []
    if doTracks and jetFlags.useTracks():
        cname = HIJetFlags.TrackJetContainerName()
        tname = 'hitrackassoc_04'
        if tname not in jtm.tools:
            JetPtAssociationTool = CompFactory.JetPtAssociationTool
            jtm.add(
                JetPtAssociationTool(tname,
                                     InputContainer=cname,
                                     AssociationName="GhostTrack"))
        tlist += [jtm.tools[tname]]
    if jetFlags.useTruth():
        cname = 'AntiKt%dTruthJets' % int(10 * R)
        tname = 'truthassoc_0%d' % int(10 * R)
        if tname not in jtm.tools:
            JetPtAssociationTool = CompFactory.JetPtAssociationTool
            jtm.add(
                JetPtAssociationTool(tname,
                                     InputContainer=cname,
                                     AssociationName="GhostTruth"))
        tlist += [jtm.tools[tname]]
    return tlist
Пример #3
0
from JetRec.JetRecConf import PseudoJetGetter
ClusterKey=HIJetFlags.HIClusterKey()

from HIJetRec.HIJetRecConf import HIClusterPseudoJetGetter
jtm += HIClusterPseudoJetGetter("get_HI",
                                InputContainer = ClusterKey,
                                Label = "LCTopo", #Label = "Tower",
                                OutputContainer = "PseudoJet" + ClusterKey,
                                SkipNegativeEnergy = False,
                                TreatNegativeEnergyAsGhost=True,
                                GhostScale = 1.e-20
                                )

jtm += PseudoJetGetter("gakt4trackget_HI", 
                       InputContainer = HIJetFlags.TrackJetContainerName(),
                       Label = "Ghost" + HIJetFlags.TrackJetContainerName(), 
                       SkipNegativeEnergy = True,
                       OutputContainer = "PseudoJetGhost" +  HIJetFlags.TrackJetContainerName(),
                       GhostScale = 1.e-20)                       

HIgetters_ghost_track = []
HIgetters_common=[]
if jetFlags.useMuonSegments(): HIgetters_common += [jtm.gmusegget]
if jetFlags.useTracks(): 
    HIgetters_ghost_track += [jtm.gakt4trackget_HI]
    if HIJetFlags.UseHITracks() : HIgetters_ghost_track += [jtm.gtrackget_HI]
    else: HIgetters_ghost_track += [jtm.gtrackget]

if jetFlags.useTruth(): 
    #HIgetters_common += [jtm.gtruthget]
Пример #4
0
subtr1 = MakeSubtractionTool(iter0.OutputEventShapeKey,
                             modulator=modulator0,
                             map_tool=theMapTool)

#now iterate
print("Now moving to iteration 1")

seeds1 = jtm.addJetCopier(
    "%s_%s1" % (seed_prefix, HIJetFlags.SeedSuffix()),
    "%s_Unsubtracted" % seed_prefix,
    [subtr1, jtm.HICalibMap[seed_prefix], jtm.jetfilHISeeds],
    shallow=False)
jtm.HIJetRecs += [seeds1]
iteration_dict = dict(suffix="iter1")
if jetFlags.useTracks() and HIJetFlags.TrackJetSeeds():
    iteration_dict['track_jet_seeds'] = HIJetFlags.TrackJetContainerName()
print("Adding iteration 1")
iter1 = AddIteration(seed_container=seeds1.OutputContainer,
                     shape_name=EventShapeKey,
                     map_tool=theMapTool,
                     **iteration_dict)

HIJetFlags.IteratedEventShapeKey = iter1.OutputEventShapeKey
modulator1 = iter1.Modulator
jtm.modulator = modulator1

#subtraction BEFORE iteration for moment
subtr1 = MakeSubtractionTool(iter0.OutputEventShapeKey,
                             moment_name="NoIteration",
                             momentOnly=True,
                             modulator=modulator0,
Пример #5
0
        theCalibTool.CalibSequence='EtaJES'
        theCalibTool.lock()

#use existing R=0.2 jets from previous reco, only making use of discriminant
seed_prefix='AntiKt%dHIJets' % int(10*HIJetFlags.SeedRValue())
seeds0=jtm.addJetCopier("%s_%s0" % (seed_prefix, HIJetFlags.SeedSuffix()),seed_prefix,[jtm.discrim],shallow=False)
jtm.HIJetRecs+=[seeds0]
iter0=AddIteration(seed_container=seeds0.OutputContainer,shape_name=EventShapeKey,suffix="iter0")
modulator0=iter0.Modulator
subtr1=MakeSubtractionTool(iter0.OutputEventShapeKey,modulator=modulator0)

#now iterate
seeds1=jtm.addJetCopier("%s_%s1" % (seed_prefix,HIJetFlags.SeedSuffix()),seed_prefix,[subtr1,jtm.HICalibMap[seed_prefix],jtm.jetfilHISeeds],shallow=False)
jtm.HIJetRecs+=[seeds1]
iteration_dict=dict(suffix="iter1")
if jetFlags.useTracks() and HIJetFlags.TrackJetSeeds() : iteration_dict['track_jet_seeds']=HIJetFlags.TrackJetContainerName()
iter1=AddIteration(seed_container=seeds1.OutputContainer,shape_name=EventShapeKey,**iteration_dict)

HIJetFlags.IteratedEventShapeKey=iter1.OutputEventShapeKey
modulator1=iter1.Modulator
jtm.modulator=modulator1

from HIJetRec.HIJetRecConf import HIClusterSubtraction
cluster_update=HIClusterSubtraction('HIClusterUpdate')
cluster_update.ClusterKey="HIClusters"
cluster_update.EventShapeKey=HIJetFlags.IteratedEventShapeKey()
cluster_update.Subtractor=jtm.HIJetClusterSubtractor
cluster_update.Modulator=modulator1
cluster_update.UpdateOnly=True
jtm.add(cluster_update)
jtm.jetrecs += [cluster_update]