1 from builtins
import range
3 ROOT.gInterpreter.ProcessLine(
"#include <DataFormats/MuonReco/interface/MuonSelectors.h>")
14 tk = mu.innerTrack().
get();
15 return tk.algoMask().
count() == 1
and tk.isAlgoInMask(tk.muonSeededStepOutIn);
19 return mu.isMediumMuon()
and mu.numberOfMatchedStations() >= 2;
21 return mu.isGlobalMuon()
and (mu.globalTrack().hitPattern().muonStationsWithValidHits() >= 3
and mu.globalTrack().normalizedChi2() <= 20);
23 if (mu.muonBestTrack().ptError() > 0.2 * mu.muonBestTrack().
pt()):
return False;
24 return mu.numberOfMatchedStations() >= 1
or self.
tightGlobal(mu);
26 return mu.pt() >= 10
and mu.numberOfMatchedStations() >= 1;
29 """Returns the list of bad muons in an event""" 31 muons =
list(m
for m
in allmuons)
34 if len(allvertices) < 1:
raise RuntimeError
39 if (not(mu.isPFMuon())
or mu.innerTrack().isNull()):
43 dxypv =
abs(mu.innerTrack().
dxy(PV));
44 dzpv =
abs(mu.innerTrack().
dz(PV));
46 ipLoose = ((dxypv < 0.5
and dzpv < 2.0)
or mu.innerTrack().hitPattern().pixelLayersWithMeasurement() >= 2);
49 ipTight = (dxypv < 0.2
and dzpv < 0.5);
50 goodMuon.append(ipTight);
58 if (muons[i].
pt() < self.
ptCut_ or goodMuon[i] != 0):
continue;
62 n1 = muons[i].numberOfMatches(ROOT.reco.Muon.SegmentArbitration);
64 if (j == i
or goodMuon[j] <= 0
or not(self.
partnerId(muons[j]))):
continue 65 n2 = muons[j].numberOfMatches(ROOT.reco.Muon.SegmentArbitration);
66 if (
deltaR(muons[i],muons[j]) < 0.4
or (n1 > 0
and n2 > 0
and ROOT.muon.sharedSegments(muons[i],muons[j]) >= 0.5*
min(n1,n2))):
def __init__(self, selectClones, muonPtCut)
def preselection(self, mu)
Abs< T >::type abs(const T &t)
def tightGlobal(self, mu)
static int position[264][3]
def badMuons(self, allmuons, allvertices)
T get(const Candidate &c)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run