5 '''3D impact parameter value.'''
6 return abs(self.dB(self.PV3D))
10 '''3D impact parameter significance.'''
11 return abs(self.dB(self.PV3D) / self.edB(self.PV3D))
13 def absIsoFromEA(self,rho,eta,effectiveArea1 = None,effectiveArea2 = None):
15 Calculate Isolation using the effective area approach. If fsrPhotons is set
16 the list of photons is subtracted from the isolation cone. It works with one or
17 two effective Areas in case one needs to do photon and neutral hadron separately
19 photonIso = self.photonIso()
20 if hasattr(self,
'fsrPhotons'):
21 for gamma
in self.fsrPhotons:
22 photonIso=photonIso-gamma.pt()
25 if effectiveArea1
is not None:
26 for element
in effectiveArea1:
27 if abs(eta)>= element[
'etaMin']
and \
28 abs(eta)< element[
'etaMax']:
29 ea1 = ea1 * element[
'area']
32 return self.chargedHadronIso()+
max(0.,photonIso+self.neutralHadronIso()-ea1)
33 if effectiveArea2
is not None:
34 for element
in effectiveArea2:
35 if abs(eta)>= element[
'etaMin']
and \
36 abs(eta)< element[
'etaMax']:
37 ea2 = ea2 * element[
'area']
38 return self.chargedHadronIso()+
max(0.,photonIso-ea1)+
max(0.,self.neutralHadronIso()-ea2)
40 return self.chargedHadronIso()+
max(0.,photonIso+self.neutralHadronIso()-ea1)
43 def absIso(self,dBetaFactor = 0,allCharged=0):
44 if dBetaFactor>0
and self.puChargedHadronIso()<0:
45 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')
46 neutralIso = self.neutralHadronIso()+self.photonIso()
48 if hasattr(self,
'fsrPhotons'):
49 for gamma
in self.fsrPhotons:
50 neutralIso=neutralIso-gamma.pt()
51 corNeutralIso = neutralIso - dBetaFactor * self.puChargedHadronIso();
52 charged = self.chargedHadronIso();
54 charged = self.chargedAllIso();
55 return charged +
max(corNeutralIso,0)
57 def relIso(self,dBetaFactor=0, allCharged=0):
58 rel = self.
absIso(dBetaFactor, allCharged)/self.pt();
63 '''Used in the H2TauTau analysis: rel iso, dbeta=0.5, using all charged particles.'''
64 return self.
relIso( 0.5, 1 )
68 '''MIKE, missing doc'''
73 '''MIKE, missing doc'''
74 return self.absEffAreaIso(rho)/self.pt()
77 if hasattr(self.innerTrack(),
"trackerExpectedHitsInner") :
78 return self.innerTrack().trackerExpectedHitsInner().numberOfLostHits()
80 return self.innerTrack().hitPattern().numberOfHits(ROOT.reco.HitPattern.MISSING_INNER_HITS)
Abs< T >::type abs(const T &t)