19 "TCHEL": (
"pfTrackCountingHighEffBJetTags", 1.7),
20 "TCHEM": (
"pfTrackCountingHighEffBJetTags", 3.3),
21 "TCHPT": (
"pfTrackCountingHighPurBJetTags", 3.41),
22 "JPL": (
"pfJetProbabilityBJetTags", 0.275),
23 "JPM": (
"pfJetProbabilityBJetTags", 0.545),
24 "JPT": (
"pfJetProbabilityBJetTags", 0.790),
25 "CSVL": (
"combinedSecondaryVertexBJetTags", 0.244),
26 "CSVM": (
"combinedSecondaryVertexBJetTags", 0.679),
27 "CSVT": (
"combinedSecondaryVertexBJetTags", 0.898),
28 "CSVv2IVFL": (
"pfCombinedInclusiveSecondaryVertexV2BJetTags", 0.423),
29 "CSVv2IVFM": (
"pfCombinedInclusiveSecondaryVertexV2BJetTags", 0.814),
30 "CSVv2IVFT": (
"pfCombinedInclusiveSecondaryVertexV2BJetTags", 0.941),
31 "CMVAL": (
"pfCombinedMVABJetTags", 0.630),
32 "CMVAM": (
"pfCombinedMVABJetTags", 0.732),
33 "CMVAT": (
"pfCombinedMVABJetTags", 0.813),
39 super(Jet, self).
__init__(*args, **kwargs)
48 if not self.isPFJet():
49 raise RuntimeError,
"jetID implemented only for PF Jets"
50 eta =
abs(self.eta());
52 chf = self.chargedHadronEnergy()/energy;
53 nhf = self.neutralHadronEnergy()/energy;
54 phf = self.neutralEmEnergy()/energy;
55 muf = self.muonEnergy()/energy;
56 elf = self.chargedEmEnergy()/energy;
57 chm = self.chargedHadronMultiplicity();
58 npr = self.chargedMultiplicity() + self.neutralMultiplicity();
61 if name ==
"POG_PFID":
62 if self.
jetID(
"POG_PFID_Tight") :
return 3;
63 elif self.
jetID(
"POG_PFID_Medium") :
return 2;
64 elif self.
jetID(
"POG_PFID_Loose") :
return 1;
67 if name ==
"POG_PFID_Loose":
return (npr>1
and phf<0.99
and nhf<0.99
and muf < 0.8)
and (eta>2.4
or (elf<0.99
and chf>0
and chm>0));
68 if name ==
"POG_PFID_Medium":
return (npr>1
and phf<0.95
and nhf<0.95
and muf < 0.8)
and (eta>2.4
or (elf<0.99
and chf>0
and chm>0));
69 if name ==
"POG_PFID_Tight":
return (npr>1
and phf<0.90
and nhf<0.90
and muf < 0.8)
and (eta>2.4
or (elf<0.90
and chf>0
and chm>0));
70 if name ==
"VBFHBB_PFID_Loose":
return (npr>1
and phf<0.99
and nhf<0.99);
71 if name ==
"VBFHBB_PFID_Medium":
return (npr>1
and phf<0.99
and nhf<0.99)
and ((eta<=2.4
and nhf<0.9
and phf<0.9
and elf<0.99
and muf<0.99
and chf>0
and chm>0)
or eta>2.4);
72 if name ==
"VBFHBB_PFID_Tight":
return (npr>1
and phf<0.99
and nhf<0.99)
and ((eta<=2.4
and nhf<0.9
and phf<0.9
and elf<0.70
and muf<0.70
and chf>0
and chm>0)
or eta>2.4);
73 raise RuntimeError,
"jetID '%s' not supported" % name
76 '''PF Jet ID (loose operation point) [method provided for convenience only]'''
77 return self.
jetID(
"POG_PFID_Loose")
79 def puMva(self, label="pileupJetId:fullDiscriminant
"):
80 return self.userFloat(label)
82 def puJetId(self, label="pileupJetId:fullDiscriminant
"):
83 '''Full mva PU jet id'''
85 puMva = self.
puMva(label)
89 for etamin, etamax, cut
in wp:
90 if not(eta>=etamin
and eta<etamax):
100 ret = self.bDiscriminator(name)
101 if ret == -1000
and name.startswith(
"pf"):
102 ret = self.bDiscriminator(name[2].lower()+name[3:])
107 (disc,val) = _btagWPs[name]
108 return self.
btag(disc) > val
114 self.
_leadingTrack =
max( self.daughterPtrVector() , key =
lambda x : x.pt()
if x.charge()!=0
else 0. )
115 if self._leadingTrack.charge()==0:
Abs< T >::type abs(const T &t)