Skip to content

special case to avoid TRT photon Conversion in MVA calibration

Ruggero Turra requested to merge special_case_MVACalib_TRTConv_Run3 into main

In the egammaMVA calibration, converted / unconverted photons are calibrated with different BDT, trained separately. Within egamma we decided to change the definition of converted due to the large fake rate of TRT-converted photons (they will be calibrated as unconverted).

The new definition is here: !69947 (diffs), basically:

 const xAOD::Photon* ph = static_cast<const xAOD::Photon*>(&eg);
    bool isConvCalib = xAOD::EgammaHelpers::isConvertedPhoton(ph) && 
                       xAOD::EgammaHelpers::conversionRadius(ph) < m_maxConvR;
    if (m_removeTRTConvBarrel) {
      // special case in rel24 Run3 to avoid TRT converted photons in the barrel
      using enum xAOD::EgammaParameters::ConversionType;
      const xAOD::EgammaParameters::ConversionType conversionType = xAOD::EgammaHelpers::conversionType(ph);
      const bool isTRTConv = (conversionType == singleTRT) || (conversionType == doubleTRT); // 2 or 4
      const bool isTRTEndcap = std::abs(ph->eta()) > 0.8;
      isConvCalib = isConvCalib && (isTRTEndcap || !isTRTConv);
    }

in short isConvCalib = isConvCalib & (isTRTEndcap || !isTRTConv)

Please @gunal , @ludovica double check it.

I am not very proud of this change since we are hard-coding a special case (the default case 0<R<800 mm) was already hard-coded, using the new property RemoveTRTConvBarrel. I don't know if we want to invest in doing something better e.g.

ToolHandle<IConvertedPhotonSelector> m_conversionSelector;
struct IConvertedPhotonSelector
{
   bool isConverted(const xAOD::Photon&);
};

This MR targets master, but in the comment I wrote // special case in rel24 Run3 to avoid TRT converted photons in the barrel. Egamma conveners should clarify how this is going to enter: 1) only at analysis level (i.e. rel25=main) or 2) at the reconstruction level (i.e. rel24 and rel25=main). Depending on the answer other clients should be configured. I guess that in any case at the analysis level we want RemoveTRTConvBarrel=true only for Run3 (all the years I guess) (@krumnack may be interested). Please @ludovica @kristin clarify.

@christos @mungo @ahabouel @adonofri @smanzoni @lnasella

Edited by Ruggero Turra

Merge request reports