void run_fit(string input, string output)
{

  
  TStopwatch timer;
  
  gSystem->Load("libTruthHelperNtuple");
  gSystem->Load("libMCNtuple");
  gSystem->Load("libCandNtupleSR");
  gSystem->Load("libStandardNtuple");
  gSystem->Load("libTruthHelperNtupleModule");
  gSystem->Load("libStandardNtupleModule");
  gSystem->Load("libNeugenInterface.so");
  gSystem->Load("libMCReweight.so");
  gSystem->Load("libBeamMegaFit");

  JobC *jc=new JobC;

  jc->Path.Create("Fitter","SkzpFitter::Ana");
  jc->Input.Set("Format=dummy");

  string in="InputFile="+input;
  jc->Path("Fitter").Mod("SkzpFitter").Set(in.c_str());

  string out="OutputFile="+output;
  jc->Path("Fitter").Mod("SkzpFitter").Set(out.c_str());

  //   jc->Msg.SetLevel("SkzpFitter","Debug");
  //    jc->Msg.SetLevel("BeamChi2","Verbose");


  jc->Path("Fitter").Run(1);
  
  timer.Print("u");
}
