6 '''3D impact parameter value.'''
7 return abs(self.dB(self.PV3D))
11 '''3D impact parameter significance.'''
12 return abs(self.dB(self.PV3D) / self.edB(self.PV3D))
15 '''Calculate Isolation using the effective area approach.'''
16 photonIso = self.photonIso()
17 offset = self.rho*getattr(self,
"EffectiveArea"+area)
18 return self.chargedHadronIso()+
max(0.,photonIso+self.neutralHadronIso()-offset)
23 def relIso(self, dBetaFactor=0, allCharged=0):
24 '''Relative isolation with default cone size of 0.4.'''
25 rel = self.
absIsoR(dBetaFactor, allCharged)/self.pt()
28 def absIsoR(self, R=0.4, dBetaFactor=0, allCharged=False):
29 '''Isolation in given cone with optional delta-beta subtraction.'''
30 if dBetaFactor>0
and self.puChargedHadronIsoR(R)<0:
31 raise ValueError(
'If you want to use dbeta corrections, you must make sure that the pu charged hadron iso is available. This should never happen')
32 neutralIso = self.neutralHadronIsoR(R) + self.photonIsoR(R)
33 corNeutralIso = neutralIso - dBetaFactor * self.puChargedHadronIsoR(R)
34 charged = self.chargedHadronIsoR(R)
36 charged = self.chargedAllIsoR(R)
37 return charged +
max(corNeutralIso, 0.)
39 def relIsoR(self, R=0.4, dBetaFactor=0, allCharged=False):
40 return self.
absIsoR(R, dBetaFactor, allCharged)/self.pt()
43 if hasattr(self.innerTrack(),
"trackerExpectedHitsInner") :
44 return self.innerTrack().trackerExpectedHitsInner().numberOfLostHits()
46 return self.innerTrack().hitPattern().numberOfHits(ROOT.reco.HitPattern.MISSING_INNER_HITS)
Abs< T >::type abs(const T &t)