moving loop.C into CodeForNtupleProduction