def __init__(self, cfg_ana, cfg_comp, looperName): super(RecoilCorrector, self).__init__(cfg_ana, cfg_comp, looperName) self.rcMVAMET = RC( 'CMGTools/H2TauTau/data/recoilMvaMEt_76X_newTraining_MG5.root') self.rcPFMET = RC('CMGTools/H2TauTau/data/recoilPFMEt_76X_MG5.root') wpat = re.compile('W\d?Jet.*') match = wpat.match(self.cfg_comp.name) self.isWJets = not (match is None) # Apply to signal, DY, and W+jets samples self.apply = 'Higgs' in self.cfg_comp.name or 'DY' in self.cfg_comp.name or self.isWJets
def __init__(self, cfg_ana, cfg_comp, looperName): super(RecoilCorrector, self).__init__(cfg_ana, cfg_comp, looperName) self.rcMVAMET = RC('CMGTools/H2TauTau/data/MvaMET_2016BCD.root') self.rcPFMET = RC('CMGTools/H2TauTau/data/TypeIPFMET_2016BCD.root') wpat = re.compile('W\d?Jet.*') match = wpat.match(self.cfg_comp.name) self.isWJets = not (match is None) # Apply to signal, DY, and W+jets samples self.apply = getattr(self.cfg_ana, 'apply', False) and ('Higgs' in self.cfg_comp.name or 'DY' in self.cfg_comp.name or self.isWJets)
def __init__(self, cfg_ana, cfg_comp, looperName): super(RecoilCorrector, self).__init__(cfg_ana, cfg_comp, looperName) # FIXME - no MVA MET yet, and no recoil corrections, so correcting # both with PF MET self.rcMVAMET = RC( 'CMGTools/H2TauTau/data/TypeI-PFMet_Run2016BtoH.root') self.rcPFMET = RC( 'CMGTools/H2TauTau/data/TypeI-PFMet_Run2016BtoH.root') wpat = re.compile('W\d?Jet.*') match = wpat.match(self.cfg_comp.name) self.isWJets = not (match is None) # Apply to signal, DY, and W+jets samples self.apply = getattr(self.cfg_ana, 'apply', False) and ('Higgs' in self.cfg_comp.name or 'DY' in self.cfg_comp.name or self.isWJets)
def __init__(self, cfg_ana, cfg_comp, looperName): super(METAnalyzer, self).__init__(cfg_ana, cfg_comp, looperName) wpat = re.compile('W\d?Jet.*') match = wpat.match(self.cfg_comp.name) self.isWJets = not (match is None) # Apply recoil correction to signal, DY, and W+jets samples self.apply_recoil_correction = getattr(self.cfg_ana, 'apply_recoil_correction', False) and ('Higgs' in self.cfg_comp.name or 'DY' in self.cfg_comp.name or self.isWJets) if self.apply_recoil_correction: try: self.rcMET = RC(self.cfg_ana.recoil_correction_file) except AttributeError: print 'No recoil correction file provided.'
def __init__(self, cfg_ana, cfg_comp, looperName): super(METAnalyzer, self).__init__(cfg_ana, cfg_comp, looperName) wpat = re.compile('W\d?Jet.*') match = wpat.match(self.cfg_comp.name) self.isWJets = not (match is None) # Apply recoil correction to signal, DY, and W+jets samples self.apply_recoil_correction = getattr( self.cfg_ana, 'apply_recoil_correction', False) and (hasattr(self.cfg_comp, 'recoil_correct') and self.cfg_comp.recoil_correct) if self.apply_recoil_correction: try: self.rcMET = RC(self.cfg_ana.recoil_correction_file) except AttributeError: print 'No recoil correction file provided.' if hasattr(self.cfg_comp, 'METSysFile'): try: self.MEtSys = MEtSys(self.cfg_comp.METSysFile) except AttributeError: print 'No MET systematics file provided.'