Define weights column after columns from custom class
Move the definitions of
addTLorentzVectors(mainNode)
defineVariables(mainNode, uniqueSampleID)
addCustomDefinesFromConfig(mainNode, sample)
before the call to addWeightColumns
such that custom columns defined in the custom frame can be used in the definition of the event weight.