예제 #1
0
    def __init__(self, is_up, np=None, **kwargs):

        # *** Set up the uncertainty tools ***
        # Tag assumed: JetUncertainties-00-05-09-02
        super(JES, self).__init__(is_up, **kwargs)

        assert np in self.all_nps and hasattr(self, '_' + np)
        self.np = np
        self.run_np = getattr(self, '_' + np)

        self.jes_tool = None
        if self.year == 2011:
            self.jes_tool = MultijetJESUncertaintyProvider(
                "JES_2011/Final/MultijetJES_2011.config",
                "JES_2011/Final/InsituJES2011_17NP_ByCategory.config",
                "AntiKt4TopoLC", "MC11c", JetUncertainties.RESOURCE_PATH)
        elif self.year == 2012:
            self.jes_tool = MultijetJESUncertaintyProvider(
                "JES_2012/Moriond2013/MultijetJES_2012.config",
                #"JES_2012/Moriond2013/InsituJES2012_AllNuisanceParameters.config",
                "JES_2012/Moriond2013/InsituJES2012_20NP_ByCategory.config",
                "AntiKt4TopoLC",
                "MC12a",
                JetUncertainties.RESOURCE_PATH)
        else:
            raise ValueError('No JES defined for year %d' % year)