UCATLAS / xAODAnaHelpers

ATLAS Run 2 and Run 3 analysis framework for AnalysisTop and AnalysisBase for proton-smashing physics
https://ucatlas.github.io/xAODAnaHelpers/
Apache License 2.0
42 stars 127 forks source link

xAH updates for Trigger-Level Analyses #1676

Closed mamerl closed 9 months ago

mamerl commented 9 months ago

Adds various modifications including:

NOTE: for BasicEventSelection trigger decision changes we may need a follow up PR after checking if the modified TLA data logic is required for 2023 TLA data (if not, then we will need a 2022 TLA data flag)

tofitsch commented 9 months ago

To add some context: These changes are needed in the dijet+ISR Trigger Level Analysis (TLA) which makes heavy use of xAH. They will also be necessary for other later trigger level analyses.

JetCalibrator

Looks fine: While these new features are only needed for TLA, they are activated by the new option m_recalibrateHLTJets which is false by default. Therefore doesn't affect anyone that doesn't explicitly activate it.

BasicEventSelection

Similarly, everything new is guarded behind the new m_isTLAData option which is also false by default. However, I would change these debug messages to not check for an && of 2 things at the same time and to remove the NOT which is confusing:

      ANA_MSG_DEBUG("Trigger chain group is NOT passed && is TLA data = " << int(!triggerChainGroup->isPassed(TrigDefs::requireDecision) && m_isTLAData));
      ANA_MSG_DEBUG("Trigger chain group is NOT passed (no requireDecision) && is NOT TLA data = " << int(!triggerChainGroup->isPassed() && !m_isTLAData));

to something like this:

      ANA_MSG_DEBUG("Is TLA data = " << int(m_isTLAData));
      ANA_MSG_DEBUG("Trigger chain group is passed = " << int(m_isTLAData ? triggerChainGroup->isPassed(TrigDefs::requireDecision) : triggerChainGroup->isPassed());

It's probably better to change Is TLA data into Is Trigger Level Analysis (TLA) data since not everyone can be expected to know this acronym.

HistogramManager

Also fine: Just adding a few more overloaded options of functions that exist for TH2 now for TH3

OverlapRemover

Looks a bit strange only doing it for jets and photons. Should we not do the same (i.e. adding the conditional without DataVector) for e, mu, tau too then to be consistent?

mamerl commented 9 months ago

Updates:

BasicEventSelection: changed logging statements as suggested and fixed indentation of a code block

OverlapRemover: made checking of ConstDataVector & xAOD container presence in TStore consistent for all objects in overlap removal