import ROOT

def main():
  ROOT.gSystem.Load( "libTauCorrUncert" )
  from ROOT import TauCorrUncert as TCU
  # Step 1. Instantiate tool
  #############/
  tc = TCU.TauSFProvider()
  tc.Initialise() 
  # Step 2. Retrieving tau ID scale factors
  # Note: those SF must be only applied to truth matched taus
  ##########################
  """
  The cast of enum to ROOT.Long is a temprary bug in ROOT and will be fixed soon in patched 5.34
  """
  print "SF for BDT medium medium eveto loose olr: ", tc.GetEVetoSF(1.2, ROOT.Long(TCU.BDTMEDIUM), ROOT.Long(TCU.MEDIUM), ROOT.Long(TCU.LOOSE)), "  +  ", tc.GetEVetoSFUnc(1.2, ROOT.Long(TCU.BDTMEDIUM), ROOT.Long(TCU.MEDIUM), ROOT.Long(TCU.LOOSE), 1)
  
if __name__=='__main__':
  main()


