2 from ROOT
import TLorentzVector
6 '''Computes and holds VBF quantities''' 7 def __init__(self, jets, diLepton, vbfMvaCalc, cjvPtCut):
8 '''jets: jets cleaned from the diLepton legs. 9 diLepton: the di-tau, for example. Necessary to compute input variables for MVA selection 16 self.
met = diLepton.met()
29 self.
mjj = dijetp4.M()
36 self.
higgsp4 = diLepton.p4() + self.met.p4()
40 visDiLepton = diLepton.leg1 ().p4 () + diLepton.leg2 ().p4 ()
42 abs (self.
leadJets[0].eta () - visDiLepton.eta ()),
43 abs (self.
leadJets[1].eta () - visDiLepton.eta ()))
49 self.
mva = self.vbfMvaCalc.val( self.
mjj,
67 '''Finds all jets between the 2 leading jets, for central jet veto.''' 68 if not len(otherJets):
70 etamin = leadJets[0].
eta()
71 etamax = leadJets[1].
eta()
73 etamin, etamax = etamax, etamin
78 if etamin < eta
and eta < etamax:
82 centralJets =
filter( isCentral, otherJets )
86 '''returns the sum p4 of a collection of objects. 87 FIXME: remove this function, which is a bit stupid 91 p4 += TLorentzVector(jet.px(), jet.py(), jet.pz(), jet.energy())
95 header =
'VBF : deta={deta:4.2f}, Mjj={mjj:4.2f}, #centjets={ncentjets}' 100 tmp.append(
'MVA input variables: dphi={dphi:4.2f}, dijetpt={dijetpt:4.2f}, dijetphi={dijetphi:4.2f}, dphidijethiggs={dphidijethiggs:4.2f}, visjeteta={visjeteta:4.2f}, ptvis={ptvis:4.2f}'.
format(
108 tmp.append(
'Leading Jets:')
109 tmp.extend( leadJets )
110 tmp.append(
'Central Jets:')
111 tmp.extend( centralJets )
112 return '\n'.
join( tmp )
def findCentralJets(self, leadJets, otherJets)
Abs< T >::type abs(const T &t)
static std::string join(char **cmd)
def __init__(self, jets, diLepton, vbfMvaCalc, cjvPtCut)
mva
self.ptvis = diLepton.pt() new VBF MVA, based on 4 variables