Пример #1
0
    f = jtm.addJetFinder(tname,
                         "AntiKt",
                         0.4,
                         "HITrack",
                         hi_trk_modifiers,
                         ptmin=HIJetFlags.TrackJetPtMin())
    HIJetFlags.TrackJetContainerName = tname
    AddToOutputList(tname)
    jtm.HIJetRecs += [f]

#initial unsubtracted jets
for R in HIJetFlags.AntiKtRValues():
    AddHIJetFinder(R)

#initial seeds
if HIJetFlags.SeedRValue() not in HIJetFlags.AntiKtRValues():
    AddHIJetFinder(HIJetFlags.SeedRValue())
seed_prefix = 'AntiKt%dHIJets' % int(10 * HIJetFlags.SeedRValue())
seeds0 = jtm.addJetCopier("%s_%s0" % (seed_prefix, HIJetFlags.SeedSuffix()),
                          "%s_Unsubtracted" % seed_prefix, [jtm.discrim],
                          shallow=False)
jtm.HIJetRecs += [seeds0]

#code nearly identical, but new behavior since upstream ES container and package flags are different
iter0 = AddIteration(seed_container=seeds0.OutputContainer,
                     shape_name=EventShapeKey,
                     map_tool=theMapTool,
                     suffix="iter0")
modulator0 = iter0.Modulator
subtr1 = MakeSubtractionTool(iter0.OutputEventShapeKey,
                             modulator=modulator0,
Пример #2
0
from HIJetRec.HIJetRecUtils import *

theSubtrTool=jtm.HIJetClusterSubtractor
theSubtrTool.unlock()
theSubtrTool.UseSamplings=False
theSubtrTool.lock()

if is_mc_or_overlay :
    for theCalibTool in jtm.HICalibMap.values() :
        theCalibTool.unlock()
        theCalibTool.IsData=False
        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