Ejemplo n.º 1
0
        def fill(the_histos, row, fillNtuple=False):
            # Get PU weight - fix me
            weight = 1
            if row.run == 1:
                weight = self.pucorrector(row.nTruePU) * \
                         mcCorrectors.double_muon_trigger(row,'m1','m2')
                        
            the_histos['muonPt'].Fill(row.m2Pt, weight)
            the_histos['muonJetPt'].Fill(max(row.m2JetPt, row.m2Pt), weight)
            the_histos['muonAbsEta'].Fill(row.m2AbsEta, weight)
            the_histos['muonPtRatio'].Fill(row.m2Pt/max(row.m2JetPt, row.m2Pt), weight)
            the_histos['muonPtDiff'].Fill(max(row.m2JetPt, row.m2Pt) - row.m2Pt, weight)

            the_histos['m1MtToMET'].Fill(row.m1MtToMET, weight)
            the_histos['m1m2Mass' ].Fill(row.m1_m2_Mass, weight)
            the_histos['m2MtToMET'].Fill(row.m2MtToMET, weight)
            the_histos["m1JetBtag"].Fill(row.m1JetBtag, weight)
            the_histos["m2JetBtag"].Fill(row.m2JetBtag, weight)

            the_histos['m2JetptD'].Fill(row.m2JetptD, weight)
            the_histos['m2Jetmult'].Fill(row.m2Jetmult, weight)

            if fillNtuple:
                pfidiso02    = float( row.m2PFIDTight and row.m2RelPFIsoDB < 0.2)
                h2taucuts    = float( row.m2PFIDTight and ((row.m2RelPFIsoDB < 0.15 and row.m2AbsEta < 1.479) or row.m2RelPFIsoDB < 0.1 ))
                h2taucuts020 = float( row.m2PFIDTight and ((row.m2RelPFIsoDB < 0.20 and row.m2AbsEta < 1.479) or row.m2RelPFIsoDB < 0.15))
                muon_jet_mass = -1. #inv_mass(row.m1Pt, row.m1Eta, row.m1Phi, row.leadingJetPt, row.leadingJetEta, row.leadingJetPhi)

                the_histos['muonInfo'].Fill( array("f", [row.m2Pt, max(row.m2JetPt, row.m2Pt), row.m2AbsEta, max(0, row.m2JetCSVBtag), 
                                                         abs(row.m2PVDXY), muon_jet_mass, row.jetVeto20, row.jetVeto40_DR05, weight, 
                                                         pfidiso02, h2taucuts, h2taucuts020] ) )
Ejemplo n.º 2
0
 def event_weight(self, row):
     if row.run > 2:
         return 1.
     return self.pucorrector(row.nTruePU) * \
         mcCorrectors.get_muon_corrections(row,'m1','m2') * \
         mcCorrectors.get_electron_corrections(row, 'e') * \
         mcCorrectors.double_muon_trigger(row,'m1','m2')
Ejemplo n.º 3
0
 def event_weight(self, row):
     if row.run > 2:
         return 1.
     return self.pucorrector(row.nTruePU) * \
         mcCorrectors.get_muon_corrections(row,'m1','m2') * \
         mcCorrectors.get_electron_corrections(row, 'e') * \
         mcCorrectors.double_muon_trigger(row,'m1','m2')
Ejemplo n.º 4
0
        def fill(the_histos, row, fillNtuple=False):
            # Get PU weight - fix me
            weight = 1
            if row.run == 1:
                weight = self.pucorrector(row.nTruePU) * \
                         mcCorrectors.double_muon_trigger(row,'m1','m2')

            the_histos['muonPt'].Fill(row.m2Pt, weight)
            the_histos['muonJetPt'].Fill(max(row.m2JetPt, row.m2Pt), weight)
            the_histos['muonAbsEta'].Fill(row.m2AbsEta, weight)
            the_histos['muonPtRatio'].Fill(
                row.m2Pt / max(row.m2JetPt, row.m2Pt), weight)
            the_histos['muonPtDiff'].Fill(
                max(row.m2JetPt, row.m2Pt) - row.m2Pt, weight)

            the_histos['m1MtToMET'].Fill(row.m1MtToMET, weight)
            the_histos['m1m2Mass'].Fill(row.m1_m2_Mass, weight)
            the_histos['m2MtToMET'].Fill(row.m2MtToMET, weight)
            the_histos["m1JetBtag"].Fill(row.m1JetBtag, weight)
            the_histos["m2JetBtag"].Fill(row.m2JetBtag, weight)

            the_histos['m2JetptD'].Fill(row.m2JetptD, weight)
            the_histos['m2Jetmult'].Fill(row.m2Jetmult, weight)

            if fillNtuple:
                pfidiso02 = float(row.m2PFIDTight and row.m2RelPFIsoDB < 0.2)
                h2taucuts = float(
                    row.m2PFIDTight
                    and ((row.m2RelPFIsoDB < 0.15 and row.m2AbsEta < 1.479)
                         or row.m2RelPFIsoDB < 0.1))
                h2taucuts020 = float(
                    row.m2PFIDTight
                    and ((row.m2RelPFIsoDB < 0.20 and row.m2AbsEta < 1.479)
                         or row.m2RelPFIsoDB < 0.15))
                the_histos['muonInfo'].Fill(
                    array("f", [
                        row.m2Pt, row.m2JetPt,
                        max(0, row.m2JetCSVBtag),
                        abs(row.m2PVDXY), weight, pfidiso02, h2taucuts,
                        h2taucuts020
                    ]))
Ejemplo n.º 5
0
 def correction(self, row):
     return self.pucorrector(row.nTruePU) * \
         mcCorrectors.get_muon_corrections(row,'m1','m2') * \
         mcCorrectors.double_muon_trigger(row,'m1','m2')
Ejemplo n.º 6
0
 def event_weight(self, row):
     if row.run > 2:
         return 1.
     return self.pucorrector(row.nTruePU) * mcCorrectors.double_muon_trigger(row,'m1','m2')\
Ejemplo n.º 7
0
 def correction(self, row):
     return self.pucorrector(row.nTruePU) * \
         mcCorrectors.get_muon_corrections(row,'m1','m2') * \
         mcCorrectors.double_muon_trigger(row,'m1','m2')