예제 #1
0
파일: filters.py 프로젝트: qbuat/hhntup
    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)
예제 #2
0
파일: filters.py 프로젝트: qbuat/hhntup
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