Пример #1
0
modulator0 = iter0.Modulator
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,
Пример #2
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]