From 39332b853c5f61bfd9002da56c717d35c80b964a Mon Sep 17 00:00:00 2001
From: Arnaud Duperrin <duperrin@cppm.in2p3.fr>
Date: Thu, 22 Jul 2021 08:43:22 +0200
Subject: [PATCH] Comment part of the code to avoid the attempt to retrieve
 nonexistent aux data item SMT_mu_link

---
 .../JetTagValidation/JetTagDQA/scripts/mergePhysValFiles.py   | 4 ++--
 .../JetTagDQA/src/BTaggingValidationPlots.cxx                 | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/scripts/mergePhysValFiles.py b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/scripts/mergePhysValFiles.py
index e2f85a19aadd..f145147ef7c0 100644
--- a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/scripts/mergePhysValFiles.py
+++ b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/scripts/mergePhysValFiles.py
@@ -12,7 +12,7 @@ from __future__ import print_function
 import getopt,os,sys,glob,argparse,ROOT,time
 from ROOT import gDirectory
 
-start = time.clock()
+start = time.process_time()
 
 # define the categories (= sub-folders)
 categories = ['jet',
@@ -271,5 +271,5 @@ if len(errors)>0:
     for phrase in errors:
         print(phrase)
 
-end = time.clock()
+end = time.process_time()
 print("Wall time used: %s sec" % (end - start))
diff --git a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.cxx b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.cxx
index 4c365de47188..9f29e26bfdb7 100644
--- a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/BTaggingValidationPlots.cxx
@@ -873,6 +873,8 @@ namespace JetTagDQA{
 
     // check if there is a muon and store the relative muon pT
     bool has_muon = false;
+    //temporary fix to avoid the validation code to crash (SoftMu is turned off in FTAG code at the moment)
+    /*
     ElementLink<xAOD::MuonContainer> muonLink; 
     // muon link doesn't work on the VR track jets atm (it will be structured differently in r22 anyways. Properly update it later for all collections.)
     if(m_sParticleType != "antiKtVR30Rmax4Rmin02PV0TrackJets"){
@@ -886,6 +888,7 @@ namespace JetTagDQA{
             m_muon_pT_frac->Fill(muon_pT_frac, event->beamSpotWeight());
         }
     }
+    */
     // fill contains_muon for the caller of this function
     contains_muon = has_muon;
   }
-- 
GitLab