2 from PhysicsTools.HeppyCore.framework.analyzer
import Analyzer
3 from PhysicsTools.Heppy.analyzers.AutoHandle
import AutoHandle
7 print 'x = {x:5.4f}, y = {y:5.4f}, z = {z:5.4f}'.
format(x=vc.X(),
12 '''Analyze MET in Z+jet events. 13 Need a to provide a module creating event.diLepton 14 earlier in the sequence. 19 self.handles[
'met'] = AutoHandle(
30 self.readCollections( iEvent )
31 event.met = self.handles[
'met'].product()[0]
35 if not hasattr(event,
'diLepton'):
48 mVect = met.p4().Vect()
50 vVect = diL.p4().Vect()
52 recoilVect = copy.deepcopy(mVect)
56 zAxis = type(vVect)(0,0,1)
57 uvVectPerp = vVect.Cross(zAxis).Unit()
59 u1 = - recoilVect.Dot(uvVect)
60 u2 = recoilVect.Dot(uvVectPerp)
65 if self.cfg_ana.verbose: