Skip to content
Snippets Groups Projects
Commit b920fa3f authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'TauAntiTauOR_fix' into 'main'

Fixes for TauAntiTauJetOverlapTool

See merge request atlas/athena!70116
parents e309f1d1 0d826917
No related branches found
No related tags found
37 merge requests!78241Draft: FPGATrackSim: GenScan code refactor,!78236Draft: Switching Streams https://its.cern.ch/jira/browse/ATR-27417,!78056AFP monitoring: new synchronization and cleaning,!78041AFP monitoring: new synchronization and cleaning,!77990Updating TRT chip masks for L1TRT trigger simulation - ATR-28372,!77733Draft: add new HLT NN JVT, augmented with additional tracking information,!77731Draft: Updates to ZDC reconstruction,!77728Draft: updates to ZDC reconstruction,!77522Draft: sTGC Pad Trigger Emulator,!76725ZdcNtuple: Fix cppcheck warning.,!76611L1CaloFEXByteStream: Fix out-of-bounds array accesses.,!76475Punchthrough AF3 implementation in FastG4,!76474Punchthrough AF3 implementation in FastG4,!76343Draft: MooTrackBuilder: Recalibrate NSW hits in refine method,!75729New implementation of ZDC nonlinear FADC correction.,!75703Draft: Update to HI han config for HLT jets,!75184Draft: Update file heavyions_run.config,!74430Draft: Fixing upper bound for Delayed Jet Triggers,!73963Changing the path of the histograms to "Expert" area,!73875updating ID ART reference plots,!73874AtlasCLHEP_RandomGenerators: Fix cppcheck warnings.,!73449Add muon detectors to DarkJetPEBTLA partial event building,!73343Draft: [TrigEgamma] Add photon ringer chains on bootstrap mechanism,!72972Update L1Calo Jet Trigger Efficiency Monitoring algorithm,!72336Fixed TRT calibration crash,!72176Draft: Improving L1TopoOnline chain that now gets no-empty plots. Activating it by default,!72012Draft: Separate JiveXMLConfig.py into Config files,!71876Fix MET trigger name in MissingETMonitoring,!71820Draft: Adding new TLA End-Of-Fill (EOF) chains and removing obsolete DIPZ chains,!71279Draft: ATR-29330: Move L1_4J15 and the HLT chains seeded by it in the MC Menu,!70990Updates to pulse analysis to support new 2016 p+Pb analysis and 2023 Pb+Pb analysis,!70948[TrigEGam] Adding egamma chains to be monitored,!70777Draft: sTGC offline raw monitoring: strip efficiency re-implementation,!70654Update JetMonitoringStandard.py,!70442Draft: Harmonize output folders+collections in ID Alignment monitoring and update DQM han config,!70269Draft: Initial Preparations for mc23e mu-distribution,!70116Fixes for TauAntiTauJetOverlapTool
......@@ -114,6 +114,15 @@ namespace ORUtils
m_decHelper->initializeDecorations(taus);
m_decHelper->initializeDecorations(jets);
// Start by discarding all taus which are not ID or anti-ID
for(const auto tau : taus) {
if(!m_decHelper->isSurvivingObject(*tau)) continue;
if(isSurvivingTau(*tau)) continue;
if(isSurvivingAntiTau(*tau)) continue;
// remove it with trivial overlap with itself
ATH_CHECK( handleOverlap(tau, tau) );
}
// Remove bjets overlapping with ID taus
int ntaus = 0;
for(const auto tau : taus) {
......@@ -134,6 +143,7 @@ namespace ORUtils
if(!m_decHelper->isSurvivingObject(*jet)) continue;
if(!isBJet(*jet)) continue;
for(const auto tau : taus) {
if(!m_decHelper->isSurvivingObject(*jet)) continue;
if(!isSurvivingAntiTau(*tau)) continue;
if(m_dRMatcher->objectsMatch(*tau, *jet)) {
ATH_CHECK( handleOverlap(tau, jet) );
......@@ -145,8 +155,8 @@ namespace ORUtils
int antiTauCategory = 0;
static const SG::AuxElement::ConstAccessor<int> categoryAcc(m_antiTauEventCategoryDecorName);
for(const auto tau : taus) {
if(!m_decHelper->isSurvivingObject(*tau) &&
!isSurvivingAntiTau(*tau) ) continue;
if(!m_decHelper->isSurvivingObject(*tau)) continue;
if(!isSurvivingAntiTau(*tau)) continue;
nantitaus++;
antiTauCategory = categoryAcc(*tau);
}
......@@ -163,20 +173,21 @@ namespace ORUtils
int nSelectedAntitaus = 0;
int idx = 0;
for(const auto tau : taus) {
if(!m_decHelper->isSurvivingObject(*tau) &&
!isSurvivingAntiTau(*tau) ) continue;
if (idx == selIndex && nSelectedAntitaus < nAntiTauMax) nSelectedAntitaus++;
else {
// remove excess anti-taus by applying OR fail (it trivially overlaps with itself)
ATH_CHECK( handleOverlap(tau, tau) );
}
idx++;
if(!m_decHelper->isSurvivingObject(*tau)) continue;
if(!isSurvivingAntiTau(*tau) ) continue;
if (idx == selIndex && nSelectedAntitaus < nAntiTauMax) nSelectedAntitaus++;
else {
// remove excess anti-taus by applying OR fail (it trivially overlaps with itself)
ATH_CHECK( handleOverlap(tau, tau) );
}
idx++;
}
}
// Remove light jets from remaining anti-taus.
for(const auto tau : taus) {
if(!m_decHelper->isSurvivingObject(*tau) &&
!isSurvivingAntiTau(*tau) ) continue;
if(!m_decHelper->isSurvivingObject(*tau)) continue;
if(!isSurvivingAntiTau(*tau)) continue;
// if isSurviving
for(const auto jet : jets) {
if(!m_decHelper->isSurvivingObject(*jet)) continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment