Beispiel #1
0
    def doSmartCut(self, row, *obj):
        # Doesn't apply to eemm
        if obj[0][0] != obj[2][0]:
            return True

        altObj = [list(obj), list(obj)]

        # Find the proper alternate Z pairings. 
        ssInd = 0 # index of Z1 same-sign lepton
        if nObjVar(row, 'SS', obj[1], obj[2]):
            ssInd += 1
        for i in range(2):
            altObj[i][ssInd] = obj[i+2]
            altObj[i][i+2] = obj[ssInd]

        altZMass = [[nObjVar(row, "Mass"+self.fsrVar, *sorted(obs[:2])), nObjVar(row, "Mass"+self.fsrVar, *sorted(obs[2:]))] for obs in altObj]
        altZCompatibility = [[zMassDist(m) for m in mAlt] for mAlt in altZMass]
        z1Compatibility = zCompatibility(row, obj[0], obj[1], self.fsrVar)

        zACompatibility = []
        zBMass = []
        for i in range(len(altZMass)):
            if altZCompatibility[i][0] < altZCompatibility[i][1]:  # Za is first
                zACompatibility.append(altZCompatibility[i][0])
                zBMass.append(altZMass[i][1])
            else:
                zACompatibility.append(altZCompatibility[i][1])
                zBMass.append(altZMass[i][0])

        return not any((zACompatibility[i] < z1Compatibility and zBMass[i] < 12) for i in range(2))
Beispiel #2
0
 def storeVars(self, row, objects, cuts):
     '''
     Need d_bkg^kin and Z1 distance from nominal mass.
     '''
     self.dbk = row.D_bkg_kin #row.D_sel_kin
     self.dZ = zCompatibility(row, objects[0], objects[1], cuts.fsrVar)
     self.m4l = evVar(row, 'Mass'+cuts.fsrVar)
Beispiel #3
0
 def storeVars(self, row, objects, cuts):
     '''
     Need Z1 distance from nominal mass and scalar sum of pt of Z2 
     leptons.
     '''
     self.dZ = zCompatibility(row, objects[0], objects[1], cuts.fsrVar)
     self.ptSum = objVar(row, 'Pt', objects[2]) + objVar(row, 'Pt', objects[3])
Beispiel #4
0
    def doSmartCut(self, row, *obj):
        # Doesn't apply to eemm
        if obj[0][0] != obj[2][0]:
            return True

        # Find the proper alternate Z pairing. We already checked that we have 2 OS pairs
        if nObjVar(row, 'SS', *sorted([obj[0], obj[2]])): # l1 matches l4
            altObj = [obj[0], obj[3], obj[1], obj[2]]
        else: # l1 matches l3
            altObj = [obj[0], obj[2], obj[1], obj[3]]

        altZMass = [nObjVar(row, "Mass"+self.fsrVar, *sorted(altObj[:2])), nObjVar(row, "Mass"+self.fsrVar, *sorted(altObj[2:]))]
        altZCompatibility = [zMassDist(m) for m in altZMass]
        z1Compatibility = zCompatibility(row, obj[0], obj[1], self.fsrVar)

        if altZCompatibility[0] < altZCompatibility[1]:  # Za is first
            zACompatibility = altZCompatibility[0]
            zBMass = altZMass[1]
        else:
            zACompatibility = altZCompatibility[1]
            zBMass = altZMass[0]

        return not (zACompatibility < z1Compatibility and zBMass < 12)
Beispiel #5
0
 def storeVars(self, row, objects, cuts):
     """
     Need Z1 distance from nominal mass.
     """
     self.dZ = zCompatibility(row, objects[0], objects[1], cuts.fsrVar)