Ejemplo n.º 1
0
 def buildOtherLeptons(self, cmgOtherLeptons, event):
     '''Build electrons for third lepton veto, associate best vertex.
     '''
     otherLeptons = []
     for index, lep in enumerate(cmgOtherLeptons):
         # pyl = self.__class__.OtherLeptonClass(lep)
         pyl = Electron(lep)
         pyl.associatedVertex = event.goodVertices[0]
         pyl.rho = event.rho
         otherLeptons.append(pyl)
     return otherLeptons
Ejemplo n.º 2
0
 def buildOtherLeptons(self, cmgOtherLeptons, event):
   '''Build electrons for third lepton veto, associate best vertex.'''
   otherLeptons = []
   for index, lep in enumerate(cmgOtherLeptons):
     pyl = Electron(lep)
     pyl.associatedVertex = event.goodVertices[0]
     pyl.rho = event.rho
     if not pyl.cutBasedId('POG_PHYS14_25ns_v1_Veto')       : continue
     if not pyl.relIso(dBetaFactor=0.5, allCharged=0) < 0.3 : continue
     if not self.testLegKine(pyl, ptcut=10, etacut=2.5)     : continue
     otherLeptons.append( pyl )
   return otherLeptons
Ejemplo n.º 3
0
 def process(self, event):
     self.readCollections(event.input)
     electrons = self.handles['electrons'].product()
     output_electrons = []
     for electron in electrons:
         helectron = Electron(electron)
         helectron.associatedVertex = event.vertices[0]
         helectron.event = event.input.object()
         helectron.rho = event.rho
         helectron.conversions = self.handles['conversions'].product()
         helectron.beamspot = self.handles['beamspot'].product()
         output_electrons.append(helectron)
     setattr(event, self.cfg_ana.output, output_electrons)
 def buildLeptons(self, cmgOtherLeptons, event):
     '''Build electrons for third lepton veto, associate best vertex.'''
     otherLeptons = []
     for index, lep in enumerate(cmgOtherLeptons):
         pyl = Electron(lep)
         pyl.associatedVertex = event.goodVertices[0]
         pyl.rho = event.rho
         pyl.event = event.input.object()
         if not pyl.mvaIDRun2('Spring16', 'POG90'):
             continue
         if not pyl.relIso(0.3, dbeta_factor=0.5, all_charged=0) < 0.3:
             continue
         if not self.testLegKine(pyl, ptcut=10, etacut=2.5):
             continue
         if not pyl.physObj.passConversionVeto():
             continue
         if not pyl.lostInner() <= 1:
             continue
         if not abs(pyl.dxy()) < 0.045:
             continue
         if not abs(pyl.dz()) < 0.2:
             continue
         otherLeptons.append(pyl)
     return otherLeptons
Ejemplo n.º 5
0
 def buildOtherLeptons(self, cmgOtherLeptons, event):
     '''Build electrons for third lepton veto, associate best vertex.'''
     otherLeptons = []
     for index, lep in enumerate(cmgOtherLeptons):
         pyl = Electron(lep)
         pyl.associatedVertex = event.goodVertices[0]
         pyl.rho = event.rho
         if not pyl.cutBasedId('POG_PHYS14_25ns_v1_Veto'): continue
         if not pyl.relIso(dBetaFactor=0.5, allCharged=0) < 0.3: continue
         if not self.testLegKine(pyl, ptcut=10, etacut=2.5): continue
         otherLeptons.append(pyl)
     return otherLeptons
Ejemplo n.º 6
0
 def buildLeptons(self, cmgOtherLeptons, event):
     '''Build electrons for third lepton veto, associate best vertex.'''
     otherLeptons = []
     for index, lep in enumerate(cmgOtherLeptons):
         pyl = Electron(lep)
         pyl.associatedVertex = event.goodVertices[0]
         pyl.rho = event.rho
         pyl.event = event.input.object()
         if not pyl.mvaIDRun2('Spring16', 'POG90'):
             continue
         if not pyl.relIsoR(R=0.3, dBetaFactor=0.5, allCharged=0) < 0.3:
             continue
         if not self.testLegKine(pyl, ptcut=10, etacut=2.5):
             continue
         otherLeptons.append(pyl)
     return otherLeptons
Ejemplo n.º 7
0
 def __init__(self, diobject):
     super(MuonElectron, self).__init__(diobject)
     self.mu = Muon(super(MuonElectron, self).leg1())
     self.ele = Electron(super(MuonElectron, self).leg2())
     self.diobject.setP4(self.p4())
Ejemplo n.º 8
0
 def __init__(self, diobject):
     super(TauElectron, self).__init__(diobject)
     self.tau = Tau(super(TauElectron, self).leg1())
     self.ele = Electron(super(TauElectron, self).leg2())
     self.diobject.setP4(self.p4())