-
Notifications
You must be signed in to change notification settings - Fork 3
Description
I have several doubts about the current implementation of Task 7.
The benchmark description says to plot "jets [...] that are not within 0.4 in ΔR of any lepton [...]", i.e., of any muon or electron. In math, this is equivalent to the following conditions, which are all equivalent among themselves (omitting the conditions on pt):
(1) {j \in Jets | \nexists l \in Leptons : DeltaR(j, l) < 0.4 }
(2) {j \in Jets | (\nexists m \in Muons : DeltaR(j, m) < 0.4) \and
(\nexists e \in Electrons : DeltaR(j, e) < 0.4) }
(3) {j \in Jets | (\forall m \in Muons : DeltaR(j, m) >= 0.4) \and
(\forall e \in Electrons: DeltaR(j, e) >= 0.4) }
(4) {j \in Jets | \forall m \in Muons : DeltaR(j, m) >= 0.4 } \intersect
{j \in Jets | \forall e \in Electrons: DeltaR(j, e) >= 0.4 }
The current implementations is based on goodJets, which, roughly speaking, implements the following (it is called once on with muons, once with electrons):
(5) { j \in Jets | \exists m \in Muons : DeltaR(j, m) >= 0.4) }
(6) { j \in Jets | \exists e \in Electrons: DeltaR(j, e) >= 0.4) }
That isn't the same. (5) and (6) compute if there exists a good lepton; (1) through (4) compute if there exists no bad one.
I see two other problems: First, goodJets is used the following way:
var (
jets []int
muJets = goodJets(jetPt, jetEta, jetPhi, muPt, muEta, muPhi)
eleJets = goodJets(jetPt, jetEta, jetPhi, elePt, eleEta, elePhi)
)
switch {
case len(muJets) > 0: // If there is one good jet as far as muons are concerned, electrons do not matter
jets = muJets
case len(eleJets) > 0:
jets = eleJets
default:
continue
}The problem is that the two types of leptons are never looked at jointly (like in formulation (3) above) and the results testing for each type are in no way combined (like in formulation (4) above). It seems like one of the two is necessary to compute the correct result.
Second, goodMuon may return the index of the same jet several times. This is the relevant part:
var jets = make([]int, 0, len(pt1))
for ijet, jetPt := range pt1 {
// ...
for ilep, lepPt := range pt2 {
// ...
dr2 := ...
if dr2 > dr2Min {
jets = append(jets, ijet)
// After we added ijet, we continue with the next lepton,
// which might meet the condition again,
// in which case ijet is added again
}
}
},