Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed incorrect deltaR squaring from object matching #662

Open
wants to merge 1 commit into
base: vhbbHeppy80X
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions PhysicsTools/Heppy/python/analyzers/objects/JetAnalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def process(self, event):

## Associate jets to leptons
incleptons = event.inclusiveLeptons if hasattr(event, 'inclusiveLeptons') else event.selectedLeptons
jlpairs = matchObjectCollection(incleptons, self.allJets, self.jetLepDR**2)
jlpairs = matchObjectCollection(incleptons, self.allJets, self.jetLepDR)

for jet in self.allJets:
jet.leptons = [l for l in jlpairs if jlpairs[l] == jet ]
Expand All @@ -322,7 +322,7 @@ def process(self, event):
setattr(lep,"jet"+self.cfg_ana.collectionPostFix,jet)
## Associate jets to taus
taus = getattr(event,'selectedTaus',[])
jtaupairs = matchObjectCollection( taus, self.allJets, self.jetLepDR**2)
jtaupairs = matchObjectCollection( taus, self.allJets, self.jetLepDR)

for jet in self.allJets:
jet.taus = [l for l in jtaupairs if jtaupairs[l] == jet ]
Expand All @@ -344,7 +344,7 @@ def process(self, event):

if getattr(self.cfg_ana, 'attachNeutrinos', True) and hasattr(self.cfg_ana,"genNuSelection") :
jetNus=[x for x in event.genParticles if abs(x.pdgId()) in [12,14,16] and self.cfg_ana.genNuSelection(x) ]
pairs= matchObjectCollection (jetNus, self.genJets, 0.4**2)
pairs= matchObjectCollection (jetNus, self.genJets, 0.4)

for (nu,genJet) in pairs.iteritems() :
if genJet is not None :
Expand Down