Esempio n. 1
0
    def event_weight(self, row):
        if row.run > 2:  #FIXME! add tight ID correction
            return 1.


        return self.pucorrector(row.nTruePU) * \
            mcCorrections.eid_correction( row, 'e1', 'e2') * \
            mcCorrections.eiso_correction(row, 'e1', 'e2') * \
            mcCorrections.trig_correction(row, 'e2'  )
    def event_weight(self, row):
        if row.run > 2:  #FIXME! add tight ID correction
            return 1.

        #if bool(row.e1MatchesEle27WP80) and  not bool(row.e2MatchesEle27WP80) : etrig = 'e1'
        #if not bool(row.e1MatchesEle27WP80) and  bool(row.e2MatchesEle27WP80) :  etrig = 'e2'
        return self.pucorrector(row.nTruePU) * \
            mcCorrections.eid_correction( row, self.mye1, self.mye2, self.mye3) * \
            mcCorrections.eiso_correction(row, self.mye1, self.mye2, self.mye3) * \
            mcCorrections.trig_correction(row, self.mye3   )
Esempio n. 3
0
    def event_weight(self, row, sys_shifts):
        if self.is_data:
            return {'' : 1.}

        weights = {}
        for shift in sys_shifts:
            embedded_weight = row.EmbPtWeight*mcCorrections.eEmb_correction( row, 'e', shift=shift) if self.is_embedded else 1.

            weights[shift] = embedded_weight *\
                             mcCorrections.eid_correction( row, 'e', shift=shift) * \
                             mcCorrections.eiso_correction(row, 'e', shift=shift) * \
                             self.trig_weight(row, 'e', shift=shift) * \
                             self.pucorrector(row.nTruePU, shift=shift)
                       
        return weights
    def event_weight(self, row):
        if row.run > 2: #FIXME! add tight ID correction
            return 1.

        etrig = 'e1'
        if row.e2Pt > row.e1Pt : etrig = 'e2'
        if bool(row.e1MatchesSingleE27WP80) and  not bool(row.e2MatchesSingleE27WP80) : etrig = 'e1'
        if not bool(row.e1MatchesSingleE27WP80) and  bool(row.e2MatchesSingleE27WP80) :  etrig = 'e2'

        #if bool(row.e1MatchesEle27WP80) and  not bool(row.e2MatchesEle27WP80) : etrig = 'e1'
        #if not bool(row.e1MatchesEle27WP80) and  bool(row.e2MatchesEle27WP80) :  etrig = 'e2'
            
            
            
        return self.pucorrector(row.nTruePU) * \
            mcCorrections.eid_correction( row, 'e1', 'e2') * \
            mcCorrections.eiso_correction(row, 'e1', 'e2') * \
            mcCorrections.trig_correction(row, etrig     )