load makeHistoFromBranch function from external file as it is the same for all three macros