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))
14 def absIsoFromEA(self,rho,eta,effectiveArea1 = None,effectiveArea2 = None):
16 Calculate Isolation using the effective area approach. If fsrPhotons is set
17 the list of photons is subtracted from the isolation cone. It works with one or
18 two effective Areas in case one needs to do photon and neutral hadron separately
20 photonIso = self.photonIso()
21 if hasattr(self,
'fsrPhotons'):
22 for gamma
in self.fsrPhotons:
23 photonIso=photonIso-gamma.pt()
26 if effectiveArea1
is not None:
27 for element
in effectiveArea1:
28 if abs(eta)>= element[
'etaMin']
and \
29 abs(eta)< element[
'etaMax']:
30 ea1 = ea1 * element[
'area']
33 return self.chargedHadronIso()+
max(0.,photonIso+self.neutralHadronIso()-ea1)
34 if effectiveArea2
is not None:
35 for element
in effectiveArea2:
36 if abs(eta)>= element[
'etaMin']
and \
37 abs(eta)< element[
'etaMax']:
38 ea2 = ea2 * element[
'area']
39 return self.chargedHadronIso()+
max(0.,photonIso-ea1)+
max(0.,self.neutralHadronIso()-ea2)
41 return self.chargedHadronIso()+
max(0.,photonIso+self.neutralHadronIso()-ea1)
44 def absIso(self, dBetaFactor=0, allCharged=0):
45 if dBetaFactor>0
and self.puChargedHadronIso()<0:
46 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')
47 neutralIso = self.neutralHadronIso()+self.photonIso()
49 if hasattr(self,
'fsrPhotons'):
50 for gamma
in self.fsrPhotons:
51 neutralIso=neutralIso-gamma.pt()
52 corNeutralIso = neutralIso - dBetaFactor * self.puChargedHadronIso()
53 charged = self.chargedHadronIso()
55 charged = self.chargedAllIso()
56 return charged +
max(corNeutralIso,0)
58 def relIso(self,dBetaFactor=0, allCharged=0):
59 rel = self.
absIso(dBetaFactor, allCharged)/self.pt()
63 '''MIKE, missing doc'''
64 return self.absEffAreaIso(rho)/self.pt()
67 if hasattr(self.innerTrack(),
"trackerExpectedHitsInner") :
68 return self.innerTrack().trackerExpectedHitsInner().numberOfLostHits()
70 return self.innerTrack().hitPattern().numberOfHits(ROOT.reco.HitPattern.MISSING_INNER_HITS)
Abs< T >::type abs(const T &t)