Ejemplo n.º 1
0
    def __init__(self, datatype, **kwargs):
        super(TauCalibration, self).__init__(**kwargs)
        self.datatype = datatype

        from ROOT.TauAnalysisTools import TauSmearingTool
        self.tool = TauSmearingTool('tau_smearing_tool')
        self.tool.setProperty('bool')(
            'IsData', self.datatype == datasets.DATA)
Ejemplo n.º 2
0
class TauCalibration(EventFilter):
    """
    Apply Energy shift in data and 
    systematic variation in MC (Not yet)
    """
    def __init__(self, datatype, **kwargs):
        super(TauCalibration, self).__init__(**kwargs)
        self.datatype = datatype

        from ROOT.TauAnalysisTools import TauSmearingTool
        self.tool = TauSmearingTool('tau_smearing_tool')
        self.tool.setProperty('bool')(
            'IsData', self.datatype == datasets.DATA)

    def passes(self, event):
        taus_copy = store_helper.shallowCopyTauJetContainer(event.taus.collection)
        for tau in taus_copy:
            self.tool.applyCorrection(tau)
        event.taus.collection = taus_copy
        return True