Skip to content

AnalysisTop - Fixing event weights for buggy samples (II)

Ian Allan Connelly requested to merge iconnell/athena:21.2-ATFixWeights2 into 21.2

It was identified that the changes in !24845 (merged) did not fully resolve the event weight problem. Specifically, the function was not being called for the variable being saved into the ntuple. It was being called in top-xaod to provide a weight for the cutflow. However, the changes below will also decorate the EventInfo with a new float AnalysisTop_eventWeight which will be the recalculated value for the mc_weight which will actually use the PMGTruthWeightTool before resorting to the 0th event weight. As this is called early in top-xaod, the decoration will be available at early in the event processing, meaning we should be safe in all truth/particle/reco processing modes. There may be other places in the code that could be updated too, but this is the bare minimum I believe to fix the issue.

Tagging @tdado, @kzoch, @mvanadia, @smergelm

It might be useful if Knut would run on one of the analysis files identified as buggy before and check if this patch would propagate through correctly.

Edited by Ian Allan Connelly

Merge request reports

Loading