jets -> jetsEle, numberOfBjets -> numberOfBjetsEle

I recommend you move the lines 17 + 18 down and keep the same variable names for jets, bjets, bjetWeights (clear all before reuse).
So basically first do all muon stuff then all electron stuff (including histogram filling).

But: you are currently only doing to functions which need the weights at all. Why not move the code there? Then there is no chance of cross-contamination.