Example #1
0
class JER(JetSystematic):

    def __init__(self, is_up, **kwargs):
        super(JER, self).__init__(is_up, **kwargs)
        # Tag assumed: JetResolution-01-00-00
        if self.year == 2011:
            log.info("Using 2011 JER config")
            self.jer_tool = JERProvider(
                "AntiKt4LCTopoJES", "Truth",
                JetResolution.get_resource('JERProviderPlots_2011.root'))
            self.jer_tool.is7TeV(True)
        else:
            log.info("Using 2012 JER config")
            self.jer_tool = JERProvider(
                "AntiKt4LCTopoJES", "Truth",
                JetResolution.get_resource('JERProviderPlots_2012.root'))
        self.jer_tool.init()
        self.jetrandom = get_random()

    @JetSystematic.set
    def run(self, jet, event):
        """
        Note: The JERDown shift is essentially meaningless.
        https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/JetEnergyResolutionProvider2012
        """
        shift = 1.
        # Allowable range is > 10 GeV, but anything below 20 enters SoftJets
        if jet.pt > 20 * GeV and jet.pt < 10000 * GeV:
            smear = self.jer_tool.getSmearingFactorMC(jet.pt, jet.eta)
            shift = self.jetrandom.Gaus(1., smear)
        jet.pt *= shift
Example #2
0
class JER(JetSystematic):
    def __init__(self, is_up, **kwargs):
        super(JER, self).__init__(is_up, **kwargs)
        # Tag assumed: JetResolution-01-00-00
        if self.year == 2011:
            log.info("Using 2011 JER config")
            self.jer_tool = JERProvider(
                "AntiKt4LCTopoJES", "Truth",
                JetResolution.get_resource('JERProviderPlots_2011.root'))
            self.jer_tool.is7TeV(True)
        else:
            log.info("Using 2012 JER config")
            self.jer_tool = JERProvider(
                "AntiKt4LCTopoJES", "Truth",
                JetResolution.get_resource('JERProviderPlots_2012.root'))
        self.jer_tool.init()
        self.jetrandom = get_random()

    @JetSystematic.set
    def run(self, jet, event):
        """
        Note: The JERDown shift is essentially meaningless.
        https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/JetEnergyResolutionProvider2012
        """
        shift = 1.
        # Allowable range is > 10 GeV, but anything below 20 enters SoftJets
        if jet.pt > 20 * GeV and jet.pt < 10000 * GeV:
            smear = self.jer_tool.getSmearingFactorMC(jet.pt, jet.eta)
            shift = self.jetrandom.Gaus(1., smear)
        jet.pt *= shift
Example #3
0
 def __init__(self, is_up, **kwargs):
     super(JER, self).__init__(is_up, **kwargs)
     # Tag assumed: JetResolution-01-00-00
     if self.year == 2011:
         log.info("Using 2011 JER config")
         self.jer_tool = JERProvider(
             "AntiKt4LCTopoJES", "Truth",
             JetResolution.get_resource('JERProviderPlots_2011.root'))
         self.jer_tool.is7TeV(True)
     else:
         log.info("Using 2012 JER config")
         self.jer_tool = JERProvider(
             "AntiKt4LCTopoJES", "Truth",
             JetResolution.get_resource('JERProviderPlots_2012.root'))
     self.jer_tool.init()
     self.jetrandom = get_random()
Example #4
0
 def __init__(self, is_up, **kwargs):
     super(JER, self).__init__(is_up, **kwargs)
     # Tag assumed: JetResolution-01-00-00
     if self.year == 2011:
         log.info("Using 2011 JER config")
         self.jer_tool = JERProvider(
             "AntiKt4LCTopoJES", "Truth",
             JetResolution.get_resource('JERProviderPlots_2011.root'))
         self.jer_tool.is7TeV(True)
     else:
         log.info("Using 2012 JER config")
         self.jer_tool = JERProvider(
             "AntiKt4LCTopoJES", "Truth",
             JetResolution.get_resource('JERProviderPlots_2012.root'))
     self.jer_tool.init()
     self.jetrandom = get_random()