Пример #1
0
leptons = cfg.Analyzer(Selector,
                       'sel_leptons',
                       output='leptons',
                       input_objects='rec_particles',
                       filter_func=is_lepton)

# Compute lepton isolation w/r other particles in the event.
# help(IsolationAnalyzer)
# help(isolation)
# for more information
from heppy.analyzers.IsolationAnalyzer import IsolationAnalyzer
from heppy.particles.isolation import EtaPhiCircle
iso_leptons = cfg.Analyzer(IsolationAnalyzer,
                           leptons='leptons',
                           particles='rec_particles',
                           iso_area=EtaPhiCircle(0.4))


# Select isolated leptons with a Selector
def is_isolated(lep):
    '''returns true if the particles around the lepton
    in the EtaPhiCircle defined above carry less than 30%
    of the lepton energy.'''
    return lep.iso.sume / lep.e() < 0.3  # fairly loose


sel_iso_leptons = cfg.Analyzer(Selector,
                               'sel_iso_leptons',
                               output='sel_iso_leptons',
                               input_objects='leptons',
                               filter_func=is_isolated)
# produce particle collection to be used for fsr photon isolation
from heppy.analyzers.Merger import Merger
iso_candidates = cfg.Analyzer(Merger,
                              instance_label='iso_candidates',
                              inputs=['pfphotons', 'pfcharged', 'pfneutrals'],
                              output='iso_candidates')

# compute fsr photon isolation w/r other particles in the event.
from heppy.analyzers.IsolationAnalyzer import IsolationAnalyzer
from heppy.particles.isolation import EtaPhiCircle

iso_photons = cfg.Analyzer(IsolationAnalyzer,
                           candidates='photons',
                           particles='iso_candidates',
                           iso_area=EtaPhiCircle(0.3))

# select isolated photons
sel_iso_photons = cfg.Analyzer(
    Selector,
    'sel_iso_photons',
    output='sel_iso_photons',
    input_objects='sel_photons',
    filter_func=lambda ptc: ptc.iso.sumpt / ptc.pt() < 1.0)

# remove fsr photons from particle-flow photon collections
from heppy.analyzers.Subtractor import Subtractor
pfphotons_nofsr = cfg.Analyzer(Subtractor,
                               instance_label='pfphotons_nofsr',
                               inputA='pfphotons',
                               inputB='sel_iso_photons',
Пример #3
0
                        output='tau_jets',
                        particles='rec_particles',
                        fastjet_args=dict(R=0.2, p=-1, emin=5),
                        verbose=False)

from fcc_ee_higgs.analyzers.TauSelector import TauSelector

taus = cfg.Analyzer(TauSelector, output='taus', jets='tau_jets', verbose=False)

from heppy.analyzers.IsolationAnalyzer import IsolationAnalyzer
from heppy.particles.isolation import EtaPhiCircle

iso_taus = cfg.Analyzer(IsolationAnalyzer,
                        candidates='taus',
                        particles='rec_particles',
                        iso_area=EtaPhiCircle(0.4),
                        off_iso_area=EtaPhiCircle(0.2))

from heppy.analyzers.Selector import Selector

sel_iso_taus = cfg.Analyzer(
    Selector,
    'sel_iso_taus',
    output='sel_iso_taus',
    input_objects='taus',
    # filter_func = relative_isolation
    filter_func=lambda lep: lep.iso.sumpt / lep.pt() < 0.5)

from heppy.analyzers.EventFilter import EventFilter

n_taus = cfg.Analyzer(EventFilter,
Пример #4
0
# produce particle collection to be used for fsr photon isolation
from heppy.analyzers.Merger import Merger
iso_candidates = cfg.Analyzer(Merger,
                              instance_label='iso_candidates',
                              inputs=['pfphotons', 'pfcharged', 'pfneutrals'],
                              output='iso_candidates')
# compute fsr photon isolation w/r other particles in the event.
from heppy.analyzers.IsolationAnalyzer import IsolationAnalyzer
from heppy.particles.isolation import EtaPhiCircle

iso_photons = cfg.Analyzer(
    IsolationAnalyzer,
    candidates='selected_photons',
    particles='iso_candidates',
    iso_area=EtaPhiCircle(0.8),
)

# store interesting quantities into flat ROOT tree
from heppy.FCChhAnalyses.FCNC_ttgamma.TreeProducer import *
reco_tree = cfg.Analyzer(
    TreeProducer,
    photons='selected_photons',
    leptons='selected_leptons',
    selected_bjets='selected_bjets',
    selected_ljets='selected_ljets',
    selected_fatjets='selected_fatjets',
    met='met',
    #    jets02="jets02",
    jets04="jets04",
    #    jets08="jets08",