19 "TCHEL": (
"trackCountingHighEffBJetTags", 1.7),
20 "TCHEM": (
"trackCountingHighEffBJetTags", 3.3),
21 "TCHPT": (
"trackCountingHighPurBJetTags", 3.41),
22 "JPL": (
"jetProbabilityBJetTags", 0.275),
23 "JPM": (
"jetProbabilityBJetTags", 0.545),
24 "JPT": (
"jetProbabilityBJetTags", 0.790),
25 "CSVL": (
"combinedSecondaryVertexBJetTags", 0.244),
26 "CSVM": (
"combinedSecondaryVertexBJetTags", 0.679),
27 "CSVT": (
"combinedSecondaryVertexBJetTags", 0.898),
28 "CSVv2IVFL": (
"combinedInclusiveSecondaryVertexV2BJetTags", 0.423),
29 "CSVv2IVFM": (
"combinedInclusiveSecondaryVertexV2BJetTags", 0.814),
30 "CSVv2IVFT": (
"combinedInclusiveSecondaryVertexV2BJetTags", 0.941),
31 "CMVAL": (
"combinedMVABJetTags", 0.630),
32 "CMVAM": (
"combinedMVABJetTags", 0.732),
33 "CMVAT": (
"combinedMVABJetTags", 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 (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 (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 (eta>2.4
or (elf<0.99
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 return self.bDiscriminator(name)
104 (disc,val) = _btagWPs[name]
105 return self.bDiscriminator(disc) > val
111 self.
_leadingTrack =
max( self.daughterPtrVector() , key =
lambda x : x.pt()
if x.charge()!=0
else 0. )
112 if self._leadingTrack.charge()==0:
Abs< T >::type abs(const T &t)