Skip to content

Electron charge ID scale factor uncertainty fix

Oleg Kuprash requested to merge okuprash/athena:test_chflip_tool into 21.2

The systematic uncertainty on the scale factor (SF) returned by ElectronChargeEfficiencyCorrectionTool is applied twice, leading effectively to a 2 sigma variation of the SF, instead of 1 sigma:

chargeFlipSFObs_DN       VERBOSE  -> flipRate is 0.90031, for histogram SFCentral_RunNumber276262_311481_SS
chargeFlipSFObs_DN       DEBUG   eta: 1.74627  pt: 37.7322
chargeFlipSFObs_DN       DEBUG   SF Rates---- . SF: 0.90031
chargeFlipSFObs_DN       DEBUG   Get SS his
chargeFlipSFObs_DN       VERBOSE  -> in: getChargeFlipRate(37.7322, 1.74627 TH2D, double&)
chargeFlipSFObs_DN       VERBOSE  -> flipRate is 0.0483092, for histogram STAT_RunNumber276262_311481_SS
chargeFlipSFObs_DN       DEBUG   Get SS his
chargeFlipSFObs_DN       VERBOSE  -> in: getChargeFlipRate(37.7322, 1.74627 TH2D, double&)
chargeFlipSFObs_DN       VERBOSE  -> flipRate is -0.164761, for histogram SYSTtotal_RunNumber276262_311481_SS
chargeFlipSFObs_DN       DEBUG    ... nominal SF: 0.90031
chargeFlipSFObs_DN       DEBUG   SF after SYSdown = 1.06507
chargeFlipSFObs_DN       DEBUG   SF after SYSdown = 1.22983
chargeFlipSFObs_DN       DEBUG   In CP::ElectronChargeEfficiencyCorrectionTool::getEfficiencyScaleFactor(const xAOD::IParticle& part, double& sf) const

(see two lines containing "SF after SYSdown = ")

The reason for this is that the systematic uncertainty string "SYSTtotal" is added to the vector m_systematics for every SF histogram with the name starting with "SYST" and ending with "_OS". There are two histograms in the SF root file satisfying these criteria, for two data taking periods, data15-16, and data17+:

$ rootls chargeEfficiencySF.TightLLH_d0z0_v13_Gradient_ECIDSloose.root -1

SFCentral_RunNumber276262_311481_OS
SFCentral_RunNumber276262_311481_SS
SFCentral_RunNumber325713_999999_OS
SFCentral_RunNumber325713_999999_SS
STAT_RunNumber276262_311481_OS
STAT_RunNumber276262_311481_SS
STAT_RunNumber325713_999999_OS
STAT_RunNumber325713_999999_SS
SYSTtotal_RunNumber276262_311481_OS
SYSTtotal_RunNumber276262_311481_SS
SYSTtotal_RunNumber325713_999999_OS
SYSTtotal_RunNumber325713_999999_SS

After allowing only unique systematic uncertainty names to be added to the vector m_systematics, the uncertainty is applied only one time as expected:

chargeFlipSFObs_DN       VERBOSE  -> flipRate is 0.90031, for histogram SFCentral_RunNumber276262_311481_SS
chargeFlipSFObs_DN       DEBUG   eta: 1.74627  pt: 37.7322
chargeFlipSFObs_DN       DEBUG   SF Rates---- . SF: 0.90031
chargeFlipSFObs_DN       DEBUG   Get SS his
chargeFlipSFObs_DN       VERBOSE  -> in: getChargeFlipRate(37.7322, 1.74627 TH2D, double&)
chargeFlipSFObs_DN       VERBOSE  -> flipRate is 0.0483092, for histogram STAT_RunNumber276262_311481_SS
chargeFlipSFObs_DN       DEBUG   Get SS his
chargeFlipSFObs_DN       VERBOSE  -> in: getChargeFlipRate(37.7322, 1.74627 TH2D, double&)
chargeFlipSFObs_DN       VERBOSE  -> flipRate is -0.164761, for histogram SYSTtotal_RunNumber276262_311481_SS
chargeFlipSFObs_DN       DEBUG    ... nominal SF: 0.90031
chargeFlipSFObs_DN       DEBUG   SF after SYSdown = 1.06507
chargeFlipSFObs_DN       DEBUG   In CP::ElectronChargeEfficiencyCorrectionTool::getEfficiencyScaleFactor(const xAOD::IParticle& part, double& sf) const

The issue is especially relevant for analyses using ECIDS to suppress electron charge mis-ID background, where the scale factor uncertainties for wrongly reconstructed charges are large.

Cc @turra, @jpoveda, @ahadef, @gtarna, @psommer, @jfernan8

Merge request reports