@aminghiasi, I noticed several places where the DeltaPhiQCD code could be better integrated with the rest of TreeMaker or written more efficiently. In the process, I fixed a few bugs.
I tested the new code with 100 QCD events and didn't see any unexpected changes. Let me know if I misunderstood anything and if I should fix point 8 before merging.